/* ==========================================================================
   Julien Jimenez, expert SEO technique
   Feuille de style unique, aucune dependance externe, polices systeme
   Direction artistique : technique et donnees, mode sombre
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Variables
   -------------------------------------------------------------------------- */
:root {
  /* palette imposee */
  --bg: #0C0A14;
  --surface: #16121F;
  --surface-2: #1C1728;
  --border: #2A2338;
  --violet: #7C3AED;
  --violet-light: #A78BFA;
  --lime: #A3E635;
  --text: #EDE9FE;
  --muted: #9CA3AF;

  /* derives */
  --violet-soft: rgba(124, 58, 237, 0.14);
  --violet-glow: rgba(124, 58, 237, 0.35);
  --lime-soft: rgba(163, 230, 53, 0.12);
  --danger: #F87171;

  /* typographie */
  --font-sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", "Cascadia Mono", "JetBrains Mono", Consolas, "Liberation Mono", Menlo, monospace;

  /* echelle fluide */
  --fs-xs: 0.78rem;
  --fs-sm: 0.875rem;
  --fs-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --fs-lead: clamp(1.05rem, 0.98rem + 0.42vw, 1.22rem);
  --fs-h3: clamp(1.12rem, 1.04rem + 0.4vw, 1.32rem);
  --fs-h2: clamp(1.7rem, 1.3rem + 1.7vw, 2.7rem);
  --fs-h1: clamp(2.3rem, 1.5rem + 3.4vw, 4.3rem);

  /* espacements */
  --sp-1: 0.35rem;
  --sp-2: 0.7rem;
  --sp-3: 1.1rem;
  --sp-4: 1.6rem;
  --sp-5: 2.4rem;
  --sp-6: 3.4rem;
  --sp-7: 5rem;
  --sp-8: 7rem;

  /* rayons */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-pill: 999px;

  /* ombres */
  --sh-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --sh-md: 0 12px 32px rgba(0, 0, 0, 0.42);
  --sh-lg: 0 28px 70px rgba(0, 0, 0, 0.55);
  --sh-violet: 0 18px 46px rgba(124, 58, 237, 0.28);

  /* divers */
  --shell: 1180px;
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 0.68, 0.28, 1);
}

/* --------------------------------------------------------------------------
   2. Reset et bases
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.72;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--violet-light);
  text-decoration: none;
  transition: color 0.22s var(--ease);
}

a:hover { color: var(--lime); }

h1, h2, h3, h4 {
  margin: 0 0 var(--sp-3);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -0.018em;
}

h1 { font-size: var(--fs-h1); letter-spacing: -0.035em; }
h2 { font-size: var(--fs-h2); letter-spacing: -0.028em; }
h3 { font-size: var(--fs-h3); }

p { margin: 0 0 var(--sp-3); }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

strong { color: #FFFFFF; font-weight: 650; }

::selection {
  background: var(--violet);
  color: #FFFFFF;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.accent { color: var(--violet-light); }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--sp-4);
}

/* --------------------------------------------------------------------------
   3. Accessibilite
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: var(--sp-3);
  top: -80px;
  z-index: 200;
  background: var(--lime);
  color: #0C0A14;
  font-weight: 700;
  padding: 0.7rem 1.2rem;
  border-radius: var(--r-sm);
  transition: top 0.24s var(--ease);
}

.skip-link:focus {
  top: var(--sp-3);
  color: #0C0A14;
}

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

/* --------------------------------------------------------------------------
   4. Barre de progression de lecture
   -------------------------------------------------------------------------- */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 120;
  background: transparent;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--violet), var(--violet-light) 60%, var(--lime));
  transition: width 0.1s linear;
}

/* --------------------------------------------------------------------------
   5. En tete
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(12, 10, 20, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.site-header.is-stuck {
  border-bottom-color: var(--border);
  background: rgba(12, 10, 20, 0.92);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
}

.brand:hover { color: var(--text); }

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--violet), #4C1D95);
  border: 1px solid rgba(167, 139, 250, 0.45);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: #FFFFFF;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.brand-mark.small { width: 32px; height: 32px; font-size: 0.72rem; }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong { font-size: 0.96rem; letter-spacing: -0.01em; }

.brand-sub {
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* navigation */
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.site-nav a {
  display: inline-block;
  padding: 0.42rem 0.62rem;
  font-size: 0.845rem;
  color: var(--muted);
  border-radius: var(--r-sm);
  position: relative;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0.62rem;
  right: 0.62rem;
  bottom: 0.18rem;
  height: 1px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.26s var(--ease);
}

.site-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.site-nav a:hover::after,
.site-nav a.is-active::after { transform: scaleX(1); }

.site-nav a.is-active { color: var(--text); }

.site-nav .nav-cta {
  margin-left: 0.4rem;
  padding: 0.45rem 0.95rem;
  background: var(--violet);
  color: #FFFFFF;
  border-radius: var(--r-pill);
  font-weight: 600;
}

.site-nav .nav-cta::after { display: none; }

.site-nav .nav-cta:hover {
  background: var(--violet-light);
  color: #12101B;
}

/* bouton menu mobile */
.burger {
  display: none;
  width: 42px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.burger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.28s var(--ease), opacity 0.2s var(--ease);
}

.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   6. Sections generiques
   -------------------------------------------------------------------------- */
.section {
  padding: var(--sp-8) 0;
  position: relative;
}

.section-alt {
  background:
    radial-gradient(900px 420px at 15% 0%, rgba(124, 58, 237, 0.08), transparent 70%),
    #100D19;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 820px;
  margin-bottom: var(--sp-6);
}

.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--lime);
  margin: 0 0 var(--sp-2);
}

.section-intro {
  font-size: var(--fs-lead);
  color: var(--muted);
  max-width: 74ch;
}

.note {
  margin-top: var(--sp-5);
  padding: var(--sp-3) var(--sp-4);
  border-left: 2px solid var(--violet);
  background: var(--violet-soft);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.note .mono { color: var(--violet-light); }

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + var(--sp-7)) 0 var(--sp-8);
  overflow: hidden;
}

.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(42, 35, 56, 0.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 35, 56, 0.55) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(1000px 620px at 30% 10%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(1000px 620px at 30% 10%, #000 0%, transparent 78%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  width: 620px;
  height: 620px;
  right: -180px;
  top: -160px;
  background: radial-gradient(circle, var(--violet-glow), transparent 65%);
  filter: blur(30px);
  opacity: 0.55;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  align-items: start;
}

.hero h1 { margin-bottom: var(--sp-4); }

.lead {
  font-size: var(--fs-lead);
  color: #D6D0EC;
  max-width: 64ch;
}

.lead-sec {
  color: var(--muted);
  max-width: 64ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin: var(--sp-5) 0 var(--sp-5);
}

/* boutons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.82rem 1.5rem;
  border-radius: var(--r-pill);
  font-weight: 620;
  font-size: 0.94rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.22s var(--ease), background 0.22s var(--ease),
              border-color 0.22s var(--ease), box-shadow 0.22s var(--ease), color 0.22s var(--ease);
}

.btn-primary {
  background: var(--violet);
  color: #FFFFFF;
  box-shadow: var(--sh-violet);
}

.btn-primary:hover {
  background: var(--violet-light);
  color: #14111E;
  transform: translateY(-2px);
}

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.btn-ghost:hover {
  border-color: var(--lime);
  color: var(--lime);
  transform: translateY(-2px);
}

/* indicateurs */
.kpi-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-2);
  border-top: 1px solid var(--border);
  padding-top: var(--sp-4);
}

.kpi {
  padding: var(--sp-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color 0.26s var(--ease), transform 0.26s var(--ease);
}

.kpi:hover {
  border-color: var(--violet);
  transform: translateY(-3px);
}

.kpi-value {
  display: block;
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--lime);
  line-height: 1.1;
}

.kpi-label {
  display: block;
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.45;
  margin-top: 0.35rem;
}

/* portrait technique */
.hero-portrait {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-3);
  box-shadow: var(--sh-lg);
  max-width: 420px;
}

.portrait-frame {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #0A0810;
}

.portrait-frame img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  filter: contrast(1.05) saturate(0.92);
  transition: filter 0.5s var(--ease), transform 0.6s var(--ease);
}

.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(124, 58, 237, 0.22), transparent 55%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero-portrait:hover .portrait-frame img {
  filter: contrast(1.08) saturate(1);
  transform: scale(1.025);
}

.frame-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--lime);
  z-index: 3;
  opacity: 0.85;
}

.frame-corner.tl { top: 9px; left: 9px; border-right: 0; border-bottom: 0; }
.frame-corner.tr { top: 9px; right: 9px; border-left: 0; border-bottom: 0; }
.frame-corner.bl { bottom: 9px; left: 9px; border-right: 0; border-top: 0; }
.frame-corner.br { bottom: 9px; right: 9px; border-left: 0; border-top: 0; }

.portrait-tag {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 3;
  font-size: 0.63rem;
  color: var(--text);
  background: rgba(12, 10, 20, 0.78);
  border: 1px solid var(--border);
  padding: 0.16rem 0.5rem;
  border-radius: var(--r-sm);
}

.meta-list {
  margin: var(--sp-3) 0 0;
  font-size: 0.74rem;
}

.meta-list > div {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: 0.36rem 0.2rem;
  border-bottom: 1px dashed rgba(42, 35, 56, 0.85);
}

.meta-list > div:last-child { border-bottom: 0; }

.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; color: var(--text); text-align: right; }
.meta-list dd.ok { color: var(--lime); }
.meta-list dd.ok::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  margin-right: 6px;
  vertical-align: middle;
  box-shadow: 0 0 0 3px var(--lime-soft);
}

/* --------------------------------------------------------------------------
   8. Onglets des piliers
   -------------------------------------------------------------------------- */
.tabs {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-md);
}

.tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--border);
  background: #120F1B;
}

.tab {
  flex: 1 1 140px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 0.9rem;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--border);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: color 0.24s var(--ease), background 0.24s var(--ease);
}

.tab:last-child { border-right: 0; }

.tab .mono {
  font-size: 0.7rem;
  color: var(--violet-light);
  opacity: 0.75;
}

.tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--lime);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease);
}

.tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.025); }

.tab[aria-selected="true"] {
  color: var(--text);
  background: var(--surface-2);
}

.tab[aria-selected="true"]::after { transform: scaleX(1); }
.tab[aria-selected="true"] .mono { color: var(--lime); opacity: 1; }

.tabpanel {
  padding: var(--sp-5);
  animation: panelIn 0.4s var(--ease) both;
}

.tabpanel h3 { color: var(--text); }
.tabpanel p { color: var(--muted); max-width: 76ch; }

@keyframes panelIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: var(--sp-4);
}

.pill-list li {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--violet-light);
  background: var(--violet-soft);
  border: 1px solid rgba(124, 58, 237, 0.32);
  padding: 0.28rem 0.7rem;
  border-radius: var(--r-pill);
  transition: background 0.22s var(--ease), color 0.22s var(--ease);
}

.pill-list li:hover {
  background: rgba(124, 58, 237, 0.26);
  color: var(--text);
}

/* --------------------------------------------------------------------------
   9. Cartes techniques
   -------------------------------------------------------------------------- */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
}

.tcard {
  position: relative;
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.tcard::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--violet), transparent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.42s var(--ease);
}

.tcard:hover {
  border-color: rgba(124, 58, 237, 0.6);
  transform: translateY(-4px);
  box-shadow: var(--sh-md);
}

.tcard:hover::before { transform: scaleY(1); }

.tcard-num {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--lime);
  letter-spacing: 0.14em;
  margin-bottom: var(--sp-2);
  padding: 0.14rem 0.5rem;
  border: 1px solid rgba(163, 230, 53, 0.3);
  border-radius: var(--r-sm);
  background: var(--lime-soft);
}

.tcard h3 { margin-bottom: var(--sp-2); }
.tcard p { color: var(--muted); font-size: 0.95rem; }

.tcard-out {
  margin-top: var(--sp-3);
  padding-top: var(--sp-2);
  border-top: 1px dashed var(--border);
  font-size: 0.7rem;
  color: var(--violet-light);
}

/* --------------------------------------------------------------------------
   10. Bloc terminal
   -------------------------------------------------------------------------- */
.terminal {
  margin-top: var(--sp-6);
  background: #0A0810;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--sh-lg);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 0.95rem;
  background: #120F1B;
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.dot.d1 { background: #F87171; }
.dot.d2 { background: #FBBF24; }
.dot.d3 { background: var(--lime); }

.terminal-title {
  margin-left: 0.6rem;
  font-size: 0.7rem;
  color: var(--muted);
}

.terminal-body {
  margin: 0;
  padding: var(--sp-4);
  overflow-x: auto;
  font-size: 0.78rem;
  line-height: 1.85;
  color: #C7BFE6;
  white-space: pre;
  tab-size: 2;
}

.terminal-body code { color: inherit; }

.terminal-body.is-typing::after {
  content: "_";
  color: var(--lime);
  animation: caret 1s steps(2) infinite;
}

@keyframes caret {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.terminal-note {
  margin: 0;
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: var(--fs-sm);
}

/* --------------------------------------------------------------------------
   11. Panneaux, netlinking
   -------------------------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}

.panel {
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color 0.3s var(--ease);
}

.panel:hover { border-color: rgba(167, 139, 250, 0.45); }
.panel p { color: var(--muted); }

.panel h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: var(--sp-3);
}

.tag {
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--lime);
  background: var(--lime-soft);
  border: 1px solid rgba(163, 230, 53, 0.3);
  padding: 0.2rem 0.55rem;
  border-radius: var(--r-sm);
  font-weight: 600;
}

.panel.danger { border-color: rgba(248, 113, 113, 0.28); }
.panel.danger .tag {
  color: var(--danger);
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.3);
}

.check-list li {
  position: relative;
  padding-left: 1.7rem;
  margin-bottom: 0.7rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--lime);
  border-top: 0;
  border-right: 0;
  transform: rotate(-45deg);
}

.check-list li:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   12. Blocs media
   -------------------------------------------------------------------------- */
.media-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
  align-items: start;
}

.media-figure {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--sh-md);
}

.media-figure img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.06) brightness(0.9);
  transition: filter 0.55s var(--ease), transform 0.7s var(--ease);
}

.media-figure:hover img {
  filter: saturate(1) contrast(1.08) brightness(1);
  transform: scale(1.03);
}

.media-figure figcaption {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.7rem;
  color: var(--muted);
}

.media-copy h3 {
  margin-top: var(--sp-4);
  color: var(--violet-light);
  font-size: 1.06rem;
}

.media-copy h3:first-child { margin-top: 0; }
.media-copy p { color: var(--muted); }

/* --------------------------------------------------------------------------
   13. Jauges Core Web Vitals
   -------------------------------------------------------------------------- */
.gauges {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}

.gauge-card {
  padding: var(--sp-5) var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  text-align: center;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.gauge-card:hover {
  border-color: rgba(124, 58, 237, 0.55);
  transform: translateY(-4px);
}

.gauge {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto var(--sp-3);
}

.gauge svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-track {
  fill: none;
  stroke: #241D33;
  stroke-width: 9;
}

.gauge-bar {
  fill: none;
  stroke: var(--violet);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 326.7;
  transition: stroke-dashoffset 1.6s var(--ease);
  filter: drop-shadow(0 0 6px rgba(124, 58, 237, 0.55));
}

.gauge.is-on .gauge-bar { stroke: var(--lime); filter: drop-shadow(0 0 7px rgba(163, 230, 53, 0.4)); }

.gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  pointer-events: none;
}

.gauge-num {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.gauge-unit {
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.gauge-card h3 {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem;
}

.gauge-card h3 .mono {
  font-size: 0.75rem;
  color: var(--lime);
  font-weight: 600;
}

.gauge-card p {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: left;
}

/* --------------------------------------------------------------------------
   14. Etapes de la methode d'audit
   -------------------------------------------------------------------------- */
.steps {
  counter-reset: none;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--border);
}

.step {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-2);
  border-bottom: 1px solid var(--border);
  position: relative;
  transition: background 0.3s var(--ease), padding-left 0.3s var(--ease);
}

.step::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--lime);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 0.35s var(--ease);
}

.step:hover {
  background: rgba(124, 58, 237, 0.05);
  padding-left: var(--sp-3);
}

.step:hover::before { transform: scaleY(1); }

.step-num {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--violet);
  line-height: 1.2;
  transition: color 0.3s var(--ease);
}

.step:hover .step-num { color: var(--violet-light); }

.step h3 { margin-bottom: 0.4rem; font-size: 1.06rem; }
.step p { color: var(--muted); font-size: 0.95rem; max-width: 82ch; }

/* --------------------------------------------------------------------------
   15. Outils
   -------------------------------------------------------------------------- */
.tools-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
  align-items: start;
}

.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
}

.tool-group {
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

.tool-group h3 {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: var(--sp-2);
  font-weight: 600;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.badges li {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.3rem 0.65rem;
  border-radius: var(--r-sm);
  transition: border-color 0.24s var(--ease), color 0.24s var(--ease), transform 0.24s var(--ease);
}

.badges li:hover {
  border-color: var(--lime);
  color: var(--lime);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   16. Graphique de progression
   -------------------------------------------------------------------------- */
.chart-wrap {
  margin: 0 0 var(--sp-6);
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--sh-md);
}

.chart {
  width: 100%;
  height: auto;
  display: block;
}

.chart-grid line {
  stroke: var(--border);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.chart-axis text,
.chart-months text {
  fill: var(--muted);
  font-size: 11px;
  font-family: var(--font-mono);
  text-anchor: end;
}

.chart-months text { text-anchor: middle; }

.chart-line {
  fill: none;
  stroke: var(--lime);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(163, 230, 53, 0.3));
}

.chart-area {
  fill: rgba(124, 58, 237, 0.16);
  opacity: 0;
  transition: opacity 1s var(--ease) 0.5s;
}

.chart-wrap.is-drawn .chart-area { opacity: 1; }

.chart-dots circle {
  fill: var(--bg);
  stroke: var(--violet-light);
  stroke-width: 2;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0.4);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.chart-wrap.is-drawn .chart-dots circle { opacity: 1; transform: scale(1); }
.chart-wrap.is-drawn .chart-dots circle:nth-child(1) { transition-delay: 0.25s; }
.chart-wrap.is-drawn .chart-dots circle:nth-child(2) { transition-delay: 0.5s; }
.chart-wrap.is-drawn .chart-dots circle:nth-child(3) { transition-delay: 0.75s; }
.chart-wrap.is-drawn .chart-dots circle:nth-child(4) { transition-delay: 1s; }
.chart-wrap.is-drawn .chart-dots circle:nth-child(5) { transition-delay: 1.25s; }
.chart-wrap.is-drawn .chart-dots circle:nth-child(6) { transition-delay: 1.5s; }
.chart-wrap.is-drawn .chart-dots circle:nth-child(7) {
  transition-delay: 1.75s;
  fill: var(--lime);
  stroke: var(--lime);
}

.chart-wrap figcaption {
  margin-top: var(--sp-2);
  font-size: 0.7rem;
  color: var(--muted);
  text-align: right;
}

.timeline-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}

.proof-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
  border-top: 1px solid var(--border);
  padding-top: var(--sp-5);
}

.proof {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.proof .mono {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--violet-light);
  line-height: 1.1;
}

.proof span:last-child {
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
   17. Accordeon FAQ
   -------------------------------------------------------------------------- */
.accordion {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
}

.acc-item { border-bottom: 1px solid var(--border); }
.acc-item:last-child { border-bottom: 0; }

.acc-item h3 { margin: 0; font-size: 1rem; }

.acc-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-align: left;
  padding: 1.15rem var(--sp-4);
  background: transparent;
  border: 0;
  color: var(--text);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
  transition: background 0.24s var(--ease), color 0.24s var(--ease);
}

.acc-btn .mono {
  font-size: 0.7rem;
  color: var(--violet-light);
  flex: 0 0 auto;
}

.acc-btn:hover { background: rgba(124, 58, 237, 0.07); }

.acc-btn[aria-expanded="true"] {
  color: var(--lime);
  background: rgba(124, 58, 237, 0.09);
}

.acc-btn[aria-expanded="true"] .mono { color: var(--lime); }

.acc-icon {
  margin-left: auto;
  position: relative;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.acc-icon::before,
.acc-icon::after {
  content: "";
  position: absolute;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.acc-icon::before { left: 0; top: 6px; width: 14px; height: 2px; }
.acc-icon::after { left: 6px; top: 0; width: 2px; height: 14px; }

.acc-btn[aria-expanded="true"] .acc-icon::after { transform: rotate(90deg); opacity: 0; }

.acc-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.42s var(--ease);
}

.acc-panel p {
  padding: 0 var(--sp-4) var(--sp-4) calc(var(--sp-4) + 2.1rem);
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 88ch;
}

/* --------------------------------------------------------------------------
   18. Contact
   -------------------------------------------------------------------------- */
.contact-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
  align-items: center;
  padding: var(--sp-6) var(--sp-5);
  background:
    radial-gradient(700px 300px at 85% 0%, rgba(124, 58, 237, 0.2), transparent 70%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
}

.contact-left h2 { margin-bottom: var(--sp-3); }
.contact-left p { color: var(--muted); max-width: 62ch; }

.contact-mail { margin: var(--sp-4) 0; }

.mail-link {
  display: inline-block;
  font-size: clamp(1rem, 0.85rem + 0.75vw, 1.45rem);
  font-weight: 700;
  color: var(--lime);
  padding: 0.65rem 1.2rem;
  border: 1px solid rgba(163, 230, 53, 0.35);
  border-radius: var(--r-md);
  background: var(--lime-soft);
  word-break: break-all;
  transition: background 0.26s var(--ease), transform 0.26s var(--ease), border-color 0.26s var(--ease);
}

.mail-link:hover {
  background: rgba(163, 230, 53, 0.2);
  border-color: var(--lime);
  color: var(--lime);
  transform: translateY(-2px);
}

.contact-meta {
  font-size: 0.76rem;
  color: var(--muted);
  display: grid;
  gap: 0.4rem;
}

.contact-meta li {
  display: flex;
  gap: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px dashed var(--border);
}

.contact-meta li:last-child { border-bottom: 0; }

.contact-meta span {
  color: var(--violet-light);
  min-width: 108px;
  display: inline-block;
}

.contact-right {
  text-align: center;
}

.contact-right img {
  width: 190px;
  height: 190px;
  margin: 0 auto;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  padding: 5px;
  background: var(--bg);
  box-shadow: 0 0 0 6px rgba(124, 58, 237, 0.12);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}

.contact-right img:hover {
  box-shadow: 0 0 0 10px rgba(163, 230, 53, 0.14);
  transform: translateY(-3px);
}

.contact-sign {
  margin-top: var(--sp-3);
  font-size: 0.8rem;
  color: var(--text);
}

.contact-sign span { color: var(--muted); font-size: 0.72rem; }

/* --------------------------------------------------------------------------
   19. Pied de page
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: #0A0810;
  padding: var(--sp-6) 0 var(--sp-5);
}

.footer-inner {
  display: grid;
  gap: var(--sp-4);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.footer-brand p { font-size: 0.86rem; line-height: 1.5; }
.footer-brand .mono { font-size: 0.7rem; color: var(--muted); }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
}

.footer-nav a {
  font-size: 0.82rem;
  color: var(--muted);
  position: relative;
}

.footer-nav a:hover { color: var(--lime); }

.footer-legal {
  font-size: 0.68rem;
  color: #6B7280;
  border-top: 1px solid var(--border);
  padding-top: var(--sp-3);
  margin: 0;
}

/* --------------------------------------------------------------------------
   20. Retour en haut
   -------------------------------------------------------------------------- */
.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 1rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease),
              visibility 0.3s var(--ease), border-color 0.3s var(--ease);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  border-color: var(--lime);
  color: var(--lime);
}

/* --------------------------------------------------------------------------
   21. Animations d'apparition
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   22. Page 404
   -------------------------------------------------------------------------- */
.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--sp-6) 0;
  position: relative;
  overflow: hidden;
}

.error-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.error-code {
  font-family: var(--font-mono);
  font-size: clamp(4.5rem, 3rem + 10vw, 9rem);
  font-weight: 700;
  line-height: 1;
  color: var(--violet);
  letter-spacing: -0.05em;
  margin-bottom: var(--sp-3);
  text-shadow: 0 0 44px rgba(124, 58, 237, 0.45);
}

.error-inner p { color: var(--muted); }

.error-log {
  margin: var(--sp-5) 0;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted);
  background: #0A0810;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  line-height: 2;
}

.error-log b { color: var(--lime); font-weight: 600; }

.error-actions {
  display: flex;
  gap: var(--sp-2);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--sp-4);
}

/* --------------------------------------------------------------------------
   23. Points de rupture
   -------------------------------------------------------------------------- */
@media (min-width: 640px) {
  .kpi-row { grid-template-columns: repeat(3, 1fr); }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline-grid { grid-template-columns: repeat(2, 1fr); }
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .proof-row { grid-template-columns: repeat(4, 1fr); }
  .contact-card { padding: var(--sp-7) var(--sp-6); }
}

@media (min-width: 900px) {
  :root { --header-h: 74px; }

  .shell { padding: 0 var(--sp-5); }

  .hero-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: var(--sp-6);
    align-items: center;
  }

  .hero-portrait { max-width: none; justify-self: end; width: 100%; }

  .split { grid-template-columns: 1fr 1fr; }
  .media-split { grid-template-columns: 1fr 1fr; gap: var(--sp-6); align-items: center; }
  .gauges { grid-template-columns: repeat(3, 1fr); }
  .cards-grid.three { grid-template-columns: repeat(3, 1fr); }
  .tools-layout { grid-template-columns: 1.15fr 0.85fr; gap: var(--sp-6); }
  .contact-card { grid-template-columns: 1.4fr 0.6fr; }

  .step { grid-template-columns: 82px 1fr; padding: var(--sp-4) var(--sp-3); }
  .step-num { font-size: 1.6rem; }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1200px) {
  .cards-grid { grid-template-columns: repeat(4, 1fr); }
  .cards-grid.three { grid-template-columns: repeat(3, 1fr); }
  .timeline-grid { grid-template-columns: repeat(4, 1fr); }
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: var(--sp-8) 0; }
}

/* resserrement de la navigation sur les ecrans intermediaires */
@media (min-width: 1100px) and (max-width: 1279px) {
  .site-nav a { padding: 0.42rem 0.46rem; font-size: 0.8rem; }
  .site-nav a::after { left: 0.46rem; right: 0.46rem; }
  .site-nav .nav-cta { padding: 0.42rem 0.8rem; }
  .brand-sub { display: none; }
}

/* menu mobile */
@media (max-width: 1099px) {
  .burger { display: flex; }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: rgba(12, 10, 20, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.42s var(--ease);
  }

  .site-nav.is-open { max-height: 80vh; overflow-y: auto; }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--sp-2) var(--sp-4) var(--sp-4);
  }

  .site-nav li { border-bottom: 1px solid var(--border); }
  .site-nav li:last-child { border-bottom: 0; }

  .site-nav a {
    display: block;
    padding: 0.85rem 0.2rem;
    font-size: 0.98rem;
  }

  .site-nav a::after { display: none; }

  .site-nav .nav-cta {
    margin: var(--sp-3) 0 0;
    text-align: center;
    padding: 0.75rem 1rem;
  }
}

@media (max-width: 639px) {
  .tab { flex: 1 1 50%; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
  .tabpanel { padding: var(--sp-4); }
  .terminal-body { font-size: 0.7rem; }
  .acc-btn { padding: 1rem var(--sp-3); font-size: 0.92rem; }
  .acc-panel p { padding: 0 var(--sp-3) var(--sp-3) var(--sp-3); }
  .section { padding: var(--sp-7) 0; }
  .proof-row { grid-template-columns: repeat(2, 1fr); }
  .chart-wrap { padding: var(--sp-2); }
}

/* --------------------------------------------------------------------------
   24. Mouvement reduit
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .gauge-bar { transition: none !important; }
  .chart-dots circle { opacity: 1 !important; transform: none !important; }
  .chart-area { opacity: 1 !important; }
  .terminal-body.is-typing::after { display: none; }
}

/* --------------------------------------------------------------------------
   25. Impression
   -------------------------------------------------------------------------- */
@media print {
  .site-header,
  .to-top,
  .scroll-progress,
  .burger { display: none !important; }

  body { background: #FFFFFF; color: #111111; }
  .section { padding: 1.2rem 0; }
  .reveal { opacity: 1; transform: none; }
  .acc-panel { max-height: none !important; }
}
