/* ==========================================================================
   Page /technologie. Se charge APRES home.css, dont elle reprend l'en-tete,
   les boutons, les blocs et le pied.
   Les extraits de code portent la palette « terminal » de vvl-lang.dev
   (memes classes vvl-*, memes teintes) : c'est le seul endroit du site ou
   l'on quitte les verts de ProAdmin.
   ========================================================================== */

:root {
  --term-bg: #0e0d0b;
  --term-bg-2: #16140f;
  --term-green: #6ed26a;
  --term-cyan: #6ed8e0;
  --term-amber: #e6b450;
  --term-rose: #e07a8f;
  --term-violet: #b890e0;
  --term-fg: #d6cfba;
  --mono: "JetBrains Mono", "Cascadia Code", ui-monospace, Consolas, Menlo, monospace;
}

.tete-nav a[aria-current="page"] { color: var(--foret); box-shadow: 0 2px 0 var(--vert); }

/* --- Ouverture ------------------------------------------------------------ */

.tk-hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0 72px;
  color: #eef5e8;
  background:
    linear-gradient(152deg, rgba(255, 255, 255, 0.04) 0 26%, transparent 26%),
    linear-gradient(332deg, rgba(0, 0, 0, 0.26) 0 22%, transparent 22%),
    radial-gradient(120% 120% at 20% 10%, #1b4a20 0%, #103018 50%, #071a0b 100%);
}
.tk-hero .cadre { position: relative; }
.tk-sur { margin: 0 0 18px; font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--citron); }
.tk-hero h1 { max-width: 20ch; font-size: clamp(2.125rem, 4.6vw, 3.5rem); font-weight: 800; line-height: 1.05; }
.tk-hero .tk-chapo { max-width: 62ch; margin: 24px 0 0; font-size: 1.125rem; color: #c6d8bd; }

/* La chaine : contrat, preuve, transaction, bloc, verification. */
.chaine { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin: 52px 0 0; padding: 0; list-style: none; counter-reset: maillon; }
.chaine li { position: relative; padding: 22px 20px 22px 0; border-top: 2px solid rgba(180, 242, 26, 0.35); counter-increment: maillon; }
.chaine li::before {
  content: counter(maillon);
  position: absolute; top: -15px; left: 0;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--citron); color: var(--nuit);
  font-size: 0.8125rem; font-weight: 800;
}
.chaine h3 { margin-top: 10px; font-size: 1.0625rem; }
.chaine p { margin: 6px 0 0; font-size: 0.9375rem; line-height: 1.5; color: #b9cdb0; }
.chaine code { font-variant-ligatures: none; font-family: var(--mono); font-size: 0.8125rem; color: var(--citron); }

/* --- Sommaire ------------------------------------------------------------- */

.tk-plan { border-bottom: 1px solid var(--bord); background: var(--brume); }
.tk-plan ol { display: flex; flex-wrap: wrap; gap: 6px 26px; margin: 0; padding: 16px 0; list-style: none; font-size: 0.9375rem; font-weight: 600; counter-reset: plan; }
.tk-plan li { counter-increment: plan; }
.tk-plan a { text-decoration: none; color: var(--doux); }
.tk-plan a::before { content: counter(plan) ". "; color: var(--vert-fonce); font-weight: 800; }
.tk-plan a:hover { color: var(--encre); }

/* --- Sections ------------------------------------------------------------- */

.tk { padding: 80px 0; scroll-margin-top: 68px; }
.tk + .tk { border-top: 1px solid var(--bord); }
.tk--brume { background: var(--brume); }
.tk-num { display: block; margin-bottom: 12px; font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--vert-fonce); }
.tk h2 { max-width: 30ch; }
.tk h3 { margin-top: 34px; }
.tk p { max-width: 72ch; }
.tk p code, .tk li code, .tk td code, .tk th code {
  padding: 1px 6px; border-radius: 5px;
  background: #e8f1e0; color: var(--foret);
  font-family: var(--mono); font-size: 0.875em; font-variant-ligatures: none; white-space: nowrap;
}

/* Texte a gauche, code a droite. */
.duo { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 44px; align-items: start; margin-top: 40px; }
.duo > div:first-child > :first-child { margin-top: 0; }
.duo h3:first-child { margin-top: 0; }

.reperes { margin: 20px 0 0; padding: 0; list-style: none; }
.reperes li { position: relative; margin-top: 14px; padding-left: 20px; color: var(--doux); font-size: 1rem; }
.reperes li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px; border-radius: 2px; background: var(--vert); transform: rotate(45deg); }
.reperes b { color: var(--encre); }

/* --- Extraits de code ----------------------------------------------------- */

.code { position: relative; margin: 0; border-radius: 14px; overflow: hidden; background: var(--term-bg); box-shadow: 0 18px 40px rgba(10, 36, 16, 0.18); }
.code + .code { margin-top: 18px; }
.code figcaption {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 96px 10px 16px;
  background: var(--term-bg-2);
  border-bottom: 1px solid rgba(214, 207, 186, 0.12);
  color: #a39c88; font-family: var(--mono); font-size: 0.8125rem;
}
.code figcaption::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--term-green); }
.code pre { margin: 0; padding: 18px 20px 20px; overflow-x: auto; tab-size: 4; }
.code code { font-variant-ligatures: none; font-family: var(--mono); font-size: 0.875rem; line-height: 1.62; color: var(--term-fg); white-space: pre; }

.code-copie {
  position: absolute; top: 7px; right: 10px;
  padding: 4px 11px; border-radius: 6px;
  border: 1px solid rgba(214, 207, 186, 0.25);
  background: rgba(214, 207, 186, 0.1); color: var(--term-fg);
  font: inherit; font-size: 0.75rem; font-weight: 600; cursor: pointer;
}
.code-copie:hover { background: rgba(214, 207, 186, 0.24); }

/* Ce que le serveur repond : sous l'extrait, meme cadre. */
.code .sortie-titre { max-width: none; margin: 0; padding: 9px 20px 0; background: var(--term-bg-2); border-top: 1px solid rgba(214, 207, 186, 0.12); color: var(--term-amber); font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }
.code pre.sortie { padding-top: 8px; background: var(--term-bg-2); }
.code pre.sortie code { color: var(--term-green); }
.code pre.sortie .refus { color: var(--term-rose); }

/* Coloration syntaxique VVL : la palette de vvl-lang.dev. */
.code .vvl-bracket { color: #b6ac90; }
.code .vvl-builtin { color: var(--term-violet); }
.code .vvl-comment { color: #7a7464; font-style: italic; }
.code .vvl-decl    { color: var(--term-amber); font-weight: 600; }
.code .vvl-kw      { color: var(--term-rose); font-weight: 600; }
.code .vvl-lambda  { color: var(--term-violet); font-weight: 600; }
.code .vvl-num     { color: var(--term-amber); }
.code .vvl-op      { color: var(--term-rose); }
.code .vvl-string  { color: var(--term-green); }
.code .vvl-var     { color: var(--term-cyan); }
.code .vvl-word    { color: var(--term-fg); }

/* --- Tableaux et encadres ------------------------------------------------- */

.tk-table { width: 100%; margin-top: 32px; border-collapse: collapse; border: 1px solid var(--bord); border-radius: 14px; overflow: hidden; font-size: 1rem; }
.tk-table th, .tk-table td { padding: 16px 20px; text-align: left; vertical-align: top; border-top: 1px solid var(--bord); }
.tk-table thead th { border-top: 0; background: var(--foret); color: #ffffff; font-size: 0.9375rem; }
.tk-table tbody th { width: 24%; font-weight: 700; }
.tk-table td { color: var(--doux); }
.tk--brume .tk-table { background: var(--papier); }

.verdicts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 36px 0 0; padding: 0; list-style: none; }
.verdicts li { padding: 24px; border-radius: 14px; background: var(--papier); border: 1px solid var(--bord); border-top: 4px solid var(--vert); }
.verdicts li:nth-child(2) { border-top-color: var(--rouge); }
.verdicts li:nth-child(3) { border-top-color: #c79a1c; }
.tk .verdicts code { font-family: var(--mono); font-size: 1rem; font-weight: 700; color: var(--encre); background: none; padding: 0; }
.verdicts p { margin: 8px 0 0; color: var(--doux); font-size: 1rem; }

.etapes { margin: 36px 0 0; padding: 0; list-style: none; counter-reset: etape; }
.etapes > li { position: relative; padding: 0 0 30px 56px; counter-increment: etape; }
.etapes > li::before {
  content: counter(etape);
  position: absolute; left: 0; top: -2px;
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--foret); color: #ffffff; font-weight: 800;
}
.etapes > li::after { content: ""; position: absolute; left: 17px; top: 40px; bottom: 6px; width: 2px; background: var(--bord); }
.etapes > li:last-child { padding-bottom: 0; }
.etapes > li:last-child::after { display: none; }
.etapes h3 { margin: 0; }
.etapes p { margin: 6px 0 0; color: var(--doux); }

.limites { margin-top: 36px; padding: 28px 30px; border-left: 4px solid var(--vert); border-radius: 0 14px 14px 0; background: var(--brume); }
.limites h3 { margin: 0; }
.limites ul { margin: 14px 0 0; padding-left: 20px; color: var(--doux); }
.limites li { margin-top: 8px; max-width: 74ch; }

/* --- Ecrans etroits ------------------------------------------------------- */

@media (max-width: 960px) {
  .tk-hero { padding: 52px 0 52px; }
  .chaine { grid-template-columns: minmax(0, 1fr); gap: 26px; margin-top: 44px; }
  .chaine li { padding: 18px 0 0; }
  .duo { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .verdicts { grid-template-columns: minmax(0, 1fr); }
  .tk { padding: 60px 0; }
}

@media (max-width: 640px) {
  .code { border-radius: 10px; margin-left: -8px; margin-right: -8px; }
  .code code { font-size: 0.8125rem; }
  .code pre { padding: 14px 14px 16px; }
  .tk-table, .tk-table tbody, .tk-table tr, .tk-table th, .tk-table td { display: block; width: auto; }
  .tk-table thead { display: none; }
  .tk-table tbody th { width: auto; padding-bottom: 4px; }
  .tk-table td { border-top: 0; padding-top: 0; }
  .limites { padding: 22px 20px; }
}
