/* Site de Kloe : charte KIT/DA/DA-KLOE.md (rouge pur #D4000F sur fond sombre, SF Pro, Kloe Display pour un mot seul).
   Look « technique » : viseur de caméra (coins, REC, timecode 24 i/s), fiches techniques en mono, prompts en blocs d'éditeur. */
@font-face { font-family: "Kloe Display"; src: url(KloeDisplay-Regular.ttf) format("truetype"); font-display: swap; }

:root {
  --fond: #0e0e0e; --surface: #161616; --surface-2: #1c1c1c; --trait: #262626; --trait-fort: #343434;
  --texte: #F4F4F2; --doux: #c4c4bf; --gris: #8a8a85;
  --rouge: #D4000F; --rouge-profond: #82000A; --rouge-voile: rgba(212, 0, 15, .14);
  --texte-police: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --titre-police: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --large: 1180px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { background: var(--fond); color: var(--texte); font: 16px/1.55 var(--texte-police); min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
::selection { background: var(--rouge); color: #fff; }
a { color: inherit; }
b { color: var(--texte); font-weight: 700; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

/* Fond : grille fine qui s'efface vers le bas, grain par-dessus. */
.fond-grille { position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background-image: linear-gradient(to right, rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(to bottom, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 48px 48px; -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 80%); mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 80%); }
.grain { position: fixed; inset: 0; opacity: .05; mix-blend-mode: overlay; pointer-events: none; background: url(grain.png) repeat; background-size: 64px 64px; z-index: 50; }

.etiq, .surtitre, .fil, .puce, .reel-meta, .prompt-pied, .specs dt, .compteurs dt, .note, .filtre {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; }
.surtitre { color: var(--gris); display: flex; align-items: center; gap: 10px; }
.surtitre::before { content: ""; width: 7px; height: 7px; background: var(--rouge); flex: none; }
.surtitre:has(.bulle)::before { display: none; }
.etiq { color: var(--gris); }
.chapo { color: var(--doux); font-size: 18px; max-width: 620px; }
.rouge { color: var(--rouge); }

/* ── Barre du haut ─────────────────────────────────── */
.barre { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 60px; padding: 0 max(16px, calc((100vw - var(--large)) / 2)); background: rgba(14,14,14,.72);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid var(--trait); }
.marque { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.marque img { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--rouge); object-fit: cover; }
.marque span, .marque-pied { font: 400 26px/1 "Kloe Display", var(--titre-police); color: var(--rouge); text-decoration: none; }
.liens { display: flex; gap: 22px; font: 600 14px/1 var(--titre-police); }
.liens a { text-decoration: none; color: var(--doux); transition: color .15s; }
.liens a:hover { color: var(--texte); }
.fleche { color: var(--rouge); }

/* ── Boutons et puces ──────────────────────────────── */
.boutons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.bouton { display: inline-flex; align-items: center; gap: 8px; font: 700 14.5px/1 var(--titre-police); padding: 13px 18px; border-radius: 8px;
  border: 1px solid var(--trait-fort); background: var(--surface); color: var(--texte); text-decoration: none; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.bouton:hover { border-color: var(--rouge); }
.bouton:active { transform: translateY(1px); }
.bouton.plein { background: var(--rouge); border-color: var(--rouge); }
.bouton.plein:hover { background: #e30a19; }
.bouton.discret { background: transparent; color: var(--gris); }
.bouton.petit { width: 100%; justify-content: center; padding: 11px 14px; font-size: 13px; margin-top: 18px; }
.bouton svg, .copier svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.4; flex: none; }
.fait { background: #1f2a1f !important; border-color: #2f4a2f !important; color: #b9f0b9 !important; }

.puces { display: flex; flex-wrap: wrap; gap: 6px; }
.puce { display: inline-block; font-size: 10.5px; padding: 4px 7px; border-radius: 4px; border: 1px solid var(--trait-fort); color: var(--doux); white-space: nowrap; }
.puce.modele { border-color: var(--rouge-profond); color: #ff6b70; background: var(--rouge-voile); }

/* ── Viseur de caméra ──────────────────────────────── */
.viseur { position: relative; overflow: hidden; background: #000; }
.viseur > img, .viseur > video { width: 100%; height: 100%; object-fit: cover; }
.viseur .coin { position: absolute; width: 18px; height: 18px; border: 0 solid rgba(255,255,255,.85); pointer-events: none; z-index: 2; }
.coin.hg { top: 10px; left: 10px; border-top-width: 1.5px; border-left-width: 1.5px; }
.coin.hd { top: 10px; right: 10px; border-top-width: 1.5px; border-right-width: 1.5px; }
.coin.bg { bottom: 10px; left: 10px; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.coin.bd { bottom: 10px; right: 10px; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.viseur .rec, .viseur .tc, .viseur-etiquette { position: absolute; z-index: 2; font: 600 10.5px/1 var(--mono); letter-spacing: .1em; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); pointer-events: none; }
.viseur .rec { top: 17px; left: 36px; display: flex; align-items: center; gap: 6px; }
.viseur .rec::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--rouge); animation: clignote 1.2s steps(2, start) infinite; }
.viseur .tc { top: 17px; right: 36px; font-variant-numeric: tabular-nums; }
.viseur-etiquette { bottom: 17px; left: 36px; max-width: calc(100% - 72px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes clignote { to { visibility: hidden; } }

/* ── Accueil ───────────────────────────────────────── */
.accueil { max-width: var(--large); margin: 0 auto; padding: 0 16px 24px; }
.heros { display: grid; grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: center; padding: 64px 0 40px; }
.identite { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 28px); margin: 22px 0 22px; padding-left: 7px; }
.identite .bulle { width: clamp(108px, 13vw, 168px); height: clamp(108px, 13vw, 168px); flex: none; border-radius: 50%; object-fit: cover; border: 3px solid var(--rouge); box-shadow: 0 0 0 6px var(--fond), 0 0 0 7px var(--trait-fort); }
.nom { font: 400 clamp(84px, 12vw, 160px)/.9 "Kloe Display", var(--titre-police); color: var(--rouge); }
.vide .nom { margin: 18px 0; }
.heros-video { display: block; border-radius: 6px; overflow: hidden; border: 1px solid var(--trait); box-shadow: 0 30px 80px -30px rgba(212,0,15,.35); }
.heros-video .viseur { aspect-ratio: 4 / 3; }

.compteurs { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--trait); border-radius: 8px; background: rgba(22,22,22,.7); overflow: hidden; }
.compteurs div { padding: 18px 22px; border-left: 1px solid var(--trait); }
.compteurs div:first-child { border-left: 0; }
.compteurs dt { color: var(--gris); }
.compteurs dd { font: 800 34px/1.1 var(--titre-police); margin-top: 6px; font-variant-numeric: tabular-nums; }
.compteurs div:last-child dd { color: var(--rouge); }

.entete-section { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin: 72px 0 24px; }
.entete-section .titre-section { margin: 0; flex: 1 1 320px; }
.titre-section { font: 900 clamp(26px, 4vw, 38px)/1 var(--titre-police); text-transform: uppercase; letter-spacing: -.01em; margin: 72px 0 24px; }
.titre-section b { color: var(--rouge); }
.filtres { display: flex; flex-wrap: wrap; gap: 6px; }
.filtre { background: transparent; border: 1px solid var(--trait-fort); color: var(--doux); padding: 8px 11px; border-radius: 6px; cursor: pointer; transition: all .15s; }
.filtre:hover { color: var(--texte); border-color: var(--gris); }
.filtre.actif { background: var(--texte); color: var(--fond); border-color: var(--texte); }

.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.reel { display: flex; flex-direction: column; text-decoration: none; background: var(--surface); border: 1px solid var(--trait); border-radius: 8px; overflow: hidden; transition: border-color .2s, transform .2s; }
.reel:hover { border-color: var(--trait-fort); transform: translateY(-3px); }
.reel[hidden] { display: none; }
.vignette { position: relative; }
.vignette .viseur { aspect-ratio: 4 / 3; }
.vignette video { position: absolute; inset: 0; opacity: 0; transition: opacity .3s; }
.vignette video.joue { opacity: 1; }
.mot { position: absolute; right: 10px; bottom: 10px; z-index: 3; background: var(--rouge); font: 800 11px/1 var(--mono); letter-spacing: .1em; padding: 6px 8px; border-radius: 4px; }
.mot::before { content: "COMMENT "; font-weight: 500; opacity: .8; }
.reel-texte { display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 16px; flex: 1; }
.reel h3 { font: 800 21px/1.15 var(--titre-police); }
.reel-texte > p { color: var(--gris); font-size: 14.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.reel-meta { display: flex; gap: 14px; color: var(--gris); margin-top: auto; padding-top: 12px; border-top: 1px solid var(--trait); }
.reel-meta .ouvrir { margin-left: auto; color: var(--rouge); }

.outils { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.outil { text-decoration: none; background: var(--surface); border: 1px solid var(--trait); border-radius: 8px; padding: 18px 20px; transition: border-color .15s; }
.outil:hover { border-color: var(--rouge); }
.outil h3 { font: 800 20px/1.2 var(--titre-police); margin-top: 8px; }
.outil p { color: var(--gris); font-size: 14.5px; margin-top: 4px; }

.vide { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 120px 0 80px; }
.vide .boutons { justify-content: center; }

/* ── Page d'un workflow ────────────────────────────── */
.page-guide { max-width: var(--large); margin: 0 auto; padding: 36px 16px 24px; }
.intro { max-width: 860px; }
.fil { color: var(--gris); display: flex; gap: 8px; margin-bottom: 22px; }
.fil a { text-decoration: none; color: var(--doux); }
.fil a:hover { color: var(--rouge); }
.intro h1 { font: 900 clamp(40px, 7.5vw, 76px)/.92 var(--titre-police); text-transform: uppercase; letter-spacing: -.025em; margin: 14px 0 18px; }

.mise-en-page { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 56px; margin-top: 40px; align-items: start; }
.contenu { min-width: 0; max-width: 820px; }
.sommaire { position: sticky; top: 84px; border-left: 1px solid var(--trait); padding-left: 18px; }
.sommaire ol { list-style: none; margin-top: 12px; display: grid; gap: 2px; }
.sommaire a { display: block; padding: 5px 0; color: var(--gris); text-decoration: none; font-size: 13.5px; line-height: 1.35; transition: color .15s; }
.sommaire li.sous a { padding-left: 12px; font-family: var(--mono); font-size: 12px; }
.sommaire a:hover { color: var(--texte); }
.sommaire a.actif { color: var(--texte); box-shadow: -19px 0 0 -17px var(--rouge); }

.video { display: flex; justify-content: center; background: #050505; border: 1px solid var(--trait); border-radius: 8px; overflow: hidden; }
.video .viseur { display: inline-block; }
.video video { max-height: 70vh; width: auto; height: auto; }

.specs { margin: 20px 0 8px; border: 1px solid var(--trait); border-radius: 8px; overflow: hidden; background: rgba(22,22,22,.7); }
.specs div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 12px 18px; border-top: 1px solid var(--trait); align-items: baseline; }
.specs div:first-child { border-top: 0; }
.specs dt { color: var(--gris); }
.specs dd { color: var(--doux); font-size: 14.5px; }
.specs dd a { color: var(--rouge); font-weight: 700; text-decoration: none; }

.image { margin: 28px 0; }
.image img { width: 100%; border-radius: 6px; border: 1px solid var(--trait); }
.image figcaption { color: var(--gris); font-size: 14px; margin-top: 10px; display: flex; gap: 10px; align-items: baseline; }

.carte { background: var(--surface); border: 1px solid var(--trait); border-radius: 8px; padding: 18px 20px; margin: 18px 0; }
.carte h3 { font: 600 11.5px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--gris); display: flex; align-items: center; gap: 8px; }
.carte p { color: var(--doux); margin-top: 10px; }
.carte.alerte { border-color: var(--rouge-profond); background: linear-gradient(var(--rouge-voile), var(--rouge-voile)), var(--surface); }
.carte.alerte h3 { color: #ff6b70; }
.signe { width: 18px; height: 18px; border-radius: 50%; background: var(--rouge); color: #fff; font: 800 12px/18px var(--titre-police); text-align: center; }
.contenu a:not(.bouton) { color: var(--rouge); font-weight: 700; text-decoration: none; }
.contenu a:not(.bouton):hover { text-decoration: underline; }

.sous-titre { font: 900 28px/1 var(--titre-police); text-transform: uppercase; margin: 52px 0 22px; display: flex; flex-direction: column; gap: 10px; }
.etapes { list-style: none; position: relative; }
.etapes::before { content: ""; position: absolute; left: 19px; top: 8px; bottom: 30px; border-left: 1px dashed var(--trait-fort); }
.etapes li { position: relative; display: grid; grid-template-columns: 40px 1fr; gap: 18px; padding-bottom: 26px; }
.etapes .num { width: 40px; height: 40px; border-radius: 8px; background: var(--fond); border: 1px solid var(--rouge); color: var(--rouge); font: 700 14px/38px var(--mono); text-align: center; position: relative; }
.etapes h3 { font: 800 19px/1.25 var(--titre-police); padding-top: 8px; }
.etapes p { color: var(--doux); margin-top: 6px; }

.partie { margin: 72px 0 22px; padding-top: 32px; border-top: 1px solid var(--trait); }
.partie h2 { font: 900 clamp(36px, 6vw, 56px)/.95 var(--titre-police); text-transform: uppercase; letter-spacing: -.02em; margin: 14px 0 12px; }
.partie p:not(.surtitre) { color: var(--doux); }

.prompt { background: var(--surface); border: 1px solid var(--trait); border-radius: 8px; margin: 18px 0; overflow: hidden; transition: border-color .2s; }
.prompt:hover { border-color: var(--trait-fort); }
.prompt-tete { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 14px 14px 16px; background: var(--surface-2); border-bottom: 1px solid var(--trait); }
.prompt-num { font: 700 22px/1 var(--mono); color: var(--rouge); }
.prompt-titre h3 { font: 800 16px/1.2 var(--titre-police); margin-bottom: 7px; }
.copier { display: inline-flex; align-items: center; gap: 7px; font: 700 13.5px/1 var(--titre-police); color: #fff; background: var(--rouge); border: 1px solid var(--rouge); border-radius: 7px; padding: 10px 14px; cursor: pointer; transition: background .15s; }
.copier:hover { background: #e30a19; }
.entrees { padding: 10px 18px; border-bottom: 1px solid var(--trait); color: var(--doux); font-size: 13.5px; display: flex; gap: 12px; align-items: baseline; }
.prompt pre { font: 13.5px/1.7 var(--mono); color: #e9e9e6; white-space: pre-wrap; word-wrap: break-word; padding: 18px 18px 18px 20px; border-left: 2px solid var(--rouge); margin: 14px 0 14px 0; }
mark { background: var(--rouge-voile); color: #ff6b70; border-radius: 3px; padding: 0 2px; }
.prompt-pied { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--trait); color: var(--gris); font-size: 10.5px; }

.note { color: var(--gris); margin-top: 40px; }

/* ── Pied ──────────────────────────────────────────── */
.pied { max-width: var(--large); margin: 80px auto 0; padding: 32px 16px 48px; border-top: 1px solid var(--trait); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.pied p { color: var(--gris); font-size: 14px; margin-top: 8px; }
.pied-liens { display: flex; gap: 20px; font-size: 14px; }
.pied-liens a { text-decoration: none; color: var(--doux); }
.pied-liens a:hover { color: var(--rouge); }

/* ── Petits écrans ─────────────────────────────────── */
@media (max-width: 980px) {
  .heros { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; }
  .mise-en-page { grid-template-columns: 1fr; }
  .sommaire { display: none; }
}
@media (max-width: 600px) {
  .liens { gap: 14px; font-size: 13px; }
  .liens a:first-child { display: none; }
  .compteurs { grid-template-columns: repeat(2, 1fr); }
  .compteurs div:nth-child(3) { border-left: 0; }
  .compteurs div:nth-child(n+3) { border-top: 1px solid var(--trait); }
  .specs div { grid-template-columns: 1fr; gap: 4px; }
  .prompt-tete { grid-template-columns: auto 1fr; }
  .prompt-tete .copier { grid-column: 1 / -1; justify-content: center; }
  .viseur .rec, .viseur .tc, .viseur-etiquette { font-size: 9.5px; }
  .chapo { font-size: 16.5px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .viseur .rec::before { animation: none; }
}
