/* ============================================================
   Arbitrage Triathlon — site de présentation
   Aucune dépendance externe : ni police, ni script, ni image distante. La page s'affiche
   vite, y compris sur un téléphone en 4G faible, et la politique de sécurité peut tout
   interdire hors du site lui-même.
   ============================================================ */

:root {
  --nuit: #12233d;
  --nuit-clair: #1b3254;
  --nuit-texte: #c3cfdf;

  --jaune: #eaa900;
  --jaune-pale: #fdf4dd;
  --jaune-fonce: #8a6300;
  --bleu: #1d6ad8;
  --bleu-pale: #eaf2fd;
  --bleu-fonce: #14509e;
  --rouge: #d5242b;
  --rouge-pale: #fdeced;
  --rouge-fonce: #8a1414;
  --vert: #0f7a48;
  --vert-pale: #e4f6ec;

  --fond: #f4f6fa;
  --surface: #ffffff;
  --bordure: #dde3ec;
  --texte: #0f151d;
  --doux: #566172;

  --rayon: 14px;
  --rayon-s: 9px;
  --largeur: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--texte);
  background: var(--surface);
}
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p, figure { margin: 0; }
a { color: var(--bleu-fonce); }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--jaune); outline-offset: 3px; }

.cadre { width: 100%; max-width: var(--largeur); margin: 0 auto; padding: 0 1.25rem; }

.evitement {
  position: absolute; left: -9999px; top: 0;
  padding: 0.6rem 1rem; border-radius: var(--rayon-s);
  background: var(--surface); color: var(--texte); font-weight: 700;
}
.evitement:focus { left: 1rem; top: 1rem; z-index: 20; }

/* --- En-tête --- */
.entete {
  position: sticky; top: 0; z-index: 10;
  background: var(--nuit); color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.entete__cadre { display: flex; align-items: center; gap: 1.5rem; min-height: 64px; }
.marque {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: #fff; text-decoration: none;
  font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em;
}
.marque span { line-height: 1.05; }
.entete__nav { display: none; gap: 1.4rem; margin-left: auto; }
.entete__nav a { color: var(--nuit-texte); font-size: 0.95rem; font-weight: 600; text-decoration: none; }
.entete .bouton { margin-left: auto; }
/* Le bouton raccourcit sur téléphone : « Arbitrage Triathlon » et « Accéder au logiciel »
   ne tiennent pas côte à côte sous 560 px. */
.texte-court { display: none; }
@media (max-width: 559px) {
  .marque { font-size: 1.05rem; }
  .marque span { max-width: 6.5rem; }
  .texte-long { display: none; }
  .texte-court { display: inline; }
}
/* La navigation n'apparaît qu'avec la place pour le nom, les cinq liens et le bouton. */
@media (min-width: 1100px) {
  .entete__nav { display: flex; }
  .entete .bouton { margin-left: 0; }
}

/* --- Boutons --- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 1.25rem;
  border: 2px solid transparent; border-radius: var(--rayon-s);
  font-size: 1rem; font-weight: 700; text-align: center; text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.bouton--principal { background: var(--jaune); color: #1a1300; }
.bouton--contour { border-color: rgba(255, 255, 255, 0.45); color: #fff; }
.bouton--clair { min-height: 42px; padding: 0 1rem; background: #fff; color: var(--nuit); font-size: 0.95rem; }

/* Survols réservés aux appareils qui survolent : sur iPhone, un changement au survol
   impose un double appui sur les liens. */
@media (hover: hover) {
  .entete__nav a:hover { color: #fff; }
  .bouton--principal:hover { background: #f7b900; }
  .bouton--contour:hover { border-color: #fff; }
  .bouton--clair:hover { background: var(--bleu-pale); }
  .moyen:hover { border-color: var(--bleu); }
}

/* --- Accroche --- */
.hero { padding: 3rem 0 3.5rem; background: var(--nuit); color: #fff; overflow: hidden; }
.hero__cadre { display: grid; gap: 2.75rem; align-items: center; }
.surtitre {
  margin-bottom: 0.75rem;
  font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--bleu-fonce);
}
.hero .surtitre, .section--nuit .surtitre { color: var(--jaune); }
.hero h1 { font-size: clamp(2rem, 5.4vw, 3.2rem); font-weight: 800; }
.hero__chapeau { max-width: 36rem; margin-top: 1.25rem; font-size: 1.125rem; color: var(--nuit-texte); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.hero__ecrans { max-width: 580px; }
@media (min-width: 1000px) {
  .hero { padding: 5rem 0; }
  .hero__cadre { grid-template-columns: 1fr 1.05fr; gap: 3.5rem; }
}

.note { margin-top: 0.75rem; font-size: 0.8rem; color: var(--doux); }
.hero .note { color: var(--nuit-texte); }

/* --- Sections --- */
.section { padding: 3.25rem 0; }
@media (min-width: 720px) { .section { padding: 4.5rem 0; } }
.section--grise { background: var(--fond); }
.section--nuit { background: var(--nuit); color: #fff; }
.section h2 { max-width: 46rem; font-size: clamp(1.6rem, 3.6vw, 2.35rem); font-weight: 800; }
.section__intro { max-width: 42rem; margin-top: 1rem; font-size: 1.1rem; color: var(--doux); }
.section--nuit .section__intro { color: var(--nuit-texte); }

.grille { display: grid; gap: 1rem; margin-top: 2.25rem; }
@media (min-width: 720px) { .grille--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grille--3 { grid-template-columns: repeat(3, 1fr); } }

.tuile { padding: 1.4rem; border: 1px solid var(--bordure); border-radius: var(--rayon); background: var(--surface); }
.tuile h3 { margin-bottom: 0.45rem; font-size: 1.1rem; font-weight: 750; }
.tuile p { color: var(--doux); }
.tuile--jaune { border-top: 4px solid var(--jaune); }
.tuile--bleu { border-top: 4px solid var(--bleu); }
.tuile--rouge { border-top: 4px solid var(--rouge); }
.section--nuit .tuile { border-color: rgba(255, 255, 255, 0.09); background: var(--nuit-clair); }
.section--nuit .tuile p { color: var(--nuit-texte); }

/* --- Fonctionnement en trois étapes --- */
.flux { display: grid; gap: 2rem; margin-top: 2.5rem; }
@media (min-width: 1000px) { .flux { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }
.etape { display: grid; gap: 0.9rem; align-content: start; }
.etape__rang { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--bleu-fonce); }
.etape p:last-child { color: var(--doux); }

/* --- Un poste : texte et aperçu côte à côte --- */
.poste { display: grid; gap: 2rem; align-items: center; padding: 2.75rem 0; border-top: 1px solid var(--bordure); }
.poste:first-of-type { margin-top: 2rem; }
.poste--sans-bord { padding-bottom: 0; border-top: none; }
.poste h3 { font-size: clamp(1.35rem, 2.8vw, 1.75rem); font-weight: 800; }
.poste__visuel { min-width: 0; }
@media (min-width: 900px) {
  .poste { grid-template-columns: 1fr 1fr; gap: 3.5rem; }
  .poste--inverse .poste__visuel { order: -1; }
}

.gestes { display: grid; gap: 0.85rem; margin: 1.4rem 0 0; padding: 0; list-style: none; counter-reset: geste; }
.gestes li { display: grid; grid-template-columns: 2rem 1fr; gap: 0.75rem; align-items: start; counter-increment: geste; }
.gestes li::before {
  content: counter(geste);
  display: grid; place-items: center; width: 2rem; height: 2rem;
  border-radius: 50%; background: var(--nuit); color: #fff;
  font-size: 0.9rem; font-weight: 800;
}

.liste { display: grid; gap: 0.8rem; margin: 1.4rem 0 0; padding: 0; list-style: none; }
.liste li { position: relative; padding-left: 1.6rem; }
.liste li::before {
  content: ""; position: absolute; left: 0; top: 0.4em;
  width: 10px; height: 14px; border-radius: 2px; background: var(--bleu);
}
.liste li.liste__jaune::before { background: var(--jaune); }
.liste li.liste__rouge::before { background: var(--rouge); }
.liste--claire li { color: var(--nuit-texte); }

.encadre {
  margin-top: 1.5rem; padding: 1rem 1.2rem;
  border-left: 4px solid var(--jaune); border-radius: 0 var(--rayon-s) var(--rayon-s) 0;
  background: var(--jaune-pale);
}

/* --- Aperçus d'écran (schématiques) --- */
/* Chaque aperçu est un conteneur de requête : ses fiches se placent selon la place qu'il a
   réellement, et non selon la largeur de la fenêtre. Dans une colonne étroite d'un grand
   écran, deux fiches côte à côte seraient illisibles. */
.ecran {
  container-type: inline-size;
  padding: 14px;
  border: 1px solid var(--bordure); border-radius: 16px;
  background: var(--surface); color: var(--texte);
  box-shadow: 0 1px 2px rgba(15, 21, 29, 0.06), 0 12px 32px rgba(15, 21, 29, 0.1);
  font-size: 0.85rem; line-height: 1.3;
}
.hero .ecran { border-color: transparent; box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35); }
.ecran--telephone { border-radius: 26px; padding: 16px 12px; }
.ecran--centre { max-width: 340px; margin: 0 auto; }
.ecran__barre {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem;
  margin-bottom: 12px; font-size: 0.9rem; font-weight: 800;
}
.temoin {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px;
  background: var(--vert-pale); color: var(--vert);
  font-size: 0.72rem; font-weight: 700; white-space: nowrap;
}
.temoin::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.temoin--attente { background: var(--jaune-pale); color: var(--jaune-fonce); }

.cartons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.carton {
  display: flex; align-items: flex-end;
  min-height: 64px; padding: 9px 10px; border-radius: 10px;
  color: #fff; font-size: 0.82rem; font-weight: 800;
}
.cartons--grands .carton { min-height: 96px; font-size: 0.9rem; }
.carton--jaune { background: var(--jaune); color: #1a1300; }
.carton--bleu { background: var(--bleu); }
.carton--rouge { background: var(--rouge); }
.carton--hc { background: var(--rouge-fonce); }

.fiches { display: grid; gap: 10px; }
@container (min-width: 400px) { .fiches--2 { grid-template-columns: 1fr 1fr; } }
.fiche {
  display: grid; gap: 6px; justify-items: start; align-content: start;
  padding: 12px; border: 1px solid var(--bordure); border-left: 4px solid var(--bleu);
  border-radius: 10px; background: var(--surface);
}
.fiche--rouge { border-left-color: var(--rouge); }
.fiche--jaune { border-left-color: var(--jaune); justify-items: stretch; }
.fiche--vert { border-left-color: var(--vert); justify-items: stretch; }
.fiche__type { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--bleu-fonce); }
.fiche__dossard { font-size: 2rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.fiche__puce { padding: 2px 8px; border-radius: 999px; background: var(--fond); color: var(--doux); font-size: 0.72rem; font-weight: 700; }
.fiche__puce--dsq { background: var(--rouge-pale); color: var(--rouge-fonce); }
.fiche__bouton {
  justify-self: stretch; padding: 8px; border-radius: 8px;
  background: var(--bleu); color: #fff; text-align: center; font-size: 0.78rem; font-weight: 700;
}
.fiche__bouton--neutre { background: var(--fond); color: var(--texte); }
.fiche__bouton--rouge { background: var(--rouge); }
.anneau { position: relative; justify-self: center; width: 74px; height: 74px; }
.anneau svg { display: block; width: 100%; height: 100%; }
.anneau b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1rem; }

.compteurs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.compteurs--2 { grid-template-columns: 1fr 1fr; }
.compteur { display: grid; gap: 2px; padding: 8px 4px; border-radius: 8px; background: var(--fond); text-align: center; }
.compteur b { font-size: 1.35rem; line-height: 1.1; }
.compteur span { font-size: 0.66rem; font-weight: 600; color: var(--doux); }
.compteur--actif b { color: var(--jaune-fonce); }
.compteur--alerte b { color: var(--rouge); }

/* --- Journal d'exemple --- */
.table-defilante { overflow-x: auto; border: 1px solid var(--bordure); border-radius: var(--rayon); background: var(--surface); }
.journal { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.88rem; }
.journal caption { padding: 0.6rem 0.8rem 0; margin: 0; text-align: left; }
.journal th, .journal td { padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--bordure); text-align: left; vertical-align: top; }
.journal th { background: var(--fond); color: var(--doux); font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; }
.journal tr:last-child td { border-bottom: none; }
.journal .dossard { font-weight: 800; }
.journal .auto { color: var(--bleu-fonce); font-weight: 700; }

/* --- Pilote --- */
.pilote {
  display: grid; gap: 1.5rem; align-items: center;
  margin-top: 2.5rem; padding: 1.75rem;
  border: 1px solid rgba(234, 169, 0, 0.45); border-radius: var(--rayon);
}
.pilote h3 { margin-bottom: 0.5rem; font-size: 1.35rem; font-weight: 800; }
.pilote p { color: var(--nuit-texte); }
.pilote__titre { font-weight: 700; color: #fff !important; }
.pilote .liste { margin-top: 0.6rem; }
.pilote .bouton { justify-self: start; }
@media (min-width: 1000px) {
  .pilote { grid-template-columns: 1.2fr 1fr auto; gap: 2.5rem; }
}

/* --- Questions --- */
.questions { display: grid; gap: 0.6rem; max-width: 50rem; margin-top: 2rem; }
.questions details { border: 1px solid var(--bordure); border-radius: var(--rayon-s); background: var(--surface); }
.questions summary {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.2rem; cursor: pointer; list-style: none; font-weight: 700;
}
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after { content: "+"; flex: 0 0 auto; color: var(--bleu); font-weight: 800; }
.questions details[open] summary::after { content: "–"; }
.questions details p { padding: 0 1.2rem 1.1rem; color: var(--doux); }

/* --- Contact --- */
.contact { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .contact { grid-template-columns: 1.3fr 1fr; } }
.contact__moyens { display: grid; gap: 0.75rem; }
.moyen {
  display: flex; flex-direction: column;
  padding: 1rem 1.2rem; border: 1px solid var(--bordure); border-radius: var(--rayon);
  background: var(--surface); color: var(--texte); text-decoration: none;
  transition: border-color 0.15s;
}
.moyen span { font-size: 0.8rem; font-weight: 600; color: var(--doux); }
.moyen strong { font-size: 1.1rem; overflow-wrap: anywhere; }

/* --- Pied de page --- */
.pied { padding: 2.25rem 0; background: var(--nuit); color: var(--nuit-texte); font-size: 0.92rem; }
.pied__cadre { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.pied a { color: #fff; }
.pied nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }

/* --- Pages de texte (mentions légales, confidentialité, 404) --- */
.page-texte { padding: 3rem 0 4rem; }
.page-texte .cadre { max-width: 760px; }
.page-texte h1 { margin-bottom: 1.5rem; font-size: clamp(1.75rem, 4vw, 2.25rem); font-weight: 800; }
.page-texte h2 { margin: 2.25rem 0 0.6rem; font-size: 1.2rem; font-weight: 750; }
.page-texte p, .page-texte li { color: #2b3542; }
.page-texte p + p { margin-top: 0.75rem; }
.page-texte ul { padding-left: 1.2rem; }
.a-completer { padding: 0 0.3rem; border-radius: 4px; background: var(--jaune-pale); color: var(--jaune-fonce); font-weight: 700; }
