/* ============================================================
   NAILEC.DEV — violet & noir
   Fonts : Unbounded (display) · Instrument Sans (body) · JetBrains Mono
   ============================================================ */

/* ---------- Polices auto-hébergées (woff2, latin + latin-ext) ---------- */
@font-face{font-family:"Instrument Sans";font-style:normal;font-weight:400;font-display:swap;src:url("../fonts/InstrumentSans-400-latin-ext.woff2") format("woff2");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:"Instrument Sans";font-style:normal;font-weight:400;font-display:swap;src:url("../fonts/InstrumentSans-400-latin.woff2") format("woff2");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:"Instrument Sans";font-style:normal;font-weight:500;font-display:swap;src:url("../fonts/InstrumentSans-500-latin-ext.woff2") format("woff2");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:"Instrument Sans";font-style:normal;font-weight:500;font-display:swap;src:url("../fonts/InstrumentSans-500-latin.woff2") format("woff2");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:"Instrument Sans";font-style:normal;font-weight:600;font-display:swap;src:url("../fonts/InstrumentSans-600-latin-ext.woff2") format("woff2");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:"Instrument Sans";font-style:normal;font-weight:600;font-display:swap;src:url("../fonts/InstrumentSans-600-latin.woff2") format("woff2");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:"JetBrains Mono";font-style:normal;font-weight:400;font-display:swap;src:url("../fonts/JetBrainsMono-400-latin-ext.woff2") format("woff2");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:"JetBrains Mono";font-style:normal;font-weight:400;font-display:swap;src:url("../fonts/JetBrainsMono-400-latin.woff2") format("woff2");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:"JetBrains Mono";font-style:normal;font-weight:500;font-display:swap;src:url("../fonts/JetBrainsMono-500-latin-ext.woff2") format("woff2");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:"JetBrains Mono";font-style:normal;font-weight:500;font-display:swap;src:url("../fonts/JetBrainsMono-500-latin.woff2") format("woff2");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:"JetBrains Mono";font-style:normal;font-weight:700;font-display:swap;src:url("../fonts/JetBrainsMono-700-latin-ext.woff2") format("woff2");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:"JetBrains Mono";font-style:normal;font-weight:700;font-display:swap;src:url("../fonts/JetBrainsMono-700-latin.woff2") format("woff2");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:"Unbounded";font-style:normal;font-weight:600;font-display:swap;src:url("../fonts/Unbounded-600-latin-ext.woff2") format("woff2");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:"Unbounded";font-style:normal;font-weight:600;font-display:swap;src:url("../fonts/Unbounded-600-latin.woff2") format("woff2");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:"Unbounded";font-style:normal;font-weight:700;font-display:swap;src:url("../fonts/Unbounded-700-latin-ext.woff2") format("woff2");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:"Unbounded";font-style:normal;font-weight:700;font-display:swap;src:url("../fonts/Unbounded-700-latin.woff2") format("woff2");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:"Unbounded";font-style:normal;font-weight:800;font-display:swap;src:url("../fonts/Unbounded-800-latin-ext.woff2") format("woff2");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:"Unbounded";font-style:normal;font-weight:800;font-display:swap;src:url("../fonts/Unbounded-800-latin.woff2") format("woff2");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}


:root {
  /* Couleurs */
  --noir: #060309;
  --noir-2: #0c0714;
  --noir-3: #140b20;
  --violet: #a855f7;
  --violet-vif: #c084fc;
  --violet-deep: #7c3aed;
  --violet-sombre: #581c87;
  --encre: #f2edfa;
  --encre-2: #b6a9cc;
  --encre-3: #877ba0; /* ≥ 4.5:1 sur fond noir (WCAG AA) */
  --ligne: rgba(168, 85, 247, 0.14);
  --ligne-soft: rgba(255, 255, 255, 0.06);

  /* Typo */
  --font-display: "Unbounded", sans-serif;
  --font-body: "Instrument Sans", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  /* Rythme */
  --radius: 18px;
  --radius-sm: 12px;
  --nav-h: 72px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* Ombres */
  --shadow-violet: 0 8px 28px rgba(124, 58, 237, 0.35);
  --shadow-card: 0 18px 40px rgba(88, 28, 135, 0.25);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }

body {
  background: var(--noir);
  color: var(--encre);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--violet-deep); color: #fff; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* Scrollbar personnalisée */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--noir); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--violet-sombre), var(--violet-deep));
  border-radius: 8px;
  border: 2px solid var(--noir);
}
::-webkit-scrollbar-thumb:hover { background: var(--violet); }
@supports not selector(::-webkit-scrollbar) {
  html { scrollbar-color: var(--violet-deep) var(--noir); scrollbar-width: thin; }
}

/* Focus clavier */
:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 200;
  padding: 0.7rem 1.2rem;
  background: var(--violet-deep);
  color: #fff;
  font-weight: 600;
  border-radius: 10px;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* Gouttières fluides : 1rem de chaque côté sur petit écran, 1.25rem au-delà */
.container { width: min(1160px, 100% - clamp(2rem, 6vw, 2.5rem)); margin-inline: auto; }
.mono { font-family: var(--font-mono); letter-spacing: 0.08em; }
.muted { color: var(--encre-3); }
.text-violet { color: var(--violet-vif); font-weight: 600; }

.grad-text {
  background: linear-gradient(100deg, #f3e8ff, #c084fc 30%, #a855f7 55%, #7c3aed 80%, #e9d5ff);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: grad-flow 5s ease-in-out infinite;
}
@keyframes grad-flow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.link-violet {
  color: var(--violet-vif);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s;
}
.link-violet:hover { color: #e9d5ff; }

.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--violet-vif);
  margin-bottom: 0.9rem;
}
.chip::before {
  content: "✦";
  display: inline-block;
  margin-right: 0.65em;
  color: var(--violet);
  font-size: 0.85em;
  transform: translateY(-1px);
}

/* ---------- Écran de chargement ---------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  background: var(--noir);
  transition: opacity 0.65s var(--ease-out), visibility 0.65s;
}
.loader::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 45% at 50% 42%, rgba(124, 58, 237, 0.16), transparent 70%);
  pointer-events: none;
}
.loader.done { opacity: 0; visibility: hidden; }
.no-js .loader { display: none; }
body.is-loading { overflow: hidden; }

.loader-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2.2rem 3rem;
  animation: loader-in 0.7s var(--ease-out) both;
}
/* Équerres "viseur" : même signature que le badge du hero */
.loader-inner::before,
.loader-inner::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
}
.loader-inner::before {
  top: 0;
  left: 0;
  border-top: 1.5px solid var(--violet);
  border-left: 1.5px solid var(--violet);
}
.loader-inner::after {
  bottom: 0;
  right: 0;
  border-bottom: 1.5px solid var(--violet);
  border-right: 1.5px solid var(--violet);
}
@keyframes loader-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.loader-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.4rem, 4.5vw, 1.9rem);
  letter-spacing: -0.02em;
}
.loader-logo span {
  background: linear-gradient(100deg, #c084fc, #a855f7 55%, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.loader-bar {
  width: min(280px, 62vw);
  height: 2px;
  border-radius: 2px;
  background: rgba(168, 85, 247, 0.15);
  overflow: hidden;
}
.loader-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(to right, var(--violet-deep), var(--violet), var(--violet-vif));
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.6);
  transform: scaleX(0);
  transform-origin: left;
}

.loader-meta {
  display: flex;
  justify-content: space-between;
  width: min(280px, 62vw);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--encre-3);
}
.loader-meta #loader-count {
  color: var(--violet-vif);
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  .loader { transition: none; }
  .loader-inner { animation: none; }
}

/* ---------- Barre de progression ---------- */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  height: 2px;
  width: 100%;
  background: linear-gradient(to right, var(--violet-deep), var(--violet), var(--violet-vif));
  transform: scaleX(0);
  transform-origin: left;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.6);
}

/* ---------- Fond : faisceaux de lumière + grain ---------- */

.stage-lights {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}
.beam {
  position: absolute;
  top: -30vh;
  width: 34vw;
  height: 130vh;
  filter: blur(60px);
  opacity: 0.5;
  transform-origin: top center;
}
.beam-1 {
  left: 8vw;
  background: conic-gradient(from 8deg at 50% 0%, transparent 44%, rgba(168, 85, 247, 0.32) 50%, transparent 56%);
  animation: sway 11s ease-in-out infinite alternate;
}
.beam-2 {
  left: 42vw;
  background: conic-gradient(from -6deg at 50% 0%, transparent 45%, rgba(124, 58, 237, 0.26) 50%, transparent 55%);
  animation: sway 14s ease-in-out infinite alternate-reverse;
}
.beam-3 {
  right: 4vw;
  background: conic-gradient(from 4deg at 50% 0%, transparent 46%, rgba(192, 132, 252, 0.2) 50%, transparent 54%);
  animation: sway 9s ease-in-out infinite alternate;
}
@keyframes sway {
  from { transform: rotate(-7deg); }
  to { transform: rotate(7deg); }
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(6, 3, 9, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}
.nav.scrolled {
  background: rgba(6, 3, 9, 0.85);
  border-bottom-color: var(--ligne-soft);
}
.nav-inner {
  width: min(1280px, 100% - clamp(2rem, 6vw, 2.5rem));
  margin-inline: auto;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.nav-logo-dot { color: var(--violet); }
.nav-links { display: flex; gap: 2.2rem; }
.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--encre-2);
  position: relative;
  padding: 0.35rem 0;
  transition: color 0.2s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--violet);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease-out);
}
.nav-links a:hover { color: #fff; }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: #fff; }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
}
.nav-burger span {
  width: 24px;
  height: 2px;
  background: var(--encre);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-burger.open span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-burger.open span:last-child { transform: translateY(-4px) rotate(-45deg); }

.nav-mobile {
  display: none;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows 0.3s var(--ease-out);
  border-top: 1px solid transparent;
  /* Fond opaque : le contenu de la page ne doit jamais transparaître */
  background: rgba(6, 3, 9, 0.98);
}
.nav-mobile.open {
  grid-template-rows: 1fr;
  border-top-color: var(--ligne-soft);
  box-shadow: 0 30px 50px rgba(0, 0, 0, 0.55);
}
.nav-mobile-inner {
  min-height: 0;
  overflow: hidden;
}
.nav-mobile.open .nav-mobile-inner {
  /* Scroll interne si l'écran est très court (mobile paysage) */
  max-height: calc(100dvh - var(--nav-h));
  overflow-y: auto;
}
.nav-mobile a {
  display: block;
  padding: 0.85rem 1.25rem;
  color: var(--encre-2);
  font-weight: 500;
  border-bottom: 1px solid var(--ligne-soft);
}
.nav-mobile a.btn {
  display: flex;
  margin: 0.9rem 1.25rem 1.2rem;
  padding: 0.65rem 1.35rem;
  color: #fff;
  border-bottom: 0;
}

/* ---------- Boutons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  min-height: 44px;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  overflow: hidden;
  /* --mag-x / --mag-y : effet magnétique piloté par JS (pointeur fin uniquement) */
  transform: translate(var(--mag-x, 0px), var(--mag-y, 0px));
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s, border-color 0.25s, background 0.25s;
  will-change: transform;
}
.btn-lg { min-height: 52px; padding: 0.85rem 1.9rem; font-size: 1rem; }

.btn-solid {
  color: #fff;
  background: linear-gradient(115deg, var(--violet-deep), var(--violet) 45%, var(--violet-vif) 70%, var(--violet-deep));
  background-size: 250% 100%;
  animation: grad-flow 6s ease-in-out infinite;
  box-shadow: var(--shadow-violet);
}
.btn-solid::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.35) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.6s var(--ease-out);
}
.btn-solid:hover {
  transform: translate(var(--mag-x, 0px), calc(var(--mag-y, 0px) - 2px));
  box-shadow: 0 12px 36px rgba(168, 85, 247, 0.45);
}
.btn-solid:hover::before { transform: translateX(120%); }
.btn-solid:active { transform: translate(var(--mag-x, 0px), var(--mag-y, 0px)); }

.btn-ghost {
  color: var(--encre);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.02);
}
.btn-ghost:hover {
  border-color: rgba(168, 85, 247, 0.55);
  background: rgba(168, 85, 247, 0.08);
  transform: translate(var(--mag-x, 0px), calc(var(--mag-y, 0px) - 2px));
}
.btn-ghost:active { transform: translate(var(--mag-x, 0px), var(--mag-y, 0px)); }
.btn-mascot { width: 26px; height: 26px; object-fit: contain; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
}
/* Photo de scène en fond : recouverte d'un voile noir et fondue vers le bas
   pour que le texte reste lisible et que la section suivante enchaîne sans coupure */
.hero-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero-photo img,
.hero-photo video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
  opacity: 0.5;
  filter: saturate(1.15) contrast(1.05);
  mask-image: linear-gradient(to bottom, black 35%, rgba(0, 0, 0, 0.55) 65%, transparent 96%);
  -webkit-mask-image: linear-gradient(to bottom, black 35%, rgba(0, 0, 0, 0.55) 65%, transparent 96%);
  animation: hero-photo-in 1.8s var(--ease-out) both;
}
/* La vidéo reste invisible tant qu'elle ne joue pas ; la photo sert d'affiche.
   Quand elle démarre, fondu croisé photo → vidéo. */
.hero-video { opacity: 0; animation: none; transition: opacity 1.2s ease; }
.hero-photo.is-playing .hero-video { opacity: 0.5; }
/* animation:none obligatoire : l'animation d'entrée (fill-mode both) fige
   l'opacité à 0.5 et empêcherait la photo de disparaître */
.hero-photo.is-playing img { animation: none; transition: opacity 1.2s ease 0.3s; opacity: 0; }
@keyframes hero-photo-in {
  from { opacity: 0; transform: scale(1.04); }
  to { opacity: 0.5; transform: scale(1); }
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(6, 3, 9, 0.85) 0%, rgba(6, 3, 9, 0.55) 45%, rgba(6, 3, 9, 0.25) 100%),
    linear-gradient(to bottom, rgba(6, 3, 9, 0.6), transparent 30%);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(168, 85, 247, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(168, 85, 247, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 75%);
}
.hero-halo {
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 70vw;
  height: 55vh;
  background: radial-gradient(ellipse at 50% 0%, rgba(168, 85, 247, 0.14), transparent 65%);
  pointer-events: none;
}
/* Texte à gauche, tirage photo à droite */
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}
.hero-copy { min-width: 0; }

/* Carte photo : tirage incliné avec bord violet et légende viseur */
.hero-card {
  position: relative;
  justify-self: end;
  width: min(100%, 380px);
  margin: 0;
  padding: 0.55rem;
  border-radius: calc(var(--radius) + 4px);
  background:
    linear-gradient(160deg, rgba(20, 11, 32, 0.9), rgba(12, 7, 20, 0.95)) padding-box,
    linear-gradient(160deg, rgba(168, 85, 247, 0.6), rgba(168, 85, 247, 0.1) 45%, rgba(255, 255, 255, 0.08)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), 0 0 60px rgba(124, 58, 237, 0.25);
  transform: rotate(3deg);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s;
}
.hero-card:hover {
  transform: rotate(1.2deg) translateY(-6px);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.65), 0 0 80px rgba(168, 85, 247, 0.35);
}
.hero-card picture, .hero-card img {
  display: block;
  width: 100%;
  border-radius: var(--radius);
}
/* height:auto : sinon l'attribut height="853" l'emporte sur aspect-ratio */
.hero-card img { height: auto; aspect-ratio: 3 / 4; object-fit: cover; }

/* Avec la carte à droite, le titre n'a plus que ~60 % de la largeur :
   on borne sa taille pour que le rôle le plus long tienne sur une ligne */
@media (min-width: 981px) {
  .hero .hero-copy .hero-title { font-size: clamp(2rem, 4vw, 3.3rem); }
}
/* Lueur chaude qui déborde de la photo, comme la chaleur des jets */
.hero-card::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -1;
  background: radial-gradient(ellipse at 50% 40%, rgba(255, 140, 40, 0.18), transparent 60%);
  pointer-events: none;
}
.hero-card figcaption {
  position: absolute;
  left: 1.4rem;
  bottom: 1.4rem;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  padding: 0.5rem 0.9rem;
  text-shadow: 0 2px 12px rgba(6, 3, 9, 0.9);
}
.hero-card figcaption::before,
.hero-card figcaption::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
}
.hero-card figcaption::before { top: 0; left: 0; border-top: 1.5px solid var(--violet-vif); border-left: 1.5px solid var(--violet-vif); }
.hero-card figcaption::after { bottom: 0; right: 0; border-bottom: 1.5px solid var(--violet-vif); border-right: 1.5px solid var(--violet-vif); }

@media (max-width: 980px) {
  /* En dessous d'une tablette paysage, la carte disparaît : le hero reste compact */
  .hero-inner { grid-template-columns: 1fr; }
  .hero-card { display: none; }
}

/* Badge : pastille épurée avec halo violet */
/* Statut de disponibilité : pastille sobre, point vert qui pulse */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--encre-2);
  padding: 0.4rem 0.9rem 0.4rem 0.7rem;
  margin-bottom: 1.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 3, 9, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.badge-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  /* 7.5vw calibré pour que le rôle le plus long (≈ 11.7× la taille de police)
     tienne toujours dans le conteneur, même à 320 px */
  font-size: clamp(1.4rem, 7.5vw, 4.6rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 1.6rem;
  text-wrap: balance;
}

/* Prénom en petit au-dessus du titre : ancre l'identité dès le premier écran */
.hero-name {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: clamp(0.72rem, 1.1vw, 0.85rem);
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--encre-2);
  margin-bottom: 0.9rem;
}
.hero-name::after {
  content: "";
  width: 3rem;
  height: 1px;
  background: linear-gradient(to right, var(--violet), transparent);
}

/* Texte rotatif */
.rotator {
  display: inline-block;
  overflow: hidden;
  height: 1.18em;
  vertical-align: bottom;
}
.rotator-track { display: flex; flex-direction: column; }
.rotator-item {
  display: block;
  height: 1.18em;
  line-height: 1.18em;
  white-space: nowrap;
}

.hero-desc {
  max-width: 40rem;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--encre-2);
  margin-bottom: 2.4rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* Expertise : ligne de mots-clés en mono, séparés par des points violets */
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0;
  margin-top: 2.6rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--encre-3);
}
.hero-tags li {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  transition: color 0.25s;
}
.hero-tags li:hover { color: var(--encre); }
.hero-tags li + li::before {
  content: "";
  width: 4px;
  height: 4px;
  margin: 0 1rem;
  border-radius: 50%;
  background: var(--violet);
  opacity: 0.8;
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  color: var(--encre-3);
  font-size: 0.65rem;
  z-index: 1;
  transition: color 0.2s;
}
.scroll-hint:hover { color: var(--violet-vif); }
.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(168, 85, 247, 0.7), transparent);
  position: relative;
  display: block;
}
.scroll-line i {
  position: absolute;
  left: -2.5px;
  top: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--violet);
  animation: drop 2s ease-in-out infinite;
}
@keyframes drop {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(38px); opacity: 0.3; }
}

/* ---------- Chiffres clés : bande sous le hero ---------- */

.stats {
  position: relative;
  margin-top: -1px; /* recouvre le fondu bas du hero */
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--ligne);
}
.stat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  padding: 1.6rem 1.4rem;
  border-inline-start: 1px solid var(--ligne);
}
.stat:first-child { border-inline-start: 0; }
.stat-value {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(100deg, #f3e8ff, #c084fc 45%, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--encre-3);
}
@media (max-width: 560px) {
  .stat { padding: 1.2rem 0.6rem; }
  .stat-label { font-size: 0.66rem; }
}

/* ---------- Galerie photos ---------- */

.gallery-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  margin-bottom: 1.4rem;
}
.gallery-head .kicker { margin-bottom: 0.5rem; }
.gallery-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  letter-spacing: -0.01em;
}
.gallery-title em { font-style: normal; }
.gallery-hint { font-size: 0.66rem; color: var(--encre-3); letter-spacing: 0.14em; text-transform: uppercase; }

/* 4 colonnes × 2 rangées : deux portraits pleine hauteur aux extrémités,
   deux paysages empilés au centre */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: clamp(150px, 16vw, 230px);
  grid-auto-flow: dense; /* le 2e portrait remonte remplir la colonne de droite */
  gap: 0.9rem;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ligne);
  border-radius: var(--radius);
  padding: 0;
  background: var(--noir-3);
  cursor: zoom-in;
  transition: border-color 0.3s, transform 0.3s var(--ease-out), box-shadow 0.3s;
}
.gallery-item:nth-child(1), .gallery-item:nth-child(4) { grid-row: span 2; }
.gallery-item:nth-child(2), .gallery-item:nth-child(3) { grid-column: span 2; }
/* 2e bande : deux portraits pleine hauteur à gauche, un grand paysage 2×2 à droite */
.gallery-item:nth-child(5), .gallery-item:nth-child(6) { grid-row: span 2; }
.gallery-item:nth-child(7) { grid-column: span 2; grid-row: span 2; }
.gallery-item picture, .gallery-item img {
  width: 100%;
  height: 100%;
  display: block;
}
.gallery-item img {
  object-fit: cover;
  transition: transform 0.7s var(--ease-out), filter 0.4s;
  filter: saturate(0.9);
}
.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 3, 9, 0.55), transparent 45%);
  opacity: 0.7;
  transition: opacity 0.3s;
  pointer-events: none;
}
.gallery-item:hover, .gallery-item:focus-visible {
  border-color: rgba(168, 85, 247, 0.55);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}
.gallery-item:hover img, .gallery-item:focus-visible img { transform: scale(1.05); filter: saturate(1.05); }
.gallery-item:hover::after { opacity: 0.35; }
@media (max-width: 640px) {
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: clamp(130px, 28vw, 180px); gap: 0.7rem; }
  .gallery-item:nth-child(1), .gallery-item:nth-child(4) { grid-row: span 2; }
  .gallery-item:nth-child(2), .gallery-item:nth-child(3) { grid-column: span 2; grid-row: span 1; }
  .gallery-item:nth-child(5), .gallery-item:nth-child(6) { grid-row: span 1; grid-column: span 1; }
  .gallery-item:nth-child(7) { grid-column: span 2; grid-row: span 1; }
  .gallery-head { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
}

/* ---------- Sections ---------- */

/* isolation : le numéro de section en z-index -1 reste au-dessus du fond de la section */
.section { position: relative; isolation: isolate; padding: clamp(4.5rem, 9vw, 8rem) 0; }

/* Une section sur deux sur un fond légèrement plus clair, bordé d'un filet
   violet dégradé : rythme le scroll et casse la monotonie noir/cartes */
.section-alt {
  background: linear-gradient(to bottom, var(--noir-2), var(--noir-3) 50%, var(--noir-2));
}
.section-alt::before,
.section-alt::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(168, 85, 247, 0.4) 30%, rgba(168, 85, 247, 0.4) 70%, transparent);
}
.section-alt::before { top: 0; }
.section-alt::after { bottom: 0; }

.section-head {
  position: relative;
  max-width: 46rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
/* Numéro de section géant en filigrane */
.section-head[data-index]::before {
  content: attr(data-index);
  position: absolute;
  top: -0.32em;
  left: -0.04em;
  z-index: -1;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(7rem, 18vw, 13rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(168, 85, 247, 0.16);
  pointer-events: none;
  user-select: none;
}

.kicker {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--violet-vif);
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.kicker::before {
  content: "✦";
  display: inline-block;
  margin-right: 0.65em;
  color: var(--violet);
  font-size: 0.85em;
  transform: translateY(-1px);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.4vw, 3.2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.1rem;
  text-wrap: balance;
}
.section-title em { font-style: normal; }

.section-desc { color: var(--encre-2); font-size: 1.05rem; }

/* ---------- Cartes ---------- */

.card {
  position: relative;
  background:
    linear-gradient(160deg, rgba(20, 11, 32, 0.85), rgba(12, 7, 20, 0.9)) padding-box,
    linear-gradient(160deg, rgba(168, 85, 247, 0.35), rgba(168, 85, 247, 0.06) 40%, rgba(255, 255, 255, 0.04)) border-box;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 1.7rem;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px 200px at var(--mx, 50%) var(--my, 0%), rgba(168, 85, 247, 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.card:hover::before { opacity: 1; }

.card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}
.card p { color: var(--encre-2); font-size: 0.95rem; }
.card p + p { margin-top: 0.6rem; }

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--violet-vif);
  background: rgba(168, 85, 247, 0.14);
  border: 1px solid rgba(168, 85, 247, 0.25);
  margin-bottom: 1.1rem;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
}
.card:hover .card-icon {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}
.card-icon svg { width: 24px; height: 24px; }

/* Cartes prestation : numéro en filigrane en haut à droite, icône plus discrète */
.card-presta { padding-top: 1.9rem; }
.card-presta::after {
  content: attr(data-num);
  position: absolute;
  top: 1.1rem;
  right: 1.3rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--encre-3);
  transition: color 0.3s;
}
.card-presta:hover::after { color: var(--violet-vif); }
.card-presta h3 { font-size: 1.05rem; }
.card-presta .card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: transparent;
  border-color: rgba(168, 85, 247, 0.3);
}
.card-presta:hover .card-icon { background: rgba(168, 85, 247, 0.14); }

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}

.ma-logo {
  height: 44px;
  width: auto;
  margin-bottom: 1.2rem;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.45));
}

/* Carte MA Lighting : photo immersive + console en verre */
.card-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 0;
  align-items: stretch;
  padding: 0;
  margin-bottom: 1.1rem;
}
.card-feature h3 { font-size: 1.5rem; }
.card-feature p { font-size: 1rem; }

.feature-body {
  align-self: center;
  padding: clamp(1.8rem, 3.5vw, 3rem);
}

.feature-media {
  position: relative;
  min-height: 480px;
  overflow: hidden;
}
.feature-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: transform 0.7s var(--ease-out), opacity 1.2s ease;
}
.feature-photo.active { opacity: 1; }
.card-feature:hover .feature-photo { transform: scale(1.04); }
.feature-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(6, 3, 9, 0.88), transparent 55%),
    linear-gradient(to right, transparent 70%, rgba(12, 7, 20, 0.55));
  pointer-events: none;
}
/* Légende photo : équerres "viseur", même signature que le badge du hero */
.feature-caption {
  position: absolute;
  left: 1.4rem;
  bottom: 1.4rem;
  z-index: 2;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  padding: 0.55rem 1rem;
  text-shadow: 0 2px 12px rgba(6, 3, 9, 0.9);
}
.feature-caption::before,
.feature-caption::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
}
.feature-caption::before {
  top: 0;
  left: 0;
  border-top: 1.5px solid var(--violet-vif);
  border-left: 1.5px solid var(--violet-vif);
}
.feature-caption::after {
  bottom: 0;
  right: 0;
  border-bottom: 1.5px solid var(--violet-vif);
  border-right: 1.5px solid var(--violet-vif);
}

@keyframes pulse-green {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ---------- Outils : double marquee de tuiles ---------- */

.tools { padding: clamp(3rem, 6vw, 5rem) 0; }
.tools .kicker { margin-bottom: 0.8rem; }
.tools-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  letter-spacing: -0.01em;
  margin-bottom: 2.2rem;
}
.tools-title em { font-style: normal; }

.marquee {
  overflow: hidden;
  padding: 0.45rem 0;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 36s linear infinite;
}
.marquee-reverse .marquee-track { animation-direction: reverse; animation-duration: 42s; }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee-slot {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding-right: 0.9rem;
  flex-shrink: 0;
}

.tool {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
  color: var(--encre-2);
  background: linear-gradient(160deg, rgba(20, 11, 32, 0.75), rgba(12, 7, 20, 0.85));
  border: 1px solid var(--ligne-soft);
  border-radius: 14px;
  padding: 0.7rem 1.25rem;
  transition: color 0.25s, border-color 0.25s, transform 0.25s var(--ease-out), box-shadow 0.25s;
}
.tool:hover {
  color: #fff;
  border-color: rgba(168, 85, 247, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(88, 28, 135, 0.3);
}
.tool-ico {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  font-style: normal;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--tool, var(--violet-vif));
  background: color-mix(in srgb, var(--tool, #a855f7) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--tool, #a855f7) 32%, transparent);
}
.tool:hover .tool-ico {
  box-shadow: 0 0 14px color-mix(in srgb, var(--tool, #a855f7) 45%, transparent);
}
.tool-logo { height: 26px; width: auto; }
.tool-logo-rode { height: 16px; }
.tool-logo-img { width: 20px; height: 20px; object-fit: contain; }
/* Logos sombres passés en blanc pour le fond noir */
.tool-logo-inv { filter: brightness(0) invert(1); opacity: 0.92; }
.tool-logo-round { border-radius: 5px; }
.tool-logo-robe { height: 15px; width: auto; filter: brightness(0) invert(1); opacity: 0.92; }
.tool-logo-chauvet { height: 26px; width: auto; filter: brightness(0) invert(1); opacity: 0.92; }

.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;
}

/* ---------- Squelettes de chargement ---------- */

.skeleton {
  position: relative;
  overflow: hidden;
  background: rgba(168, 85, 247, 0.08);
  border-radius: 8px;
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(192, 132, 252, 0.12), transparent);
  animation: shimmer 1.6s ease-in-out infinite;
}
@keyframes shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}
.skeleton-text { display: inline-block; height: 0.9em; max-width: 100%; }
.skeleton-card { gap: 0.8rem; pointer-events: none; }

/* ---------- GitHub ---------- */

.card-github {
  display: flex;
  gap: 1.8rem;
  align-items: center;
  padding: 2rem;
  margin-bottom: 3rem;
}
.gh-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(from 0deg, var(--violet), var(--violet-sombre), var(--violet-vif), var(--violet));
}
.gh-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid var(--noir);
  background: var(--noir-3);
  object-fit: cover;
}
.gh-name { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 0.3rem; }
.gh-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin-top: 0.9rem;
  font-size: 0.78rem;
  color: var(--encre-2);
}
.gh-stats b { color: var(--violet-vif); font-weight: 700; font-variant-numeric: tabular-nums; }
.gh-link { margin-top: 0.9rem; font-size: 0.92rem; }

.repos-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.repos-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
}
.repos-count {
  font-size: 0.68rem;
  color: var(--encre-3);
  letter-spacing: 0.04em;
}
.repos-count::before {
  content: "✦";
  display: inline-block;
  margin-right: 0.65em;
  color: var(--violet);
  font-size: 0.85em;
  transform: translateY(-1px);
}
.repos-loading { grid-column: 1 / -1; text-align: center; padding: 2rem 0; font-size: 0.8rem; }

/* La grille des repos ne reprend pas l'étirement de la dernière carte des mods :
   6 cartes → 3×2 en large, 2×3 en tablette, 1 colonne en mobile */
.repos-grid { gap: 1.1rem; }
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
@media (max-width: 1080px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-3 { grid-template-columns: 1fr; gap: 0.9rem; } }
.repo-card { display: flex; flex-direction: column; gap: 0.55rem; }
.repo-card .repo-name {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--violet-vif);
  word-break: break-word;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.repo-card .repo-name svg { flex-shrink: 0; opacity: 0.7; }
.repo-card .repo-desc {
  font-size: 0.88rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.repo-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--encre-3);
}
.repo-meta svg { vertical-align: -2px; margin-right: 3px; }
.repo-lang { display: inline-flex; align-items: center; gap: 0.4rem; }
.repo-lang::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lang-color, var(--violet));
}
.repo-date { margin-left: auto; }

/* ---------- Section JAMSM / Minecraft : fiche technique ---------- */

.jamsm-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 0;
  padding: 0;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.jamsm-intro {
  padding: clamp(1.8rem, 3.5vw, 2.8rem);
  align-self: center;
}
.jamsm-intro h3 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  margin-bottom: 0.8rem;
}
.jamsm-intro > p:not(.chip) { color: var(--encre-2); font-size: 1rem; }
.jamsm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

/* Colonne droite : capture en jeu pleine hauteur, légende viseur */
.jamsm-media {
  position: relative;
  margin: 0;
  min-height: 320px;
  overflow: hidden;
  border-inline-start: 1px solid var(--ligne);
}
.jamsm-media picture, .jamsm-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}
.jamsm-panel:hover .jamsm-media img { transform: scale(1.04); }
.jamsm-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(6, 3, 9, 0.75), transparent 45%),
    linear-gradient(to right, rgba(12, 7, 20, 0.5), transparent 30%);
  pointer-events: none;
}
.jamsm-media figcaption {
  position: absolute;
  left: 1.4rem;
  bottom: 1.4rem;
  z-index: 1;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  padding: 0.5rem 0.9rem;
  text-shadow: 0 2px 12px rgba(6, 3, 9, 0.9);
}
.jamsm-media figcaption::before,
.jamsm-media figcaption::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
}
.jamsm-media figcaption::before { top: 0; left: 0; border-top: 1.5px solid var(--violet-vif); border-left: 1.5px solid var(--violet-vif); }
.jamsm-media figcaption::after { bottom: 0; right: 0; border-bottom: 1.5px solid var(--violet-vif); border-right: 1.5px solid var(--violet-vif); }

/* Autres mods : trois cartes visuelles, statut et version posés sur l'image */
.mods {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
.mod-card { padding: 0; display: flex; flex-direction: column; }
.mod-media { position: relative; overflow: hidden; }
.mod-thumb { display: block; aspect-ratio: 16 / 9; }
.mod-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}
.mod-card:hover .mod-thumb img { transform: scale(1.05); }
.mod-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(6, 3, 9, 0.55), transparent 40%, rgba(12, 7, 20, 0.6));
  pointer-events: none;
}
.mod-media .mod-status,
.mod-media .mod-version {
  position: absolute;
  top: 0.9rem;
  z-index: 1;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(6, 3, 9, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.mod-media .mod-status { left: 0.9rem; }
.mod-media .mod-version { right: 0.9rem; color: var(--encre-2); }
.mod-body { padding: 1.2rem 1.4rem 1.4rem; }
.mod-body h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}
.mod-body p { color: var(--encre-2); font-size: 0.9rem; }
.mod-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--encre-2);
}
.mod-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.mod-beta { color: #d8b4fe; }
.mod-beta i { box-shadow: 0 0 8px rgba(216, 180, 254, 0.7); }
.mod-stable { color: #86efac; }
.mod-stable i { box-shadow: 0 0 8px rgba(134, 239, 172, 0.7); animation: pulse-green 2.4s ease-in-out infinite; }
.mod-version { font-size: 0.66rem; color: var(--encre-3); letter-spacing: 0.06em; white-space: nowrap; }
.mod-fork {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--encre-3);
  margin-left: 0.5em;
  transform: translateY(-2px);
}

@media (max-width: 900px) {
  .jamsm-panel { grid-template-columns: 1fr; }
  .jamsm-media { min-height: 0; aspect-ratio: 16 / 9; border-inline-start: 0; border-top: 1px solid var(--ligne); }
}
@media (max-width: 1080px) {
  .mods { grid-template-columns: repeat(2, 1fr); }
  .mods > :last-child { grid-column: 1 / -1; }
  .mods > :last-child .mod-thumb { aspect-ratio: 21 / 9; }
}
@media (max-width: 640px) {
  .mods { grid-template-columns: 1fr; gap: 0.9rem; }
  .mods > :last-child { grid-column: auto; }
  .mods > :last-child .mod-thumb { aspect-ratio: 16 / 9; }
}

/* ---------- Contact ---------- */

.contact { overflow: hidden; }
.contact-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 110% 75% at 50% 115%, rgba(168, 85, 247, 0.3), rgba(124, 58, 237, 0.08) 55%, transparent 75%);
  pointer-events: none;
}
.contact-inner { position: relative; text-align: center; }
.contact-inner .section-desc { max-width: 34rem; margin-inline: auto; }
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.4rem;
}
.contact-guns {
  flex: 1 1 100%;
  display: flex;
  justify-content: center;
}
.contact-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.8rem;
  font-size: 0.85rem;
  color: var(--encre-3);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.6);
  animation: pulse-green 2.4s ease-in-out infinite;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--ligne-soft);
  padding: 3rem 0 calc(2rem + env(safe-area-inset-bottom, 0px));
  background: rgba(6, 3, 9, 0.6);
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.4rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--ligne-soft);
}
.footer-brand { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-tagline { font-size: 0.82rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.8rem; }
.footer-links a { color: var(--encre-2); font-size: 0.9rem; transition: color 0.2s; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  padding-top: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  font-size: 0.85rem;
}
.footer-bottom .mono { font-size: 0.72rem; }
.socials { display: flex; justify-content: center; gap: 1.3rem; }
.socials a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--ligne-soft);
  color: var(--encre-3);
  transition: color 0.2s, transform 0.2s, border-color 0.2s, background 0.2s;
}
.socials a:hover {
  color: var(--violet-vif);
  border-color: rgba(168, 85, 247, 0.45);
  background: rgba(168, 85, 247, 0.08);
  transform: translateY(-3px);
}

/* ---------- Easter egg : taper « GO » ---------- */

.cue-flash {
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(232, 213, 255, 0.5), transparent 60%),
    radial-gradient(ellipse 120% 80% at 50% 100%, rgba(168, 85, 247, 0.35), transparent 70%);
}
body.cue-go .cue-flash { animation: cue-flash 2.2s ease-out; }
@keyframes cue-flash {
  0% { opacity: 0; }
  6% { opacity: 1; }
  100% { opacity: 0; }
}

.beam { transition: opacity 0.4s, filter 0.4s; }
body.cue-go .beam { opacity: 1; filter: blur(60px) brightness(1.7); }

/* Faisceaux volumétriques : cônes accrochés en haut de l'écran,
   cœur brillant + brume, chacun balaye avec son angle et sa vitesse */
.cue-beams {
  position: fixed;
  inset: 0;
  z-index: 94;
  pointer-events: none;
  overflow: hidden;
}
.cue-beam {
  position: absolute;
  top: -14vh;
  left: var(--x, 50%);
  width: min(34vw, 460px);
  height: 170vh;
  transform: translateX(-50%) rotate(var(--from, -35deg));
  transform-origin: 50% 0;
  opacity: 0;
  filter: blur(16px) saturate(1.25);
  will-change: transform, opacity;
  background:
    /* Brume : halo discret autour du cône */
    conic-gradient(from 0deg at 50% 0%,
      transparent 46.5%,
      color-mix(in srgb, var(--c, #c084fc) 10%, transparent) 48.5%,
      color-mix(in srgb, var(--c, #c084fc) 22%, transparent) 50%,
      color-mix(in srgb, var(--c, #c084fc) 10%, transparent) 51.5%,
      transparent 53.5%),
    /* Cœur du faisceau */
    conic-gradient(from 0deg at 50% 0%,
      transparent 48.9%,
      color-mix(in srgb, #ffffff 55%, var(--c, #c084fc)) 50%,
      transparent 51.1%);
}
/* Point chaud à la source, comme une lyre */
.cue-beam::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -40%);
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff, color-mix(in srgb, var(--c, #c084fc) 80%, #fff) 35%, transparent 70%);
}
body.cue-go .cue-beam {
  animation: cue-sweep var(--dur, 1.8s) var(--delay, 0s) cubic-bezier(0.33, 0, 0.2, 1) both;
}
@keyframes cue-sweep {
  0% { transform: translateX(-50%) rotate(var(--from, -35deg)); opacity: 0; }
  10% { opacity: 0.8; }
  78% { opacity: 0.7; }
  100% { transform: translateX(-50%) rotate(var(--to, 35deg)); opacity: 0; }
}

.cue-toast {
  position: fixed;
  left: 50%;
  bottom: 2.4rem;
  transform: translate(-50%, 16px);
  z-index: 96;
  pointer-events: none;
  opacity: 0;
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--violet-vif);
  padding: 0.55rem 1.15rem;
  background: rgba(6, 3, 9, 0.85);
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 999px;
  transition: opacity 0.3s, transform 0.3s var(--ease-out);
}
body.cue-go .cue-toast,
body.fx-flame .cue-toast { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Easter egg : taper « FLAME » — pyro sur canvas ---------- */

.fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 94;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.fx-canvas.active { opacity: 1; }

/* Lueur chaude qui monte du bas de scène pendant les jets */
.flame-glow {
  position: fixed;
  inset: 0;
  z-index: 93;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(ellipse 130% 55% at 50% 108%, rgba(255, 140, 40, 0.42), rgba(255, 80, 20, 0.14) 45%, transparent 70%);
}
body.fx-flame .flame-glow { animation: flame-glow 2.7s ease-out; }
@keyframes flame-glow {
  0% { opacity: 0; }
  8% { opacity: 1; }
  70% { opacity: 0.85; }
  100% { opacity: 0; }
}

/* ---------- Lightbox photos ---------- */

#feature-slideshow { cursor: zoom-in; }
#feature-slideshow:focus-visible {
  outline: 2px solid var(--violet-vif);
  outline-offset: 3px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.2rem;
  background: rgba(6, 3, 9, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.lightbox.open { opacity: 1; visibility: visible; }

.lb-figure {
  max-width: min(1100px, 92vw);
  text-align: center;
  transform: scale(0.96);
  transition: transform 0.35s var(--ease-out);
}
.lightbox.open .lb-figure { transform: scale(1); }

.lb-img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 82vh;
  border-radius: var(--radius);
  border: 1px solid rgba(168, 85, 247, 0.25);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.lb-caption {
  margin-top: 0.9rem;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--encre-3);
}

.lb-btn {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--encre);
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.lb-btn:hover {
  border-color: rgba(168, 85, 247, 0.6);
  background: rgba(168, 85, 247, 0.14);
  transform: scale(1.06);
}
.lb-close {
  position: absolute;
  top: calc(1.2rem + env(safe-area-inset-top, 0px));
  right: calc(1.2rem + env(safe-area-inset-right, 0px));
}

@media (max-width: 560px) {
  .lightbox { gap: 0.5rem; padding: 0.8rem; }
  .lb-btn { width: 40px; height: 40px; }
  .lb-img { max-height: 72vh; }
}

/* ---------- Sélecteur de langue ---------- */

.nav-lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lang-flag {
  display: block;
  flex-shrink: 0;
  width: 21px;
  height: 14px;
  border-radius: 3px;
  overflow: hidden;
  outline: 1px solid rgba(255, 255, 255, 0.22);
  outline-offset: -1px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s var(--ease-out);
}
.lang-flag svg { display: block; width: 100%; height: 100%; }
.nav-lang:hover .lang-flag { transform: scale(1.08); }

.nav-mobile-lang { display: flex; align-items: center; gap: 0.6em; }

/* ---------- Retour en haut ---------- */

.back-top {
  position: fixed;
  right: calc(1.5rem + env(safe-area-inset-right, 0px));
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  width: 50px;
  height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  color: var(--encre-2);
  background:
    linear-gradient(160deg, rgba(20, 11, 32, 0.92), rgba(12, 7, 20, 0.94)) padding-box,
    linear-gradient(160deg, rgba(168, 85, 247, 0.55), rgba(168, 85, 247, 0.1) 45%, rgba(255, 255, 255, 0.07)) border-box;
  border: 1px solid transparent;
  border-radius: 14px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s, color 0.3s, box-shadow 0.3s;
}
/* Lueur intérieure au survol, comme un projecteur au-dessus du bouton */
.back-top::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(60% 45% at 50% 0%, rgba(192, 132, 252, 0.35), transparent 75%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.back-top svg { transition: transform 0.3s var(--ease-out); }
.back-top-label {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  margin-right: -0.26em; /* compense l'espacement de la dernière lettre */
}
.back-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-top:hover {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(88, 28, 135, 0.5);
}
.back-top:hover::before { opacity: 1; }
.back-top:hover svg { transform: translateY(-2px); }

/* ---------- Reveal (état initial, animé par GSAP) ---------- */

/* Le hero n'est PAS masqué en CSS : il est peint dès le départ derrière l'écran
   de chargement (meilleur LCP), puis GSAP le fait entrer au retrait du loader. */
[data-reveal] { opacity: 0; }
.no-js [data-reveal] { opacity: 1; }

/* ============================================================
   Responsive — 6 paliers
   1080  petits laptops : grilles 4 → 2
    980  tablette : carte MA en 1 colonne, image en ratio
    768  tablette portrait / mobile : burger, hero compact, cartes
    560  mobile : 1 colonne, boutons pleine largeur
    380  très petits écrans
   + mobile paysage (écrans courts)
   ============================================================ */

@media (max-width: 1080px) {
  /* 4 colonnes deviennent trop étroites sous ~1080 px */
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 980px) {
  .card-feature { grid-template-columns: 1fr; }
  /* Ratio au lieu d'une hauteur fixe : l'image garde de belles proportions */
  .feature-media { min-height: 0; aspect-ratio: 16 / 10; }
  .section-head[data-index]::before { font-size: clamp(6rem, 16vw, 10rem); }
}

@media (max-width: 768px) {
  :root { --nav-h: 64px; }

  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .nav-mobile { display: grid; }

  .hero {
    min-height: 100svh;
    padding-top: calc(var(--nav-h) + 2rem);
    padding-bottom: 4.5rem;
  }
  .hero-badge { margin-bottom: 1.4rem; }
  .hero-desc { margin-bottom: 2rem; }
  .scroll-hint { display: none; }


  /* Chips d'expertise plus compactes */
  .hero-tags { margin-top: 2.2rem; font-size: 0.66rem; }
  .hero-tags li + li::before { margin: 0 0.75rem; }

  /* Les <br> décoratifs des titres laissent le texte se répartir naturellement */
  .section-title br { display: none; }

  .card { padding: 1.4rem; }
  .card-feature { padding: 0; }
  .feature-body { padding: 1.7rem 1.4rem 1.9rem; }
  .feature-caption { left: 1rem; bottom: 1rem; }

  .card-github { flex-direction: column; text-align: center; padding: 1.8rem 1.4rem; }
  .gh-stats { justify-content: center; gap: 1rem 1.4rem; }
  .card-github .gh-link { display: inline-flex; }

  .repos-head { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
  .repo-date { margin-left: 0; }

  /* Tuiles outils plus compactes */
  .tool { font-size: 0.8rem; padding: 0.55rem 1rem; gap: 0.55rem; }
  .tool-ico { width: 18px; height: 18px; }
  .tool-logo { height: 22px; }
  .tool-logo-rode { height: 14px; }
  .tool-logo-robe { height: 13px; }
  .tool-logo-chauvet { height: 22px; }
  .tool-logo-img { width: 18px; height: 18px; }
  .marquee {
    mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
  }
}

@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; gap: 0.9rem; }

  .hero-actions { gap: 0.7rem; }
  .hero-actions .btn, .contact-actions .btn { width: 100%; }

  .feature-media { aspect-ratio: 4 / 3; }

  .section-head[data-index]::before { font-size: clamp(4.5rem, 24vw, 6.5rem); }

  .footer-top { flex-direction: column; gap: 1.5rem; }
  .footer-links { gap: 1rem 1.5rem; }

  .back-top { width: 46px; height: 54px; }
}

@media (max-width: 380px) {
  body { font-size: 16px; }
  .card { padding: 1.2rem; }
  .gh-avatar { width: 80px; height: 80px; }
  .contact-note { font-size: 0.78rem; }
}

/* Écrans peu hauts (laptop 768 px) : l'indice SCROLL chevaucherait les puces */
@media (max-height: 820px) {
  .scroll-hint { display: none; }
}

/* Mobile paysage : le hero ne force plus 100 svh sur un écran très court */
@media (max-height: 540px) and (orientation: landscape) {
  .hero {
    min-height: 0;
    padding-top: calc(var(--nav-h) + 2.5rem);
    padding-bottom: 3rem;
  }
  .scroll-hint { display: none; }
  .hero-tags { margin-top: 2rem; }
}

/* ---------- Accessibilité : mouvement réduit ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .beam, .hero-photo img, .hero-video, .badge-pulse, .scroll-line i, .status-dot,
  .marquee-track, .grad-text, .btn-solid, .skeleton::after {
    animation: none !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .btn, .card, .card-icon, .socials a { transition: none; }
}
