/**
 * Header, footer et coque site (templates natifs Châteaux France).
 */

:root {
  --ikn-header-bg: #fff;
  --ikn-header-border: rgba(73, 113, 75, 0.12);
  --ikn-header-text: #2d3b2a;
  --ikn-header-accent: #49714b;
  --ikn-header-max: 1320px;
  --ikn-footer-bg: #ffffff;
  --ikn-footer-text: #324a6d;
  --ikn-footer-heading: #49714b;
  --ikn-footer-bar-bg: #2d3b2a;
  --ikn-footer-bar-text: rgba(255, 255, 255, 0.92);
}

.ikn-site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.ikn-site-main {
  flex: 1 1 auto;
  width: 100%;
}

/* Header */
.ikn-site-header {
  position: sticky;
  top: 0;
  z-index: 10000;
  background: var(--ikn-header-bg);
  border-bottom: 1px solid var(--ikn-header-border);
  box-shadow: 0 4px 18px rgba(45, 59, 42, 0.06);
}

.ikn-site-header__inner {
  max-width: var(--ikn-header-max);
  margin: 0 auto;
  padding: 14px clamp(16px, 3vw, 32px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
}

.ikn-site-header__logo {
  display: block;
  height: auto;
  max-height: 56px;
  width: auto;
  max-width: min(220px, 40vw);
}

.ikn-site-header__toggle {
  display: none;
  border: 0;
  background: transparent;
  padding: 8px;
  cursor: pointer;
}

.ikn-site-header__toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ikn-header-text);
  box-shadow: 0 -7px 0 var(--ikn-header-text), 0 7px 0 var(--ikn-header-text);
}

.ikn-site-header__nav {
  justify-self: center;
}

.ikn-site-menu {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 6px 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ikn-site-menu a {
  color: var(--ikn-header-text);
  text-decoration: none !important;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 2px;
  white-space: nowrap;
}

.ikn-site-menu a:hover,
.ikn-site-menu a:focus-visible,
.ikn-site-menu .current-menu-item > a,
.ikn-site-menu .current-menu-ancestor > a {
  color: var(--ikn-header-accent);
}

/* Sous-menus (dropdown desktop) */
.ikn-site-menu .menu-item {
  position: relative;
  list-style: none;
}

.ikn-site-menu .menu-item-has-children > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ikn-site-menu .menu-item-has-children > a::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.75;
  margin-top: 2px;
}

@media (min-width: 961px) {
  /* Zone invisible entre l’entrée et le sous-menu (évite la fermeture au déplacement de la souris) */
  .ikn-site-header .ikn-site-menu > .menu-item-has-children::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 14px;
    z-index: 10002;
  }
}

.ikn-site-header .ikn-site-menu .sub-menu {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  position: absolute !important;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  margin: 0;
  padding: 8px 0;
  list-style: none !important;
  background: #fff;
  border: 1px solid var(--ikn-header-border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(45, 59, 42, 0.14);
  z-index: 10003;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.ikn-site-menu .sub-menu .menu-item {
  width: 100%;
}

.ikn-site-menu .sub-menu a {
  display: block;
  padding: 10px 16px;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none !important;
}

.ikn-site-menu .sub-menu a:hover,
.ikn-site-menu .sub-menu a:focus-visible {
  background: rgba(139, 169, 129, 0.12);
  color: var(--ikn-header-accent);
}

@media (min-width: 961px) {
  .ikn-site-header .ikn-site-menu > .menu-item-has-children:hover > .sub-menu,
  .ikn-site-header .ikn-site-menu > .menu-item-has-children:focus-within > .sub-menu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transition-delay: 0s;
  }

  .ikn-site-header .ikn-site-menu > .menu-item-has-children > .sub-menu {
    transition-delay: 0.1s;
  }
}

.ikn-site-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: end;
}

.ikn-site-header__cart {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ikn-header-text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--ikn-header-border);
  background: rgba(255, 255, 255, 0.9);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ikn-site-header__cart:hover,
.ikn-site-header__cart:focus-visible {
  color: var(--ikn-header-accent);
  background: rgba(139, 169, 129, 0.12);
  border-color: rgba(73, 113, 75, 0.28);
}

.ikn-site-header__cart-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
}

.ikn-site-header__cart-icon svg {
  display: block;
  width: 20px;
  height: 20px;
}

.ikn-site-header__cart-total {
  line-height: 1;
}

.ikn-site-header__cart-total .woocommerce-Price-amount {
  color: inherit;
}

.ikn-site-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ikn-header-accent);
  color: #fff !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}

.ikn-site-header__cta:hover {
  filter: brightness(1.05);
}

/* Footer */
.ikn-site-footer {
  margin-top: 48px;
  background: var(--ikn-footer-bg);
  color: var(--ikn-footer-text);
}

.ikn-site-footer__main {
  border-top: 1px solid rgba(73, 113, 75, 0.1);
}

.ikn-site-footer__inner {
  max-width: var(--ikn-header-max);
  margin: 0 auto;
  padding: clamp(32px, 4vw, 56px) clamp(16px, 3vw, 32px);
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) repeat(3, minmax(160px, 1fr));
  gap: clamp(24px, 3vw, 40px);
  align-items: start;
}

.ikn-site-footer__col--brand {
  max-width: 26rem;
}

.ikn-site-footer__logo-link {
  display: inline-block;
}

.ikn-site-footer__logo {
  display: block;
  max-width: min(220px, 60%);
  height: auto;
}

.ikn-site-footer__site-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ikn-footer-heading);
}

.ikn-site-footer__tagline {
  margin: 16px 0 0;
  max-width: 28rem;
  font-size: 0.98rem;
  line-height: 1.6;
  color: #4b5a34;
}

.ikn-site-footer__heading {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ikn-footer-heading);
}

.ikn-site-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.ikn-site-footer__links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ikn-footer-text);
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.35;
  transition: color 0.15s ease, transform 0.15s ease;
}

.ikn-site-footer__links a:hover,
.ikn-site-footer__links a:focus-visible {
  color: var(--ikn-footer-heading);
}

.ikn-site-footer__link-arrow {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0.85;
}

.ikn-site-footer__social {
  margin-top: 24px;
}

.ikn-site-footer__social-list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ikn-site-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--ikn-footer-heading);
  background: rgba(73, 113, 75, 0.1);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.ikn-site-footer__social-link svg {
  width: 20px;
  height: 20px;
  display: block;
}

.ikn-site-footer__social-link:hover,
.ikn-site-footer__social-link:focus-visible {
  color: #fff;
  background: var(--ikn-footer-heading);
  transform: translateY(-1px);
}

.ikn-site-footer__bar {
  background: var(--ikn-footer-bar-bg);
  color: var(--ikn-footer-bar-text);
}

.ikn-site-footer__bar-inner {
  max-width: var(--ikn-header-max);
  margin: 0 auto;
  padding: 12px clamp(16px, 3vw, 32px);
}

.ikn-site-footer__copy {
  margin: 0;
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.6;
}

.ikn-site-footer__bar-links {
  display: inline;
}

.ikn-site-footer__bar-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}

.ikn-site-footer__bar-links a:hover,
.ikn-site-footer__bar-links a:focus-visible {
  text-decoration: underline;
}

.ikn-site-footer__bar-sep {
  margin: 0 8px;
  opacity: 0.55;
}

@media (max-width: 960px) {
  .ikn-site-footer__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ikn-site-footer__col--brand {
    grid-column: 1 / -1;
    max-width: none;
    text-align: center;
  }

  .ikn-site-footer__logo-link {
    margin: 0 auto;
  }

  .ikn-site-footer__tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .ikn-site-footer__social-list {
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .ikn-site-footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .ikn-site-footer__links a {
    justify-content: center;
  }

  .ikn-site-footer__bar-links {
    display: block;
    margin-top: 6px;
  }

  .ikn-site-footer__bar-sep {
    display: none;
  }

  .ikn-site-footer__bar-links a {
    display: inline-block;
    margin: 0 6px;
  }
}

/* Contenu générique */
.ikn-content-entry {
  max-width: var(--ikn-header-max);
  margin: 0 auto;
  padding: 24px clamp(16px, 3vw, 32px) 48px;
}

@media (max-width: 960px) {
  .ikn-site-header__inner {
    grid-template-columns: 1fr auto auto;
  }

  .ikn-site-header__toggle {
    display: inline-flex;
  }

  .ikn-site-header__nav {
    grid-column: 1 / -1;
    display: none;
  }

  .ikn-site-header.is-nav-open .ikn-site-header__nav {
    display: block;
  }

  .ikn-site-menu {
    flex-direction: column;
    align-items: stretch;
    padding-top: 8px;
    gap: 0;
  }

  .ikn-site-menu .menu-item-has-children > a::after {
    margin-left: auto;
    transform: rotate(0deg);
    transition: transform 0.2s ease;
  }

  .ikn-site-menu .menu-item-has-children.is-submenu-open > a::after {
    transform: rotate(180deg);
  }

  .ikn-site-menu .sub-menu {
    position: static !important;
    transform: none;
    display: none !important;
    min-width: 0;
    margin: 4px 0 8px 12px;
    padding: 4px 0;
    border: 0;
    border-left: 2px solid rgba(139, 169, 129, 0.35);
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  .ikn-site-menu .menu-item-has-children.is-submenu-open > .sub-menu {
    display: block !important;
  }

  .ikn-site-menu .sub-menu a {
    padding: 8px 12px;
    white-space: normal;
  }

  .ikn-site-header__actions {
    justify-self: end;
  }
}
