/* nejib.com — site vitrine. Accents ambre ; Space Grotesk + JetBrains Mono. */
/* Thème clair par défaut (blanc neutre) ; .theme-dark = bandeau Pylon-Monitor, pied de page, visionneuse, et tout le site si l'on choisit le mode sombre. */
:root {
    --bg: #ffffff;
    --bg-2: #f5f6f8;
    --card: #ffffff;
    --card-2: #f2f3f5;
    --line: #e5e7eb;
    --line-2: #d3d7de;
    --text: #111318;
    --body: #3b404a;
    --muted: #5b616d;
    --dim: #7a808c;
    --amber: #b4570a;
    --btn: #ffaa3b;
    --btn-hover: #ffbb5e;
    --amber-ink: #1a1206;
    --orange: #c2410c;
    --green: #3f7d2c;
    --danger: #b3381f;
    --chrome: #eef0f3;
    --chrome-2: #cdd2da;
    --accent: var(--amber);
    --header-bg: rgba(255, 255, 255, .86);
    --grid-line: #eceef1;
    --shadow: 0 22px 50px -26px rgba(17, 24, 39, .28);
    --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --sans: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --radius: 14px;
    --radius-sm: 8px;
    --wrap: 1200px;
    --gutter: clamp(16px, 4vw, 40px);
    color-scheme: light;
}
:root[data-theme="dark"], .theme-dark {
    --bg: #0c0b09;
    --bg-2: #121009;
    --card: #17140e;
    --card-2: #1d1911;
    --line: #2a2519;
    --line-2: #3d3626;
    --text: #f3ecdc;
    --body: #c5bba5;
    --muted: #9a907b;
    --dim: #7d7462;
    --amber: #ffb454;
    --btn: #ffb454;
    --btn-hover: #ffc370;
    --orange: #ff7a3d;
    --green: #8cc47a;
    --danger: #f0957d;
    --chrome: #1f1b13;
    --chrome-2: #3e3727;
    --header-bg: rgba(12, 11, 9, .82);
    --grid-line: #2a2519;
    --shadow: 0 24px 60px -24px rgba(0, 0, 0, .7);
    color-scheme: dark;
}
.theme-dark { color: var(--body); }

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
section[id], [id].section { scroll-margin-top: 84px; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font: 400 17px/1.65 var(--sans);
    background: var(--bg);
    color: var(--body);
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--btn); color: var(--amber-ink); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); }
.dim { color: var(--dim); }
.small { font-size: 13px; }
.center { text-align: center; margin-top: 40px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--btn); color: var(--amber-ink); padding: 8px 14px; border-radius: 6px; }
.skip:focus { left: 8px; }

/* ===== Boutons ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
    font-weight: 600; font-size: 15px; line-height: 1.2; cursor: pointer; white-space: nowrap;
    transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn-solid { background: var(--btn); color: var(--amber-ink); }
.btn-solid:hover { background: var(--btn-hover); }
.btn-orange { background: #ff7a3d; color: #1b0b03; }
.btn-orange:hover { background: #ff9563; }
.btn-green { background: #8cc47a; color: #0b1607; }
.btn-green:hover { background: #a3d593; }
.btn-accent { background: var(--accent); color: #140d04; }
.btn-ghost { border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ===== En-tête ===== */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: var(--header-bg); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand-mark {
    display: inline-flex; align-items: center; justify-content: center; flex: none; width: 38px; height: 38px; border-radius: 10px;
    background: var(--btn); color: var(--amber-ink); font: 700 15px/1 var(--mono); letter-spacing: -.06em; white-space: nowrap;
}
.brand-mark span { color: #8a4b00; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-weight: 600; font-size: 16px; }
.brand-text small { font: 400 11px/1.3 var(--mono); color: var(--dim); }
.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav ul { display: flex; gap: 24px; }
.main-nav ul a { color: var(--body); font-weight: 500; font-size: 15px; padding: 6px 0; border-bottom: 2px solid transparent; }
.main-nav ul a:hover, .main-nav ul a[aria-current] { color: var(--text); border-color: var(--amber); }
.lang-switch { display: flex; gap: 2px; font: 500 12px var(--mono); border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; }
.lang-switch a { padding: 4px 9px; border-radius: 999px; color: var(--dim); }
.lang-switch a:hover { color: var(--text); }
.lang-switch a[aria-current] { background: var(--card-2); color: var(--amber); }
.menu-btn { display: none; width: 42px; height: 42px; border: 1px solid var(--line-2); border-radius: 10px; background: none; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 6px; }
.menu-btn span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ===== Titres de section ===== */
.label { font-size: 13px; color: var(--amber); letter-spacing: .02em; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(140, 196, 122, .15); flex: none; }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-tight { padding: 40px 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-title, .hero-title, .feature-title, .card-title, .next-case strong { text-wrap: balance; }
.section-title { font-size: clamp(30px, 4.2vw, 46px); line-height: 1.08; letter-spacing: -.025em; color: var(--text); font-weight: 600; }
.section-lede { font-size: 19px; color: var(--muted); margin-top: 16px; max-width: 680px; }

/* ===== Héros ===== */
.hero { padding: clamp(48px, 7vw, 96px) 0 0; position: relative; }
.hero::before {
    content: ""; position: absolute; inset: 0 0 auto; height: 640px; pointer-events: none;
    background: radial-gradient(60% 60% at 80% 20%, rgba(255, 180, 84, .10), transparent 70%),
                linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 56px 56px,
                linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 56px 56px;
    -webkit-mask-image: radial-gradient(80% 70% at 50% 0%, #000 30%, transparent 75%);
            mask-image: radial-gradient(80% 70% at 50% 0%, #000 30%, transparent 75%);
    opacity: .55;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero-title { font-size: clamp(38px, 5.6vw, 68px); line-height: 1.02; letter-spacing: -.035em; color: var(--text); font-weight: 600; }
.hero-title em { font-style: normal; color: var(--amber); }
.hero-lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); margin-top: 24px; max-width: 600px; }
.hero-visual { position: relative; height: 480px; }
.stack-shot { position: absolute; transition: transform .4s ease; }
.stack-shot.s1 { width: 86%; right: 0; top: 0; transform: rotate(1.5deg); z-index: 1; }
.stack-shot.s2 { width: 70%; left: 0; top: 180px; transform: rotate(-2.5deg); z-index: 2; }
.stack-shot.s3 { width: 46%; right: 2%; bottom: -10px; z-index: 3; }
.hero-visual:hover .s1 { transform: rotate(0) translateY(-6px); }
.hero-visual:hover .s2 { transform: rotate(-1deg) translateY(-4px); }
.hero-product { border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line-2); }

/* ===== Chiffres ===== */
.stats {
    display: grid; grid-template-columns: repeat(4, 1fr);
    margin-top: clamp(48px, 7vw, 88px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden;
}
.stats > div { padding: 26px 28px; border-left: 1px solid var(--line); display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 8px; }
.stats > div:first-child { border-left: 0; }
.stats dt { font: 400 13px/1.4 var(--mono); color: var(--dim); }
.stats dd { font-size: clamp(30px, 3.4vw, 42px); font-weight: 600; line-height: 1; color: var(--text); letter-spacing: -.02em; }
.stats > div:nth-child(n+2) dd { color: var(--accent); }

/* ===== Cadres navigateur / téléphone ===== */
.browser { border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); background: var(--card); box-shadow: var(--shadow); }
.browser-bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: var(--chrome); border-bottom: 1px solid var(--line-2); }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--chrome-2); }
.browser-bar i:first-child { background: #e46a4c; } .browser-bar i:nth-child(2) { background: #e7b041; } .browser-bar i:nth-child(3) { background: #6ab35a; }
.browser-bar span { margin-left: 10px; font: 400 11px var(--mono); color: var(--dim); background: var(--bg); padding: 2px 12px; border-radius: 6px; flex: 1; max-width: 260px; }
.browser img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.phone { width: 100%; max-width: 230px; border-radius: 30px; padding: 8px; background: #050504; border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.phone img { border-radius: 23px; aspect-ratio: 9 / 18; object-fit: cover; object-position: top; width: 100%; }

/* ===== Projets phares ===== */
.feature { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
.feature-rev .feature-visual { order: 2; }
.feature-visual { position: relative; padding-bottom: 40px; }
.feature-visual .browser { width: 88%; }
.feature-visual .phone { position: absolute; right: 0; bottom: 0; width: 30%; max-width: 200px; }
.feature-num { color: var(--dim); font-size: 13px; margin-bottom: 10px; }
.feature-title { font-size: clamp(30px, 3.6vw, 44px); letter-spacing: -.03em; line-height: 1.05; color: var(--text); font-weight: 600; }
.feature-kpi { display: inline-block; margin: 14px 0 18px; padding: 5px 12px; border-radius: 999px; font: 500 13px var(--mono); color: var(--amber); background: rgba(255, 180, 84, .1); border: 1px solid rgba(255, 180, 84, .25); }
.feature-rev .feature-kpi { color: var(--green); background: rgba(140, 196, 122, .1); border-color: rgba(140, 196, 122, .25); }
.feature-copy > p:not([class]) { font-size: 18px; color: var(--body); }

/* Bandeau Pylon-Monitor */
.pm-band {
    padding: clamp(64px, 9vw, 112px) 0; position: relative; overflow: hidden;
    background: radial-gradient(70% 80% at 85% 30%, rgba(255, 122, 61, .16), transparent 65%), #110d09;
    border-top: 1px solid #3a2516; border-bottom: 1px solid #3a2516;
    --accent: var(--orange);
}
.pm-band .label { color: var(--orange); }
.pm-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.checks { margin-top: 26px; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 32px; color: var(--text); }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: rgba(255, 122, 61, .15); color: var(--orange); }
.pm-visual { position: relative; padding: 0 0 60px 60px; }
.pm-photo { border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid #4a2f1b; }
.pm-dash { position: absolute; left: 0; bottom: 0; width: 46%; border-radius: 12px; border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.stats-pm { background: rgba(23, 18, 12, .8); border-color: #3a2516; }
.stats-pm > div { border-color: #3a2516; }
.range-label { margin-top: 56px; color: var(--orange); }
.range-item { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); transition: border-color .2s, transform .2s; }
.range-item:hover { border-color: var(--accent); transform: translateY(-3px); }
.range-item img { border-radius: 10px; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; margin-bottom: 10px; background: #fff; }
.range-item strong { color: var(--text); font-weight: 600; }
.range-item .dim { font-size: 14px; }
.range-item .price { color: var(--accent); font-size: 14px; margin-top: 4px; }

/* ===== Grilles & cartes ===== */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .2s, transform .2s; }
.card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.card[hidden] { display: none; }
.card-media { position: relative; display: block; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--bg-2); aspect-ratio: 16 / 10; cursor: zoom-in; }
/* Capture pleine page : au survol elle défile du haut vers le bas, puis remonte vite quand on sort. */
.card-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transition: object-position .8s ease, transform .4s ease; }
.card:hover .card-media img, .card-media:focus-visible img { object-position: 50% 100%; transition: object-position var(--scroll-dur, 6s) linear, transform .4s ease; }
.card-media::after { content: ""; position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(transparent, rgba(12, 11, 9, .55)); opacity: 0; transition: opacity .3s; pointer-events: none; }
.card:hover .card-media::after { opacity: 1; }
.card-zoom { position: absolute; right: 12px; bottom: 12px; z-index: 1; padding: 6px 11px; border-radius: 999px; font-size: 12px; background: rgba(12, 11, 9, .82); color: #f3ecdc; border: 1px solid rgba(255,255,255,.18); opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
.card:hover .card-zoom, .card-media:focus-visible .card-zoom { opacity: 1; transform: none; }
@media (hover: none) { .card-zoom { opacity: 1; transform: none; } }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.card-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); margin-bottom: 10px; }
.badge { padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); font-size: 11px; }
.badge-amber { color: var(--amber); border-color: rgba(255, 180, 84, .4); background: rgba(255, 180, 84, .08); }
.badge-green { color: var(--green); border-color: rgba(140, 196, 122, .4); background: rgba(140, 196, 122, .08); }
.card-title { font-size: 21px; font-weight: 600; color: var(--text); letter-spacing: -.01em; line-height: 1.25; }
.card-title a:hover { color: var(--amber); }
.card-title span { color: var(--dim); font-size: 16px; }
.card-desc { margin-top: 8px; font-size: 15.5px; color: var(--body); flex: 1; }
.card-related { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.card-related a { font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); color: var(--muted); }
.card-related a:hover { color: var(--amber); border-color: var(--amber); }
.card-related .mono { font-size: 10px; color: var(--dim); margin-right: 2px; }
.card-tags { font-size: 12px; color: var(--dim); margin-top: 16px; }
/* Grille projets sur 6 pistes : 3 cartes par ligne ; s'il en reste 2, elles se partagent la ligne (classes posées par site.js). */
.grid-3.cards { grid-template-columns: repeat(6, 1fr); }
.grid-3.cards > .card { grid-column: span 2; }
.grid-3.cards > .card.is-half { grid-column: span 3; }
.grid-3.cards > .card.is-wide { grid-column: 1 / -1; }
/* Dernière carte seule sur sa ligne : elle prend toute la largeur, en mode horizontal (classe posée par site.js). */
.card.is-wide { grid-column: 1 / -1; flex-direction: row; }
.card.is-wide .card-media { flex: 0 0 48%; border-bottom: 0; border-right: 1px solid var(--line); }
.card.is-wide .card-media { aspect-ratio: auto; min-height: 300px; }
.card.is-wide .card-body { justify-content: center; padding: 32px; }
.card.is-wide .card-title { font-size: 26px; }

.tile { position: relative; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.tile h3 { font-size: 21px; color: var(--text); font-weight: 600; margin: 14px 0 8px; letter-spacing: -.01em; }
.tile p { color: var(--body); font-size: 16px; }
.tile p.small { font-size: 13px; margin-top: 14px; }
.tile-num { font-size: 12px; color: var(--accent); }
.infra-item { padding: 24px 0 0; border-top: 1px solid var(--line-2); }
.infra-item h3 { font-size: 14px; color: var(--amber); font-weight: 500; margin-bottom: 8px; }
.infra-item p { font-size: 16px; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pills li { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; color: var(--body); background: var(--card); }

/* ===== Page projets ===== */
.page-hero { padding: clamp(48px, 7vw, 88px) 0 24px; position: relative; }
.page-hero .section-head { margin-bottom: 32px; }
.page-hero .section-title, .hero-title, .feature-title, .card-title, .next-case strong { text-wrap: balance; }
.section-title { font-size: clamp(38px, 5.4vw, 62px); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.archive-hint { margin-top: 32px; font-size: 15px; text-align: center; }
.archive-hint a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.archive-hint a:hover { color: var(--amber); }
.chip { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; font-size: 13px; color: var(--body); cursor: pointer; transition: all .15s; }
.chip span { color: var(--dim); margin-left: 4px; }
.chip:hover { border-color: var(--amber); }
.chip[aria-pressed="true"] { background: var(--btn); border-color: var(--btn); color: var(--amber-ink); }
.chip[aria-pressed="true"] span { color: #6b4300; }
.archive { padding-top: 24px; }
.archive-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; padding-top: 32px; border-top: 1px dashed var(--line-2); margin-bottom: 20px; }
.archive-head h2 { font-size: 14px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.archive-head p { font-size: 14px; }
.archive-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 28px; font-size: 14px; }
.archive-list li { display: flex; flex-wrap: wrap; gap: 2px 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.archive-list a { color: var(--muted); }
.archive-list a:hover { color: var(--amber); }
.archive-list .dim { font-size: 13px; }
.archive-rel { width: 100%; font-size: 12px; }
.archive-rel a { color: var(--dim); }

/* ===== Étude de cas ===== */
.crumbs { font-size: 13px; color: var(--dim); margin-bottom: 24px; }
.crumbs a:hover { color: var(--amber); }
.case .label, .case .tile-num, .case .steps li::before { color: color-mix(in srgb, var(--accent) 62%, var(--text)); }
.case-hero-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.case-hero .hero-title { font-size: clamp(36px, 4.6vw, 56px); }
.case-photo { border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line-2); }
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 64px; align-items: center; }
.split-visual { display: flex; justify-content: center; }
.split-visual .phone { max-width: 270px; }
.big-text { font-size: clamp(20px, 2.2vw, 26px); line-height: 1.5; color: var(--text); letter-spacing: -.01em; }
.takeaway { margin-top: 28px; padding: 18px 22px; border-left: 3px solid var(--accent); background: var(--card); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--body); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.steps-3 { grid-template-columns: repeat(3, 1fr); }
.steps li { counter-increment: step; position: relative; padding: 52px 24px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.steps li::before { content: counter(step, decimal-leading-zero); position: absolute; top: 20px; left: 24px; font: 500 13px var(--mono); color: var(--accent); }
.steps h3 { font-size: 19px; color: var(--text); font-weight: 600; margin-bottom: 6px; }
.steps p { font-size: 15.5px; }
.gallery figure { display: flex; flex-direction: column; gap: 10px; }
.gallery a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); background: var(--card); }
.gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; transition: transform .4s; }
.gallery a:hover img { transform: scale(1.03); }
.gallery figcaption { font-size: 14px; color: var(--muted); }
.next-case { display: grid; gap: 6px; margin-top: 56px; padding: 32px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--card); transition: border-color .2s; }
.next-case:hover { border-color: var(--accent); }
.next-case strong { font-size: clamp(26px, 3vw, 36px); color: var(--text); font-weight: 600; letter-spacing: -.02em; }

/* ===== À propos ===== */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 64px; align-items: start; }
.about-p { margin-top: 18px; font-size: 18px; max-width: 640px; }
.idcard { position: sticky; top: 100px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--card); overflow: hidden; font-size: 14px; }
.idcard-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); color: var(--dim); }
.idcard dl { padding: 8px 20px 14px; }
.idcard dl div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.idcard dl div:last-child { border-bottom: 0; }
.idcard dt { color: var(--dim); }
.idcard dd { color: var(--text); }
.idcard .ok { color: var(--green); }

/* ===== Contact ===== */
.contact { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); border-top: 1px solid var(--line); }
.contact-page .contact { border-top: 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start; }
.contact-links { display: grid; gap: 12px; margin-top: 8px; }
.contact-links a { display: inline-flex; gap: 12px; align-items: baseline; color: var(--text); font-size: 18px; }
.contact-links a:hover { color: var(--amber); }
.contact-links .mono { width: 24px; font-size: 12px; }
.contact-form { display: grid; gap: 18px; padding: 32px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--card); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-form label { display: grid; gap: 8px; }
.contact-form label > span { font: 400 13px var(--mono); color: var(--muted); }
.contact-form input, .contact-form select, .contact-form textarea {
    width: 100%; padding: 13px 15px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font-size: 16px; transition: border-color .15s;
}
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form ::placeholder { color: var(--dim); opacity: .8; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: none; border-color: var(--amber); }
.contact-form .btn { justify-self: start; }
.form-message { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 15px; }
.form-message.success { background: rgba(140, 196, 122, .12); color: var(--green); border: 1px solid rgba(140, 196, 122, .3); }
.form-message.error { background: rgba(228, 106, 76, .12); color: var(--danger); border: 1px solid rgba(228, 106, 76, .3); }
.spinner[hidden] { display: none; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.recaptcha-note a { text-decoration: underline; }
.grecaptcha-badge { visibility: hidden; }

/* ===== Pied de page ===== */
.site-footer { border-top: 1px solid var(--line); padding: 64px 0 28px; background: var(--bg); color: var(--body); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-about p { margin-top: 16px; max-width: 360px; font-size: 15px; }
.footer-h { font: 500 12px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.site-footer ul { display: grid; gap: 8px; font-size: 15px; }
.site-footer ul a:hover { color: var(--amber); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 12px; color: var(--dim); }

/* ===== Visionneuse ===== */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(5, 4, 3, .92); display: grid; place-items: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox figure { max-width: min(1280px, 100%); max-height: 100%; display: grid; gap: 14px; }
.lightbox-scroll { max-height: 82vh; overflow: auto; border-radius: 10px; overscroll-behavior: contain; }
.lightbox img { max-height: 82vh; width: auto; margin: 0 auto; border-radius: 10px; }
.lightbox.is-page figure { width: min(1100px, 100%); }
.lightbox.is-page .lightbox-scroll { border: 1px solid var(--line-2); background: #fff; }
.lightbox.is-page img { max-height: none; width: 100%; border-radius: 0; }
.lightbox figcaption { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px; color: var(--muted); font-size: 14px; }
.lightbox-close { position: absolute; top: 16px; right: 20px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--card); color: var(--text); font-size: 24px; cursor: pointer; }

/* ===== Apparition au défilement ===== */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
    .card:hover .card-media img { object-position: 50% 0; }
    * { transition: none !important; animation: none !important; }
}

/* ===== Responsive ===== */
@media (max-width: 1080px) {
    .grid-4, .numbers { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .main-nav { gap: 18px; }
    .main-nav ul { gap: 18px; }
    .brand-text small { display: none; }
}
@media (max-width: 960px) {
    .hero-grid, .feature, .pm-grid, .case-hero-grid, .split, .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .feature-rev .feature-visual { order: 0; }
    .hero-visual { height: 400px; max-width: 640px; }
    .grid-3, .grid-3.cards { grid-template-columns: repeat(2, 1fr); }
    .grid-3.cards > .card, .grid-3.cards > .card.is-half { grid-column: auto; }
    .grid-3.cards > .card.is-wide { grid-column: 1 / -1; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .stats > div:nth-child(3) { border-left: 0; }
    .stats > div:nth-child(n+3) { border-top: 1px solid var(--line); }
    .stats-pm > div:nth-child(n+3) { border-top-color: #3a2516; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-about { grid-column: 1 / -1; }
    .archive-list { grid-template-columns: repeat(2, 1fr); }
    .idcard { position: static; }
    .split-visual { order: 2; }

    .menu-btn { display: flex; }
    .main-nav {
        position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 18px;
        padding: 20px var(--gutter) 28px; background: var(--bg); border-bottom: 1px solid var(--line);
        transform: translateY(-8px); opacity: 0; visibility: hidden; transition: all .2s ease;
    }
    .main-nav.open { transform: none; opacity: 1; visibility: visible; }
    .main-nav ul { flex-direction: column; gap: 0; }
    .main-nav ul a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 18px; }
    .main-nav ul a[aria-current] { border-bottom-color: var(--line); color: var(--amber); }
    .lang-switch { align-self: flex-start; }
    .nav-cta { align-self: stretch; }
}
@media (max-width: 640px) {
    body { font-size: 16px; }
    .journal::before { left: 6px; }
    .journal li { grid-template-columns: 1fr; gap: 2px; padding-left: 28px; }
    .journal li::before { left: 1px; }
    .journal time { text-align: left; }
    .grid-2, .grid-3, .grid-3.cards, .steps, .steps-3, .form-row, .archive-list { grid-template-columns: 1fr; }
    .hero-visual { height: 300px; }
    .stack-shot.s1 { width: 92%; }
    .stack-shot.s2 { width: 78%; top: 120px; }
    .stack-shot.s3 { width: 48%; }
    .stats > div { padding: 20px; }
    .feature-visual .phone { width: 34%; }
    .pm-visual { padding: 0 0 40px 30px; }
    .card.is-wide { flex-direction: column; }
    .card.is-wide .card-media { flex: none; border-right: 0; border-bottom: 1px solid var(--line); aspect-ratio: 16 / 10; min-height: 0; }
    .card.is-wide .card-body { padding: 20px 22px 22px; }
    .card.is-wide .card-title { font-size: 21px; }
    .contact-form { padding: 22px; }
    .contact-form .btn { justify-self: stretch; }
    .actions .btn { flex: 1 1 auto; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
    .brand-text strong { font-size: 15px; }
    .browser-bar span { max-width: 160px; }
}

/* ===== Le parc en chiffres ===== */
.numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.number { display: flex; flex-direction: column; gap: 6px; padding: 28px 26px 24px; background: var(--card); transition: background .2s; }
.number:hover { background: var(--card-2); }
.number strong { font-size: clamp(30px, 3.4vw, 44px); line-height: 1; font-weight: 600; letter-spacing: -.03em; color: var(--text); }
.number:nth-child(4n+1) strong, .number:nth-child(4n+3) strong { color: var(--amber); }
.number span { color: var(--body); font-size: 15px; }
.number em { font-style: normal; font-size: 12px; color: var(--dim); margin-top: auto; padding-top: 10px; }
.number:hover em { color: var(--amber); }

/* ===== Journal ===== */
.journal { position: relative; display: grid; gap: 0; max-width: 880px; }
.journal::before { content: ""; position: absolute; left: 118px; top: 8px; bottom: 8px; width: 1px; background: var(--line-2); }
.journal li { display: grid; grid-template-columns: 100px 1fr; gap: 36px; padding: 14px 0; position: relative; }
.journal li::before { content: ""; position: absolute; left: 113px; top: 22px; width: 11px; height: 11px; border-radius: 50%; background: var(--card); border: 2px solid var(--amber); }
.journal time { font-size: 13px; color: var(--dim); text-align: right; padding-top: 3px; }
.journal a { font-weight: 600; color: var(--text); }
.journal a:hover { color: var(--amber); }
.journal p { color: var(--body); font-size: 16px; margin-top: 2px; }

/* ===== Recherche dans les grilles ===== */
.grid-tools { margin-bottom: 16px; }
.search input { width: 100%; max-width: 520px; padding: 13px 18px 13px 44px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23857a65' stroke-width='2'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E") no-repeat 17px 50%; font-size: 16px; color: var(--text); }
.search input:focus { outline: none; border-color: var(--amber); }
.no-results { padding: 32px 0; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ===== Bascule de thème ===== */
.theme-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; color: var(--text); cursor: pointer; font-size: 16px; line-height: 1; display: grid; place-items: center; }
.theme-btn:hover { border-color: var(--amber); color: var(--amber); }
.theme-btn .i-dark { display: none; }
:root[data-theme="dark"] .theme-btn .i-dark { display: inline; }
:root[data-theme="dark"] .theme-btn .i-light { display: none; }
/* En clair, les captures et photos gardent un léger contour pour se détacher du papier. */
:root:not([data-theme="dark"]) .card { box-shadow: 0 1px 2px rgba(17, 24, 39, .05); }
:root:not([data-theme="dark"]) .card:hover { box-shadow: var(--shadow); }
