/* Portail distributeurs Cisolift — conforme au système graphique Cisolift (artefact « Cisolift », Design System).
   Couleurs : rouge #b92330, charbon #201e1e ; surfaces #fff / #f2f2f2 ; texte #191919 / #6b6c6c ; ligne #caccce.
   Polices : Overpass 800 (titres, interlettrage -1px), Roboto (texte, boutons 700), et pour les numéros de modèle la
   police d'affichage Swis721 Black — remplacée ici par Archivo Black, son substitut prévu par le système, tant que la
   licence web de Swis721 n'est pas confirmée. Fichiers hébergés dans app/fonts (licences OFL / Apache).
   Formes : tout est carré ; seuls boutons et champs ont 4 px. Aucune ombre. Seul dégradé permis : charbon → rouge, vertical.
   Diagonales montantes vers la droite (barres « X fantôme »). Focus : anneau 2 px de la couleur « focus ». */
@font-face { font-family: "Overpass"; src: url("fonts/overpass-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Roboto"; src: url("fonts/roboto-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Roboto"; src: url("fonts/roboto-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Roboto"; src: url("fonts/roboto-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Archivo Black"; src: url("fonts/archivo-black-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  /* Jetons du système graphique Cisolift (thème clair) */
  --rouge: #b92330;
  --rouge-texte: #b92330;
  --charbon: #201e1e;
  --gris: #caccce;
  --blanc: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f2f2f2;
  --surface-subtle: #f8f8f8;
  --surface-nav: #191919;
  --surface-footer: #272828;
  --ink: #191919;
  --ink-muted: #6b6c6c;
  --ink-on-dark: #ffffff;
  --ink-on-dark-muted: #caccce;
  --ligne: #caccce;
  --focus: #191919;
  --rouge-voile: rgba(185, 35, 48, .08);     /* fond de sélection : rouge à 8 % (dérivé, pas une couleur nouvelle) */
  --degrade: linear-gradient(180deg, #201e1e 0%, #201e1e 35%, #b92330 100%);
  --heading: "Overpass", Arial, sans-serif;
  --body: "Roboto", Arial, sans-serif;
  --display: "Swis721 BlkBT", "Swiss 721 Black BT", "Archivo Black", "Arial Black", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --rouge-texte: #ef6b74; --surface: #201e1e; --surface-alt: #272828; --surface-subtle: #191919; --ink: #ffffff; --ink-muted: #caccce;
    --ligne: #7e7f7f; --focus: #ffffff; --rouge-voile: rgba(239, 107, 116, .12); }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/24px var(--body); letter-spacing: .24px; color: var(--ink); background: var(--surface); }
a { color: var(--rouge-texte); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.plaque :focus-visible { outline-color: var(--blanc); }

/* ---------- Bandeau démo : surface claire, distincte de l'en-tête foncé ---------- */
.bandeau-demo { background: var(--surface-alt); color: var(--ink); text-align: center; padding: 6px 16px; font-size: 14px; line-height: 21px; font-weight: 500;
  border-bottom: 4px solid var(--rouge); }

/* ---------- En-tête : dégradé vertical charbon → rouge ---------- */
.plaque { background: var(--degrade); color: var(--ink-on-dark); position: relative; overflow: hidden; }
.plaque::after {            /* quatre barres en diagonale montante : rappel des traits du X du logo (X fantôme, opacité faible) */
  content: ""; position: absolute; top: 0; bottom: 0; right: -40px; width: 420px; pointer-events: none;
  background: linear-gradient(115deg,
    transparent 0 30%, rgba(255,255,255,.09) 30% 34%, transparent 34% 44%, rgba(255,255,255,.07) 44% 48%,
    transparent 48% 58%, rgba(255,255,255,.06) 58% 62%, transparent 62% 72%, rgba(255,255,255,.05) 72% 76%, transparent 76%);
}
@media (max-width: 520px) { .plaque::after { width: 300px; right: -70px; } }
.plaque a { color: var(--ink-on-dark); }
header.haut { max-width: 1140px; margin: 0 auto; padding: 16px 30px; display: flex; align-items: center; justify-content: space-between; gap: 16px; position: relative; z-index: 1; }
.marque { display: flex; align-items: center; gap: 16px; text-decoration: none; min-width: 0; }
.marque img { height: 26px; width: auto; flex: none; }
.marque span { font: 800 18px/24px var(--heading); letter-spacing: -.5px; padding-left: 16px; border-left: 1px solid rgba(255,255,255,.35);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.outils { display: flex; align-items: center; gap: 8px; flex: none; }
.lien-parametres { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-on-dark); text-decoration: none; font: 700 14px/16.8px var(--body);
  letter-spacing: .24px; padding: 10px 16px; border-radius: 4px; border: 1px solid rgba(255,255,255,.5); }
.lien-parametres:hover, .lien-parametres[aria-current="page"] { background: rgba(255,255,255,.12); }

.tete { max-width: 1140px; margin: 0 auto; padding: 24px 30px 60px; position: relative; z-index: 1; }
.tete .fil { font-size: 14px; line-height: 21px; margin-bottom: 8px; }
.tete .fil a { text-decoration: none; color: var(--ink-on-dark-muted); }
.tete .fil a:hover { color: var(--ink-on-dark); text-decoration: underline; }
.tete h1 { font: 800 clamp(34px, 5vw, 60px)/1.1 var(--heading); letter-spacing: -1px; margin: 0; }
.tete .sous { margin: 12px 0 0; color: var(--ink-on-dark-muted); max-width: 64ch; }
.tete.accueil { padding: 40px 30px 60px; }

/* Recherche (page Documentation) : champ et bouton, 4 px, sans ombre */
.recherche { margin-top: 24px; display: flex; gap: 8px; max-width: 640px; }
.recherche input[type=search] { flex: 1; min-width: 0; border: 1px solid var(--blanc); border-radius: 4px; background: var(--blanc); color: #191919;
  font: 400 16px/24px var(--body); padding: 12px 14px; min-height: 48px; }
.recherche input[type=search]::placeholder { color: #6b6c6c; }
.recherche button { border: 1px solid var(--blanc); background: var(--blanc); color: #191919; font: 700 16px/19.2px var(--body); letter-spacing: .24px;
  padding: 0 29px; border-radius: 4px; cursor: pointer; min-height: 48px; }
.recherche button:hover { background: var(--surface-alt); }

/* ---------- Contenu ---------- */
main { max-width: 1140px; margin: 0 auto; padding: 40px 30px 80px; }
@media (max-width: 520px) { header.haut, .tete, .tete.accueil, main { padding-left: 16px; padding-right: 16px; } }

h2, h3 { font-family: var(--heading); font-weight: 800; letter-spacing: -1px; }
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.tuile { display: flex; flex-direction: column; gap: 8px; background: var(--surface-alt); padding: 24px; text-decoration: none; color: var(--ink);
  position: relative; border-bottom: 4px solid transparent; }
.tuile:hover { border-bottom-color: var(--rouge); }
.tuile h2 { font-size: 24px; line-height: 28.8px; margin: 8px 0 0; }
.tuile p { margin: 0; color: var(--ink-muted); font-size: 14px; line-height: 21px; }
.tuile .ico { width: 44px; height: 44px; background: var(--charbon); color: var(--blanc); display: grid; place-items: center; }
.tuile:hover .ico { background: var(--rouge); }
.tuile.inactive { pointer-events: none; }
.tuile.inactive h2, .tuile.inactive p { color: var(--ink-muted); }
.tuile.inactive .ico { background: var(--ink-muted); }
.etiquette { position: absolute; top: 24px; right: 24px; font-size: 14px; line-height: 21px; font-weight: 700; color: var(--ink-muted); }

select, input[type=search] { font: 400 16px/24px var(--body); color: var(--ink); background: var(--surface); border: 1px solid var(--ligne); border-radius: 4px; padding: 10px 12px; min-height: 44px; }
.filtres { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.filtres > * { min-width: 0; width: 100%; }
@media (max-width: 720px) { .filtres { grid-template-columns: repeat(3, 1fr); } .filtres input { grid-column: 1 / -1; } .filtres select { font-size: 14px; padding: 8px 6px; } }
.compte-resultats { font-size: 14px; line-height: 21px; color: var(--ink-muted); margin: 0 0 8px; }

.liste { display: flex; flex-direction: column; background: var(--surface-alt); }
.ligne { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 16px; align-items: center; padding: 16px; border-top: 1px solid var(--ligne); }
.ligne:first-child { border-top: 0; }
.ligne .type, .type-doc .type { width: 44px; height: 44px; background: var(--surface); color: var(--rouge-texte); display: grid; place-items: center; }
.ligne .nom { font-weight: 700; overflow-wrap: anywhere; }
.ligne .meta { font-size: 14px; line-height: 21px; color: var(--ink-muted); display: flex; flex-wrap: wrap; gap: 2px 16px; }
.pastille { display: inline-block; font-size: 14px; line-height: 21px; font-weight: 700; padding: 0 6px; border: 1px solid var(--ligne); color: var(--ink); }
.pastille.alerte-l { border-color: var(--rouge-texte); color: var(--rouge-texte); }
.bouton { background: var(--rouge); color: var(--blanc); border: 1px solid var(--rouge); border-radius: 4px; padding: 12px 24px; font: 700 14px/16.8px var(--body); letter-spacing: .24px; cursor: pointer; min-height: 44px; }
.bouton:hover { background: #9e1d29; border-color: #9e1d29; }
.bouton.discret { background: transparent; color: var(--ink); border-color: var(--ligne); }
.bouton.discret:hover { border-color: var(--ink); }
@media (max-width: 560px) { .ligne { grid-template-columns: auto 1fr; align-items: start; } .ligne .bouton { grid-column: 1 / -1; width: 100%; } }

.groupe h2 { font-size: 24px; line-height: 28.8px; margin: 40px 0 16px; }
.groupe:first-child h2 { margin-top: 0; }
.alerte { border: 1px solid var(--rouge-texte); padding: 16px; }
.vide { color: var(--ink-muted); padding: 24px 0; }
.accueil-connexion { text-align: center; padding: 60px 16px; }
.accueil-connexion p { color: var(--ink-muted); margin-bottom: 24px; }
footer.bas { max-width: 1140px; margin: 0 auto; padding: 0 30px 40px; font-size: 14px; line-height: 21px; color: var(--ink-muted); }
@media (max-width: 520px) { footer.bas { padding: 0 16px 32px; } }

/* ---------- Paramètres ---------- */
@media (max-width: 520px) { .marque span, .lien-parametres span { display: none; } .lien-parametres { padding: 10px; } }
main.etroit { max-width: 780px; }
.bloc { background: var(--surface-alt); padding: 24px; margin-bottom: 16px; }
.bloc h2 { font-size: 24px; line-height: 28.8px; margin: 0 0 8px; }
.aide { color: var(--ink-muted); margin: 0 0 16px; }
.choix-langue { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 520px) { .choix-langue { grid-template-columns: 1fr; } }
.option { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--surface); border: 1px solid var(--ligne); border-radius: 4px;
  padding: 14px 16px; cursor: pointer; font-weight: 700; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option small { color: var(--ink-muted); font-weight: 700; font-size: 14px; }
.option:has(input:checked) { border: 2px solid var(--rouge); padding: 13px 15px; }
.option:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.confirmation { margin: 16px 0 0; color: var(--ink-muted); }
.fiche { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 8px 0 24px; }
.fiche dt { color: var(--ink-muted); }
.fiche dd { margin: 0; font-weight: 700; }
.fiche .doux { color: var(--ink-muted); font-weight: 400; }

/* ---------- Documentation par machine ---------- */
.message { border: 1px solid var(--ligne); border-left: 4px solid var(--rouge); padding: 12px 16px; margin: 0 0 24px; }
.intertitre { font-size: 38px; line-height: 45.6px; margin: 0 0 24px; }
.modeles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.modele { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; background: var(--surface-alt); border: 0; border-bottom: 4px solid transparent;
  padding: 20px; cursor: pointer; font: inherit; color: var(--ink); }
.modele:hover { border-bottom-color: var(--rouge); }
.nom-modele, .machine-tete h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .5px; }
.nom-modele { font-size: 28px; line-height: 1; }
.doux { color: var(--ink-muted); font-size: 14px; line-height: 21px; margin: 0; }
.machine { background: var(--surface-alt); }
.machine-tete { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 24px; padding: 24px; border-bottom: 4px solid var(--rouge); }
.machine-tete h2 { font-size: 40px; line-height: 1; margin: 4px 0 0; }
.machine-tete > div:first-child { margin-right: auto; }
.choix-annee { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.lien-rouge { background: none; border: 0; color: var(--rouge-texte); font: 700 14px/16.8px var(--body); cursor: pointer; padding: 10px 0; text-decoration: underline; text-underline-offset: 3px; }
.type-doc { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 20px 24px; border-top: 1px solid var(--ligne); }
.type-doc:first-child { border-top: 0; }
.type-doc.voulu { background: var(--rouge-voile); }
.type-doc h3 { font-size: 24px; line-height: 28.8px; margin: 8px 0 12px; }
.version { margin-bottom: 12px; }
.version:last-child { margin-bottom: 0; }
.annees { display: block; font-size: 14px; line-height: 21px; color: var(--ink-muted); margin-bottom: 8px; font-weight: 500; }
.langues-doc { display: flex; flex-wrap: wrap; gap: 8px; }
.bouton-langue { background: var(--surface); color: var(--ink); border: 1px solid var(--ligne); border-radius: 4px; padding: 12px 20px; font: 700 14px/16.8px var(--body);
  letter-spacing: .24px; cursor: pointer; min-height: 44px; }
.bouton-langue:hover { border-color: var(--ink); }
.bouton-langue.principale { background: var(--rouge); color: var(--blanc); border-color: var(--rouge); }
.bouton-langue.principale:hover { background: #9e1d29; border-color: #9e1d29; }
.note { color: var(--ink-muted); font-size: 14px; line-height: 21px; margin: 8px 0 0; }
@media (max-width: 520px) {
  .machine-tete { padding: 16px; } .type-doc { padding: 16px; gap: 12px; } .machine-tete h2 { font-size: 32px; } .intertitre { font-size: 28px; line-height: 34px; }
  .bouton-langue .mot { display: none; } .bouton-langue { min-width: 64px; } .bouton-langue::before { content: "⬇ "; }
  .tuile { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; row-gap: 2px; padding: 16px; align-items: start; }
  .tuile .ico { grid-row: span 2; } .tuile h2 { margin: 0; font-size: 22px; line-height: 26px; } .etiquette { top: 16px; right: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Photo de la plaque (bouton à côté de la recherche) */
.recherche .photo { display: grid; place-items: center; width: 48px; flex: none; border: 1px solid rgba(255,255,255,.6); border-radius: 4px; color: var(--ink-on-dark); cursor: pointer; }
.recherche .photo:hover { background: rgba(255,255,255,.12); }
.recherche .photo:focus-within { outline: 2px solid var(--blanc); outline-offset: 2px; }
.recherche .photo input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.aide-photo { margin: 8px 0 0; color: var(--ink-on-dark-muted); font-size: 14px; line-height: 21px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 520px) { .recherche button[type=submit] { padding: 0 16px; } }
