/* Charte BM&A : marine #1C2540, bleu-gris #4A6E86 / #668BA1, bleu clair #9BBACD, bleu pâle #E1EBF1, rouge #E8203F, gris #F3F3F3.
   Carlito (équivalent libre de Calibri) ; un mot en Playfair Display italique dans les titres. Cercles et anneaux, sans ombre ni dégradé. */

@font-face { font-family: 'Carlito'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/carlito-400.woff2') format('woff2'); }
@font-face { font-family: 'Carlito'; font-weight: 400; font-style: italic; font-display: swap; src: url('../fonts/carlito-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Carlito'; font-weight: 700; font-style: normal; font-display: swap; src: url('../fonts/carlito-700.woff2') format('woff2'); }
@font-face { font-family: 'Carlito'; font-weight: 700; font-style: italic; font-display: swap; src: url('../fonts/carlito-700-italic.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-weight: 400; font-style: italic; font-display: swap; src: url('../fonts/playfair-display-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Playfair Display'; font-weight: 400; font-style: italic; font-display: swap; src: url('../fonts/playfair-display-italic-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --marine: #1C2540;
  --bleu: #4A6E86;
  --bleu-moyen: #668BA1;
  --bleu-clair: #9BBACD;
  --bleu-pale: #E1EBF1;
  --rouge: #E8203F;
  --rouge-fonce: #C40000;
  --gris: #F3F3F3;
  --blanc: #FFFFFF;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--blanc);
  color: var(--marine);
  font: 17px/1.5 Calibri, Carlito, Arial, sans-serif;
}

a { color: var(--bleu); }
a:hover { color: var(--marine); }
code { font-size: .92em; background: var(--gris); padding: 2px 6px; border-radius: 6px; word-break: break-all; }

/* Fond animé : cercles et anneaux de la charte qui dérivent lentement derrière le contenu.
   Chaque cercle a sa taille, sa place, son trajet (--dx, --dy) et sa durée ; tout s'arrête si le système demande moins d'animations. */
.fond { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.fond span {
  position: absolute;
  border-radius: 50%;
  box-sizing: border-box;
  will-change: transform;
  animation: derive var(--duree) ease-in-out var(--delai, 0s) infinite alternate;
}
.fond span:nth-child(1) { width: 560px; height: 560px; left: -170px; top: -140px; border: 2px solid var(--bleu-pale); --dx: 140px; --dy: 90px; --duree: 70s; }
.fond span:nth-child(2) { width: 380px; height: 380px; right: 6%; top: 14%; background: var(--gris); --dx: -110px; --dy: 150px; --duree: 85s; --delai: -20s; }
.fond span:nth-child(3) { width: 220px; height: 220px; left: 10%; bottom: 8%; border: 2px solid var(--bleu-clair); --dx: 180px; --dy: -130px; --duree: 55s; --delai: -10s; }
.fond span:nth-child(4) { width: 92px; height: 92px; right: 22%; top: 64%; border: 2px solid var(--rouge); opacity: .55; --dx: -150px; --dy: -110px; --duree: 45s; --delai: -30s; }
.fond span:nth-child(5) { width: 920px; height: 920px; right: -320px; bottom: -420px; border: 1px solid var(--bleu-clair); opacity: .45; --dx: -90px; --dy: -70px; --duree: 95s; }
.fond span:nth-child(6) { width: 160px; height: 160px; left: 42%; top: 6%; background: var(--bleu-pale); --dx: 120px; --dy: 170px; --duree: 60s; --delai: -40s; }
.fond span:nth-child(7) { width: 300px; height: 300px; left: 56%; bottom: -90px; border: 2px dashed var(--bleu-clair); --dx: -160px; --dy: -120px; --duree: 75s; --delai: -15s; }
.fond span:nth-child(8) { width: 26px; height: 26px; left: 28%; top: 42%; background: var(--marine); opacity: .14; --dx: 220px; --dy: 140px; --duree: 50s; --delai: -25s; }
.fond span:nth-child(9) { width: 54px; height: 54px; left: 78%; top: 34%; border: 2px solid var(--marine); opacity: .18; --dx: -200px; --dy: 90px; --duree: 65s; --delai: -35s; }
@keyframes derive {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(calc(var(--dx) * .6), calc(var(--dy) * -.4)) scale(1.06); }
  100% { transform: translate(var(--dx), var(--dy)) scale(.97); }
}
@media (prefers-reduced-motion: reduce) {
  .fond span { animation: none; }
}
@media (max-width: 640px) {
  .fond span { scale: .55; }
}

/* En-tête */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 18px 40px;
  border-bottom: 1px solid var(--bleu-pale);
  background: rgba(255, 255, 255, .86);
}
.logo { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--marine); }
.logo img { height: 30px; width: auto; display: block; }
.logo span { font-size: 19px; color: var(--bleu); padding-left: 14px; border-left: 1px solid var(--bleu-clair); line-height: 1.2; }
.nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; font-size: 16px; }
.nav a { text-decoration: none; color: var(--marine); font-weight: 700; }
.nav a:hover { color: var(--rouge); }
.nav-user { color: var(--bleu-moyen); }
.nav form { margin: 0; }

/* Contenu */
.main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 44px 24px 64px; }
.main-large { max-width: 1440px; }
.footer { padding: 22px 40px; font-size: 14px; color: var(--bleu-moyen); border-top: 1px solid var(--bleu-pale); background: rgba(255, 255, 255, .86); }
.footer a { color: inherit; }

/* Boutons d'interaction du site BM&A, repris de bma-groupe.com : mêmes pastilles, mêmes mesures (en vw) et même place, en bas
   à droite. Sur ordinateur, la pastille s'allonge vers la gauche au survol, avec un point rouge et son libellé. */
.contacts { position: fixed; right: 5.333vw; bottom: 8vw; z-index: 100; }
.contacts ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: flex-end; }
.contacts li { margin-bottom: 4vw; }
.contacts a {
  display: flex;
  align-items: center;
  height: 13.333vw;
  min-width: 13.333vw;
  padding: 0 calc(4vw - 1px);
  background: var(--marine);
  color: var(--blanc);
  border: 1px solid var(--blanc);
  border-radius: 50px;
  font-size: 16px;
  text-decoration: none;
}
.contacts a:hover, .contacts a:focus-visible { color: var(--blanc); }
.contacts a:focus-visible { outline: 2px solid var(--rouge); outline-offset: 3px; }
.contacts-picto { flex: none; width: 5.333vw; height: 4.2vw; background: center / contain no-repeat; }
.contacts-contact .contacts-picto { background-image: url('../img/contact.svg'); }
.contacts-linkedin .contacts-picto { background-image: url('../img/linkedin.svg'); }
.contacts-lettre .contacts-picto { background-image: url('../img/cloche.svg'); }
.contacts-reagir .contacts-picto { background-image: url('../img/reagir.svg'); }
/* Sur téléphone, le libellé n'est lu que par les lecteurs d'écran. */
.contacts-libelle { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.contacts-point { display: none; }
@media (min-width: 769px) {
  .contacts { right: 1.786vw; bottom: 1.786vw; }
  .contacts li { margin-bottom: 1.19vw; }
  .contacts a { height: 3.81vw; min-width: 3.81vw; padding: 0 calc(1.131vw - 1px); }
  .contacts-picto { width: 1.548vw; height: 1.19vw; }
  .contacts-libelle {
    position: static;
    width: auto;
    height: auto;
    clip-path: none;
    display: flex;
    align-items: center;
    gap: .9vw;
    max-width: 0;
    opacity: 0;
    transition: max-width .4s ease, opacity .3s ease, padding .4s ease;
  }
  .contacts a:hover .contacts-libelle, .contacts a:focus-visible .contacts-libelle { max-width: 24em; opacity: 1; padding: 0 1.5vw 0 .1vw; }
  .contacts-point { display: block; flex: none; width: .476vw; height: .476vw; border-radius: 50%; background: var(--rouge); transform: scale(0); transition: transform .3s ease .1s; }
  .contacts a:hover .contacts-point, .contacts a:focus-visible .contacts-point { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .contacts-libelle, .contacts-point { transition: none; }
}

h1 { font-size: 40px; line-height: 1.15; margin: 0 0 14px; font-weight: 700; letter-spacing: -.01em; }
h1 em, h2 em { font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-weight: 400; color: var(--rouge); }
h2 { font-size: 24px; margin: 0 0 18px; }
.sous-titre { color: var(--bleu); font-size: 19px; margin: 0 0 26px; }
.fil { margin: 0 0 10px; font-size: 15px; }
.fil a { text-decoration: none; color: var(--bleu-moyen); }
.fil a::before { content: '‹ '; }
.discret { color: var(--bleu-moyen); font-size: 15px; }
/* Texte lu par les lecteurs d'écran, invisible à l'écran. */
.hors-ecran { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.carte { background: var(--blanc); border: 1px solid var(--bleu-pale); border-radius: 18px; padding: 30px 32px; margin: 0 0 24px; }
.etroite { max-width: 560px; margin: 40px auto; }
.entete-page { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.entete-page h1, .entete-page h2 { margin: 0; }
.colonnes { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 24px; }
.colonnes .carte { margin: 0; }
.colonnes + .carte { margin-top: 24px; }

/* Formulaires */
.formulaire { display: grid; gap: 16px; margin: 0 0 18px; }
label { display: grid; gap: 6px; font-weight: 700; font-size: 15px; }
label.case { display: flex; align-items: center; gap: 10px; font-weight: 400; }
input, select, textarea {
  font: inherit;
  font-weight: 400;
  color: var(--marine);
  padding: 11px 14px;
  border: 1px solid var(--bleu-clair);
  border-radius: 12px;
  background: var(--blanc);
  width: 100%;
}
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--marine); }
textarea { resize: vertical; font-family: Consolas, 'Courier New', monospace; font-size: 15px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--bleu-moyen); outline-offset: 1px; border-color: transparent; }

button, .bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  padding: 11px 24px;
  border-radius: 999px;
  border: 2px solid var(--marine);
  background: var(--marine);
  color: var(--blanc);
  text-decoration: none;
  cursor: pointer;
  justify-self: start;
}
button:hover, .bouton:hover { background: var(--bleu); border-color: var(--bleu); color: var(--blanc); }
button.secondaire, .bouton.secondaire { background: var(--blanc); color: var(--marine); }
button.secondaire:hover, .bouton.secondaire:hover { background: var(--bleu-pale); color: var(--marine); border-color: var(--marine); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.link { background: none; border: 0; padding: 0; color: var(--bleu); font-weight: 400; text-decoration: underline; }
button.link:hover { color: var(--marine); background: none; }
button.danger, .danger { color: var(--rouge-fonce); }

.alerte { background: #FDECEF; border-left: 4px solid var(--rouge); padding: 12px 16px; border-radius: 0 10px 10px 0; }
.succes { background: var(--bleu-pale); border-left: 4px solid var(--bleu); padding: 12px 16px; border-radius: 0 10px 10px 0; }

/* Anti-robot : case ALTCHA aux couleurs de la charte, champ piège hors de l'écran */
altcha-widget {
  --altcha-border-radius: 12px;
  --altcha-color-border: var(--bleu-clair);
  --altcha-color-text: var(--marine);
  --altcha-color-border-focus: var(--bleu-moyen);
  --altcha-color-error-text: var(--rouge-fonce);
  --altcha-max-width: 100%;
  display: block;
}
.piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Pastilles de statut */
.pastille { display: inline-block; font-size: 13px; font-weight: 700; padding: 3px 12px; border-radius: 999px; background: var(--gris); color: var(--bleu); }
.pastille-publiee { background: var(--marine); color: var(--blanc); }
.pastille-brouillon { background: var(--bleu-pale); color: var(--bleu); }
.pastille-archivee { background: var(--gris); color: var(--bleu-moyen); }

/* Liste des conférences */
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; margin-top: 26px; }
.conf {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 28px 28px 30px;
  min-height: 200px;
  border: 1px solid var(--bleu-pale);
  border-radius: 18px;
  background: var(--blanc);
  text-decoration: none;
  color: var(--marine);
  overflow: hidden;
}
.conf::after {
  content: '';
  position: absolute;
  right: -60px;
  bottom: -60px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: 2px solid var(--bleu-pale);
  transition: border-color .2s;
}
.conf:hover { border-color: var(--bleu-clair); color: var(--marine); }
.conf:hover::after { border-color: var(--rouge); }
.conf-date { font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--rouge); }
.conf-titre { font-size: 24px; font-weight: 700; line-height: 1.2; }
.conf-desc { color: var(--bleu); }
.conf .pastille { justify-self: start; margin-top: 6px; }
/* Le contenu de la tuile passe devant son anneau décoratif. */
.conf > * { position: relative; z-index: 1; }

/* Tags. Filtres de l'accueil : pastilles-liens (plusieurs tags actifs se combinent en « ou »), lisibles sur le fond animé.
   Tags d'une tuile ou d'un tableau : plus petits et plus discrets. */
.tags-filtre { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 0; }
.tag-filtre {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--bleu-clair);
  background: var(--blanc);
  color: var(--marine);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.tag-filtre:hover { background: var(--bleu-pale); border-color: var(--marine); color: var(--marine); }
.tag-filtre.actif { background: var(--marine); border-color: var(--marine); color: var(--blanc); }
.tag-filtre.actif:hover { background: var(--bleu); border-color: var(--bleu); color: var(--blanc); }
.tag-filtre:focus-visible { outline: 2px solid var(--bleu-moyen); outline-offset: 2px; }
/* Un tag actif se retire d'un clic : une croix le signale (sauf « Toutes », toujours en tête). */
.tag-filtre.actif:not(:first-child)::after { content: '×'; font-size: 18px; line-height: 1; font-weight: 400; opacity: .8; }

.conf-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--bleu-pale);
  background: var(--blanc);
  color: var(--bleu);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}
.tableau .tag { margin: 2px 0; }

/* Fiche conférence : cases à cocher présentées en pastilles. */
.tags-choix { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; border: 0; min-width: 0; }
.tags-choix legend { padding: 0; margin: 0 0 10px; font-weight: 700; font-size: 15px; }
.tags-choix label.case {
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--bleu-clair);
  border-radius: 999px;
  background: var(--blanc);
  font-weight: 700;
  cursor: pointer;
}
.tags-choix label.case:hover { border-color: var(--marine); }
.tags-choix label.case:has(input:checked) { background: var(--bleu-pale); border-color: var(--marine); }

/* Liste des tags : libellé, ordre et bouton sur une ligne. */
.tag-ligne { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 0; }
.tag-ligne label { flex: 1 1 220px; }
.tag-ligne label:has(input[type=number]) { flex: 0 0 110px; }
.tag-ligne button { padding: 10px 18px; }
.entete-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Agenda des conférences à venir : un disque marine pour la date, une carte blanche opaque par conférence */
.actions-agenda { margin: -12px 0 22px; }
.agenda-mois { margin: 34px 0 0; }
.agenda-mois h2 { font-size: 21px; color: var(--bleu); padding-bottom: 8px; border-bottom: 1px solid var(--bleu-pale); }
.agenda-mois h2::first-letter { text-transform: uppercase; }
.agenda-liste { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 14px; }
.agenda-item { display: flex; align-items: center; gap: 18px; padding: 18px 22px; background: var(--blanc); border: 1px solid var(--bleu-pale); border-radius: 18px; }
.agenda-item:hover { border-color: var(--bleu-clair); }
.agenda-lien { flex: 1; display: flex; align-items: center; gap: 22px; text-decoration: none; color: var(--marine); min-width: 0; }
.agenda-jour { flex: none; width: 74px; height: 74px; border-radius: 50%; background: var(--marine); color: var(--blanc); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; transition: background .2s; }
a.agenda-lien:hover .agenda-jour { background: var(--rouge); }
.agenda-num { font-size: 28px; font-weight: 700; }
.agenda-sem { margin-top: 4px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--bleu-clair); }
a.agenda-lien:hover .agenda-sem { color: var(--blanc); }
.agenda-corps { display: grid; gap: 4px; min-width: 0; }
.agenda-date { font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--rouge); }
.agenda-titre { font-size: 21px; font-weight: 700; line-height: 1.25; }
.agenda-lieu { color: var(--bleu); }
.agenda-corps .pastille { justify-self: start; margin-top: 4px; }
a.agenda-lien:focus-visible { outline: 2px solid var(--bleu-moyen); outline-offset: 6px; border-radius: 12px; }
a.agenda-lien:focus-visible .agenda-jour { background: var(--rouge); }
.agenda-ics { flex: none; }
.sous-titre:empty { display: none; }
/* Heures de début et de fin côte à côte : les champs restent alignés même si un libellé passe sur deux lignes. */
.ligne-horaire { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.carte h3 { font-size: 18px; margin: 26px 0 12px; padding-top: 20px; border-top: 1px solid var(--bleu-pale); }
/* Gestion de l'agenda (le seul tableau qui renvoie vers /admin/agenda/<id>) : dates, statuts et actions sur une ligne. */
.tableau:has(a[href^="/admin/agenda/"]) th,
.tableau:has(a[href^="/admin/agenda/"]) td:not(:first-child) { white-space: nowrap; }
@media (max-width: 640px) {
  .agenda-item { flex-direction: column; align-items: stretch; padding: 18px; }
  .agenda-lien { align-items: flex-start; gap: 16px; }
  .agenda-ics { align-self: flex-start; }
  .agenda-jour { width: 58px; height: 58px; }
  .agenda-num { font-size: 24px; }
  .agenda-titre { font-size: 19px; }
  /* Gestion de l'agenda : une fiche par événement, les colonnes empilées et nommées. */
  .tableau:has(a[href^="/admin/agenda/"]) thead { display: none; }
  .tableau:has(a[href^="/admin/agenda/"]) tr, .tableau:has(a[href^="/admin/agenda/"]) td { display: block; }
  .tableau:has(a[href^="/admin/agenda/"]) tr { padding: 14px 0; border-bottom: 1px solid var(--bleu-pale); }
  .tableau:has(a[href^="/admin/agenda/"]) td { padding: 3px 0; border: 0; }
  .tableau:has(a[href^="/admin/agenda/"]) td:first-child a { font-weight: 700; }
  .tableau:has(a[href^="/admin/agenda/"]) td:nth-child(4)::before { content: 'Agenda public : '; color: var(--bleu-moyen); font-size: 14px; }
  .tableau:has(a[href^="/admin/agenda/"]) .actions-ligne { justify-content: flex-start; flex-wrap: wrap; gap: 6px 18px; padding-top: 6px; }
}

/* Suivi (/admin/suivi) : graphiques SVG produits par lib/graphiques.js, puis les tableaux de chiffres repliés.
   Une couleur de données (marine) ; rouge foncé réservé aux alertes, toujours doublé d'un libellé ; filets d'un pixel. */
.suivi-section h2 { margin-bottom: 14px; }
.graphiques { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin: 0 0 18px; }
.graphique { margin: 0; padding: 14px 16px 10px; border: 1px solid var(--bleu-pale); border-radius: 14px; background: var(--blanc); min-width: 0; }
.graphique figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin: 0 0 6px; font-size: 15px; line-height: 1.3; }
.graphique-titre { font-weight: 700; }
.graphique-total { color: var(--bleu); font-variant-numeric: tabular-nums; }
.graphique-note { margin: 0 0 8px; color: var(--bleu); font-size: 15px; }
.graphique svg { display: block; width: 100%; height: auto; overflow: visible; font-family: Calibri, Carlito, Arial, sans-serif; }
.graphique-large { margin: 0 0 18px; }
.graphique-large svg { max-width: 980px; }
.g-grille { stroke: var(--bleu-pale); stroke-width: 1; }
.g-axe { fill: var(--bleu); font-size: 12px; }
.g-vide { fill: var(--bleu-moyen); font-size: 14px; }
.g-ligne { fill: none; stroke: var(--marine); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.g-aire { fill: var(--marine); opacity: .08; }
.g-point { fill: var(--marine); stroke: var(--blanc); stroke-width: 2; }
.g-fin { fill: var(--marine); font-size: 12px; font-weight: 700; }
.g-zone { fill: transparent; }
.g-curseur { stroke: var(--bleu-moyen); stroke-width: 1; opacity: 0; }
.g-repere { fill: var(--marine); stroke: var(--blanc); stroke-width: 2; opacity: 0; }
.g-col:hover .g-curseur, .g-col:hover .g-repere { opacity: 1; }
.g-barre { fill: var(--marine); }
.g-barre.statut-alerte, .g-barre.statut-frein, .g-barre.statut-depasse { fill: var(--rouge-fonce); }
.g-col:hover .g-barre { opacity: .85; }
.g-prevision { fill: var(--blanc); stroke: var(--marine); stroke-width: 1.5; }
.g-manque { stroke: var(--bleu-clair); stroke-width: 2; }
.g-valeur { fill: var(--marine); font-size: 12px; font-weight: 700; }
.g-piste { fill: var(--bleu-pale); }
.g-seuil { stroke: var(--bleu-clair); stroke-width: 1; }
.g-seuil-frein { stroke: var(--rouge-fonce); stroke-width: 1.5; }
.g-seuil-budget { stroke: var(--marine); stroke-width: 1.5; }
.g-seuil-texte { fill: var(--bleu); font-size: 12px; }
.g-seuil-texte.fort { fill: var(--marine); font-weight: 700; }
.suivi-chiffres { margin: 0 0 18px; }
.suivi-chiffres > summary { cursor: pointer; font-weight: 700; color: var(--bleu); margin: 0 0 10px; }
.suivi-chiffres > summary:hover { color: var(--marine); }
.suivi-tableau caption, .suivi-classement caption { caption-side: top; text-align: left; font-weight: 700; padding: 0 0 8px; }
.suivi-tableau th[scope=row] { font-weight: 400; white-space: nowrap; }
.suivi-tableau tfoot th, .suivi-tableau tfoot td { font-weight: 700; border-top: 2px solid var(--marine); }
.suivi-budget { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0 0 18px; }
.suivi-budget dt { font-weight: 700; }
.suivi-budget dd { margin: 0; }
.suivi-budget dd ul { margin: 0; padding-left: 18px; }
[class^="statut-"]:is(dd, span) { justify-self: start; display: inline-block; padding: 2px 12px; border-radius: 999px; font-weight: 700; font-size: 15px; }
dd.statut-normal { background: var(--bleu-pale); color: var(--marine); }
dd.statut-vigilance { background: var(--bleu-pale); color: var(--bleu); border: 1px solid var(--bleu-clair); }
dd.statut-alerte { background: #FDECEF; color: var(--rouge-fonce); }
dd.statut-frein, dd.statut-depasse { background: var(--rouge-fonce); color: var(--blanc); }
.note { background: var(--gris); border-left: 4px solid var(--bleu-clair); padding: 12px 16px; border-radius: 0 10px 10px 0; }

/* Tableaux */
.tableau { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 16px; background: var(--blanc); }
.tableau th { text-align: left; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--bleu-moyen); padding: 10px 12px; border-bottom: 2px solid var(--marine); }
.tableau td { padding: 12px; border-bottom: 1px solid var(--bleu-pale); vertical-align: middle; }
.tableau .nombre { text-align: right; font-variant-numeric: tabular-nums; }
.actions-ligne { display: flex; gap: 18px; justify-content: flex-end; align-items: center; }
.actions-ligne form { margin: 0; }

/* Dépôt de fichiers */
.depot { display: grid; gap: 14px; }
.depot-zone { border: 2px dashed var(--bleu-clair); border-radius: 18px; padding: 26px; text-align: center; transition: background .15s, border-color .15s; }
.depot-zone p { margin: 0 0 12px; }
.depot-zone p:last-child { margin: 0; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.depot-zone.survol { background: var(--bleu-pale); border-color: var(--marine); }
.depot-zone label { display: inline-flex; font-size: 16px; }
progress { width: 100%; height: 8px; accent-color: var(--rouge); }
.zone-danger { border-color: #F6CED4; padding: 18px 32px; }
.zone-danger form { margin: 0; }

/* Import des invités depuis Excel (fiche d'une conférence, carte « 2 · Les invités ») */
.import-invites > p { margin: 0 0 14px; }
.import-invites > .bouton { margin: 0 0 16px; }
.import-invites .formulaire { margin: 0 0 12px; }
.import-invites input[type=file] { padding: 8px 10px; font-size: 15px; cursor: pointer; }
.import-invites input[type=file]::file-selector-button {
  font: inherit; font-weight: 700; color: var(--marine); cursor: pointer;
  padding: 7px 18px; margin-right: 12px; border: 2px solid var(--marine); border-radius: 999px; background: var(--blanc);
}
.import-invites input[type=file]::file-selector-button:hover { background: var(--bleu-pale); }
/* Compte rendu d'import : disque plein quand la liste a changé, anneau sinon ; les lignes ignorées en alerte. */
.rapport-import h2 { overflow-wrap: anywhere; }
.rapport-chiffres { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 40px; }
.rapport-chiffres li { display: flex; align-items: center; gap: 12px; font-size: 17px; color: var(--bleu); }
.rapport-chiffres strong {
  flex: none; display: flex; align-items: center; justify-content: center;
  min-width: 52px; height: 52px; padding: 0 8px; border-radius: 999px;
  border: 2px solid var(--marine); background: var(--blanc); color: var(--marine); font-size: 22px; font-variant-numeric: tabular-nums;
}
.rapport-change strong { background: var(--marine); color: var(--blanc); }
.rapport-rejets { background: #FDECEF; border-left: 4px solid var(--rouge); padding: 12px 16px; border-radius: 0 10px 10px 0; }
.rapport-rejets > summary { cursor: pointer; font-weight: 700; color: var(--rouge-fonce); }
.rapport-rejets ul { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: 15px; }
.rapport-rejets code { background: var(--blanc); }
@media (max-width: 640px) {
  .rapport-chiffres { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .rapport-chiffres li { font-size: 16px; gap: 10px; }
  .rapport-chiffres strong { min-width: 44px; height: 44px; font-size: 19px; }
}

/* Onglets des supports */
.onglets { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 20px; }
.onglet { display: inline-flex; align-items: baseline; gap: 10px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--bleu-clair); background: var(--blanc); text-decoration: none; color: var(--marine); font-weight: 700; }
.onglet-type { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--bleu-moyen); font-weight: 700; }
.onglet.actif { background: var(--marine); border-color: var(--marine); color: var(--blanc); }
.onglet.actif .onglet-type { color: var(--bleu-clair); }

/* Lecteurs */
.lecteur { position: relative; width: 100%; aspect-ratio: 16 / 9; background: var(--marine); border-radius: 14px; overflow: hidden; }
.lecteur iframe, .lecteur video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; }
.lecteur-html iframe { background: var(--blanc); }
.lecteur:fullscreen { border-radius: 0; aspect-ratio: auto; }
.lecteur-pdf { display: flex; align-items: center; justify-content: center; background: var(--gris); }
.lecteur-pdf canvas { max-width: 100%; max-height: 100%; display: block; }
.pdf-barre {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 999px;
  background: var(--marine);
  color: var(--blanc);
  opacity: .92;
}
.pdf-barre button { padding: 6px 14px; font-size: 18px; border: 0; background: transparent; }
.pdf-barre button:hover { background: var(--bleu); }
.pdf-barre [data-pdf=plein] { font-size: 14px; }
.pdf-barre span { min-width: 72px; text-align: center; font-variant-numeric: tabular-nums; font-size: 15px; }
.actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 18px 0 0; }

@media (max-width: 640px) {
  .header { padding: 14px 16px; }
  .main { padding: 28px 16px 48px; }
  h1 { font-size: 30px; }
  .carte { padding: 22px 18px; }
  .colonnes { grid-template-columns: 1fr; }
  .tableau { font-size: 15px; }
  .footer { padding: 18px 16px; }
  .tag-filtre, .tags-choix label.case { min-height: 44px; }
  /* Graphiques larges (budget) : texte lisible, ils défilent dans leur cadre. Chiffres du budget empilés. */
  .graphique-large { overflow-x: auto; }
  .graphique-large svg { min-width: 620px; }
  .graphique-jauge svg { min-width: 480px; }
  .suivi-budget { grid-template-columns: 1fr; gap: 2px; }
  .suivi-budget dd { margin-bottom: 10px; }
  .tag-ligne label, .tag-ligne label:has(input[type=number]) { flex: 1 1 100%; }
  /* Tableaux larges : ils défilent dans leur cadre, la page ne déborde pas. */
  .tableau { display: block; overflow-x: auto; }
  /* Liste des tags : une fiche par tag, les colonnes empilées et nommées. */
  .tableau:has(.tag-ligne) thead { display: none; }
  .tableau:has(.tag-ligne) tr, .tableau:has(.tag-ligne) td { display: block; }
  .tableau:has(.tag-ligne) tr { padding: 12px 0; border-bottom: 1px solid var(--bleu-pale); }
  .tableau:has(.tag-ligne) td { padding: 4px 0; border: 0; text-align: left; }
  .tableau:has(.tag-ligne) td:nth-child(2)::before { content: 'Identifiant : '; color: var(--bleu-moyen); font-size: 14px; }
  .tableau:has(.tag-ligne) td:nth-child(3)::before { content: 'Conférences : '; color: var(--bleu-moyen); font-size: 14px; }
}

/* Présences : pointage à l'entrée de la salle, sur téléphone */
/* Compteur : le nombre de présents dans un disque marine, comme le jour dans l'agenda. */
.compteur { display: flex; align-items: center; gap: 14px; font-size: 19px; color: var(--bleu); margin: 0 0 14px; }
.compteur strong {
  flex: none; display: flex; align-items: center; justify-content: center;
  min-width: 64px; height: 64px; padding: 0 10px; border-radius: 999px;
  background: var(--marine); color: var(--blanc); font-size: 28px; font-variant-numeric: tabular-nums;
}
.presences-recherche { position: sticky; top: 0; z-index: 2; padding: 10px 0; margin: 0 0 14px; background: var(--blanc); }
.presences { list-style: none; margin: 0 0 8px; padding: 0; }
.presence { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--bleu-pale); }
.presence[hidden] { display: none; }
.presence:last-child { border-bottom: 0; }
.presence-qui { display: grid; gap: 2px; min-width: 0; }
.presence-qui strong::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--bleu-clair); margin-right: 10px; vertical-align: 0; }
.presence-ok .presence-qui strong::before { background: var(--marine); border-color: var(--marine); }
.presence-qui span { color: var(--bleu-moyen); font-size: 14px; overflow-wrap: anywhere; }
.presence form { margin: 0; display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.presence-heure { color: var(--bleu); font-size: 15px; }
.presences-ajout { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: end; margin-top: 18px; }
@media (max-width: 640px) {
  .compteur { font-size: 17px; }
  .compteur strong { min-width: 54px; height: 54px; font-size: 24px; }
  .presences-recherche input::placeholder { font-size: 15px; }
  .presence form { flex-wrap: wrap; justify-content: flex-end; gap: 2px 12px; max-width: 46%; text-align: right; }
  .presence button:not(.link) { padding: 9px 18px; }
  .presence-heure { font-size: 14px; }
}
