/* ── Variables ── */
    :root {
      --noir:        #0f0f14;
      --bleu-nuit:   #141426;
      --bleu-violet: #5b5bd6;
      --bleu-clair:  #BBBFFF;
      --blanc:       #f5f5fa;
      --gris:        #a0a0b8;
      --gris-fin:    #2a2a3a;
      --font-display: 'Boldonse', cursive;
      --font-body:    'Rethink Sans', sans-serif;
      --ease: cubic-bezier(.4,0,.2,1);
    }

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html { font-size: 16px; scroll-behavior: smooth; overflow-x: hidden; }

    body {
      background: var(--noir);
      color: var(--blanc);
      font-family: var(--font-body);
      overflow-x: hidden;
      -webkit-font-smoothing: antialiased;
      cursor: none;
    }

    a { color: inherit; text-decoration: none; }
    img { display: block; max-width: 100%; }

   
/* ══════════════════════════════════════════════
   CURSEUR
══════════════════════════════════════════════ */
.cursor {
  position: fixed;
  width: 10px; height: 10px;
  background: var(--bleu-clair);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform .1s var(--ease), width .25s var(--ease), height .25s var(--ease), opacity .3s, background .25s;
  mix-blend-mode: difference;
}
.cursor-ring {
  position: fixed;
  width: 32px; height: 32px;
  border: 1.5px solid rgba(187,191,255,.3);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform .18s var(--ease), width .3s var(--ease), height .3s var(--ease), border-color .3s;
}
body:has(a:hover) .cursor,
body:has(button:hover) .cursor { width: 18px; height: 18px; background: #fff; opacity: .9; }
body:has(a:hover) .cursor-ring,
body:has(button:hover) .cursor-ring { width: 42px; height: 42px; border-color: rgba(187,191,255,.6); }

    /* ── Header ── */
    #header {
      position: fixed;
      top: 20px;
      left: 50%;
      transform: translateX(-50%);
      z-index: 600;
      width: calc(100% - 80px);
      max-width: 900px;
      transition: top .4s ease, opacity .3s ease;
    }
    #header.hidden { top: -100px; opacity: 0; pointer-events: none; }
    #navbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 17px 14px 28px;
      border-radius: 50px;
      background: rgba(20,20,38,.6);
      backdrop-filter: blur(18px);
      border: 1px solid rgba(187,187,255,.1);
    }
    .nav-logo { height: 34px; width: auto; }
    .nav-links { display: flex; align-items: center; gap: 28px; }
    .nav-links a {
      font-size: .88rem; font-weight: 500; color: var(--gris);
      transition: color .3s;
    }
    .nav-links a:hover { color: var(--blanc); }
    .nav-links a.active { color: var(--bleu-clair); }
    .btn-nav {
      background: var(--bleu-clair);
      color: var(--bleu-nuit) !important;
      padding: 7px 18px;
      border-radius: 20px;
      font-weight: 800 !important;
      font-size: .85rem !important;
    }
    .btn-nav:hover { background: var(--blanc) !important; }

/* ── Burger ── */
/* Menu mobile géré par style.css */



    /* ── Hero portfolio ── */
    #hero {
      padding: 180px 60px 80px;
      max-width: 1200px;
      margin: 0 auto;
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 40px;
    }
    .hero-tag {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: .7rem;
      font-weight: 700;
      letter-spacing: .18em;
      text-transform: uppercase;
      color: var(--bleu-clair);
      background: rgba(91,91,214,.12);
      border: 1px solid rgba(91,91,214,.25);
      padding: 6px 16px;
      border-radius: 100px;
      margin-bottom: 55px;
    }
    .hero-tag::before {
      content: '';
      width: 6px; height: 6px;
      background: var(--bleu-clair);
      border-radius: 50%;
      animation: pulse 2s infinite;
    }
    @keyframes pulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: .4; transform: scale(.7); }
    }
    .hero-title {
      font-family: var(--font-display);
      font-size: clamp(3.5rem, 7vw, 4.5rem);
      line-height: 1.35;
      letter-spacing: -.01em;
      display: flex;
      align-items: flex-start;
    }
    .hero-title .line-accent { color: var(--bleu-clair); display: block; }
    .hero-right {
      flex-shrink: 0;
      max-width: 300px;
      padding-bottom: 8px;
    }
    .hero-desc {
      font-size: .95rem;
      line-height: 1.55;
    }
    .hero-count {
      font-family: var(--font-display);
      font-size: 3rem;
      color: var(--bleu-clair);
      line-height: 1.3;
      margin-top:32px;
    }
    .hero-count span { font-family: var(--font-body); font-size: .75rem; color: var(--gris); display: block; margin-top: 4px; }

    /* ── Filtres ── */
    #filters {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 60px 60px;
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }
    .filter-btn {
      padding: 8px 20px;
      border-radius: 100px;
      border: 1.5px solid rgba(187,191,255,.15);
      background: transparent;
      color: var(--gris);
      font-family: var(--font-body);
      font-size: .82rem;
      font-weight: 600;
      cursor: none;
      transition: background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
      letter-spacing: .03em;
    }
    .filter-btn:hover, .filter-btn.active {
      background: var(--bleu-clair);
      border-color: var(--bleu-clair);
      color: var(--bleu-nuit);
    }
    .filter-label {
      font-size: .72rem;
      font-weight: 700;
      letter-spacing: .10em;
      text-transform: uppercase;
      color: var(--gris-fin);
      margin-right: 6px;
    }

     /* ── Grille asymétrique ── */
    #grid {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 60px 160px;
      display: grid;
      grid-template-columns: repeat(12, 1fr);
      gap: 16px;
      /* Chaque unité = 60px — 4 blocs de lignes pour 13 cartes */
      grid-template-rows:
        /* Bloc 1 — 8 rangées : grande carte gauche + 3 cartes droite */
        repeat(8, 60px)
        /* Bloc 2 — 7 rangées : 3 cartes égales */
        repeat(7, 60px)
        /* Bloc 3 — 8 rangées : 1 large gauche + 2 cartes droite */
        repeat(8, 60px)
        /* Bloc 4+5 — 8 rangées : miroir du bloc 3 */
        repeat(8, 60px);
    }


    /* ── Layout des 13 cartes ── */

    /* Bloc 1 — grande héro gauche + 3 cartes droite */
    .project-card:nth-child(1)  { grid-column: 1 / 7;  grid-row: 1 / 9;  } /* grande */
    .project-card:nth-child(2)  { grid-column: 7 / 13; grid-row: 1 / 4;  } /* droite haut — pleine largeur */
    .project-card:nth-child(3)  { grid-column: 7 / 10; grid-row: 4 / 9;  } /* droite bas gauche */
    .project-card:nth-child(4)  { grid-column: 10 / 13;grid-row: 4 / 9;  } /* droite bas droite — 3 colonnes */

    /* Bloc 2 — 3 colonnes égales */
    .project-card:nth-child(5)  { grid-column: 1 / 5;  grid-row: 9 / 16; }
    .project-card:nth-child(6)  { grid-column: 5 / 9;  grid-row: 9 / 16; }
    .project-card:nth-child(7)  { grid-column: 9 / 13; grid-row: 9 / 16; }

    /* Bloc 3 — 1 large gauche + 2 cartes droite */
    .project-card:nth-child(8)  { grid-column: 1 / 5;  grid-row: 16 / 24;}
    .project-card:nth-child(9)  { grid-column: 5 / 13; grid-row: 16 / 20;} /* large droite */
    .project-card:nth-child(10) { grid-column: 5 / 9;  grid-row: 20 / 24;}
    .project-card:nth-child(11) { grid-column: 9 / 13; grid-row: 20 / 24;}

    /* Bloc 4 — miroir du bloc 3 : large gauche haut + grande droite + 2 petites bas gauche */
    .project-card:nth-child(12) { grid-column: 1 / 9;  grid-row: 24 / 28;} /* large gauche haut */
    .project-card:nth-child(13) { grid-column: 9 / 13; grid-row: 24 / 32;} /* grande droite */
    .project-card:nth-child(14) { grid-column: 1 / 5;  grid-row: 28 / 32;} /* petite bas gauche */
    .project-card:nth-child(15) { grid-column: 5 / 9;  grid-row: 28 / 32;} /* petite bas milieu */


    /* ── Mode filtré : grille uniforme 3 colonnes ── */
    #grid.is-filtered {
      grid-template-columns: repeat(3, 1fr);
      grid-template-rows: none;
      grid-auto-rows: 320px;
    }
    #grid.is-filtered .project-card {
      grid-column: auto !important;
      grid-row: auto !important;
    }

    /* ── Carte projet ── */

    .project-card.hidden-card {
      display: none;
    }

    .card-img {
      position: absolute;
      inset: 0;
      width: 100%; height: 100%;
      object-fit: cover;
      transition: transform .6s var(--ease);
    }
    .project-card:hover .card-img {
      transform: scale(1.06);
    }

    /* Overlay dégradé */
    .card-overlay {
      position: absolute;
      inset: 0;
      background: linear-gradient(to top, rgba(10,10,20,.95) 0%, rgba(10,10,20,.3) 50%, transparent 100%);
      opacity: 0;
      transition: opacity .35s var(--ease);
    }
    .project-card:hover .card-overlay { opacity: 1; }

    /* Numéro discret */
    .card-number {
      position: absolute;
      top: 16px; left: 20px;
      font-family: var(--font-display);
      font-size: .65rem;
      color: rgba(187,191,255,.5);
      letter-spacing: .1em;
      transition: color .3s;
      z-index: 2;
    }
    .project-card:hover .card-number { color: var(--bleu-clair); }

    /* Tag catégorie */
    .card-tag {
      position: absolute;
      top: 16px; right: 16px;
      font-size: .72rem;
      font-weight: 700;
      letter-spacing: .10em;
      text-transform: uppercase;
      color: var(--bleu-clair);
      background: #5b5bd6a8;
      border: 1px solid #5b5bd67d;
      padding: 4px 10px;
      border-radius: 100px;
      z-index: 2;
      opacity: 0;
      transform: translateY(-6px);
      transition: opacity .3s var(--ease), transform .3s var(--ease);
    }
    .project-card:hover .card-tag {
      opacity: 1;
      transform: translateY(0);
    }

    /* Infos bas de carte */
    .card-info {
      position: absolute;
      bottom: 0; left: 0; right: 0;
      padding: 24px 24px 20px;
      z-index: 2;
      transform: translateY(12px);
      opacity: 0;
      transition: transform .35s var(--ease), opacity .35s var(--ease);
    }
    .project-card:hover .card-info {
      transform: translateY(0);
      opacity: 1;
    }
    .card-title {
      font-family: var(--font-display);
      font-size: clamp(1rem, 2.5vw, 1.3rem);
      line-height: 1.3;
      margin-bottom: 6px;
    }
    .card-meta {
      font-size: .75rem;
      color: var(--bleu-clair);
      font-weight: 600;
      letter-spacing: .05em;
    }

    /* Bouton voir */
    .card-cta {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      margin-top: 14px;
      font-size: .75rem;
      font-weight: 700;
      letter-spacing: .08em;
      text-transform: uppercase;
      color: var(--blanc);
      border: 1.5px solid rgba(255,255,255,.3);
      padding: 7px 16px;
      border-radius: 100px;
      transition: background .3s, border-color .3s;
    }
    .card-cta:hover {
      background: var(--bleu-clair);
      border-color: var(--bleu-clair);
    }
    .card-cta svg {
      width: 12px; height: 12px;
      transition: transform .3s;
    }
    .card-cta:hover svg { transform: translate(3px, -3px); }

    /* Carte vide avec numéro (bientôt) */
    .card-soon {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      gap: 8px;
      border: 1.5px dashed rgba(187,191,255,.1);
      background: transparent !important;
    }
    .card-soon .soon-text {
      font-size: .68rem;
      font-weight: 700;
      letter-spacing: .18em;
      text-transform: uppercase;
      color: rgba(187,191,255,.25);
    }
    .card-soon .soon-icon {
      width: 22px; height: 22px;
      border: 1.5px solid rgba(187,191,255,.15);
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      color: rgba(187,191,255,.2);
      font-size: 1rem;
    }

    /* ── Bande défilante ── */
    #marquee-wrap {
      overflow: hidden;
      border-top: 1px solid var(--gris-fin);
      border-bottom: 1px solid var(--gris-fin);
      padding: 18px 0;
      margin-bottom: 0;
      background: var(--blanc);
    }
    .marquee-track {
      display: flex;
      width: max-content;
      animation: marquee 22s linear infinite;
      will-change: transform;
    }
    .marquee-item {
      display: flex;
      align-items: center;
      gap: 20px;
      padding: 0 28px;
      font-family: var(--font-display);
      font-size: .7rem;
      letter-spacing: .15em;
      text-transform: uppercase;
      color: var(--bleu-nuit);
      white-space: nowrap;
    }
    .marquee-item .dot {
      width: 5px; height: 5px;
      background: var(--bleu-clair);
      border-radius: 50%;
      flex-shrink: 0;
    }
    @keyframes marquee {
      from { transform: translateX(0); }
      to   { transform: translateX(-50%); }
    }

    /* ── CTA bas de page ── */
    #cta {
      text-align: center;
      padding: 120px 20px 160px;
      background: var(--bleu-clair);
      position: relative;
      overflow: hidden;
    }

    .cta-label {
      font-size: .7rem;
      font-weight: 700;
      letter-spacing: .18em;
      text-transform: uppercase;
      color: var(--bleu-violet);
      margin-bottom: 24px;
      display: block;
    }
    .cta-title {
      font-family: var(--font-display);
      font-size: clamp(2.4rem, 9vw, 3.5rem);
      line-height: 1.4;
      margin-bottom: 32px;
    }
    .cta-title .accent { color: var(--blanc); }
    .cta-actions {
      display: flex;
      justify-content: center;
      gap: 14px;
      flex-wrap: wrap;
    }
    .btn-primary {
      background: var(--bleu-clair);
      color: var(--bleu-nuit);
      padding: .9rem 2rem;
      border-radius: 100px;
      font-weight: 800;
      font-size: .95rem;
      border: none;
      cursor: none;
      transition: background .3s, transform .3s;
    }
    .btn-primary:hover { background: var(--blanc); transform: translateY(-2px); }
    .btn-ghost {
      background: transparent;
      color: var(--gris);
      padding: .9rem 2rem;
      border-radius: 100px;
      font-weight: 600;
      font-size: .95rem;
      border: 1.5px solid rgba(187,191,255,.2);
      cursor: none;
      transition: border-color .3s, color .3s, transform .3s;
    }
    .btn-ghost:hover { border-color: var(--bleu-clair); color: var(--bleu-clair); transform: translateY(-2px); }

    /* ── Footer minimal ── */
    /* footer géré par style.css */

    /* ══════════════════════════════════════
       REVEAL ANIMATIONS — scroll fluide
    ══════════════════════════════════════ */

    /* Base */
    .reveal, .reveal-up, .reveal-left, .reveal-right {
      opacity: 0;
      transition: opacity .6s var(--ease), transform .6s var(--ease);
    }
    .reveal       { transform: translateY(24px); }
    .reveal-up    { transform: translateY(40px); }
    .reveal-left  { transform: translateX(-28px); }
    .reveal-right { transform: translateX(28px); }

    .reveal.visible, .reveal-up.visible { opacity: 1; transform: translateY(0); }
    .reveal-left.visible  { opacity: 1; transform: translateX(0); }
    .reveal-right.visible { opacity: 1; transform: translateX(0); }

    /* Stagger enfants */
    .reveal-stagger > * {
      opacity: 0;
      transform: translateY(16px);
      transition: opacity .5s var(--ease), transform .5s var(--ease);
    }
    .reveal-stagger.visible > *:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0ms; }
    .reveal-stagger.visible > *:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 70ms; }
    .reveal-stagger.visible > *:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 140ms; }
    .reveal-stagger.visible > *:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 210ms; }
    .reveal-stagger.visible > *:nth-child(5) { opacity: 1; transform: translateY(0); transition-delay: 280ms; }
    .reveal-stagger.visible > *:nth-child(6) { opacity: 1; transform: translateY(0); transition-delay: 350ms; }

    /* ── Cartes projet ── */
    .project-card {
      position: relative;
      border-radius: 12px;
      overflow: hidden;
      cursor: none;
      background: var(--gris-fin);
      opacity: 0;
      transform: translateY(32px);
      transition: opacity .7s var(--ease), transform .7s var(--ease);
    }
    .project-card.visible {
      opacity: 1;
      transform: translateY(0);
    }
    .project-card.animating {
      will-change: opacity, transform;
    }
    .project-card.filtering {
      opacity: 0;
      transform: translateY(8px);
      pointer-events: none;
    }

    /* Hero — délais d'entrée initiaux */
    .hero-left.reveal { transition-delay: 0ms; }
    .hero-right.reveal { transition-delay: 120ms; }

    /* Filtres — entrée légèrement retardée */
    #filters.reveal { transition-delay: 200ms; }

    /* CTA section */
    .cta-label.reveal  { transition-delay: 0ms; }
    .cta-title.reveal  { transition-delay: 80ms; color: var(--bleu-nuit); }
    .cta-actions.reveal { transition-delay: 160ms; }

    /* ── Modale projet — vue immersive plein écran ── */
    #modal {
      position: fixed;
      inset: 0;
      z-index: 800;
      opacity: 0;
      pointer-events: none;
      transition: opacity .45s var(--ease);
    }
    #modal.open { opacity: 1; pointer-events: all; }

    .modal-backdrop {
      position: absolute;
      inset: 0;
      background: #07070f;
    }

    /* Layout : image à gauche (60%), infos à droite (40%) */
    .modal-content {
      position: relative;
      width: 100%;
      height: 100%;
      display: grid;
      grid-template-columns: 60fr 40fr;
      transform: translateX(60px);
      transition: transform .5s cubic-bezier(.22,1,.36,1);
    }
    #modal.open .modal-content { transform: translateX(0); }

    /* ── Panneau image ── */
    .modal-img-panel {
      position: relative;
      overflow: hidden;
      background: #0c0c1a;
    }
    .modal-img {
      position: absolute;
      inset: 0;
      width: 100%; height: 100%;
      object-fit: contain;
      object-position: center;
      padding: 40px;
      transition: opacity .3s ease, transform .6s var(--ease);
      transform: scale(1.04);
    }
    #modal.open .modal-img { transform: scale(1); }

    /* ── Panneau infos ── */
    .modal-body {
      padding: 60px 48px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      border-left: 1px solid rgba(255,255,255,.05);
      overflow-y: auto;
      background: var(--bleu-nuit);
    }

    .modal-tag {
      font-size: .68rem;
      font-weight: 700;
      letter-spacing: .18em;
      text-transform: uppercase;
      color: var(--bleu-clair);
      background: rgba(91,91,214,.18);
      border: 1px solid rgba(91,91,214,.28);
      padding: 5px 14px;
      border-radius: 100px;
      display: inline-block;
      margin-bottom: 20px;
      width: fit-content;
    }

    .modal-title {
      font-family: var(--font-display);
      font-size: clamp(2rem, 3.5vw, 3.2rem);
      line-height: 1.4;
      margin-bottom: 24px;
      letter-spacing: -.01em;
    }

    .modal-desc {
      color: var(--gris);
      font-size: .95rem;
      line-height: 1.55;
      margin-bottom: 40px;
    }

    .modal-meta {
      display: flex;
      flex-direction: column;
      gap: 16px;
      padding-top: 32px;
      border-top: 1px solid var(--gris-fin);
    }

    .modal-meta-item {
      display: flex;
      align-items: baseline;
      gap: 16px;
    }

    .modal-meta-label {
      font-size: .68rem;
      font-weight: 700;
      letter-spacing: .18em;
      text-transform: uppercase;
      color: var(--bleu-clair);
      min-width: 60px;
      flex-shrink: 0;
    }

    .modal-meta-value {
      font-size: .88rem;
      font-weight: 500;
      color: var(--blanc);
      line-height: 1.4;
    }

    /* Bouton fermer */
    .modal-close {
      position: fixed;
      top: 24px; right: 28px;
      width: 44px; height: 44px;
      border-radius: 50%;
      border: 1.5px solid rgba(187,191,255,.15);
      background: rgba(15,15,20,.7);
      backdrop-filter: blur(10px);
      color: var(--blanc);
      font-size: 1.1rem;
      display: flex; align-items: center; justify-content: center;
      cursor: none;
      z-index: 900;
      transition: border-color .3s, background .3s, transform .3s;
    }
    .modal-close:hover {
      border-color: var(--bleu-clair);
      background: rgba(91,91,214,.25);
      transform: rotate(90deg);
    }



    /* Responsive modale */
    @media (max-width: 900px) {
      .modal-content {
        grid-template-columns: 1fr;
        grid-template-rows: 50vh 1fr;
        transform: translateY(60px);
        overflow-y: auto;
      }
      #modal.open .modal-content { transform: translateY(0); }
      .modal-body {
        border-left: none;
        border-top: 1px solid rgba(255,255,255,.05);
        padding: 32px 24px;
        justify-content: flex-start;
        overflow-y: visible;
      }
      .modal-img { padding: 20px; }
      .modal-title { font-size: clamp(1.6rem, 6vw, 2.4rem); }
    }

    /* ── Responsive ── */

    /* Tablette paysage : grille 6 colonnes */
    @media (max-width: 1100px) {
      #grid {
        padding: 0 40px 120px;
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: none;
        grid-auto-rows: 260px;
        gap: 14px;
      }
      /* Bloc 1 */
      .project-card:nth-child(1)  { grid-column: 1 / 5;  grid-row: 1 / 3; }
      .project-card:nth-child(2)  { grid-column: 5 / 7;  grid-row: 1 / 2; }
      .project-card:nth-child(3)  { grid-column: 5 / 7;  grid-row: 2 / 3; }
      /* Bloc 2 */
      .project-card:nth-child(4)  { grid-column: 1 / 3;  grid-row: 3 / 4; }
      .project-card:nth-child(5)  { grid-column: 3 / 5;  grid-row: 3 / 4; }
      .project-card:nth-child(6)  { grid-column: 5 / 7;  grid-row: 3 / 4; }
      /* Bloc 3 */
      .project-card:nth-child(7)  { grid-column: 1 / 4;  grid-row: 4 / 5; }
      .project-card:nth-child(8)  { grid-column: 4 / 7;  grid-row: 4 / 5; }
      /* Bloc 4 */
      .project-card:nth-child(9)  { grid-column: 1 / 7;  grid-row: 5 / 6; } /* pleine largeur */
      /* Bloc 5 */
      .project-card:nth-child(10) { grid-column: 1 / 3;  grid-row: 6 / 7; }
      .project-card:nth-child(11) { grid-column: 3 / 5;  grid-row: 6 / 7; }
      .project-card:nth-child(12) { grid-column: 5 / 7;  grid-row: 6 / 7; }
      /* Bloc 6 */
      .project-card:nth-child(13) { grid-column: 1 / 7;  grid-row: 7 / 8; } /* pleine largeur */
      /* Bloc 7 */
      .project-card:nth-child(14) { grid-column: 1 / 4;  grid-row: 8 / 9; }
      .project-card:nth-child(15) { grid-column: 4 / 7;  grid-row: 8 / 9; }
    }

    /* Tablette portrait */
    @media (max-width: 900px) {
      body { cursor: auto; }
      .cursor, .cursor-ring { display: none; }
      #header { width: calc(100% - 32px); top: 12px; }
      .nav-links { display: none; }
      .menu-toggle { display: flex; }
      #hero {
        flex-direction: column;
        padding: 130px 24px 50px;
        gap: 24px;
        text-align: center;
        align-items: center;
      }
      .hero-tag { margin: 0 auto 28px; }
      .hero-right { max-width: 100%; text-align: center; }
      #filters { padding: 0 58px 40px; }

      #grid {
        padding: 0 20px 80px;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: none;
        grid-auto-rows: 260px;
        gap: 12px;
      }

    #grid.is-filtered {
      grid-template-columns: repeat(1, 1fr);
    }

      /* Réinitialise toutes les cartes en flux 2 colonnes */
      .project-card:nth-child(n) {
        grid-column: auto;
        grid-row: auto;
      }
      /* Quelques cartes pleine largeur pour rythmer */
      .project-card:nth-child(1)  { grid-column: 1 / 3; }
      .project-card:nth-child(6)  { grid-column: 1 / 3; }
      .project-card:nth-child(10) { grid-column: 1 / 3; }

      /* Afficher les infos sans hover sur tactile */
      .card-overlay { opacity: 1; }
      .card-info    { opacity: 1; transform: translateY(0); }
      .card-tag     { opacity: 1; transform: translateY(0); }

      #modal  { padding: 16px; }
      .modal-body { padding: 24px; }
    }

    /* Mobile */
    @media (max-width: 540px) {
      #hero { padding: 120px 20px 40px; }
      .hero-title { font-size: clamp(2.4rem, 9vw, 3.2rem) ;align-items:center; }
      #filters { padding: 0 58px 32px; gap: 8px; }
      .filter-btn { padding: 7px 14px; font-size: .78rem; }

      #grid {
        padding: 0 16px 60px;
        grid-template-columns: 1fr;
        grid-auto-rows: 240px;
        gap: 12px;
      }
      /* Toutes les cartes sur 1 colonne */
      .project-card:nth-child(n) {
        grid-column: 1;
        grid-row: auto;
      }
      /* Carte 1 et carte 10 plus hautes */
      .project-card:nth-child(1),
      .project-card:nth-child(10) {
        grid-row: span 2;
      }

      #cta { padding: 80px 20px 100px; }
      .cta-title { font-size: clamp(2rem, 8vw, 3rem); }
      .cta-actions { flex-direction: column; align-items: center; }
    }
/* ── Carousel dans la modale ── */
.modal-carousel {
  display: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.modal-img-panel.has-carousel .modal-img { display: none; }
.modal-img-panel.has-carousel .modal-carousel { display: block; }

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform .45s cubic-bezier(.22,1,.36,1);
  will-change: transform;
}
.carousel-slide {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: #0c0c1a;
}
.carousel-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15,15,20,.75);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(187,191,255,.18);
  color: var(--blanc);
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: none;
  z-index: 10;
  transition: background .25s, border-color .25s, transform .25s;
}
.carousel-btn:hover {
  background: rgba(91,91,214,.35);
  border-color: var(--bleu-clair);
  transform: translateY(-50%) scale(1.1);
}
.carousel-prev { left: 16px; }
.carousel-next { right: 16px; }

.carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}
.carousel-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(187,191,255,.3);
  border: none;
  cursor: none;
  transition: background .25s, transform .25s;
}
.carousel-dot.active {
  background: var(--bleu-clair);
  transform: scale(1.3);
}