/* ==========================================================================
   Portfolio Enzo Bazille
   Direction artistique reprise du portfolio scolaire :
   Space Grotesk + Inter, accent #C1121F, cartes blanches bordees #EAEAEA,
   grands rayons, fond #FAFAF9.
   1. Polices  2. Tokens  3. Base  4. Nav  5. Hero  6. Sections
   7. Filtres  8. Bento   9. Popup 10. Contact/Footer 11. Responsive
   ========================================================================== */

/* 1. POLICES ------------------------------------------------------------- */
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/grotesk-latin.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/grotesk-latin-ext.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-ext.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* 2. TOKENS -------------------------------------------------------------- */
:root {
  --accent: #C1121F;
  --accent-dark: #940E17;
  --accent-soft: rgba(193, 18, 31, .08);

  --bg: #FAFAF9;
  --card: #FFFFFF;
  --border: #EAEAEA;
  --ink: #141414;
  --muted: #5B5B5B;
  --muted-2: #8A8A8A;
  --panel: #F2F2F0;

  --display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --wrap: 1200px;
  --nav-h: 72px;
  --gap: clamp(12px, 1.2vw, 20px);
  --r-sm: 12px;
  --r: 1.5rem;   /* 24px */
  --r-lg: 2rem;  /* 32px */

  --ease: cubic-bezier(.16, 1, .3, 1);
  --shadow-sm: 0 1px 2px rgba(20, 20, 20, .04);
  --shadow: 0 2px 4px rgba(20, 20, 20, .03), 0 12px 32px rgba(20, 20, 20, .06);
  --shadow-lg: 0 24px 70px rgba(20, 20, 20, .16);
}

/* 3. BASE ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff;
  padding: 12px 20px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Reveal au scroll */
.reveal, .js-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.is-in, .js-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .js-reveal { opacity: 1; transform: none; transition: none; }
}

/* Surtitre rouge : signature du portfolio */
.kicker {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}

/* 4. NAV ----------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 249, .82);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--border); background: rgba(250, 250, 249, .94); }
/* Accueil : tant qu on n a pas scrolle, la barre laisse passer le blanc et les
   diagonales du hero. Des qu elle accroche (.is-stuck), elle reprend son fond. */
body[data-page="accueil"] .nav:not(.is-stuck) {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.nav__inner {
  width: 100%; max-width: var(--wrap);
  margin-inline: auto;
  padding: 0 clamp(20px, 5vw, 40px);
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}

.brand {
  font-family: var(--display);
  font-size: 1.05rem; font-weight: 700;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.brand span { color: var(--accent); }

.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__links a {
  padding: 9px 16px;
  border-radius: 999px;
  font-size: .94rem;
  color: var(--muted);
  transition: color .25s var(--ease), background .25s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a.is-active { background: var(--ink); color: #fff; }

/* Bascule FR / EN : la langue courante est un span, l'autre un lien.
   Selecteur .nav__links .lang__item (0,2,0) et non .lang__item (0,1,0) :
   il doit battre .nav__links a (0,1,1), sinon le lien reprend le gabarit
   des liens de navigation et les deux moities n'ont pas la meme taille.
   Volontairement plat : une pastille pleine entrerait en concurrence avec
   la pastille noire de la page courante, juste a cote. */
.lang {
  display: inline-flex; align-items: center;
  margin-left: 10px;
}
.nav__links .lang__item {
  padding: 0 7px;
  border-radius: 0;
  background: none;
  font-size: .78rem; font-weight: 500;
  letter-spacing: .04em;
  line-height: 1.15;
  color: var(--muted-2);
  transition: color .25s var(--ease);
}
.nav__links .lang__item + .lang__item { border-left: 1px solid var(--border); }
.nav__links .lang__item.is-active { color: var(--ink); font-weight: 600; }
.nav__links a.lang__item:hover { color: var(--ink); background: none; }

/* 5. HERO ---------------------------------------------------------------- */
.hero {
  position: relative;
  /* 90svh et non 100 : sans les puces, le hero centre laissait trop de vide
     sous les boutons avant les cartes. */
  min-height: calc(90svh - var(--nav-h));
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: clamp(60px, 10vh, 110px) 0 clamp(80px, 12vh, 130px);
  text-align: center;
  /* Pas d overflow:hidden : il rognerait le fond qui remonte sous la nav.
     Le fond ne deborde que vers le haut, jamais lateralement. */
}

/* Diagonales de Takoweb sur blanc + halo rouge derriere le logo */
.hero__bg {
  position: absolute;
  /* Remonte derriere la barre de nav (sticky, translucide) : sans cela une
     ligne apparait entre le blanc du hero et le fond de page. */
  inset: calc(-1 * var(--nav-h)) 0 0 0;
  pointer-events: none;
  /* Diagonales de Takoweb sur fond blanc, a la place du quadrillage.
     Le degrade rouge garde le halo derriere le logo. Le masque vertical
     fond le blanc dans le fond de page avant les cartes. */
  background-color: #FFFFFF;
  background-image:
    radial-gradient(46% 38% at 50% 34%, rgba(193, 18, 31, .08) 0%, rgba(193, 18, 31, 0) 70%),
    url("../../media/_site/hero-diagonales.webp");
  background-size: 100% 100%, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
}

.hero__inner { position: relative; display: flex; flex-direction: column; align-items: center; }

.hero__logo {
  width: auto;
  height: clamp(58px, 7.5vw, 92px);
  margin: 0 0 clamp(20px, 2.6vw, 30px);
}

.hero__name {
  margin: 0 0 clamp(18px, 2.6vw, 26px);
  font-family: var(--display);
  font-size: clamp(3rem, 8.5vw, 6.4rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -.035em;
  transition-delay: .06s;
}

.hero__tagline {
  margin: 0 0 clamp(28px, 4vw, 40px);
  max-width: 46ch;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.6;
  color: var(--muted);
  transition-delay: .12s;
}

.hero__cta {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  margin-bottom: clamp(34px, 5vw, 52px);
  transition-delay: .18s;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 30px;
  border-radius: 999px;
  font-size: .98rem; font-weight: 500;
  border: 1px solid transparent;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease),
              background .28s var(--ease), color .28s var(--ease),
              border-color .28s var(--ease);
}
.btn--solid { background: var(--ink); color: #fff; }
.btn--solid:hover { background: #000; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--ghost { background: var(--card); border-color: var(--border); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.chips {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  margin: 0; padding: 0; list-style: none;
  transition-delay: .24s;
}
.chips li {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  font-size: .84rem;
  color: var(--muted);
}

.hero__explore {
  position: absolute; left: 50%; bottom: clamp(22px, 4vh, 44px);
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: .68rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted-2);
  transition-delay: .3s;
}
.hero__explore svg { width: 14px; height: 22px; animation: bob 2.6s var(--ease) infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) { .hero__explore svg { animation: none; } }
@media (max-height: 720px) { .hero__explore { display: none; } }

/* 6. SECTIONS ------------------------------------------------------------ */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--projects { padding-top: clamp(40px, 5vw, 70px); }
/* L accueil n a plus de titre de section : on resserre le haut du bloc. */
#explorer { padding-top: clamp(20px, 2.4vw, 36px); }

.section__title {
  margin: 0 0 clamp(16px, 2vw, 22px);
  font-family: var(--display);
  font-size: clamp(2.1rem, 4.6vw, 3.3rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.03em;
}

.section__lead {
  max-width: 62ch;
  margin: 0 0 clamp(30px, 4vw, 46px);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.7;
  color: var(--muted);
}
.section__lead p { margin: 0 0 1em; }
.section__lead p:last-child { margin-bottom: 0; }

/* 6b. HUB D'ACCUEIL ------------------------------------------------------ */
.hub {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}
.hub__card {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: clamp(26px, 3vw, 38px);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--card);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease),
              border-color .4s var(--ease);
}
.hub__card:first-child { grid-column: span 2; }
.hub__icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  margin-bottom: 20px;
  border-radius: var(--r-sm);
  background: var(--panel);
}
.hub__icon svg { width: 21px; height: 21px; }
.hub__body { flex: 1; }
.hub__title {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.3rem, 2vw, 1.7rem); font-weight: 700;
  letter-spacing: -.02em;
}
.hub__kicker { display: block; margin-top: 2px; font-size: .92rem; color: var(--accent); }
.hub__text {
  display: block; margin-top: 12px; max-width: 52ch;
  font-size: .96rem; line-height: 1.65; color: var(--muted);
}
.hub__go {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 24px;
  font-size: .94rem; font-weight: 500;
}
.hub__go svg { width: 16px; height: 16px; transition: transform .35s var(--ease); }
.hub__card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #DEDEDE; }
.hub__card:hover .hub__go { color: var(--accent); }
.hub__card:hover .hub__go svg { transform: translateX(5px); }

/* 6c. PAGE « A PROPOS » -------------------------------------------------- */
.section--page { padding-top: clamp(40px, 5vw, 64px); }

.about {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: var(--gap);
  align-items: start;
}
.panel {
  padding: clamp(24px, 2.8vw, 34px);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--card);
}
.panel--full { grid-column: 1 / -1; }
.about__row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  align-items: start;
}
.panel--photo { margin: 0; padding: clamp(14px, 1.2vw, 18px); }
.panel--photo img {
  width: 100%; height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--r-sm);
  background: var(--panel);
}
.panel__intro {
  margin: 0 0 clamp(24px, 3vw, 34px);
  font-size: clamp(.98rem, 1.35vw, 1.14rem);
  line-height: 1.7;
  color: var(--ink);
}
.panel__label {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: .74rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted-2);
}

.taglist { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.taglist li {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  font-size: .88rem;
  color: var(--muted);
}

.xp__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 38px) clamp(28px, 4vw, 56px);
}
.xp__org {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 1.08rem; font-weight: 700;
}
.xp__badge {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: var(--body);
  font-size: .74rem; font-weight: 600;
  letter-spacing: .01em;
}
.xp__period { margin: 0 0 8px; font-size: .92rem; color: var(--accent); }
.xp__text { margin: 0; font-size: .96rem; line-height: 1.65; color: var(--muted); }

/* pied de page multi-pages */
.footer__nav { display: flex; flex-wrap: wrap; gap: 20px; font-size: .88rem; color: var(--muted); }
.footer__nav a { transition: color .25s var(--ease); }
.footer__nav a:hover { color: var(--accent); }

/* 7. FILTRES ------------------------------------------------------------- */
.filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: clamp(24px, 3vw, 36px);
}
.filter {
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  font-size: .9rem;
  color: var(--muted);
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease);
}
.filter:hover { border-color: var(--muted-2); color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.filter__count { margin-left: 8px; font-size: .8em; opacity: .55; font-variant-numeric: tabular-nums; }

/* 8. GRILLE BENTO -------------------------------------------------------- */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: clamp(200px, 19vw, 280px);
  grid-auto-flow: row dense;
  gap: var(--gap);
}

/* Carte : le visuel dans un cadre arrondi en haut, le texte dessous.
   Structure heritee du portfolio scolaire, appliquee a toutes les tailles. */
.card {
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  padding: clamp(10px, .9vw, 14px);
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--card);
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease),
              border-color .45s var(--ease);
}
.card--large { grid-column: span 2; grid-row: span 2; }
.card--wide  { grid-column: span 2; }
.card--tall  { grid-row: span 2; }

.card__media {
  position: relative;
  min-height: 0; /* sinon l'image imposerait sa hauteur intrinseque a la ligne */
  overflow: hidden;
  border-radius: var(--r-sm);
  background: var(--panel);
}
.card__img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
/* pad : un logo, affiche entier sur son fond de marque */
.card--pad .card__media { padding: clamp(14px, 4%, 34px); }
.card--pad .card__img { object-fit: contain; }

.card__body {
  display: flex; align-items: center; gap: 12px;
  padding: 14px clamp(6px, .6vw, 10px) 6px;
}
.card__text { flex: 1; min-width: 0; }

.card__title {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.02rem, 1.5vw, 1.3rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.015em;
}
.card--large .card__title { font-size: clamp(1.3rem, 2vw, 1.75rem); }
.card__tag {
  display: block;
  margin-top: 2px;
  font-size: .82rem;
  color: var(--accent);
}
.card__kicker {
  /* Deux lignes maxi : sans ca, un intitule long pousse la fleche hors du cadre
     sur les cartes etroites. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 3px;
  font-size: .86rem;
  line-height: 1.45;
  color: var(--muted);
}

.card__arrow {
  flex: 0 0 auto;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--ink);
  transition: background .3s var(--ease), color .3s var(--ease),
              border-color .3s var(--ease), transform .3s var(--ease);
}
.card__arrow svg { width: 15px; height: 15px; }

.card__num {
  position: absolute; top: clamp(18px, 1.6vw, 24px); left: clamp(18px, 1.6vw, 24px);
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-family: var(--display);
  font-size: .7rem; font-weight: 700; letter-spacing: .1em;
  color: var(--muted);
}

.card:hover, .card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: #DEDEDE;
}
.card:hover .card__img { transform: scale(1.04); }
.card:hover .card__arrow { background: var(--accent); border-color: var(--accent); color: #fff; }

.card.is-hidden { display: none; }
.bento__empty { padding: 60px 0; text-align: center; color: var(--muted); }

/* 9. POPUP --------------------------------------------------------------- */
.modal {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  padding: clamp(0px, 3vh, 40px) clamp(0px, 3vw, 40px);
}
.modal[hidden] { display: none; }

.modal__overlay {
  position: absolute; inset: 0;
  background: rgba(16, 16, 16, .58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .22s ease;
}
.modal.is-open .modal__overlay { opacity: 1; }

.modal__panel {
  position: relative;
  width: min(1060px, 100%);
  max-height: 100%;
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: clamp(0px, 2vw, 2rem);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: scale(.965) translateY(10px);
  transition: opacity .26s var(--ease), transform .26s var(--ease);
  overflow: hidden;
}
.modal.is-open .modal__panel { opacity: 1; transform: none; }
.modal__panel:focus, .modal__panel:focus-visible { outline: none; }
@media (prefers-reduced-motion: reduce) { .modal__overlay, .modal__panel { transition: none; } }

.modal__close {
  position: absolute; top: 16px; right: 16px; z-index: 3;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease), transform .25s var(--ease);
}
.modal__close svg { width: 17px; height: 17px; }
.modal__close:hover {
  background: var(--accent); border-color: var(--accent);
  color: #fff; transform: rotate(90deg);
}

.modal__scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.modal__inner { padding: clamp(32px, 4.5vw, 56px) clamp(20px, 4.5vw, 56px) clamp(30px, 4vw, 48px); }

.modal__title {
  margin: 0 0 clamp(18px, 2.6vw, 26px);
  font-family: var(--display);
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.03em;
}

.pills {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0 0 clamp(22px, 3vw, 30px); padding: 0; list-style: none;
}
.pills li {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  font-size: .84rem;
  color: var(--muted);
}
.pills li:first-child {
  background: var(--accent-soft); border-color: transparent;
  color: var(--accent-dark); font-weight: 500;
}

.modal__desc {
  max-width: 88ch;
  margin: 0 0 clamp(28px, 3.6vw, 40px);
  font-size: clamp(1rem, 1.4vw, 1.08rem);
  line-height: 1.75;
  color: var(--muted);
}

.modal__label {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: .72rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted-2);
}

.palette { margin-bottom: clamp(28px, 3.6vw, 40px); }
.palette__list { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.swatch {
  width: 96px; height: 96px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  display: flex; align-items: flex-end;
  padding: 9px;
  cursor: pointer;
  font-size: .68rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.swatch:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }

.modal__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: clamp(30px, 4vw, 44px); }
.action {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: .94rem; font-weight: 500;
  border: 1px solid transparent;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease),
              background .28s var(--ease), border-color .28s var(--ease);
}
.action svg { width: 15px; height: 15px; }
.action--primary { background: var(--ink); color: #fff; }
.action--primary:hover { background: #000; transform: translateY(-2px); box-shadow: var(--shadow); }
.action--ghost { border-color: var(--border); color: var(--ink); background: var(--card); }
.action--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.action__size { font-weight: 400; opacity: .6; font-size: .88em; }

/* align-items: start -> chaque visuel garde sa hauteur propre.
   Sans cela, le plus court d une ligne est etire et laisse voir le fond
   du bloc : le fameux rectangle gris. */
.gallery__grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--gap);
  align-items: start;
}
.shot {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--panel);
  grid-column: span 6;
}
.shot--half { grid-column: span 3; }
.shot--third { grid-column: span 2; }
.shot--two-thirds { grid-column: span 4; }
.shot img, .shot video { width: 100%; height: auto; }
.shot--pad { display: grid; place-items: center; padding: clamp(18px, 4%, 44px); }
.shot--pad img { max-height: 420px; width: auto; object-fit: contain; }
.shot img { transition: transform .7s var(--ease); }
.shot:not(.shot--pad):hover img { transform: scale(1.03); }

.modal__nav {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  padding: 12px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal__navbtn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.modal__navbtn svg { width: 16px; height: 16px; }
.modal__navbtn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.modal__navlabel {
  font-family: var(--display);
  font-size: .8rem; font-weight: 500;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
  min-width: 90px; text-align: center;
}

/* 10. CONTACT & FOOTER --------------------------------------------------- */
.contact__links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap);
}
.contact__card {
  display: flex; align-items: center; gap: 16px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--card);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease),
              border-color .35s var(--ease);
}
.contact__icon {
  flex: 0 0 auto;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  background: var(--panel);
  color: var(--ink);
}
.contact__icon svg { width: 20px; height: 20px; }
.contact__body { flex: 1; min-width: 0; }
.contact__label {
  display: block;
  font-family: var(--display);
  font-size: 1.02rem; font-weight: 700;
}
.contact__value {
  display: block;
  font-size: .88rem; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.contact__arrow {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.contact__arrow svg { width: 14px; height: 14px; }
.contact__card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #DEDEDE; }
.contact__card:hover .contact__arrow { background: var(--accent); border-color: var(--accent); color: #fff; }

.footer { border-top: 1px solid var(--border); padding: 28px 0; }
.footer__inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 12px;
}
.footer__inner p { margin: 0; font-size: .86rem; color: var(--muted-2); }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 90;
  transform: translate(-50%, 16px);
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--ink); color: #fff;
  font-size: .84rem;
  opacity: 0; pointer-events: none;
  transition: opacity .28s var(--ease), transform .28s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* 11. RESPONSIVE --------------------------------------------------------- */
@media (max-width: 1040px) {
  .bento { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  :root { --nav-h: 62px; }

  .nav__links a { padding: 8px 10px; font-size: .86rem; }
  .lang { margin-left: 7px; }
  .nav__links .lang__item { padding: 0 6px; font-size: .74rem; }
  .brand { font-size: .98rem; }

  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: clamp(190px, 42vw, 250px); }

  .hub { grid-template-columns: 1fr; }
  .hub__card:first-child { grid-column: span 1; }
  .about { grid-template-columns: 1fr; }
  .panel--photo { max-width: 320px; }
  .xp__grid { grid-template-columns: 1fr; }
  .about__row { grid-template-columns: 1fr; }
  .card--large { grid-column: span 2; grid-row: span 2; }
  .card--wide  { grid-column: span 2; }
  .card--tall  { grid-row: span 1; }

  .gallery__grid { grid-template-columns: repeat(2, 1fr); }
  .shot, .shot--half, .shot--two-thirds { grid-column: span 2; }
  .shot--third { grid-column: span 1; }
  .shot--pad img { max-height: 260px; }

  .modal { padding: 0; }
  .modal__panel { max-height: 100svh; height: 100svh; border-radius: 0; border: 0; }
  .modal__close { top: 10px; right: 10px; width: 38px; height: 38px; }
  .swatch { width: 74px; height: 74px; font-size: .62rem; }
}

/* Sous 520 px, la barre ne peut plus tout porter : on resserre les liens et
   la bascule n affiche que la langue vers laquelle on va (l autre est la page
   courante, elle se devine). Sans ca la page deborde de ~50px a 390px. */
/* Sous 360 px, meme la bascule plate ne rentre plus : on ne garde que la
   langue de destination, la courante etant celle de la page affichee. */
@media (max-width: 360px) {
  .nav__links .lang__item.is-active { display: none; }
  .nav__links .lang__item + .lang__item { border-left: 0; }
  .nav__links a.lang__item { color: var(--ink); font-weight: 600; }
}

@media (max-width: 520px) {
  .nav__inner { padding: 0 12px; gap: 6px; }
  .nav__links { gap: 0; }
  .nav__links a { padding: 8px 7px; font-size: .82rem; }
  .brand { font-size: .92rem; }
  .lang { margin-left: 5px; }
  .nav__links .lang__item { padding: 0 5px; font-size: .72rem; }

  .bento { grid-template-columns: 1fr; grid-auto-rows: 264px; }
  .card--large, .card--wide { grid-column: span 1; }
  .card--large, .card--tall { grid-row: span 1; }

  .gallery__grid { grid-template-columns: 1fr; }
  .shot, .shot--half, .shot--third, .shot--two-thirds { grid-column: span 1; }

  .hero__cta { flex-direction: column; align-self: stretch; }
  .btn { width: 100%; }
  .modal__actions .action { width: 100%; justify-content: center; }
}

@media print {
  .nav, .modal, .hero__explore, .filters, .toast, .hero__bg { display: none !important; }
}
