/* ==========================================================================
   LÉA VASSEUR — Mise en page : conteneurs, sections, header, footer
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Conteneurs
   -------------------------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}

.shell--narrow { max-width: var(--shell-narrow); }
.shell--wide { max-width: var(--shell-wide); }

/* --------------------------------------------------------------------------
   2. Sections
   -------------------------------------------------------------------------- */

.section {
  padding-block: var(--section-y);
}

.section--sm { padding-block: var(--section-y-sm); }
.section--flush-top { padding-top: 0; }
.section--flush-bottom { padding-bottom: 0; }

.section--tinted {
  background: var(--c-sable);
}

.section--dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--c-ivoire);
}

/* --------------------------------------------------------------------------
   3. En-têtes de section (surtitre + titre + chapô)
   -------------------------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--c-ocre-dark);
  line-height: 1;
}

.eyebrow::before {
  content: "";
  width: 2.25rem;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
  flex: none;
}

.section--dark .eyebrow { color: var(--c-ocre); }

.section-head--center .eyebrow::after {
  content: "";
  width: 2.25rem;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
  flex: none;
}

.section-head {
  max-width: 42rem;
  margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}

.section-head > * + * { margin-top: var(--sp-5); }

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head--center .eyebrow { justify-content: center; }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 42ch;
}

.section-head--center .lead { margin-inline: auto; }
.section--dark .lead { color: var(--text-on-dark-muted); }

/* --------------------------------------------------------------------------
   3 bis. Bandeau « modèle de démonstration »
   Marque le site comme une maquette d'agence. Il coiffe le header : tout le
   reste de la page est décalé de --banner-h. Pour le retirer, supprimer le
   bloc <!-- demo-banner:start --> de chaque page et mettre --banner-h à 0px
   (ou lancer `node tools/rebrand.js` avec "retirerMentionDemo": true).
   -------------------------------------------------------------------------- */

.demo-banner {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: calc(var(--z-menu) + 10);
  height: var(--banner-h);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--c-ocre);
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(51, 32, 58, 0.12) 0 10px,
    transparent 10px 20px
  );
  color: var(--c-aubergine-3);
  padding-inline: var(--sp-4);
}

.demo-banner__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-width: 0;
}

.demo-banner__badge {
  flex: none;
  padding: 0.28em 0.7em;
  border: 1px solid rgba(51, 32, 58, 0.55);
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  text-transform: uppercase;
  line-height: 1.4;
}

.demo-banner__sep {
  flex: none;
  opacity: 0.55;
}

.demo-banner__text {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-banner__long { display: none; }

@media (min-width: 600px) {
  .demo-banner__long { display: inline; }
  .demo-banner__text { letter-spacing: 0.18em; }
}

@media (min-width: 768px) {
  .demo-banner__badge,
  .demo-banner__text { font-size: 0.6875rem; }
  .demo-banner__inner { gap: var(--sp-4); }
}

/* --------------------------------------------------------------------------
   4. Header
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  top: var(--banner-h);
  right: 0;
  left: 0;
  z-index: var(--z-header);
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              height var(--dur) var(--ease-out);
}

/* Fond appliqué au scroll, ou d'emblée sur les pages sans hero sombre */
.site-header.is-scrolled,
.site-header.is-solid {
  background: rgba(248, 241, 228, 0.92);
  border-bottom-color: var(--border-light);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

@media (min-width: 768px) {
  .site-header.is-scrolled { height: 76px; }
}

.site-header__inner {
  width: 100%;
  max-width: var(--shell-wide);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
}

/* --- Logo --- */

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  line-height: 1;
  color: var(--c-aubergine);
  flex: none;
}

/* Sur un hero sombre, le header reste transparent : le logo doit rester lisible */
.site-header:not(.is-scrolled):not(.is-solid) .brand {
  color: var(--c-ivoire);
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  font-style: italic;
}

.brand__tag {
  font-size: 0.5625rem;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  text-transform: uppercase;
  color: var(--c-ocre-dark);
  opacity: 0.95;
}

.site-header:not(.is-scrolled):not(.is-solid) .brand__tag {
  color: var(--c-ocre-soft);
}

@media (min-width: 768px) {
  .brand__name { font-size: 1.65rem; }
  .brand__tag { font-size: 0.625rem; }
}

/* --- Navigation principale (desktop) --- */

.nav {
  display: none;
}

@media (min-width: 1024px) {
  .nav {
    display: flex;
    align-items: center;
    gap: clamp(1.5rem, 0.5rem + 1.8vw, 2.5rem);
  }
}

.nav__link {
  position: relative;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: var(--ls-nav);
  color: var(--text-main);
  padding-block: var(--sp-2);
  transition: color var(--dur-fast) var(--ease-out);
}

.site-header:not(.is-scrolled):not(.is-solid) .nav__link {
  color: rgba(255, 255, 255, 0.88);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--c-ocre);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease-out);
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--c-ocre-dark);
}

.site-header:not(.is-scrolled):not(.is-solid) .nav__link:hover,
.site-header:not(.is-scrolled):not(.is-solid) .nav__link:focus-visible {
  color: var(--c-ivoire);
}

.nav__link:hover::after,
.nav__link:focus-visible::after {
  transform: scaleX(1);
}

.nav__link[aria-current="page"] {
  color: var(--c-ocre-dark);
}

.site-header:not(.is-scrolled):not(.is-solid) .nav__link[aria-current="page"] {
  color: var(--c-ivoire);
}

.nav__link[aria-current="page"]::after {
  transform: scaleX(1);
}

/* --- Actions à droite --- */

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  flex: none;
}

.header-actions .btn {
  display: none;
}

@media (min-width: 1024px) {
  .header-actions .btn { display: inline-flex; }
}

/* --- Bouton burger --- */

.burger {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-right: -10px;
  flex: none;
}

@media (min-width: 1024px) {
  .burger { display: none; }
}

.burger__box {
  position: relative;
  width: 26px;
  height: 12px;
}

.burger__bar {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--c-aubergine);
  transition: transform var(--dur) var(--ease-out),
              opacity var(--dur-fast) var(--ease-out),
              width var(--dur) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out);
}

.site-header:not(.is-scrolled):not(.is-solid) .burger__bar {
  background: var(--c-ivoire);
}

.burger__bar:nth-child(1) { top: 0; }
.burger__bar:nth-child(2) { bottom: 0; width: 60%; }

.burger[aria-expanded="true"] .burger__bar:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.burger[aria-expanded="true"] .burger__bar:nth-child(2) {
  width: 100%;
  transform: translateY(-5px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   5. Menu mobile (panneau plein écran)
   -------------------------------------------------------------------------- */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  background: var(--c-aubergine-3);
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--banner-h) + var(--header-h));
  opacity: 0;
  visibility: hidden;
  transform: translateY(-1.5rem);
  transition: opacity var(--dur) var(--ease-out),
              transform var(--dur) var(--ease-out),
              visibility var(--dur);
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (min-width: 1024px) {
  .mobile-menu { display: none; }
}

.mobile-menu__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--sp-6);
  padding: var(--sp-8) var(--shell-pad);
  overflow-y: auto;
}

.mobile-menu__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.mobile-menu__link {
  display: flex;
  align-items: baseline;
  gap: var(--sp-4);
  padding-block: var(--sp-3);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.9rem, 1.2rem + 3.5vw, 2.75rem);
  color: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border-dark);
  transition: color var(--dur-fast) var(--ease-out),
              padding-left var(--dur) var(--ease-out);
}

.mobile-menu__link:hover,
.mobile-menu__link[aria-current="page"] {
  color: var(--c-ocre-soft);
  padding-left: var(--sp-3);
}

.mobile-menu__link .idx {
  font-family: var(--font-body);
  font-style: normal;
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  color: var(--c-ocre);
  opacity: 0.75;
}

.mobile-menu__list li {
  opacity: 0;
  transform: translateY(0.75rem);
  transition: opacity var(--dur) var(--ease-out),
              transform var(--dur) var(--ease-out);
}

.mobile-menu.is-open .mobile-menu__list li {
  opacity: 1;
  transform: none;
  transition-delay: calc(90ms + var(--i, 0) * 55ms);
}

.mobile-menu__foot {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border-dark);
  color: var(--text-on-dark-muted);
  font-size: var(--fs-sm);
}

/* --------------------------------------------------------------------------
   6. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--c-aubergine-3);
  color: var(--text-on-dark-muted);
  padding-top: var(--section-y-sm);
  font-size: var(--fs-sm);
}

.footer-grid {
  display: grid;
  gap: var(--sp-9) var(--gutter);
  padding-bottom: var(--sp-9);
  border-bottom: 1px solid var(--border-dark);
}

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
    gap: var(--gutter);
  }
}

.footer-col__title {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--c-ocre);
  margin-bottom: var(--sp-5);
}

.footer-col ul { display: grid; gap: var(--sp-3); }

.footer-col a {
  transition: color var(--dur-fast) var(--ease-out);
}

.footer-col a:hover { color: var(--c-ivoire); }

.footer-brand .brand { margin-bottom: var(--sp-5); }
.footer-brand .brand,
.footer-brand .brand__name { color: var(--c-ivoire); }
.footer-brand .brand__tag { color: var(--c-ocre-soft); }

.footer-brand p {
  max-width: 32ch;
  line-height: 1.7;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding-block: var(--sp-6);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  color: var(--c-mauve-soft);
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer-bottom nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-5);
}

/* Mention « contenus fictifs » — discrète, à supprimer lors de la mise en
   production pour un vrai coach. */
.demo-note {
  display: block;
  margin-top: var(--sp-2);
  color: var(--c-ocre);
  opacity: 0.8;
}

@media (min-width: 768px) {
  .demo-note { display: inline; margin-top: 0; margin-left: var(--sp-2); }
}

.footer-bottom a:hover { color: var(--c-ocre-soft); }

/* --------------------------------------------------------------------------
   7. Grilles utilitaires
   -------------------------------------------------------------------------- */

.grid { display: grid; gap: var(--gutter); }

@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 700px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1200px) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* Deux colonnes texte / image, inversables, avec léger décalage éditorial */
.split {
  display: grid;
  gap: clamp(2.5rem, 1.5rem + 4vw, 5rem);
  align-items: center;
}

@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--wide-left { grid-template-columns: 1.15fr 0.85fr; }
  .split--wide-right { grid-template-columns: 0.85fr 1.15fr; }
  .split--reverse > *:first-child { order: 2; }
}

.split__body > * + * { margin-top: var(--sp-5); }

/* --------------------------------------------------------------------------
   8. Utilitaires
   -------------------------------------------------------------------------- */

.stack > * + * { margin-top: var(--sp-5); }
.stack-sm > * + * { margin-top: var(--sp-3); }
.stack-lg > * + * { margin-top: var(--sp-7); }

.text-center { text-align: center; }
.text-ocre { color: var(--c-ocre-dark); }
.section--dark .text-ocre { color: var(--c-ocre); }

.muted { color: var(--text-muted); }
.section--dark .muted { color: var(--text-on-dark-muted); }

.rule {
  height: 1px;
  background: var(--border-light);
  border: 0;
}

.section--dark .rule { background: var(--border-dark); }
