/*
 * global.css — éléments communs à toutes les pages du site.
 * Regroupe la navigation (header, template-parts/global/navigation.php)
 * et le pied de page (footer/contact, template-parts/global/footer-contact.php).
 * Utilisé par l'accueil et par toutes les pages futures (Crêperie, Produits...).
 */

/* ===== NAVIGATION ===== */


.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: var(--color-base);
  color: var(--color-ink);
  border-bottom: 1px solid rgb(17 47 31 / 45%);
}
.site-nav {
  display: flex;
  width: min(100%, 1500px);
  min-height: 5.25rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 3.4vw, 3.25rem);
  align-items: stretch;
  justify-content: space-between;
  gap: 2rem;
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
  font-family: var(--font-title);
  font-size: clamp(1.25rem, 1.55vw, 1.65rem);
  line-height: 1;
  text-decoration: none;
}
.site-brand-logo {
  height: 2rem;
  width: auto;
}
.desktop-nav {
  display: none;
  align-items: stretch;
  gap: clamp(0.15rem, 0.65vw, 0.75rem);
}
.desktop-nav > a,
.desktop-nav summary {
  position: relative;
  display: inline-flex;
  min-height: 3rem;
  padding-inline: clamp(0.65rem, 0.9vw, 1rem);
  align-items: center;
  gap: 0.45rem;
  color: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}
.desktop-nav > a::after,
.desktop-nav summary::after {
  position: absolute;
  right: 0.75rem;
  bottom: 1.05rem;
  left: 0.75rem;
  height: 2px;
  background: var(--color-accent);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease-out;
}
/* Le soulignement reste affiché sur la page courante (aria-current), comme
   dans les maquettes : le visiteur voit où il est. */
.desktop-nav > a:hover::after,
.desktop-nav > a:focus-visible::after,
.desktop-nav > a[aria-current="page"]::after,
.desktop-nav details[open] summary::after {
  transform: scaleX(1);
}
.desktop-nav details {
  position: relative;
  display: flex;
}
.desktop-nav summary {
  height: 100%;
  list-style: none;
}
.desktop-nav summary::-webkit-details-marker { display: none; }
.nav-chevron {
  width: 0.8rem;
  height: 0.8rem;
  transition: transform 180ms ease-out;
}
.desktop-nav details[open] .nav-chevron { transform: rotate(180deg); }
.desktop-submenu {
  position: absolute;
  top: calc(100% - 0.35rem);
  right: 0;
  width: 14.5rem;
  padding: 0.65rem;
  background: var(--color-cream);
  border: 2px solid var(--color-ink);
}
.desktop-submenu a {
  display: flex;
  padding: 0.85rem 1rem;
  align-items: center;
  justify-content: space-between;
  color: var(--color-ink);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 160ms ease-out, color 160ms ease-out;
}
.desktop-submenu a::after { content: "→"; }
.desktop-phone {
  display: none;
  align-items: center;
  gap: 0.5rem;
  justify-self: end;
  color: var(--color-ink);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  white-space: nowrap;
}
.desktop-phone svg {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
}
.mobile-menu-trigger {
  display: inline-flex;
  width: 3rem;
  min-width: 3rem;
  margin-block: 0.9rem;
  padding-inline: 0;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--color-ink);
  border: 0;
  border-radius: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.mobile-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.mobile-phone-link {
  display: inline-flex;
  width: 3rem;
  height: 3rem;
  align-items: center;
  justify-content: center;
  color: var(--color-ink);
  text-decoration: none;
}
.mobile-phone-link svg {
  width: 1.45rem;
  height: 1.45rem;
}
.menu-lines,
.menu-lines::before,
.menu-lines::after {
  display: block;
  width: 1.5rem;
  height: 2px;
  background: currentColor;
  content: "";
}
.menu-lines { position: relative; }
.menu-lines::before { position: absolute; top: -0.36rem; }
.menu-lines::after { position: absolute; top: 0.36rem; }
.mobile-menu {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  background: var(--color-ink);
  color: var(--color-base);
  border: 0;
}
.mobile-menu::backdrop { background: rgb(17 47 31 / 48%); }
.mobile-menu[open] { animation: menu-in 240ms cubic-bezier(.22, 1, .36, 1); }
.mobile-menu-inner {
  display: flex;
  min-height: 100%;
  padding: 1.25rem clamp(1.25rem, 6vw, 2rem) 2rem;
  flex-direction: column;
}
.mobile-menu-head {
  display: flex;
  min-height: 3.75rem;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgb(236 230 218 / 30%);
}
.mobile-menu-brand {
  font-family: var(--font-title);
  font-size: 1.45rem;
}
.mobile-menu-close {
  display: inline-flex;
  min-height: 2.75rem;
  padding-inline: 0.9rem;
  align-items: center;
  gap: 0.55rem;
  color: inherit;
  background: transparent;
  border: 1px solid rgb(236 230 218 / 60%);
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.mobile-menu-nav {
  display: flex;
  padding-block: clamp(2.25rem, 8vh, 4.5rem);
  flex-direction: column;
}
.mobile-menu-nav > a,
.mobile-menu-nav summary {
  display: flex;
  width: 100%;
  padding-block: 0.65rem;
  align-items: center;
  justify-content: space-between;
  color: inherit;
  font-family: var(--font-title);
  font-size: clamp(1.9rem, 9vw, 3rem);
  line-height: 1.18;
  list-style: none;
  text-decoration: none;
  cursor: pointer;
}
.mobile-menu-nav > a::after {
  color: var(--color-accent);
  content: "→";
  font-family: sans-serif;
  font-size: 1.35rem;
}
.mobile-menu-nav summary::-webkit-details-marker { display: none; }
.mobile-menu-nav summary .nav-chevron {
  width: 1.25rem;
  height: 1.25rem;
}
.mobile-menu-nav details[open] .nav-chevron { transform: rotate(180deg); }
.mobile-submenu {
  display: flex;
  padding: 0.35rem 0 1rem 1rem;
  flex-direction: column;
  border-left: 2px solid var(--color-accent);
}
.mobile-submenu a {
  padding: 0.55rem 0.75rem;
  color: var(--color-base);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}
.mobile-contact {
  display: flex;
  min-height: 3.75rem;
  margin-top: auto;
  padding-inline: 1.25rem;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  color: var(--color-base);
  border: 1px solid rgb(236 230 218 / 60%);
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-brand:focus-visible,
.desktop-nav a:focus-visible,
.desktop-nav summary:focus-visible,
.desktop-phone:focus-visible,
.mobile-menu-trigger:focus-visible,
.mobile-phone-link:focus-visible,
.mobile-menu-close:focus-visible,
.mobile-menu-nav a:focus-visible,
.mobile-menu-nav summary:focus-visible,
.mobile-contact:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

@keyframes menu-in {
  from { opacity: 0; transform: translate3d(0, -1rem, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@media (min-width: 1100px) {
  .site-nav {
    display: grid;
    grid-template-columns: minmax(10rem, 1fr) auto minmax(10rem, 1fr);
    align-items: stretch;
  }
  .desktop-nav { display: flex; }
  .desktop-phone { display: inline-flex; }
  .mobile-nav-actions { display: none; }
}

@media (hover: hover) and (pointer: fine) {
  .desktop-submenu a:hover,
  .desktop-submenu a:focus-visible {
    background: var(--color-ink);
    color: var(--color-cream);
  }
  .mobile-contact:hover,
  .mobile-contact:focus-visible {
    background: var(--color-base);
    color: var(--color-ink);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-menu[open] { animation: none; }
  .nav-chevron,
  .desktop-nav > a::after,
  .desktop-nav summary::after,
  .desktop-submenu a {
    transition: none !important;
  }
}

/* ===== CURSEUR PERSONNALISÉ (desktop uniquement) ===== */

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  display: flex;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  background-color: var(--color-accent);
  border-radius: 999px;
  opacity: 0;
  transform: translate3d(var(--cursor-x, 0), var(--cursor-y, 0), 0) translate(-50%, -50%) scale(0.6);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
  will-change: transform, opacity;
}
.custom-cursor svg {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--color-cream);
}
/* Le curseur custom n'apparaît QUE pendant le survol d'un élément cliquable.
   Le curseur système normal reste actif partout ailleurs (pas de cursor:none
   global — seulement sur les éléments cliquables, une fois survolés). */
.custom-cursor.is-hover {
  opacity: 1;
  transform: translate3d(var(--cursor-x, 0), var(--cursor-y, 0), 0) translate(-50%, -50%) scale(1);
}

@media (hover: none), (pointer: coarse) {
  .custom-cursor { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .custom-cursor { transition: opacity 0.15s ease; }
}

@media (hover: hover) and (pointer: fine) {
  html.has-custom-cursor .activity-card:hover {
    cursor: none;
  }
}

/* ===== FOOTER / CONTACT ===== */


.site-footer {
  position: relative;
  overflow: hidden;
  padding: 5rem clamp(1.5rem, 4vw, 3rem) 2.5rem;
  background-color: var(--color-base);
  color: var(--color-ink);
}
@media (min-width: 768px) {
  .site-footer { padding-top: 6rem; }
}

.footer-top {
  position: relative;
  z-index: 10;
  display: grid;
  max-width: 1400px;
  margin-inline: auto;
  margin-bottom: 4rem;
  padding-bottom: 4rem;
  gap: 3rem;
  border-bottom: 2px solid rgba(17, 47, 31, 0.2);
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) {
  .footer-top { grid-template-columns: repeat(12, 1fr); gap: 4rem; }
  .footer-brand-col { grid-column: span 6; }
  .footer-info-cols { grid-column: span 6; }
}

.footer-title {
  margin: 0 0 2rem;
  font-family: var(--font-title);
  font-size: 4.5rem; /* text-7xl */
  line-height: 0.85;
}
@media (min-width: 768px) {
  .footer-title { font-size: 96px; }
}
.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-info-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem; /* gap-16 */
  padding-top: 1rem;
}
@media (min-width: 768px) {
  .footer-info-cols {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem; /* md:gap-8 */
  }
}
.footer-info-block {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.footer-info-heading {
  margin: 0;
  color: var(--color-accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.footer-info-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.footer-info-row svg { opacity: 0.5; margin-top: 0.25rem; flex: 0 0 auto; }
.footer-info-text {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1.6;
}

.footer-bottom {
  position: relative;
  z-index: 10;
  display: flex;
  max-width: 1400px;
  margin-inline: auto;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.5;
}
@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; }
}
.footer-legal-links {
  display: flex;
  gap: 2rem;
}
.footer-legal-links a {
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-legal-links a:hover { color: var(--color-accent); }

.footer-watermark {
  position: absolute;
  bottom: -2.5rem;
  left: 0;
  z-index: 0;
  font-family: var(--font-title);
  font-size: 20vw;
  line-height: 1;
  white-space: nowrap;
  text-transform: uppercase;
  color: rgba(17, 47, 31, 0.03);
  pointer-events: none;
}

/* ===== BANNIÈRE DE PAGE =====
   Composant partagé (template-parts/components/page-banner.php), utilisé par
   les pages Crêperie et Produits. La photo est réutilisée en forme arrondie
   (desktop) et en bandeau (mobile). Les pages n'ajustent que la taille du
   titre, dans leur propre feuille. */

.page-banner {
  position: relative;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  padding: clamp(3.5rem, 7vw, 5.5rem) clamp(1.5rem, 4vw, 3rem) clamp(3rem, 6vw, 4.5rem);
  background-color: var(--color-base);
}
.page-banner-shape {
  position: absolute;
  top: -4%;
  bottom: 0;
  right: calc(50% - 50vw);
  left: 42%;
  z-index: 0;
  overflow: hidden;
  border-radius: 0 0 0 999px;
  display: none;
}
.page-banner-mobile-shape {
  display: block;
  margin: calc(-1 * clamp(3.5rem, 7vw, 5.5rem)) calc(-1 * clamp(1.5rem, 4vw, 3rem)) 1.75rem;
  height: clamp(13rem, 62vw, 19rem);
  overflow: hidden;
  border-radius: 0 0 55% 45% / 0 0 100% 35%;
}
.page-banner-media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.page-banner-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 4vw, 3rem);
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
}
.page-banner-eyebrow {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--color-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.page-banner-title {
  max-width: 12ch;
  margin: 0 0 1.5rem;
  color: var(--color-ink);
  font-family: var(--font-title);
  font-size: clamp(3.5rem, 7.5vw, 6.5rem);
  line-height: 0.9;
  text-wrap: balance;
}
/* Paragraphe optionnel sous le titre (Contact, Les Mômes...) : les pages qui
   ne le passent pas au composant n'ont simplement pas cette règle en jeu. */
.page-banner-lead {
  max-width: 38ch;
  margin: 0;
  color: rgba(17, 47, 31, 0.75);
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  font-weight: 300;
  line-height: 1.65;
  text-wrap: pretty;
}
@media (min-width: 960px) {
  .page-banner-inner {
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
    min-height: clamp(24rem, 32vw, 32rem);
  }
  .page-banner-shape { display: block; }
  .page-banner-mobile-shape { display: none; }
}
