/* Charte SOWINK : bleu nuit, orange, bleu ; Epilogue pour les titres, Manrope pour le texte. */
:root {
  --nuit: #050D40;
  --orange: #FF6D00;
  --bleu: #0055FF;
  --fond: #F5F5F5;
  --blanc: #FFFFFF;
  --gris: #4B5275;
  --filet: #E6E8EF;
  --filet-fort: #C4C8D8;
  --champ: #A9AEC4;
  --lavande: #C9CEE8;
  --tb-bg: #BDE4D3; --tb-fg: #073F33;
  --bon-bg: #E6F2EC; --bon-fg: #1F4A40; --bon-bd: #C9DDD4;
  --am-bg: #FFDD7A; --am-fg: #4A3A00;
  --ins-bg: #C62828; --ins-fg: #FFFFFF;
  --vert: #0B5A49;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fond); color: var(--nuit);
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 15px; line-height: 1.45;
}
a { color: var(--bleu); }
a:hover { color: var(--nuit); }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.discret { color: var(--gris); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- En-tête ---------- */
.entete { background: var(--nuit); color: #fff; }
.entete-in, .onglets-in, .page {
  max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px;
}
.entete-in { padding-top: 14px; padding-bottom: 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.entete-g, .entete-d { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.entete img.logo { height: 30px; width: auto; display: block; }
.produit { font-family: 'Epilogue', sans-serif; font-size: 18px; font-weight: 700; }
.entete .info { font-size: 14px; color: var(--lavande); }
.entete a.lien { color: #fff; font-size: 14px; font-weight: 600; }
.btn-entete {
  color: #fff; background: transparent; font-size: 14px; font-weight: 600; text-decoration: none;
  border: 1px solid rgba(255,255,255,.5); border-radius: 8px; padding: 10px 14px; min-height: 44px;
}
.btn-entete:hover { background: rgba(255,255,255,.12); color: #fff; }
.bandeau { background: #FFF3CD; color: #4A3A00; border-bottom: 1px solid #F2D98A; }
.bandeau .page { padding-top: 10px; padding-bottom: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }

.onglets { background: #fff; border-bottom: 1px solid #E1E3E7; }
.onglets-in { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.onglets a, .onglets button {
  min-height: 54px; display: flex; align-items: center; font-weight: 600; color: var(--gris); text-decoration: none;
  background: none; border: 0; border-bottom: 3px solid transparent; padding: 0;
}
.onglets a[aria-current="page"], .onglets button[aria-current="page"] { font-weight: 800; color: var(--nuit); border-bottom-color: var(--orange); }

.page { padding-top: 36px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 28px; }
.titre { font-family: 'Epilogue', sans-serif; font-size: 38px; line-height: 1.1; font-weight: 800; letter-spacing: -0.01em; text-transform: uppercase; }
.sous-titre { font-size: 16px; color: var(--gris); max-width: 72ch; }
.h2 { font-family: 'Epilogue', sans-serif; font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
.h3 { font-size: 17px; font-weight: 800; }
.rangee { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; }
.pile { display: flex; flex-direction: column; gap: 6px; }
.carte { background: #fff; border-radius: 16px; padding: 28px 32px; }

/* ---------- Sélecteurs ---------- */
.segments { display: flex; flex-wrap: wrap; background: #fff; border: 1px solid #D9DCE6; border-radius: 10px; padding: 4px; gap: 2px; }
.segments button { border: 0; border-radius: 7px; min-height: 44px; padding: 0 16px; font-weight: 600; background: transparent; }
.segments button[aria-pressed="true"] { background: var(--bleu); color: #fff; }
.segments.nuit { background: var(--fond); border: 0; }
.segments.nuit button[aria-pressed="true"] { background: var(--nuit); }
.avec-label { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--gris); }
.avec-label .segments { font-size: 15px; color: var(--nuit); }
.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puce {
  min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--filet-fort); background: #fff;
  font-weight: 600; display: flex; align-items: center; gap: 8px;
}
.puce span { font-weight: 400; opacity: .8; }
.puce[aria-pressed="true"] { background: var(--nuit); border-color: var(--nuit); color: #fff; }

/* ---------- Synthèse ---------- */
.synthese { display: flex; flex-wrap: wrap; gap: 28px 48px; }
.synthese > div { flex: 1 1 220px; display: flex; flex-direction: column; gap: 8px; }
.synthese > div.large { flex: 2 1 360px; gap: 14px; }
.chiffre { font-family: 'Epilogue', sans-serif; font-size: 72px; line-height: 1; font-weight: 800; letter-spacing: -0.03em; }
.chiffre.moyen { font-size: 48px; letter-spacing: -0.02em; }
.repartition { display: flex; height: 16px; gap: 3px; }
.repartition div { border-radius: 4px; }
.legende2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; font-size: 14px; }
.legende2 > div { display: flex; align-items: baseline; gap: 8px; }
.pastille { flex: none; width: 12px; height: 12px; border-radius: 3px; align-self: center; }
.pastille.bord { border: 1px solid var(--bon-bd); }
.legende { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; }
.legende > div { display: flex; align-items: center; gap: 6px; }
.legende .pastille { width: 14px; height: 14px; border-radius: 4px; }

.theme { display: flex; align-items: center; gap: 14px; }
.theme .nom { flex: 0 0 170px; font-weight: 600; }
.theme .piste { flex: 1 1 0; height: 14px; border-radius: 7px; background: #EEF0F5; overflow: hidden; }
.theme .piste div { height: 100%; border-radius: 7px; }
.theme .val { flex: 0 0 52px; text-align: right; font-weight: 800; }

/* ---------- Commentaires ---------- */
.commentaires { background: #fff; border-radius: 16px; padding: 6px 24px; }
.commentaire { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 20px; padding: 16px 0; border-bottom: 1px solid var(--filet); }
.commentaire:last-child { border-bottom: 0; }
.note { flex: none; width: 60px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; }
.commentaire .qui { flex: 0 0 250px; font-weight: 700; padding-top: 7px; }
.commentaire .qui a { text-decoration: none; }
.commentaire .qui a:hover { text-decoration: underline; }
.commentaire .quoi { flex: 1 1 380px; min-width: 0; padding-top: 7px; max-width: 68ch; }

/* ---------- Grilles de notes ---------- */
.defile { background: #fff; border-radius: 16px; padding: 12px 20px 20px; overflow-x: auto; }
.grille { min-width: 1040px; }
.ligne { display: grid; grid-template-columns: 250px repeat(12, minmax(0, 1fr)) 64px 36px; gap: 4px; align-items: center; height: 40px; border-top: 1px solid #EEF0F5; }
.ligne.tete { height: 44px; border-top: 0; border-bottom: 1px solid var(--filet); font-size: 13.5px; color: var(--gris); }
.ligne.tete div { text-align: center; }
.ligne.tete div:first-child { text-align: left; }
.ligne.tete .courant { font-weight: 800; color: var(--nuit); }
.ligne .nom { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne .nom a { font-weight: 700; text-decoration: none; }
.ligne .nom a:hover { text-decoration: underline; }
.case { height: 30px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }
.ligne .moy { text-align: right; font-size: 14px; font-weight: 700; }
.ligne .bulle { display: flex; justify-content: center; }
.groupe { display: flex; align-items: center; gap: 12px; height: 48px; padding-top: 14px; }
.groupe img { height: 24px; width: auto; max-width: 90px; object-fit: contain; }
.groupe .nom { font-family: 'Epilogue', sans-serif; font-size: 17px; font-weight: 700; }
.groupe .detail { font-size: 13.5px; color: var(--gris); }
.grille.visites { min-width: 980px; }
.grille.visites .ligne { grid-template-columns: 230px 110px 150px repeat(5, minmax(0, 1fr)); gap: 6px; height: 46px; }
.grille.visites .ligne.tete { height: auto; min-height: 52px; }
.grille.visites .ligne.tete div:nth-child(3) { text-align: left; }
.grille.visites .case.fort { height: 34px; font-size: 16px; font-weight: 800; }

.tb { background: var(--tb-bg); color: var(--tb-fg); }
.bon { background: var(--bon-bg); color: var(--bon-fg); }
.am { background: var(--am-bg); color: var(--am-fg); }
.ins { background: var(--ins-bg); color: var(--ins-fg); }
.vide { background: transparent; color: var(--gris); }

/* ---------- Fiche d'un établissement ---------- */
.retour { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; text-decoration: none; }
.identite { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.identite img { height: 52px; width: auto; max-width: 150px; object-fit: contain; background: #fff; border-radius: 8px; padding: 6px; }
.duo { display: flex; flex-wrap: wrap; gap: 24px; }
.duo > .carte { flex: 1 1 340px; display: flex; flex-direction: column; gap: 14px; }
.duo > .carte.sombre { flex: 2 1 480px; background: var(--nuit); color: #fff; gap: 16px; }
.carte.sombre h2 { font-size: 15px; font-weight: 600; color: var(--lavande); }
.carte.sombre p { font-size: 23px; line-height: 1.42; max-width: 34em; white-space: pre-line; }
.carte.sombre .pied { margin-top: auto; font-size: 14px; color: var(--lavande); }
.grande-note { font-family: 'Epilogue', sans-serif; font-size: 104px; line-height: .95; font-weight: 800; letter-spacing: -0.04em; }
.txt-tb { color: #0B5A49; } .txt-bon { color: #1F4A40; } .txt-am { color: #8A5A00; } .txt-ins { color: #C62828; }
.etiquette { font-weight: 700; border-radius: 8px; padding: 6px 12px; }
.reperes { border-top: 1px solid var(--filet); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.reperes div { display: flex; justify-content: space-between; gap: 16px; }
.reperes b { font-weight: 800; }
.barres { display: flex; gap: 6px; min-width: 640px; }
.barre { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.barre .zone { position: relative; width: 100%; height: 212px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; border-bottom: 1px solid var(--filet-fort); }
.barre .valeur { font-weight: 800; line-height: 20px; margin-bottom: 4px; padding: 0 4px; border-radius: 4px; background: #fff; position: relative; z-index: 1; }
.barre .baton { width: 60%; max-width: 58px; border-radius: 8px 8px 0 0; border: 1px solid transparent; }
.barre .baton.bon { border-color: var(--bon-bd); }
.barre .repere { position: absolute; left: 12%; right: 12%; border-top: 2px dashed var(--nuit); }
.barre .mois { font-size: 14px; color: var(--gris); }
.barre .mois.courant { color: var(--nuit); font-weight: 800; }
.trait-legende { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.trait-legende span { width: 22px; border-top: 2px dashed var(--nuit); }
.courbe { position: relative; min-width: 720px; height: 290px; }
.courbe svg { position: absolute; left: 0; top: 0; display: block; }
.courbe .point { position: absolute; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; border: 2px solid var(--nuit); }
.courbe .axe { position: absolute; left: 0; font-size: 12.5px; color: var(--gris); }
.courbe .an { position: absolute; top: 262px; font-size: 14px; font-weight: 700; }
.x-defile { overflow-x: auto; }
.bareme { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; font-size: 14.5px; }
.bareme > div { display: flex; align-items: center; gap: 8px; }
.bareme .pastille { width: 16px; height: 16px; border-radius: 4px; }

/* ---------- Boutons et champs ---------- */
.btn {
  min-height: 48px; padding: 0 22px; border: 0; border-radius: 10px; background: var(--orange); color: var(--nuit);
  font-size: 15px; font-weight: 800; text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
}
.btn:hover { background: #FF8126; color: var(--nuit); }
.btn[disabled] { background: #E1E3E7; cursor: not-allowed; }
.btn.grand { min-height: 56px; font-size: 17px; border-radius: 12px; }
.btn2 {
  min-height: 44px; padding: 0 14px; border: 1px solid var(--champ); border-radius: 8px; background: #fff; color: var(--nuit);
  font-size: 14px; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
}
.btn2:hover { border-color: var(--nuit); color: var(--nuit); }
.btn2.danger { color: #C62828; }
.champ { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--gris); }
.champ input, .champ select, .champ textarea {
  min-height: 44px; border: 1px solid var(--champ); border-radius: 8px; padding: 0 12px; font-size: 15px; color: var(--nuit); background: #fff;
}
.champ textarea { padding: 12px; line-height: 1.5; resize: vertical; }
.champs { display: flex; flex-wrap: wrap; gap: 16px 20px; }
.champs > .champ { flex: 1 1 240px; }
.message { font-weight: 700; color: var(--vert); }
.message.erreur { color: #C62828; }
.alerte { background: #FFF3CD; color: #4A3A00; border-radius: 10px; padding: 12px 16px; }
.vide-etat { background: #fff; border-radius: 16px; padding: 32px; font-size: 16px; }

/* ---------- Connexion ---------- */
.connexion { min-height: 100vh; display: flex; flex-wrap: wrap; }
.connexion .volet { flex: 1 1 380px; background: var(--nuit); color: #fff; padding: 56px 48px; display: flex; flex-direction: column; justify-content: center; gap: 36px; }
.connexion .volet img { width: 220px; height: auto; display: block; }
.connexion .volet .grand { font-family: 'Epilogue', sans-serif; font-size: 54px; line-height: 1.02; font-weight: 800; letter-spacing: -0.01em; text-transform: uppercase; }
.connexion .volet .accroche { font-size: 20px; font-weight: 700; color: var(--orange); }
.connexion .volet .texte { font-size: 17px; color: var(--lavande); max-width: 28em; }
.connexion .formulaire { flex: 1 1 380px; padding: 56px 48px; display: flex; align-items: center; justify-content: center; }
.connexion form, .connexion .bloc { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px; }
.connexion h1 { font-family: 'Epilogue', sans-serif; font-size: 32px; line-height: 1.1; font-weight: 800; text-transform: uppercase; }
.connexion .champ input { min-height: 48px; border-radius: 10px; font-size: 16px; padding: 0 14px; }
.connexion .btn { min-height: 52px; font-size: 16px; }
.separateur { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--gris); }
.separateur::before, .separateur::after { content: ""; flex: 1; border-top: 1px solid var(--filet-fort); }
.google { min-height: 44px; display: flex; justify-content: center; }
.encart { background: #fff; border-radius: 10px; padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.lien-bouton { background: none; border: 0; padding: 0; color: var(--bleu); font-weight: 600; text-decoration: underline; min-height: 44px; align-self: flex-start; }

@media (max-width: 720px) {
  .page { padding-top: 24px; gap: 22px; }
  .titre { font-size: 27px; }
  .h2 { font-size: 21px; }
  .carte { padding: 22px 20px; }
  .chiffre { font-size: 56px; }
  .grande-note { font-size: 80px; }
  .carte.sombre p { font-size: 18px; }
  .commentaire .qui { flex-basis: 100%; }
  .connexion .volet, .connexion .formulaire { padding: 36px 24px; }
  .connexion .volet .grand { font-size: 38px; }
  .barres { min-width: 0; gap: 3px; }
  .barre .zone { height: 146px; }
  .barre .valeur { font-size: 12.5px; line-height: 16px; padding: 0 2px; }
  .courbe { min-width: 0; }
  .courbe .point { width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-width: 1.5px; }
  .entete .info { display: none; }
  .entete-in { padding-top: 10px; padding-bottom: 10px; }
  .produit { font-size: 16px; }
  .entete img.logo { height: 24px; }
  .barre .baton { width: 78%; border-radius: 5px 5px 0 0; }
  .barre .mois { font-size: 12px; }
  .theme .nom { flex-basis: 120px; }
}
@media print {
  .entete, .onglets, .bandeau { display: none; }
}
