/* ============================================
   lawandeconomics — Helvetica, sobre, design
   ============================================ */

   :root {
    --bg: #f1efe9;
    --bg-paper: #f6f4ee;
    --ink: #0a0a0a;
    --ink-2: #2a2a2a;
    --ink-muted: #8a857a;
    --ink-faint: #c4bfb3;
    --line: rgba(10, 10, 10, 0.14);
    --line-strong: rgba(10, 10, 10, 0.42);
    --white-line: rgba(255, 255, 255, 0.42);
    --white-line-soft: rgba(255, 255, 255, 0.22);
    --hero-bg: #161310;
  
    --gutter: clamp(20px, 3.5vw, 48px);
    --sidebar-w: 320px;
    --max-content: 1100px;
  
    --font-sans: "Helvetica Neue", "Helvetica", "Inter", system-ui, -apple-system,
      BlinkMacSystemFont, "Arial", sans-serif;
    --font-serif: "Times New Roman", "Times", "Georgia", serif;
  
    --easing: cubic-bezier(0.7, 0, 0.2, 1);
  
  }
  
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html, body { background: var(--bg); color: var(--ink); }
  body {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
  }
  img, svg { display: block; max-width: 100%; }
  a { color: inherit; text-decoration: none; }
  button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
  ul { list-style: none; }
  
  /* ============================================
     HERO — image plein écran
     ============================================ */
  
  .hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
  }
  
  .hero-bg {
    position: absolute;
    inset: 0;
    background-color: var(--hero-bg);
    background-image: url('hero-swiss.webp');
    background-size: cover;
    background-position: center;
  }

  .hero-veil {
    position: absolute;
    inset: 0;
    background: rgba(6, 4, 2, 0.48);
    pointer-events: none;
  }
  
  /* ============================================
     CADRE central (visible uniquement en état hero)
     ============================================ */
  
  .brand-frame {
    position: fixed;
    top: 49vh;
    left: 50vw;
    width: clamp(360px, 42vw, 400px);
    height: clamp(360px, 50vh, 480px);
    transform: translate(-50%, -50%);
    border: 1px solid var(--white-line);
    pointer-events: none;
    z-index: 20;
    opacity: 1;
    transition: opacity 0.5s ease;
  }
  body.is-morphed .brand-frame { opacity: 0; }

  /* ============================================
     TITRE — centré → top-left (state-driven)
     ============================================ */

  .brand-title-mount {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    transform: translate(calc(50vw - 160px), calc(43vh - 150px)) scale(1);
    transform-origin: top left;
    z-index: 40;
    pointer-events: none;
    color: #fff;
    transition: transform 0.85s cubic-bezier(0.7, 0, 0.2, 1), color 0.5s ease;
    will-change: transform;
  }

  body.is-morphed .brand-title-mount {
    transform: translate(40px, 40px) scale(0.56);
  }

  .brand-title {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 42px;
    line-height: 1.0;
    letter-spacing: -0.025em;
    white-space: nowrap;
  }

  .brand-italic {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.01em;
  }

  .brand-ch {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    font-size: 0.64em;
    letter-spacing: 0.01em;
    opacity: 0.65;
    vertical-align: 0.08em;
  }

  /* ============================================
     PLAN / TOC — centré → bottom-left (state-driven)
     ============================================ */

  .brand-toc-mount {
    position: fixed;
    top: 0;
    left: 0;
    width: 333px;
    transform: translate(calc(50vw - 160px), calc(43vh - 30px)) scale(1);
    transform-origin: bottom left;
    z-index: 40;
    pointer-events: auto;
    color: #fff;
    transition: transform 0.85s cubic-bezier(0.7, 0, 0.2, 1), width 0.85s cubic-bezier(0.7, 0, 0.2, 1), color 0.5s ease;
    will-change: transform;
  }

  body.is-morphed .brand-toc-mount {
    /* translate(40px, 100vh-40px-100%) positionne le coin bas-gauche à (40px, 100vh-40px) */
    transform: translate(40px, calc(100vh - 40px - 100%)) scale(0.82);
    width: 280px;
  }


  .brand-tagline {
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 18px;
    letter-spacing: 0.01em;
  }

  .toc-list {
    display: flex;
    flex-direction: column;
    font-size: 19px;
    line-height: 1.25;
    letter-spacing: -0.01em;
  }

  .toc-item { padding-bottom: 2px; }

  .toc-head {
    display: flex;
    align-items: flex-end;
    gap: 0;
    cursor: pointer;
    transition: opacity 0.25s ease;
    padding-bottom: 1px;
  }

  .toc-name {
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    padding-bottom: 3px;
  }

  .toc-dots {
    flex: 1;
    min-width: 10px;
    margin: 0 8px 6px;
    height: 1px;
    background: repeating-linear-gradient(to right, currentColor 0, currentColor 2px, transparent 2px, transparent 7px);
    opacity: 0;
    clip-path: inset(0 100% 0 0);
  }

  .toc-item.is-active .toc-dots {
    opacity: 0.5;
    clip-path: inset(0 0 0 0);
    transition: opacity 0.3s ease, clip-path 0.45s ease;
  }

  .toc-head:hover .toc-dots {
    animation: dotsReveal 0.45s ease forwards;
  }

  @keyframes dotsReveal {
    from { opacity: 0;    clip-path: inset(0 100% 0 0); }
    to   { opacity: 0.38; clip-path: inset(0 0 0 0); }
  }

  .toc-num {
    flex-shrink: 0;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.04em;
    font-family: var(--font-serif);
    font-style: italic;
    opacity: 0.65;
    padding: 0 6px 4px 0;
  }

  .toc-item.is-faded .toc-head { opacity: 0.35; }
  .toc-item:hover .toc-head    { opacity: 1; }
  .toc-item.is-active .toc-head { opacity: 1; }

  /* Sous-domaines (accordéon, uniquement sous l'item actif) */
  .toc-sublist {
    max-height: 0;
    overflow: hidden;
    margin: 0;
    padding-left: 0;
    transition: max-height 0.45s var(--easing), margin 0.45s var(--easing);
  }

  .toc-item.is-active .toc-sublist {
    max-height: 500px;
    margin: 8px 0 12px 0;
  }

  .toc-subitem {
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-size: 16px;
    line-height: 1.4;
    padding: 5px 0;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    letter-spacing: -0.005em;
    font-weight: 700;
  }

  .toc-subitem:hover { opacity: 0.85; }

  .toc-subitem.is-active { opacity: 1; }

  .toc-sub-num {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 13px;
    opacity: 0.75;
    min-width: 30px;
  }

  .toc-sub-name { flex: 1; }

  .brand-footer {
    margin-top: 24px;
  }

  .brand-footer-name {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.4;
  }

  .brand-footer-ch {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
  }

  .brand-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 6px;
    font-size: 14px;
    letter-spacing: 0.02em;
    opacity: 0.65;
    margin-top: 2px;
  }

  .brand-footer-dot { opacity: 0.5; }

  /* ============================================
     ÉTATS — clair / sombre selon arrière-plan
     ============================================ */

  /* Titre : bascule sombre quand le hero est presque sorti (0.85vh) */
  body.on-light-title .brand-title-mount { color: var(--ink); }
  /* TOC : bascule sombre plus tôt, le contenu clair arrive derrière tôt (0.25vh) */
  body.on-light-toc .brand-toc-mount { color: var(--ink); }

  /* ============================================
     MODE SOMBRE — variables
     ============================================ */

  body.dark {
    --bg: #0e0c0a;
    --bg-paper: #161310;
    --ink: #f0ede6;
    --ink-2: #c8c3bc;
    --ink-muted: #6a6560;
    --ink-faint: #2e2a26;
    --line: rgba(240, 237, 230, 0.09);
    --line-strong: rgba(240, 237, 230, 0.32);
  }

  /* ============================================
     TOGGLE THÈME
     ============================================ */

  .lang-toggle {
    position: fixed;
    top: 20px;
    right: 62px;
    z-index: 50;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--ink);
    opacity: 0;
    pointer-events: none;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    transition: opacity 0.4s ease, background 0.2s ease;
  }

  body.past-hero .lang-toggle {
    opacity: 1;
    pointer-events: auto;
  }

  .lang-toggle:hover { background: rgba(128,128,128,0.12); }
  .lang-toggle:active { transform: scale(0.88); }

  .theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 50;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--ink);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, background 0.2s ease;
  }

  body.past-hero .theme-toggle {
    opacity: 1;
    pointer-events: auto;
  }

  .theme-toggle:hover { background: rgba(128,128,128,0.12); }
  .theme-toggle:active { transform: scale(0.88); }

  /* ---- Icône thème : 3 états ---- */
  .ti-auto, .ti-light, .ti-dark { opacity: 0; transition: opacity 0.25s ease; }
  body.theme-auto  .ti-auto  { opacity: 1; }
  body.theme-light .ti-light { opacity: 1; }
  body.theme-dark  .ti-dark  { opacity: 1; }

  /* ============================================
     BOUTON LÉGAL
     ============================================ */

  .legal-btn {
    cursor: pointer;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
  }
  .legal-btn:hover { border-bottom-color: currentColor; }

  /* ============================================
     MODAL LÉGAL
     ============================================ */

  .legal-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  body.legal-open .legal-modal {
    pointer-events: auto;
    opacity: 1;
  }
  body.legal-open { overflow: hidden; }

  .legal-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .legal-modal-panel {
    position: relative;
    z-index: 1;
    background: var(--bg-paper);
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 600px;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -4px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(32px);
    transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1);
  }
  body.legal-open .legal-modal-panel { transform: translateY(0); }

  .legal-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: var(--ink-faint);
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
  }
  .legal-modal-close:hover { background: var(--ink-muted); color: var(--bg); }
  .legal-modal-close:active { transform: scale(0.88); }

  .legal-modal-scroll {
    overflow-y: auto;
    padding: 36px 32px 44px;
    overscroll-behavior: contain;
  }

  .legal-modal-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 24px;
    padding-right: 28px;
  }

  .legal-section {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--line);
  }
  .legal-section--last { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

  .legal-badge {
    display: inline-flex;
    align-items: center;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bg);
    background: var(--ink);
    border-radius: 4px;
    padding: 3px 7px;
    margin-bottom: 10px;
    opacity: 0.75;
  }

  .legal-section-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 7px;
  }

  .legal-body {
    font-size: 13px;
    line-height: 1.7;
    color: var(--ink-2);
  }

  @media (min-width: 768px) {
    .legal-modal { align-items: center; }
    .legal-modal-panel {
      border-radius: 16px;
      max-height: 78vh;
    }
  }
  
  /* ============================================
     SCROLL HINT
     ============================================ */
  
  .scroll-hint {
    position: fixed;
    bottom: 36px;
    right: 36px;
    z-index: 35;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #fff;
    opacity: 1;
    pointer-events: none;
    transition: opacity 0.4s ease, color 0.5s ease;
  }
  body.is-morphed .scroll-hint { opacity: 0; }
  
  .scroll-line {
    display: inline-block;
    width: 48px;
    height: 1px;
    background: currentColor;
    position: relative;
    overflow: hidden;
  }
  
  .scroll-line::after {
    content: "";
    position: absolute;
    top: 0;
    left: -50%;
    width: 50%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    animation: scrollDash 1.8s var(--easing) infinite;
  }
  
  @keyframes scrollDash {
    0%   { transform: translateX(0); }
    100% { transform: translateX(300%); }
  }
  
  /* ============================================
     CHEVRON CTA (apparaît après le morph)
     ============================================ */

  .scroll-cta {
    position: fixed;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    z-index: 45;
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease, color 0.5s ease, transform 0.6s ease;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(4px);
  }

  .scroll-cta svg {
    width: 20px;
    height: 20px;
    display: block;
  }

  body.is-morphed .scroll-cta {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
    transition: opacity 0.6s ease 1.6s, color 0.5s ease, transform 0.6s ease 1.6s;
    animation: ctaBounce 2s var(--easing) 2.4s infinite;
  }

  body.past-hero .scroll-cta {
    opacity: 0;
    pointer-events: none;
    animation: none;
    transition: opacity 0.3s ease;
  }

  .scroll-cta:hover {
    background: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.5);
  }

  @keyframes ctaBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(7px); }
  }

  /* ============================================
     CONTENU (panel clair qui monte)
     ============================================ */
  
  .content {
    position: relative;
    background: var(--bg);
    min-height: 100vh;
    z-index: 10;
    padding-left: var(--sidebar-w);
    padding-right: var(--gutter);
  }
  
  .content-inner {
    max-width: var(--max-content);
    padding-top: 18vh;
    padding-bottom: 20vh;
  }
  
  /* ============================================
     SECTIONS de domaine
     ============================================ */
  
  .domain {
    scroll-margin-top: 80px;
    padding-bottom: 16vh;
  }
  
  .domain + .domain {
    border-top: 1px solid var(--line);
    padding-top: 14vh;
  }
  
  .domain-eyebrow {
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 14px;
  }
  
  .domain-eyebrow::before {
    content: "";
    width: 24px;
    height: 1px;
    background: var(--ink-muted);
  }
  
  .domain-title {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: clamp(56px, 8vw, 112px);
    line-height: 0.94;
    letter-spacing: -0.035em;
    margin-bottom: 24px;
  }
  
  .domain-title .accent {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.015em;
  }
  
  .domain-subtitle {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: clamp(22px, 2.2vw, 30px);
    line-height: 1.3;
    letter-spacing: -0.012em;
    color: var(--ink-2);
    max-width: 32em;
    margin-bottom: 12px;
  }
  
  .domain-description {
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink-2);
    max-width: 36em;
    margin-bottom: 80px;
  }
  
  /* ============================================
     SOUS-DOMAINES
     ============================================ */
  
  .subdomain {
    margin-top: 96px;
    scroll-margin-top: 80px;
  }
  
  .subdomain:first-of-type {
    margin-top: 0;
  }
  
  .subdomain-eyebrow {
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 16px;
  }
  
  .subdomain-title {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
  }
  
  .subdomain-subtitle {
    font-size: 18px;
    line-height: 1.45;
    color: var(--ink-2);
    max-width: 32em;
    margin-bottom: 40px;
  }
  
  /* ============================================
     INDEX DES NOTIONS (sous chaque sous-domaine)
     ============================================ */

  .topic-index {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 32px;
    padding: 18px 0;
    margin-bottom: 48px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .topic-index-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 13px;
    color: var(--ink-muted);
    cursor: pointer;
    transition: color 0.2s ease;
  }

  .topic-index-item:hover { color: var(--ink); }

  .topic-index-num {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 11px;
    opacity: 0.6;
    flex-shrink: 0;
  }

  /* ============================================
     SUJETS / TOPICS
     ============================================ */

  .topics {
    display: flex;
    flex-direction: column;
    gap: 80px;
  }
  
  .topic {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .topic-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid var(--line);
    padding-top: 20px;
  }
  
  .topic-title {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.012em;
  }
  
  .topic-roman {
    font-size: 12px;
    letter-spacing: 0.15em;
    color: var(--ink-muted);
    font-feature-settings: "tnum" 1;
  }
  
  .topic-description {
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink-2);
    max-width: 36em;
  }
  
  /* ============================================
     GALERIE (grille + lightbox)
     ============================================ */

  .gallery { margin-top: 12px; }

  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
  }

  .gallery-thumb {
    aspect-ratio: 1 / 1;
    background: var(--bg-paper);
    border: 1px solid var(--line);
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.2s ease, box-shadow 0.25s ease;
  }

  .gallery-thumb:hover {
    transform: scale(1.03);
    border-color: var(--line-strong);
    box-shadow: 0 6px 24px rgba(10,10,10,0.08);
  }

  .gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .gallery-empty {
    padding: 24px;
    text-align: center;
    color: var(--ink-faint);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  /* ============================================
     LIGHTBOX
     ============================================ */

  .lightbox {
    position: fixed;
    inset: 0;
    background: rgba(8, 6, 4, 0.94);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 5vh 6vw;
    animation: lbFade 0.2s ease;
  }

  .lightbox.is-open { display: flex; }

  @keyframes lbFade {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  .lightbox-img {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    display: block;
  }

  .lightbox-close,
  .lightbox-prev,
  .lightbox-next {
    position: absolute;
    background: rgba(255,255,255,0.06);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.18);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, border-color 0.2s;
  }

  .lightbox-close { top: 24px; right: 24px; font-size: 18px; }
  .lightbox-prev  { left: 24px; top: 50%; transform: translateY(-50%); }
  .lightbox-next  { right: 24px; top: 50%; transform: translateY(-50%); }

  .lightbox-close:hover,
  .lightbox-prev:hover,
  .lightbox-next:hover {
    background: rgba(255,255,255,0.16);
    border-color: rgba(255,255,255,0.32);
  }

  .lightbox-prev:hover { transform: translateY(-50%) scale(1.05); }
  .lightbox-next:hover { transform: translateY(-50%) scale(1.05); }

  .lightbox-count {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 11px;
    letter-spacing: 0.22em;
    opacity: 0.7;
    font-feature-settings: 'tnum' 1;
  }

  body.lightbox-open { overflow: hidden; }

  .lightbox-dots { display: none; }
  
  /* ============================================
     PAS-PAST-HERO : pointer events
     ============================================ */
  
  body.past-hero .brand-title-mount {
    pointer-events: auto;
  }
  
  /* ============================================
     PANNEAU INTRO (droite, apparaît après le morph)
     ============================================ */

  .hero-intro {
    position: absolute;
    top: 50%;
    right: clamp(40px, 6vw, 80px);
    transform: translate(20px, -50%);
    max-width: 360px;
    color: #fff;
    z-index: 30;
    opacity: 0;
    transition:
      opacity 0.25s ease,
      transform 0.25s cubic-bezier(0.7, 0, 0.2, 1);
  }

  body.is-morphed .hero-intro {
    opacity: 1;
    transform: translate(0, -50%);
    transition:
      opacity 0.7s ease 1.35s,
      transform 0.7s cubic-bezier(0.7, 0, 0.2, 1) 1.35s;
  }

  .hero-intro-eyebrow {
    font-size: 11px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 18px;
  }

  .hero-intro-title {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
  }

  .hero-intro-italic {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.01em;
  }

  .hero-intro-lede {
    font-size: 15px;
    line-height: 1.55;
    opacity: 0.85;
    margin-bottom: 22px;
  }

  .hero-intro-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.7;
  }

  /* ============================================
     RESPONSIVE
     ============================================ */

  @media (max-width: 900px) {
    :root { --sidebar-w: 0px; }

    .brand-toc-mount { width: 280px; }
    .toc-list { font-size: 18px; }

    .content {
      padding-left: var(--gutter);
      padding-top: 200px;
    }

    .content-inner { padding-top: 20px; }
    .brand-tagline { display: none; }
    .scroll-hint { display: none; }

    .hero-intro {
      right: 24px;
      left: 24px;
      max-width: none;
      top: auto;
      bottom: 32%;
      transform: translateY(20px);
    }

    body.is-morphed .hero-intro { transform: translateY(0); }

    .gallery-grid { grid-template-columns: repeat(4, 1fr); }
  }

  @media (max-width: 600px) {
    .brand-title { font-size: 40px; }
    .toc-list { font-size: 16px; }
    .brand-toc-mount { width: 220px; }
    .domain-title { font-size: 14vw; }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  }

  /* ============================================
     FOOTER (glisse depuis le bas en fin de scroll)
     ============================================ */

  .site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 60;
    background: var(--hero-bg);
    color: rgba(240, 237, 230, 0.88);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(100%);
    will-change: transform;
  }

  .site-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 28px var(--gutter);
  }

  .site-footer-brand {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.02em;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .site-footer-italic {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
  }

  .site-footer-ch {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    font-size: 0.7em;
    opacity: 0.55;
    vertical-align: 0.08em;
  }

  .site-footer-tagline {
    font-size: 13px;
    line-height: 1.45;
    opacity: 0.5;
    letter-spacing: 0.01em;
    flex: 1;
    text-align: center;
  }

  .site-footer-nav {
    display: flex;
    gap: 8px;
    font-size: 12px;
    letter-spacing: 0.04em;
    opacity: 0.55;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .site-footer-sep { opacity: 0.35; }

  @media (max-width: 600px) {
    .site-footer-tagline { display: none; }
    .site-footer-inner { gap: 16px; }
  }

  /* ============================================
     UTILS
     ============================================ */

  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  /* ============================================
     ÉLÉMENTS MOBILE-ONLY — cachés sur desktop
     ============================================ */

  .mobile-menu-btn   { display: none; }
  .mobile-overlay    { display: none; }
  .mobile-logo-fixed { display: none; }
  .toc-panel-header  { display: none; }

  /* ============================================
     MOBILE — téléphone (≤ 767px)
     ============================================ */

  @media (max-width: 767px) {

    /* ---- Éléments desktop masqués sur mobile ---- */
    .brand-frame,
    .scroll-hint { display: none !important; }

    .brand-title-mount { display: none !important; }

    .scroll-cta,
    body.is-morphed .scroll-cta { display: none !important; }

    /* ---- Logo dans le hero (défile avec la page, non fixe) ---- */
    .mobile-logo-fixed {
      display: block;
      position: absolute;
      top: 20px;
      left: 20px;
      z-index: 10;
      color: #fff;
      font-family: var(--font-sans);
      font-weight: 700;
      font-size: 16px;
      line-height: 1.0;
      letter-spacing: -0.02em;
      white-space: nowrap;
      pointer-events: none;
    }

    /* ---- Lang / Theme toggle : masqués sur la droite mobile ---- */
    .lang-toggle,
    .theme-toggle,
    body.past-hero .lang-toggle,
    body.past-hero .theme-toggle {
      display: none !important;
    }

    .mobile-logo-and {
      font-family: var(--font-serif);
      font-style: italic;
      font-weight: 400;
    }

    .mobile-logo-ch {
      font-family: var(--font-serif);
      font-style: italic;
      font-weight: 400;
      font-size: 0.68em;
      opacity: 0.65;
      vertical-align: 0.08em;
    }


    /* ---- Hero intro : visible immédiatement + aligné avec le logo ---- */
    .hero-intro {
      bottom: 36% !important;
      left: 20px !important;
      right: 20px !important;
      max-width: none !important;
    }

    body.is-morphed .hero-intro {
      opacity: 1 !important;
      transform: translateY(0) !important;
      transition: none !important;
    }

    /* ---- page-wrap : hero + contenu glissent ensemble (un seul transform) ---- */
    .page-wrap {
      position: relative;
      z-index: 10;
      transition: transform 0.35s cubic-bezier(0.7, 0, 0.2, 1);
    }

    body.mobile-toc-open .page-wrap {
      transform: translateX(280px);
    }

    body.mobile-toc-open { overflow: hidden; }

    /* Empêche le navigateur mobile de dézoomer quand page-wrap dépasse le viewport */
    html { overflow-x: hidden; }

    /* ---- TOC : panneau plein-écran fixé à gauche, SOUS le contenu ---- */
    .brand-toc-mount,
    body.is-morphed .brand-toc-mount,
    body.on-light-toc .brand-toc-mount {
      position: fixed !important;
      top: 0 !important;
      left: 0 !important;
      bottom: 0 !important;
      width: 280px !important;
      height: 100% !important;
      max-height: none !important;
      overflow-y: auto !important;
      transform: none !important;
      transition: none !important;
      will-change: auto !important;
      opacity: 1 !important;
      pointer-events: none !important;
      background: var(--bg) !important;
      color: var(--ink) !important;
      padding: 40px 24px 40px !important;
      border-right: 1px solid var(--line) !important;
      z-index: 5 !important;
      display: flex !important;
      flex-direction: column !important;
      justify-content: flex-end !important;
    }

    /* Tagline visible dans le panneau */
    .brand-tagline { display: block !important; }

    /* TOC interactif quand ouvert */
    body.mobile-toc-open .brand-toc-mount,
    body.mobile-toc-open.is-morphed .brand-toc-mount,
    body.mobile-toc-open.on-light-toc .brand-toc-mount {
      pointer-events: auto !important;
    }

    /* ---- Overlay : zone de tap pour fermer le TOC (sans ombrage) ---- */
    .mobile-overlay {
      display: block;
      position: fixed;
      top: 0;
      left: 280px;
      right: 0;
      bottom: 0;
      z-index: 220;
      -webkit-tap-highlight-color: transparent;
      opacity: 0;
      pointer-events: none;
    }

    body.mobile-toc-open .mobile-overlay {
      pointer-events: auto;
    }

    /* ---- Bouton hamburger ---- */
    .mobile-menu-btn {
      display: flex;
      position: fixed;
      bottom: 28px;
      right: 20px;
      z-index: 225;
      width: 48px;
      height: 48px;
      border-radius: 50%;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
      transition: transform 0.15s ease;
      background: var(--ink);
      color: var(--bg);
    }

    .mobile-menu-btn:active { transform: scale(0.9); }

    /* Icônes ☰ / ✕ */
    .mobile-menu-btn .icon-menu  { display: block; }
    .mobile-menu-btn .icon-close { display: none; }
    body.mobile-toc-open .mobile-menu-btn .icon-menu  { display: none; }
    body.mobile-toc-open .mobile-menu-btn .icon-close { display: block; }

    /* ---- Footer links : côte à côte si possible, sinon retour à la ligne ---- */
    .brand-footer-links { font-size: 11px; gap: 2px 4px; }

    /* ---- Lightbox mobile : flèches masquées, points à la place ---- */
    .lightbox-prev,
    .lightbox-next  { display: none !important; }

    .lightbox-count { display: none; }

    .lightbox-dots {
      display: flex;
      position: absolute;
      bottom: 28px;
      left: 50%;
      transform: translateX(-50%);
      gap: 9px;
      align-items: center;
    }

    .lightbox-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.35);
      border: none;
      padding: 0;
      cursor: pointer;
      transition: background 0.2s ease, transform 0.15s ease;
    }

    .lightbox-dot.is-active {
      background: #fff;
      transform: scale(1.3);
    }

    /* ---- En-tête du panel TOC (logo + contrôles) ---- */
    .toc-panel-header {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 20px 16px 20px 24px;
    }

    .toc-panel-logo {
      font-family: var(--font-sans);
      font-weight: 700;
      font-size: 16px;
      line-height: 1.0;
      letter-spacing: -0.02em;
      white-space: nowrap;
      color: var(--ink);
    }

    .toc-panel-logo-and {
      font-family: var(--font-serif);
      font-style: italic;
      font-weight: 400;
    }

    .toc-panel-logo-ch {
      font-family: var(--font-serif);
      font-style: italic;
      font-weight: 400;
      font-size: 0.68em;
      opacity: 0.65;
      vertical-align: 0.08em;
    }

    .toc-panel-controls {
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .toc-lang-btn,
    .toc-theme-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 36px;
      height: 36px;
      border-radius: 8px;
      color: var(--ink);
      font-family: var(--font-sans);
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.06em;
      cursor: pointer;
      background: none;
      border: none;
      transition: background 0.2s ease;
    }

    .toc-lang-btn:hover,
    .toc-theme-btn:hover { background: rgba(128,128,128,0.12); }
    .toc-lang-btn:active,
    .toc-theme-btn:active { transform: scale(0.88); }


  }