/* ==========================================================================
   Trust & Ride — Portfolio projet
   Identité reprise du back-office : marine profond + jaune signal
   ========================================================================== */

:root {
  --bg: #0b1120;
  --bg-2: #0f172a;
  --surface: #131c31;
  --surface-2: #1a2540;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.28);
  --text: #e8edf6;
  --text-2: #a3b0c6;
  --text-3: #6b7a94;
  --accent: #facc15;
  --accent-ink: #1a1400;
  --accent-soft: rgba(250, 204, 21, 0.12);
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, 0.12);
  --warn: #fbbf24;
  --info: #60a5fa;
  --info-soft: rgba(96, 165, 250, 0.12);
  --danger: #f87171;
  --radius: 14px;
  --radius-lg: 22px;
  --max: 1180px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

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

img { max-width: 100%; display: block; }
a { color: inherit; }
code, .mono { font-family: var(--mono); font-size: 0.88em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 17, 32, 0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: -0.01em; }
.brand img { width: 32px; height: 32px; border-radius: 9px; }
.brand span em { font-style: normal; color: var(--accent); }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  text-decoration: none; color: var(--text-2); font-size: 0.9rem; font-weight: 600;
  padding: 8px 12px; border-radius: 999px; transition: color .2s, background .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface-2); }
.nav-toggle { display: none; background: none; border: 1px solid var(--border-strong); color: var(--text); border-radius: 10px; padding: 8px 10px; cursor: pointer; }

/* ---------- Buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 12px; font-weight: 700; font-size: 0.95rem;
  text-decoration: none; border: 1px solid transparent; transition: transform .15s, background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #fde047; }
.btn-ghost { border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.78rem; font-weight: 600; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border);
  padding: 5px 11px; border-radius: 999px; white-space: nowrap;
}
.chip-accent { color: var(--accent); background: var(--accent-soft); border-color: rgba(250,204,21,.25); }
.chip-ok { color: var(--ok); background: var(--ok-soft); border-color: rgba(52,211,153,.25); }
.chip-info { color: var(--info); background: var(--info-soft); border-color: rgba(96,165,250,.25); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 96px 0 72px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 720px; height: 720px;
  background: radial-gradient(closest-side, rgba(250,204,21,.16), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 30% 20%, #000 10%, transparent 65%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 20%, #000 10%, transparent 65%);
  opacity: .45; pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.1rem); line-height: 1.04; letter-spacing: -0.035em;
  margin: 20px 0 20px; font-weight: 800;
}
.hero h1 .hl { color: var(--accent); }
.hero .lead { font-size: 1.15rem; color: var(--text-2); max-width: 600px; margin: 0 0 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.hero-card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  padding: 22px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.6);
}
.hero-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.hero-card-head strong { font-size: .9rem; }
.feed { display: flex; flex-direction: column; gap: 10px; }
.feed-item {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px;
  font-size: .86rem;
}
.feed-item .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.feed-item .ic.ok { background: var(--ok-soft); color: var(--ok); }
.feed-item .ic.info { background: var(--info-soft); color: var(--info); }
.feed-item small { display: block; color: var(--text-3); font-size: .76rem; }
.feed-item b { font-family: var(--mono); font-size: .82rem; }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
section.alt { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.eyebrow { font-family: var(--mono); font-size: .78rem; color: var(--accent); letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); letter-spacing: -0.03em; line-height: 1.12; margin: 12px 0 14px; }
.section-head p { color: var(--text-2); font-size: 1.05rem; margin: 0; }
h3 { letter-spacing: -0.015em; }

/* ---------- KPI band ---------- */
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.kpi { background: var(--surface); padding: 24px 20px; }
.kpi-val { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.kpi-val small { font-size: 1rem; color: var(--text-2); font-weight: 700; margin-left: 2px; }
.kpi-label { color: var(--text-2); font-size: .84rem; margin-top: 6px; }

/* ---------- Cards / grids ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--border-strong); }
.card h3 { margin: 14px 0 8px; font-size: 1.2rem; }
.card p { color: var(--text-2); margin: 0; }
.icon-box { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.icon-box svg { width: 22px; height: 22px; }

.problem { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.problem .card ul { margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.problem .card li { position: relative; padding-left: 22px; color: var(--text-2); }
.problem .card li::before { content: "—"; color: var(--text-3); position: absolute; left: 0; top: 0; }
.problem .card li strong { color: var(--text); }
.problem .card.solution { border-color: rgba(250,204,21,.3); background: linear-gradient(180deg, rgba(250,204,21,.06), var(--surface) 60%); }
.problem .card.solution li::before { content: "✓"; color: var(--accent); font-weight: 800; }

/* ---------- Feature tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.tab {
  font: inherit; font-size: .92rem; font-weight: 700; cursor: pointer;
  background: var(--surface); color: var(--text-2); border: 1px solid var(--border);
  padding: 10px 18px; border-radius: 999px; transition: all .2s;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.feat {
  display: flex; gap: 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.feat .icon-box { flex-shrink: 0; width: 40px; height: 40px; }
.feat h4 { margin: 0 0 4px; font-size: 1rem; }
.feat p { margin: 0; color: var(--text-2); font-size: .92rem; }
.feat .tech { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.feat .tech span { font-family: var(--mono); font-size: .72rem; color: var(--text-3); border: 1px solid var(--border); border-radius: 6px; padding: 2px 7px; }

/* ---------- Architecture ---------- */
.arch-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; overflow-x: auto; }
.arch-wrap svg { width: 100%; min-width: 760px; height: auto; display: block; }
.arch-wrap text { font-family: var(--font); }
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.svc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.svc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.svc h4 { margin: 0; font-size: 1rem; }
.svc .port { font-family: var(--mono); font-size: .75rem; color: var(--text-3); }
.svc p { color: var(--text-2); font-size: .9rem; margin: 8px 0 12px; }
.svc .chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Flow / steps ---------- */
.steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; counter-reset: s; }
.step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 16px; }
.step::before {
  counter-increment: s; content: "0" counter(s);
  font-family: var(--mono); font-size: .78rem; color: var(--accent); font-weight: 700;
}
.step h4 { margin: 8px 0 6px; font-size: .98rem; }
.step p { margin: 0; color: var(--text-2); font-size: .85rem; line-height: 1.5; }
.step .proto { display: inline-block; margin-top: 10px; font-family: var(--mono); font-size: .7rem; color: var(--info); }

/* ---------- Stack ---------- */
.stack { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stack-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.stack-col h4 { margin: 0 0 14px; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); font-family: var(--mono); }
.stack-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.stack-col li { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; font-size: .94rem; }
.stack-col li span { color: var(--text-3); font-weight: 500; font-family: var(--mono); font-size: .78rem; }

/* ---------- Metrics / charts ---------- */
.metric-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.metric-card h3 { margin: 0 0 4px; font-size: 1.15rem; }
.metric-card .sub { color: var(--text-2); font-size: .9rem; margin: 0 0 22px; }
.big-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.big-stat { background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.big-stat .v { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; font-family: var(--mono); }
.big-stat .v.ok { color: var(--ok); }
.big-stat .v.acc { color: var(--accent); }
.big-stat .l { font-size: .78rem; color: var(--text-3); margin-top: 2px; }

.histo { display: flex; align-items: flex-end; gap: 6px; height: 190px; padding: 0 2px; border-bottom: 1px solid var(--border-strong); position: relative; }
.histo .bar { flex: 1; background: var(--accent); border-radius: 4px 4px 0 0; position: relative; min-height: 2px; transition: opacity .2s; }
.histo .bar:hover { opacity: .8; }
.histo .bar span { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: .7rem; color: var(--text-2); padding-bottom: 4px; white-space: nowrap; }
.histo-x { display: flex; gap: 6px; padding: 8px 2px 0; }
.histo-x span { flex: 1; text-align: center; font-family: var(--mono); font-size: .72rem; color: var(--text-3); }
.threshold { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 12px 14px; border-radius: 10px; background: var(--ok-soft); color: var(--ok); font-size: .88rem; font-weight: 600; }

.meter { margin-bottom: 14px; }
.meter-head { display: flex; justify-content: space-between; font-size: .88rem; margin-bottom: 6px; gap: 8px; }
.meter-head span:first-child { font-family: var(--mono); font-size: .82rem; color: var(--text-2); }
.meter-head b { font-family: var(--mono); font-size: .82rem; }
.meter-track { height: 8px; border-radius: 99px; background: var(--bg-2); border: 1px solid var(--border); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 99px; background: var(--accent); width: 0; transition: width 1.1s cubic-bezier(.2,.8,.2,1); }
.meter-fill.ok { background: var(--ok); }
.meter-fill.info { background: var(--info); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); font-weight: 700; background: var(--bg-2); }
td { color: var(--text-2); }
td.num, th.num { text-align: right; font-family: var(--mono); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(148,163,184,.04); }
td .pass { color: var(--ok); font-weight: 700; font-family: var(--mono); }
td strong { color: var(--text); font-weight: 600; }

.confusion { display: grid; grid-template-columns: auto 1fr 1fr; gap: 6px; font-family: var(--mono); font-size: .84rem; }
.confusion div { padding: 14px; border-radius: 10px; text-align: center; background: var(--bg-2); border: 1px solid var(--border); color: var(--text-3); }
.confusion .h { background: none; border: 0; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; display: flex; align-items: center; justify-content: center; }
.confusion .hit { background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 1.15rem; border-color: var(--accent); }

.test-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; padding-right: 6px; }
.test-list li { display: flex; gap: 10px; align-items: flex-start; font-family: var(--mono); font-size: .76rem; color: var(--text-2); padding: 8px 10px; background: var(--bg-2); border-radius: 8px; border: 1px solid var(--border); word-break: break-word; }
.test-list li::before { content: "✓"; color: var(--ok); font-weight: 800; flex-shrink: 0; }

.protocol { display: flex; flex-direction: column; gap: 12px; }
.protocol-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; }
.protocol-item b { display: block; font-size: .95rem; }
.protocol-item small { color: var(--text-3); font-size: .82rem; }

.note { font-size: .82rem; color: var(--text-3); margin-top: 14px; line-height: 1.55; }
.note code { color: var(--text-2); }

/* ---------- Security list ---------- */
.sec-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.sec-item { display: flex; gap: 14px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.sec-item .icon-box { width: 38px; height: 38px; flex-shrink: 0; }
.sec-item h4 { margin: 0 0 4px; font-size: .98rem; }
.sec-item p { margin: 0; color: var(--text-2); font-size: .88rem; }

.code-block {
  background: #070b16; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; font-family: var(--mono); font-size: .8rem; line-height: 1.7; overflow-x: auto; color: #cbd5e1;
}
.code-block .k { color: #c084fc; }
.code-block .t { color: var(--accent); }
.code-block .c { color: #5b6b85; }
.code-block .f { color: #60a5fa; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery figure { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; cursor: zoom-in; transition: border-color .2s, transform .2s; }
.gallery figure:hover { border-color: var(--accent); transform: translateY(-2px); }
.gallery figure.wide { grid-column: span 2; }
.gallery figure.phone img { aspect-ratio: 9 / 19.5; object-fit: cover; object-position: top; }
.gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; background: var(--bg-2); }
.gallery figcaption { padding: 14px 18px; font-size: .88rem; color: var(--text-2); border-top: 1px solid var(--border); }
.gallery figcaption b { color: var(--text); display: block; font-size: .95rem; }

.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(3,6,14,.92); display: none; align-items: center; justify-content: center; padding: 32px; cursor: zoom-out; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 90vh; max-width: 100%; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.6); background: #fff; }

/* ---------- Data model ---------- */
.entities { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.entities span { font-family: var(--mono); font-size: .78rem; padding: 6px 10px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--border); color: var(--text-2); }
.entities span.core { color: var(--accent); border-color: rgba(250,204,21,.3); }

/* ---------- Team / planning ---------- */
.plan-row { display: grid; grid-template-columns: 260px 1fr 56px; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.plan-row:last-child { border-bottom: 0; }
.plan-row .name { color: var(--text); font-weight: 600; }
.plan-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--bg-2); }
.plan-bar i { display: block; height: 100%; }
.plan-bar i.a { background: var(--accent); }
.plan-bar i.b { background: var(--info); }
.plan-row .d { font-family: var(--mono); text-align: right; color: var(--text-2); }
.legend { display: flex; gap: 18px; font-size: .85rem; color: var(--text-2); margin-bottom: 14px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

.timeline { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.tl { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; border-top: 3px solid var(--accent); }
.tl .when { font-family: var(--mono); font-size: .76rem; color: var(--accent); }
.tl h4 { margin: 6px 0 4px; font-size: .98rem; }
.tl p { margin: 0; color: var(--text-2); font-size: .85rem; }

/* ---------- CTA / footer ---------- */
.cta { text-align: center; padding: 96px 0; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; left: 50%; top: 50%; width: 900px; height: 500px; transform: translate(-50%,-50%); background: radial-gradient(closest-side, rgba(250,204,21,.12), transparent); pointer-events: none; }
.cta h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.03em; margin: 0 0 14px; position: relative; }
.cta p { color: var(--text-2); max-width: 560px; margin: 0 auto 28px; position: relative; }
.cta .hero-cta { justify-content: center; position: relative; }
footer { border-top: 1px solid var(--border); padding: 28px 0; color: var(--text-3); font-size: .85rem; }
footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .meter-fill { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .stack { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: repeat(3, 1fr); }
  .nav-links a { padding: 8px 9px; font-size: .84rem; }
}
@media (max-width: 900px) {
  .hero-grid, .grid-2, .problem, .tab-panel.active, .sec-list { grid-template-columns: 1fr; }
  .grid-3, .services, .gallery { grid-template-columns: 1fr 1fr; }
  .gallery figure.wide { grid-column: span 2; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: 12px 16px;
  }
  .nav-links.open { display: flex; }
  .plan-row { grid-template-columns: 1fr 48px; }
  .plan-row .plan-bar { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 600px) {
  .container { padding: 0 16px; }
  section { padding: 64px 0; }
  .hero { padding: 56px 0 48px; }
  .kpis, .grid-3, .services, .gallery, .stack, .steps, .timeline { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .gallery figure.wide { grid-column: auto; }
  .big-stats { grid-template-columns: 1fr 1fr; }
  .card, .metric-card { padding: 20px; }
}

/* Les enfants de grille ne doivent jamais imposer leur largeur de contenu (code, tableaux) */
.hero-grid > *, .grid-2 > *, .grid-3 > *, .problem > *, .tab-panel > *, .services > *,
.stack > *, .steps > *, .timeline > *, .kpis > *, .sec-list > *, .gallery > * { min-width: 0; }
pre.code-block { margin: 0; max-width: 100%; }
