/* Page publique « État des services » — Croix Blanche de l'Aisne.
   Aucune police ni ressource extérieure : Inter est utilisée si elle est installée sur l'appareil, sinon la police du système. */
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/polices/jetbrains-mono-500.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #061a3a;
  --bleu: #1f5bb8;
  --rouge: #d7141f;
  --fond: #f3f5fa;
  --texte: #334155;
  --titre: #0f172a;
  --doux: #55647a;
  --bord: #e2e8f0;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --jour-operationnel: #1f9d55;
  --jour-perturbe: #d97706;
  --jour-en_panne: #d7141f;
  --jour-maintenance: #1f5bb8;
  --jour-inconnu: #8391a7;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--fond);
  color: var(--texte);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.45;
}
a { color: var(--bleu); text-underline-offset: 2px; }
a:hover { opacity: .85; }
a:focus-visible { outline: 3px solid #f6c445; outline-offset: 2px; border-radius: 4px; }

/* En-tête */
.entete { background: var(--navy); color: #fff; padding: 18px 16px 80px; }
.entete__contenu {
  max-width: 880px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center;
}
.marque { display: flex; align-items: center; gap: 12px; }
.marque__logo { width: 46px; height: 46px; border-radius: 50%; background: #fff; flex: none; }
.marque__titre { font-weight: 800; font-size: 17px; }
.marque__sous-titre { font-size: 12px; color: #b6c5e0; }
.entete__lien {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 15px;
  border: 1px solid #45619a; border-radius: 8px;
  color: #fff; font-size: 13px; font-weight: 600; text-decoration: none;
}
.tricolore { display: flex; height: 4px; }
.tricolore span { flex: 1; }
.tricolore span:nth-child(1) { background: #2f6fd6; }
.tricolore span:nth-child(2) { background: #fff; }
.tricolore span:nth-child(3) { background: var(--rouge); }

/* Contenu */
.contenu {
  width: 100%; max-width: 928px; margin: -62px auto 0; padding: 0 12px 30px;
  display: flex; flex-direction: column; gap: 16px;
}

/* Bandeau général */
.bandeau {
  display: flex; gap: 14px; align-items: center;
  background: #fff; border: 1px solid var(--bord); border-radius: 14px; padding: 18px;
  box-shadow: 0 14px 34px rgba(6, 26, 58, .14);
}
.bandeau__icone { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.bandeau__icone svg { width: 26px; height: 26px; }
.bandeau__texte { flex: 1 1 200px; min-width: 0; }
.bandeau h1 { margin: 0; font-size: 21px; line-height: 1.25; letter-spacing: -.02em; color: var(--titre); }
.bandeau p { margin: 4px 0 0; font-size: 13px; color: var(--doux); }

/* Couleurs des états (texte toujours accompagné d'une icône et d'un libellé) */
.etat--operationnel { background: #dcfce7; color: #146c37; }
.etat--perturbe { background: #fef0c7; color: #8a3b06; }
.etat--en_panne { background: #fde2e3; color: #a3101a; }
.etat--maintenance { background: #e3eefc; color: #17468f; }
.etat--inconnu { background: #eef1f6; color: #475569; }

/* Cartes */
.carte { background: #fff; border: 1px solid var(--bord); border-radius: 14px; overflow: hidden; }
.carte--texte { margin: 0; padding: 16px 20px; }
.carte__tete {
  display: flex; flex-wrap: wrap; gap: 4px 8px; justify-content: space-between; align-items: center;
  padding: 14px 16px;
}
.carte__tete h2 { margin: 0; font-size: 16px; color: var(--titre); }
.carte__note { font-size: 12px; color: var(--doux); }

/* Services */
.service { padding: 16px; border-top: 1px solid var(--bord); }
.service__tete { display: flex; flex-wrap: wrap; gap: 8px 10px; justify-content: space-between; align-items: center; }
.service h3 { margin: 0; font-size: 15px; color: var(--titre); }
.service__description { font-size: 12px; color: var(--doux); margin-top: 2px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; border-radius: 20px; padding: 4px 11px; white-space: nowrap;
}
.badge svg { width: 14px; height: 14px; flex: none; }
.badge--petit { font-size: 11px; padding: 2px 9px; }

.barres { display: flex; gap: 2px; height: 30px; margin-top: 13px; align-items: flex-end; }
.jour { flex: 1; min-width: 0; border-radius: 2px; }
.jour--operationnel { background: var(--jour-operationnel); height: 100%; }
.jour--perturbe { background: var(--jour-perturbe); height: 72%; }
.jour--maintenance { background: var(--jour-maintenance); height: 52%; }
.jour--en_panne { background: var(--jour-en_panne); height: 34%; }
.jour--inconnu { background: var(--jour-inconnu); height: 14%; }
.barres__pied {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 11px; color: var(--doux); margin-top: 7px;
}
.barres__taux { font-family: var(--mono); color: var(--titre); font-weight: 500; }

.legende { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; color: var(--doux); padding: 0 4px; }
.legende > span { display: inline-flex; align-items: center; gap: 6px; }
.legende__barre { display: inline-block; width: 8px; border-radius: 2px; }
.legende .jour--operationnel { height: 16px; }
.legende .jour--perturbe { height: 12px; }
.legende .jour--maintenance { height: 9px; }
.legende .jour--en_panne { height: 6px; }
.legende .jour--inconnu { height: 3px; }

/* Événements (en cours, à venir, historique) */
.evenement {
  display: flex; flex-wrap: wrap; gap: 6px 20px;
  padding: 14px 16px; border-top: 1px solid var(--bord);
}
.evenement__date { flex: 0 0 auto; font-size: 12px; color: var(--doux); font-family: var(--mono); }
.evenement__corps { flex: 1 1 220px; min-width: 0; }
.evenement__titre { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.evenement__titre strong { font-size: 14px; color: var(--titre); }
.evenement__message { font-size: 13px; margin-top: 4px; line-height: 1.55; overflow-wrap: anywhere; }
.evenement__services { font-size: 12px; color: var(--doux); margin-top: 2px; }
.vide { margin: 0; padding: 14px 16px; border-top: 1px solid var(--bord); font-size: 13px; color: var(--doux); }

/* Pied de page */
.pied { margin-top: auto; text-align: center; padding: 20px 24px 30px; font-size: 12px; color: var(--doux); line-height: 1.7; }

@media (min-width: 640px) {
  .entete { padding: 20px 24px 84px; }
  .contenu { padding: 0 24px 30px; gap: 18px; }
  .bandeau { gap: 16px; padding: 22px; }
  .bandeau__icone { width: 52px; height: 52px; }
  .bandeau__icone svg { width: 28px; height: 28px; }
  .bandeau h1 { font-size: 25px; }
  .carte__tete { padding: 16px 20px; }
  .service, .evenement, .vide { padding: 18px 20px; }
  .barres { gap: 4px; }
  .evenement__date { flex-basis: 120px; }
}

@media (prefers-reduced-motion: no-preference) {
  .bandeau { transition: box-shadow .2s; }
}

@media print {
  .entete { padding-bottom: 20px; }
  .contenu { margin-top: 16px; }
  .bandeau { box-shadow: none; }
}
