/* La vitrine de RPrime (#2177) : la palette, la police et le logo de l'app (`app/static/css/style.css`,
   kit #884/#948), sur une page publique et autonome. Les jetons ci-dessous reprennent ceux de l'app ;
   si la marque change, c'est là-bas qu'elle change d'abord, puis ici. */

@font-face {
  font-family: "Orbitron";
  src: url("polices/orbitron-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0e0b08;
  --panel: #18130e;
  --panel2: #221b14;
  --line: #3a2f22;
  --txt: #f2ebdd;
  --txt2: #d8d0c1;
  --muted: #aea696;
  --accent: #d6b26e;
  --marque: #e9b44c;
  --cyan: #8fdceb;           /* l'arête intérieure du tesseract, dans le logo */
  /* les couleurs d'état et de priorité de l'app (style.css de tickets-ai), pour le tableau */
  --info: #6cc5ae;
  --ok: #22c55e;
  --bad: #ef4444;
  --encre-ok: #86efac;
  --encre-test: #c084fc;
  --neutre: #4a3d2e;
  --sur-neutre: #efe4d0;
  --sur-accent: #1c140a;
  --titre: "Orbitron", system-ui, sans-serif;
  --texte: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 70% -10%, #2a1d0f 0%, var(--bg) 55%) fixed, var(--bg);
  color: var(--txt);
  font: 17px/1.6 var(--texte);
  overflow-x: hidden;
}
a { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--titre); letter-spacing: .02em; line-height: 1.15; margin: 0 0 .6em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.8rem); text-align: center; }
h3 { font-size: 1.05rem; color: var(--txt); }
.or {
  background: linear-gradient(100deg, var(--marque), #fff1c9 45%, var(--accent) 60%, var(--marque));
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: reflet 7s linear infinite;
}
@keyframes reflet { to { background-position: -250% 0; } }

#etoiles { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; }

/* ── la barre ── */
.barre {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem clamp(1rem, 4vw, 3rem);
  background: rgba(14, 11, 8, .55); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(58, 47, 34, .6);
}
.logo { display: flex; align-items: center; gap: .6rem; text-decoration: none;
  font-family: var(--titre); font-weight: 700; color: var(--marque); font-size: 1.2rem; }
.logo img { animation: tourne 30s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
.barre nav { display: flex; align-items: center; gap: 1.4rem; }
.barre nav a { color: var(--txt2); text-decoration: none; font-size: .92rem; }
.barre nav a:hover { color: var(--marque); }

/* ── les boutons ── */
.bouton {
  display: inline-block; padding: .85rem 1.6rem; border-radius: 999px;
  background: linear-gradient(135deg, var(--marque), var(--accent));
  color: var(--sur-accent) !important; font-family: var(--titre); font-weight: 700; font-size: .85rem;
  letter-spacing: .06em; text-decoration: none; text-transform: uppercase;
  box-shadow: 0 0 0 0 rgba(233, 180, 76, .5);
  transition: transform .2s, box-shadow .3s;
}
.bouton:hover { transform: translateY(-2px); box-shadow: 0 8px 30px -6px rgba(233, 180, 76, .6); }
.bouton.petit { padding: .5rem 1rem; font-size: .7rem; }
.bouton.fantome { background: transparent; color: var(--marque) !important; border: 1px solid var(--accent); }

/* ── sections ── */
main > section { padding: clamp(4rem, 10vw, 8rem) clamp(1rem, 6vw, 6rem); max-width: 1240px; margin: 0 auto; }
.intro { text-align: center; color: var(--muted); max-width: 680px; margin: -.5rem auto 3rem; }

.heros {
  min-height: min(100vh, 960px); display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 2rem;
  padding-top: 7rem !important;
}
.sur-titre { font-family: var(--titre); color: var(--cyan); letter-spacing: .3em; font-size: .75rem; text-transform: uppercase; }
.heros h1 { font-size: clamp(2.2rem, 4.6vw, 3.7rem); }
.accroche { color: var(--txt2); font-size: 1.15rem; max-width: 36rem; }
.accroche strong { color: var(--txt); }
.actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }
.heros-visuel { position: relative; display: grid; place-items: center; }
#tesseract { width: min(100%, 520px); height: auto; aspect-ratio: 1; position: relative; z-index: 1; }
.halo {
  position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 180, 76, .28), transparent 65%);
  filter: blur(20px); animation: respire 5s ease-in-out infinite;
}
@keyframes respire { 50% { transform: scale(1.15); opacity: .6; } }

.citation { text-align: center; }
.citation blockquote {
  font-family: var(--titre); font-size: clamp(1.1rem, 2.4vw, 1.7rem); color: var(--txt);
  margin: 0 auto; max-width: 900px; line-height: 1.5;
}
.citation p { color: var(--muted); }

/* ── grilles et cartes ── */
.grille { display: grid; gap: 1.4rem; }
.grille.deux { grid-template-columns: repeat(2, 1fr); }
.grille.trois { grid-template-columns: repeat(3, 1fr); }
.grille.quatre { grid-template-columns: repeat(4, 1fr); }
.carte {
  position: relative; padding: 1.7rem; border-radius: 18px;
  background: linear-gradient(160deg, rgba(34, 27, 20, .9), rgba(24, 19, 14, .75));
  border: 1px solid var(--line); overflow: hidden;
  transition: transform .35s, border-color .35s;
}
.carte p { color: var(--muted); margin: 0; font-size: .97rem; }
.carte:hover { transform: translateY(-6px); border-color: var(--accent); }
.carte .icone { font-size: 1.8rem; color: var(--marque); display: block; margin-bottom: .6rem; }
/* la lueur qui suit la souris : sa position vient de vitrine.js (--x, --y) */
.carte.lueur::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .3s; pointer-events: none;
  background: radial-gradient(320px circle at var(--x, 50%) var(--y, 50%), rgba(233, 180, 76, .16), transparent 60%);
}
.carte.lueur:hover::before { opacity: 1; }

/* ── le principe ── */
.principe-corps { display: grid; grid-template-columns: 1fr 1.05fr; gap: 3rem; align-items: start; }
.etapes { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.6rem; }
.etapes li { display: flex; gap: 1.2rem; }
.etapes b { font-family: var(--titre); font-size: 1.6rem; color: var(--marque); opacity: .8; min-width: 3rem; }
.etapes p { color: var(--muted); margin: 0; }
.console {
  border-radius: 14px; border: 1px solid var(--line); background: #0a0806;
  box-shadow: 0 30px 80px -30px rgba(233, 180, 76, .25); overflow: hidden; position: sticky; top: 6rem;
}
.console-barre { display: flex; align-items: center; gap: .4rem; padding: .6rem .9rem; background: var(--panel2); }
.console-barre i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.console-barre i:first-child { background: var(--marque); }
.console-barre span { margin-left: auto; font: .75rem var(--titre); color: var(--muted); }
#console-texte {
  /* une hauteur FIXE, et le texte défile dedans (#2240) : la console ne pousse plus la page */
  margin: 0; padding: 1.2rem; height: 22rem; overflow-y: auto; scrollbar-width: thin; white-space: pre-wrap;
  font: .86rem/1.65 ui-monospace, Consolas, monospace; color: var(--txt2);
}
#console-texte .c { color: var(--cyan); }
#console-texte .o { color: var(--marque); }
#console-texte .v { color: #86efac; }
#console-texte .curseur { display: inline-block; width: .55em; background: var(--marque); animation: clignote 1s steps(1) infinite; }
@keyframes clignote { 50% { opacity: 0; } }

/* ── le tableau qui vit ── */
/* Il recopie le tableau de l'app (colonnes et carte de `app.js`, formes de `style.css` dans
   tickets-ai) : un changement de la carte, là-bas, se reporte ici à la main. */
.tableau { display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; font-family: var(--texte); }
/* Une hauteur FIXE (#2240) : les tickets passent d'une colonne à l'autre toutes les 1,7 s, et une
   colonne qui grandissait avec eux faisait sauter toute la page en dessous. Ce qui dépasse s'efface. */
.colonne {
  height: 25rem; overflow: hidden; padding: 12px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line);
  display: flex; flex-direction: column;
  -webkit-mask-image: linear-gradient(180deg, #000 85%, transparent);
  mask-image: linear-gradient(180deg, #000 85%, transparent);
}
.colonne .ticket { flex-shrink: 0; }
.colonne[data-etat="blocked"] {
  border-color: rgba(239, 68, 68, .24);
  background: linear-gradient(180deg, rgba(239, 68, 68, .07), transparent 40%), var(--panel);
}
.colonne h4 {
  display: flex; align-items: center; gap: 6px; margin: 0 0 10px;
  font: 12px var(--texte); letter-spacing: .5px; text-transform: uppercase; color: var(--muted);
}
.colonne h4 .n { margin-left: auto; padding: 1px 8px; border-radius: 999px; background: var(--panel2); color: var(--txt2); }
.colonne[data-etat="blocked"] h4 { color: var(--bad); }
.colonne[data-etat="in_progress"] h4 { color: var(--info); }
.colonne[data-etat="test"] h4 { color: var(--encre-test); }
.colonne[data-etat="done"] h4 { color: var(--ok); }
.ticket {
  margin-bottom: 9px; padding: 10px 11px; border-radius: 9px; background: var(--panel2);
  border: 1px solid var(--line); border-left: 6px solid var(--accent);
  color: var(--txt); animation: arrive .5s ease-out;
}
.ticket .t-tete { display: flex; align-items: center; gap: 6px; }
.ticket .tnum { color: var(--muted); font-size: 11px; font-weight: 600; }
.ticket .badge { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.ticket .badge.p1 { background: #d1343a; color: #fff; }
.ticket .badge.p2 { background: #f5a623; color: #2a1c00; }
.ticket .badge.p3 { background: var(--neutre); color: var(--sur-neutre); }
.ticket .t-titre { margin: 4px 0 6px; font-size: 13px; font-weight: 550; line-height: 1.35; }
.ticket .t-projet { margin-bottom: 4px; }
.ticket .t-meta { display: flex; flex-wrap: wrap; gap: 4px; }
.ticket .proj-chip, .ticket .type-badge, .ticket .effort-badge, .ticket .t-session {
  padding: 1px 7px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.ticket .proj-chip, .ticket .type-badge { font-weight: 700; }
.ticket .effort-badge { color: var(--muted); }
.ticket .t-session { border-radius: 999px; font-size: 10px; font-weight: 600; border-color: var(--ok); color: var(--encre-ok); }
@keyframes arrive { from { opacity: 0; transform: translateY(-8px) scale(.96); } }

/* ── les sections de détail (#2218) : un texte, une maquette ; « inverse » met la maquette à gauche.
   Le dedans des maquettes est l'app elle-même (#2221) : son HTML, et ses règles dans app.css. ── */
.detail-corps { display: grid; grid-template-columns: 1fr 1.1fr; gap: 3rem; align-items: center; }
.detail-corps.inverse { grid-template-columns: 1.1fr 1fr; }
.atouts { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.atouts li { position: relative; padding-left: 1.6rem; color: var(--muted); }
.atouts li::before { content: "◆"; position: absolute; left: 0; top: .1em; color: var(--marque); font-size: .8rem; }
.atouts b { color: var(--txt); }
.atouts code { font: .85em ui-monospace, Consolas, monospace; color: var(--cyan); }
.pastille-ui, .verdict {
  display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line);
  font-size: .75rem; font-weight: 600; color: var(--txt2); white-space: nowrap;
}
.pastille-ui.chaude { border-color: #f59e0b; color: #f59e0b; }
.verdict.reussite { border-color: var(--ok); color: var(--encre-ok); }
.verdict.echec { border-color: var(--bad); color: #fca5a5; }
.verdict.incomplete { border-color: #f59e0b; color: #f59e0b; }

/* le cadre d'une maquette : une fenêtre, sa barre de titre, et l'écran de l'app dedans */
.maquette {
  border-radius: 14px; border: 1px solid var(--line); background: var(--bg); overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(233, 180, 76, .25);
}
.maquette-barre {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .6rem .9rem;
  background: var(--panel2); border-bottom: 1px solid var(--line); font: .72rem var(--titre); color: var(--muted);
}
.app.pile { display: grid; gap: 14px; justify-items: start; }

/* le fil : vitrine.js y fait arriver les lignes une à une (« lu ») ; sans script, l'échange est là, fini */
.app.joue .fil-ligne { opacity: 0; transform: translateY(10px); transition: opacity .5s, transform .5s; }
.app.joue .fil-ligne.lu { opacity: 1; transform: none; }
/* joué, l'attente garde sa place quand elle se referme : sinon le fil change de hauteur à chaque cycle (#2240) */
.app.joue [data-ouverte] { display: block; }
.app.joue [data-ouverte].referme { visibility: hidden; }

/* le parcours rejouable, sous la recette */
.parcours { margin: 0 14px 14px; border-radius: 10px; border: 1px solid var(--line); background: #0a0806; overflow: hidden; }
.parcours pre { margin: 0; padding: .8rem 1rem; font: .8rem/1.6 ui-monospace, Consolas, monospace; color: var(--txt2); white-space: pre-wrap; }
.parcours .c { color: var(--cyan); } .parcours .v { color: var(--encre-ok); } .parcours .o { color: #fca5a5; }

/* ── les chiffres ── */
.chiffres { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; text-align: center; }
.chiffre b { display: block; font: 900 clamp(2.4rem, 5vw, 3.8rem) var(--titre); color: var(--marque); }
.chiffre span { color: var(--muted); font-size: .9rem; }

/* ── l'univers ── */
.orbite-bloc { padding: 2rem; border-radius: 22px; border: 1px solid var(--line);
  background: radial-gradient(circle at 100% 0, rgba(143, 220, 235, .08), transparent 50%), var(--panel); }
.orbite-bloc p { color: var(--muted); }
.pastilles { list-style: none; padding: 0; margin: 1.4rem 0 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.pastilles li {
  padding: .5rem .95rem; border-radius: 999px; border: 1px dashed var(--line);
  font-family: var(--titre); font-size: .78rem; color: var(--muted);
}
.pastilles li small { font-family: var(--texte); font-size: .7rem; margin-left: .35rem; opacity: .8; }
.pastilles li.actif { border: 1px solid var(--accent); color: var(--marque); background: rgba(214, 178, 110, .1); }

/* ── l'appel ── */
.appel { text-align: center; }
.appel-logo { filter: drop-shadow(0 0 30px rgba(233, 180, 76, .5)); animation: tourne 40s linear infinite reverse; }
.appel p { color: var(--muted); margin-bottom: 2rem; }

.pied-legal { display: flex; flex-wrap: wrap; gap: 1rem; }
.pied {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  padding: 2rem clamp(1rem, 6vw, 6rem); border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem;
}

/* ── les apparitions au défilement : vitrine.js pose « anime » sur la page, puis « visible » sur chaque
   bloc. Sans la première, rien n'est caché : un script en échec laisse la page entière, immobile. ── */
.anime .apparait { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.anime .apparait.visible { opacity: 1; transform: none; }

/* ── petits écrans ── */
@media (max-width: 1180px) {
  .barre nav { gap: .9rem; }
  .barre nav a { font-size: .85rem; }
}
@media (max-width: 900px) {
  .heros, .principe-corps, .grille.deux, .detail-corps, .detail-corps.inverse { grid-template-columns: 1fr; }
  .heros-visuel { order: -1; max-width: 340px; margin: 0 auto; }
  .grille.trois, .grille.quatre, .chiffres { grid-template-columns: repeat(2, 1fr); }
  .tableau { grid-template-columns: repeat(5, minmax(11rem, 1fr)); overflow-x: auto; }
  .barre nav a:not(.bouton) { display: none; }
  .console { position: static; }
}
@media (max-width: 560px) {
  .grille.trois, .grille.quatre { grid-template-columns: 1fr; }
}

/* ── qui a demandé moins de mouvement l'obtient ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .anime .apparait { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
