/* Charte MAKE-IT-SIMPLE : Segoe UI, texte #595959, bleu profond, filets verts. Pas de texte en vert accent. */
:root {
  color-scheme: light;
  --bleu-profond: #1B5A85;
  --bleu-nuit: #134565;
  --bleu-moyen: #2E7BAF;
  --bleu-lien: #0078A8;
  --bleu-clair: #DCEEFB;
  --bleu-voile: #E6EFF5;
  --vert-logo: #A0BE17;
  --vert-fonce: #576E00;
  --vert-pale: #F3F7DE;
  --vert-tuile: #CFDE7B;
  --texte: #595959;
  --texte-fort: #2F3B45;
  --texte-soft: #6F6F6F;
  --fond: #F2F4F6;
  --gris-zebre: #F2F2F2;
  --filet: #D9D9D9;
  --filet-doux: #E8E8E8;
  --gris-precedent: #A9B8C4;
  --rouge: #C0392B;
  --rouge-pale: #FDEDEC;
  --rose-sur-bleu: #FFC9BF;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 15px/1.45 "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }

h1, h2, h3 { color: var(--bleu-profond); margin: 0; font-weight: 600; }
a { color: var(--bleu-lien); }
:focus-visible { outline: 3px solid var(--bleu-moyen); outline-offset: 2px; }

/* --- En-tête ------------------------------------------------------------------------------------------------ */
.entete {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px;
  padding: 10px 28px; background: #FFFFFF;
}
.marque { display: block; line-height: 0; }
.logo { height: 34px; width: auto; display: block; }
.navigation { display: flex; flex-wrap: wrap; gap: 2px; flex: 1; }
.navigation a {
  padding: 7px 12px; border-radius: 6px; color: var(--texte-fort); font-weight: 600; text-decoration: none;
}
.navigation a:hover { background: var(--bleu-voile); }
.navigation a[aria-current="page"] { color: var(--bleu-profond); box-shadow: inset 0 -3px 0 var(--vert-logo); border-radius: 6px 6px 0 0; }
.entete-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.fraicheur { margin: 0; font-size: 13px; color: var(--texte-soft); }

.bouton {
  border: 1px solid var(--bleu-profond); border-radius: 6px; padding: 7px 16px; background: var(--bleu-profond); color: #FFFFFF;
  font: inherit; font-weight: 600; cursor: pointer;
}
.bouton:hover { background: var(--bleu-moyen); border-color: var(--bleu-moyen); }
.bouton:disabled { background: var(--texte-soft); border-color: var(--texte-soft); cursor: progress; }
.bouton-large { width: 100%; padding: 10px 16px; margin-top: 6px; }
.bouton-formulaire { min-height: 38px; }
.bouton-discret {
  border: 1px solid var(--filet); border-radius: 6px; padding: 4px 10px; background: #FFFFFF; color: var(--bleu-profond);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.bouton-discret:hover { background: var(--bleu-voile); border-color: var(--bleu-moyen); }
.session { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding-left: 14px; border-left: 1px solid var(--filet); font-size: 13px; }
.session-nom { font-weight: 600; color: var(--texte-fort); }
.session a { font-weight: 600; }

/* --- Messages ----------------------------------------------------------------------------------------------- */
.message { margin: 0; padding: 10px 28px; background: var(--bleu-clair); color: var(--bleu-profond); }
.message-succes { background: var(--vert-pale); color: var(--vert-fonce); }
.message-erreur { background: var(--rouge-pale); color: var(--rouge); }
.note { margin: 10px 0 0; font-size: 13px; color: var(--texte-soft); }
.vide { margin: 8px 0; padding: 12px; color: var(--texte-soft); }

/* --- Bandeau du tableau de bord ------------------------------------------------------------------------------- */
.bandeau {
  background: linear-gradient(115deg, var(--bleu-nuit) 0%, var(--bleu-profond) 62%, #236C9C 100%);
  border-bottom: 4px solid var(--vert-logo);
  color: #FFFFFF;
  padding: 22px 28px 24px;
}
.bandeau-haut { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; max-width: 1560px; margin: 0 auto; }
.bandeau h1 { color: #FFFFFF; font-size: 26px; line-height: 1.2; }
.perimetre { margin: 4px 0 0; color: #D4E5F0; font-size: 14px; }

.filtres-bandeau { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.filtres-bandeau .champ { color: #D4E5F0; }
.filtres-bandeau select { min-width: 150px; }

.kpis {
  display: grid; grid-template-columns: 1.45fr repeat(5, minmax(0, 1fr)); gap: 0;
  max-width: 1560px; margin: 20px auto 0;
  border-top: 1px solid rgba(255, 255, 255, .22);
}
.kpi {
  position: relative; display: flex; flex-direction: column; gap: 2px; min-width: 0;
  padding: 14px 16px 12px; color: #FFFFFF; text-decoration: none;
  border-left: 1px solid rgba(255, 255, 255, .22);
  transition: background-color .15s ease;
}
.kpi:first-child { border-left: 0; padding-left: 0; }
.kpi:hover { background: rgba(255, 255, 255, .09); }
.kpi:first-child:hover { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .09)); }
.kpi:focus-visible { outline-color: var(--vert-tuile); outline-offset: -3px; }
.kpi-libelle { font-size: 13px; font-weight: 600; color: #D4E5F0; }
.kpi-valeur { font-size: 28px; font-weight: 600; line-height: 1.15; white-space: nowrap; }
.kpi-vedette .kpi-valeur { font-size: 48px; font-weight: 300; letter-spacing: -.5px; line-height: 1.05; }
.kpi-detail { font-size: 12.5px; color: #D4E5F0; }
.kpi-ecart { margin-top: 4px; font-size: 12.5px; color: #EAF2F8; }
.kpi-ecart-bon { color: var(--vert-tuile); font-weight: 600; }
.kpi-ecart-mauvais { color: var(--rose-sur-bleu); font-weight: 600; }
.kpi-ecart-base { font-weight: 400; color: #D4E5F0; }
.kpi-tendance { width: 100%; max-width: 150px; height: 30px; margin-top: 6px; display: block; }
.kpi-tendance polyline { stroke: rgba(255, 255, 255, .6); vector-effect: non-scaling-stroke; }
.kpi-tendance circle { fill: #FFFFFF; }

/* --- Contenu ---------------------------------------------------------------------------------------------------- */
.contenu { max-width: 1616px; margin: 0 auto; padding: 20px 28px 36px; width: 100%; }
.titre-rangee { font-size: 15px; margin-bottom: 8px; }

.tuiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.tuile {
  position: relative; display: flex; flex-direction: column; gap: 1px; padding: 12px 14px;
  background: #FFFFFF; border-radius: 8px; border-left: 4px solid var(--bleu-moyen);
  color: var(--texte); text-decoration: none;
  box-shadow: 0 1px 2px rgba(19, 69, 101, .12);
  transition: transform .15s ease, box-shadow .15s ease;
}
.tuile:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(19, 69, 101, .18); }
.tuile-alerte { border-left-color: var(--rouge); }
.tuile-valeur { font-size: 28px; font-weight: 600; line-height: 1.1; color: var(--bleu-profond); }
.tuile-alerte .tuile-valeur { color: var(--rouge); }
.tuile-libelle { font-weight: 600; color: var(--texte-fort); }
.tuile-detail { font-size: 12.5px; color: var(--texte-soft); }
.tuile-voir { margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--bleu-lien); }
.tuile:hover .tuile-voir { text-decoration: underline; }

.grille { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.carte { background: #FFFFFF; border-radius: 8px; padding: 16px 18px; box-shadow: 0 1px 2px rgba(19, 69, 101, .12); min-width: 0; }
.carte-entonnoir, .carte-anciennete { display: flex; flex-direction: column; }
#entonnoir, #anciennete { flex: 1; }
.carte-tete { margin-bottom: 12px; }
.carte-tete h2 { font-size: 16px; }
.carte-tete p { margin: 2px 0 0; font-size: 13px; color: var(--texte-soft); }
.carte-tete-legende { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 6px 16px; }
.carte-entonnoir { grid-column: span 5; }
.carte-mois { grid-column: span 7; }
.carte-anciennete { grid-column: span 4; }
.carte-clients { grid-column: span 8; }
.carte-responsables { grid-column: span 12; }

/* --- Entonnoir -------------------------------------------------------------------------------------------------- */
.entonnoir { display: flex; flex-direction: column; height: 100%; }
.etage, .pont { display: grid; grid-template-columns: 124px minmax(0, 1fr) 118px; align-items: center; gap: 10px; }
.etage { padding: 2px 4px; border-radius: 6px; color: var(--texte); text-decoration: none; }
.etage:hover { background: var(--bleu-voile); }
.etage-nom { font-weight: 600; color: var(--texte-fort); font-size: 14px; }
.etage-piste { display: flex; justify-content: center; }
.etage-barre { display: block; height: 42px; border-radius: 4px; }
.etage-chiffres { display: flex; flex-direction: column; text-align: right; line-height: 1.2; }
.etage-chiffres strong { font-size: 20px; font-weight: 600; color: var(--bleu-profond); font-variant-numeric: tabular-nums; }
.etage-chiffres span { font-size: 12.5px; color: var(--texte-soft); }
.pont { padding: 0 4px; min-height: 40px; flex: 1; align-items: stretch; }
.pont-taux, .pont-sorties { align-self: center; }
.pont-taux { font-size: 13px; font-weight: 600; color: var(--bleu-profond); text-align: right; padding-right: 2px; }
.pont-taux::after { content: " ↓"; color: var(--texte-soft); font-weight: 400; }
/* La forme est sortie du calcul de hauteur : un SVG carré imposerait sinon une hauteur égale à sa largeur. */
.pont-cadre { position: relative; display: block; min-height: 40px; }
.pont-forme { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pont-forme polygon { fill: var(--bleu-voile); }
.pont-sorties { display: flex; flex-direction: column; font-size: 12px; text-align: right; line-height: 1.3; }

/* --- Graphiques ------------------------------------------------------------------------------------------------- */
.legende { display: flex; gap: 14px; font-size: 13px; color: var(--texte); }
.legende-element { display: inline-flex; align-items: center; gap: 6px; }
.legende-marque { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.legende-annee { background: var(--bleu-profond); }
.legende-precedent { background: var(--gris-precedent); }
.graphique { margin: 0 0 6px; }
.graphique figcaption { font-size: 13px; font-weight: 600; color: var(--texte-fort); }
.zone-graphique { width: 100%; min-height: 170px; }
.colonnes { display: block; max-width: 100%; }
.axe-grille { stroke: var(--filet-doux); stroke-width: 1; }
.axe-base { stroke: var(--filet); stroke-width: 1; }
.axe-texte { fill: var(--texte-soft); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.marque-annee { fill: var(--bleu-profond); }
.marque-precedent { fill: var(--gris-precedent); }
.colonne-zone { fill: transparent; }
.colonne:hover .colonne-zone, .colonne:focus .colonne-zone { fill: var(--bleu-voile); }
.colonne:focus { outline: none; }
.colonne:focus-visible .colonne-zone { stroke: var(--bleu-moyen); stroke-width: 2; }
.chiffres { margin-top: 4px; font-size: 13px; }
.chiffres summary { cursor: pointer; color: var(--bleu-lien); font-weight: 600; }

.infobulle {
  position: fixed; z-index: 10; pointer-events: none; padding: 7px 10px; border-radius: 6px;
  background: var(--bleu-nuit); color: #D4E5F0; font-size: 12.5px; box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.infobulle strong { color: #FFFFFF; font-variant-numeric: tabular-nums; }

/* --- Barres horizontales ---------------------------------------------------------------------------------------- */
.barres { display: flex; flex-direction: column; justify-content: space-between; gap: 2px; height: 100%; }
.barre-ligne {
  display: grid; grid-template-columns: 112px minmax(0, 1fr) 96px; align-items: center; gap: 10px;
  padding: 6px 4px; border-radius: 6px; color: var(--texte); text-decoration: none; font-size: 13.5px;
}
.barre-ligne:hover { background: var(--bleu-voile); }
.barre-nom { color: var(--texte-fort); }
.barre-piste { display: block; min-width: 0; flex: 1; }
.barre-trace { display: block; height: 14px; border-radius: 0 4px 4px 0; background: var(--bleu-moyen); }
.barre-valeur { display: flex; flex-direction: column; text-align: right; line-height: 1.2; }
.barre-valeur strong { color: var(--texte-fort); font-weight: 600; font-variant-numeric: tabular-nums; }
.barre-valeur span { font-size: 12px; color: var(--texte-soft); }
.barre-cellule { display: flex; align-items: center; gap: 8px; }
.barre-montant { white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 78px; text-align: right; }

/* --- Tableaux --------------------------------------------------------------------------------------------------- */
.defilement { overflow-x: auto; }
.donnees { width: 100%; border-collapse: collapse; font-size: 14px; }
.donnees th, .donnees td { padding: 7px 8px; border-bottom: 1px solid var(--filet-doux); font-variant-numeric: tabular-nums; text-align: left; }
.donnees thead th { font-size: 12.5px; font-weight: 600; color: var(--texte-soft); border-bottom-color: var(--filet); white-space: nowrap; }
.donnees tbody th { font-weight: 600; color: var(--texte-fort); }
.donnees tbody th a { color: var(--bleu-lien); }
.donnees tbody tr:hover { background: var(--bleu-voile); }
.donnees .a-droite { text-align: right; white-space: nowrap; }
.colonne-barre { min-width: 190px; width: 34%; }

/* --- Filtres ---------------------------------------------------------------------------------------------------- */
.filtres { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 20px; }
.segments { display: inline-flex; border: 1px solid var(--bleu-profond); border-radius: 6px; overflow: hidden; background: #FFFFFF; }
.segments[hidden] { display: none; }
.segments button {
  border: 0; border-right: 1px solid var(--bleu-profond); background: #FFFFFF; color: var(--bleu-profond);
  padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer;
}
.segments button:last-child { border-right: 0; }
.segments button:hover { background: var(--bleu-clair); }
.segments button[aria-pressed="true"] { background: var(--bleu-profond); color: #FFFFFF; }
.segments button:focus-visible { outline-offset: -3px; outline-color: var(--vert-logo); }

.champ { display: flex; flex-direction: column; gap: 3px; font-size: 13px; font-weight: 600; color: var(--bleu-profond); }
.champ[hidden], .case[hidden] { display: none; }
.champ select, .champ input {
  font: 15px/1.3 "Segoe UI", system-ui, sans-serif; color: var(--texte); padding: 7px 9px; min-height: 38px;
  border: 1px solid var(--texte-soft); border-radius: 6px; background: #FFFFFF;
}
.champ-recherche input { width: 280px; max-width: 100%; }
.case { display: inline-flex; align-items: flex-start; gap: 7px; padding-bottom: 8px; font-size: 14px; cursor: pointer; }
.case input { margin: 3px 0 0; width: 16px; height: 16px; flex: none; accent-color: var(--bleu-profond); }

/* --- Pages de liste --------------------------------------------------------------------------------------------- */
.contenu-liste { max-width: 1320px; }
.retour { font-weight: 600; text-decoration: none; }
.retour:hover { text-decoration: underline; }
.contenu-liste > p:first-child { margin: 0 0 8px; }
.liste-tete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 24px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 3px solid var(--vert-logo); }
.liste-tete h1 { font-size: 26px; line-height: 1.2; }
.explication { margin: 4px 0 0; max-width: 780px; }
.totaux { display: flex; flex-direction: column; align-items: flex-end; margin: 0; line-height: 1.25; }
.totaux strong { font-size: 22px; font-weight: 600; color: var(--bleu-profond); }
.carte-liste { margin-top: 14px; padding: 6px 10px; }

.lignes, .modifs { list-style: none; margin: 0; padding: 0; }
.lignes > li { border-bottom: 1px solid var(--filet-doux); }
.lignes > li:last-child { border-bottom: 0; }

.entetes, .ligne {
  display: grid; align-items: center; gap: 4px 12px;
  grid-template-columns: 215px minmax(0, 3fr) 160px 110px 110px 140px;
}
.entetes { position: sticky; top: 0; z-index: 2; padding: 4px 8px; background: #FFFFFF; font-size: 12.5px; font-weight: 600; color: var(--texte-soft); border-bottom: 1px solid var(--filet); }
.entete-colonne button { border: 0; padding: 4px 0; background: none; font: inherit; font-weight: 600; color: var(--bleu-profond); cursor: pointer; }
.entete-colonne button:hover { text-decoration: underline; }
.a-droite { text-align: right; }
.ligne { width: 100%; border: 0; background: none; padding: 8px; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.ligne:hover { background: var(--gris-zebre); }
.ligne[aria-expanded="true"] { background: var(--bleu-clair); }
.ligne-date { font-weight: 600; color: var(--bleu-profond); }
.ligne-calcul { font-weight: 400; font-size: 12.5px; color: var(--texte-soft); }
.ligne[aria-expanded="true"] .ligne-calcul { color: var(--texte); }
.ligne-nom { min-width: 0; overflow-wrap: anywhere; }
.ligne-montant { text-align: right; font-variant-numeric: tabular-nums; }
.ligne-marque { justify-self: end; }

.etiquette { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.etiquette-retard { background: var(--rouge-pale); color: var(--rouge); }
.etiquette-info { background: var(--bleu-clair); color: var(--bleu-profond); }

.detail { padding: 8px 12px 14px; background: var(--gris-zebre); }
.detail dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px 20px; margin: 0 0 10px; }
.detail dt { font-size: 12.5px; font-weight: 600; color: var(--bleu-profond); }
.detail dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }

.modif { padding: 10px 8px; border-bottom: 1px solid var(--filet-doux); }
.modif:last-child { border-bottom: 0; }
.modif p { margin: 3px 0 0; font-size: 14px; }
.modif strong { color: var(--bleu-profond); }
.modif-titre { font-weight: 600; overflow-wrap: anywhere; }
.modif-qui { color: var(--texte-soft); font-size: 13px !important; }

/* --- Compte rendu ------------------------------------------------------------------------------------------------ */
.cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; margin-top: 14px; }
.carte-personne h2 { font-size: 16px; }
.carte-personne p { margin: 6px 0 0; font-size: 14px; }
.carte-personne strong { color: var(--bleu-profond); }
.carte-personne .en-retard strong { color: var(--rouge); }
.carte-compte { color: var(--texte-soft); font-size: 13px !important; margin-top: 0 !important; }

/* --- Pied --------------------------------------------------------------------------------------------------------- */
.pied {
  display: flex; flex-wrap: wrap; gap: 4px 20px; justify-content: space-between; padding: 12px 28px;
  background: var(--bleu-profond); color: #FFFFFF; font-size: 13px;
}

/* --- Connexion ----------------------------------------------------------------------------------------------------- */
.page-connexion {
  align-items: center; justify-content: center; padding: 24px 16px;
  background: linear-gradient(115deg, var(--bleu-nuit) 0%, var(--bleu-profond) 62%, #236C9C 100%);
}
.page-connexion main { flex: none; }
.connexion {
  width: 100%; max-width: 420px; padding: 32px; background: #FFFFFF; border-radius: 10px;
  border-bottom: 4px solid var(--vert-logo); box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
}
.connexion-logo { display: block; height: 46px; width: auto; margin-bottom: 22px; }
.connexion h1 { font-size: 22px; line-height: 1.2; }
.connexion-sous-titre { margin: 4px 0 18px; }
.connexion-pied { margin: 14px 0 0; color: #D4E5F0; font-size: 13px; }
.formulaire { display: flex; flex-direction: column; gap: 12px; }
.formulaire .champ input { width: 100%; }
.alerte { margin: 0 0 14px; padding: 10px 12px; border-radius: 6px; font-size: 14px; }
.alerte-erreur { background: var(--rouge-pale); color: var(--rouge); }
.alerte-info { background: var(--bleu-clair); color: var(--bleu-profond); }
.alerte-succes { background: var(--vert-pale); color: var(--vert-fonce); }

/* --- Page de la vidéo ----------------------------------------------------------------------------------------------- */
.presentation { max-width: 960px; }
.video { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--bleu-nuit); border-radius: 6px; }

/* --- Mot de passe et utilisateurs ------------------------------------------------------------------------------------ */
.contenu-etroit { max-width: 560px; }
.titre-carte { font-size: 16px; margin-bottom: 10px; }
.carte-ajout { margin-top: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.note-inline { font-size: 13px; color: var(--texte-soft); }
.provisoire { margin-bottom: 14px; border-left: 4px solid var(--vert-logo); }
.provisoire code { font-size: 15px; padding: 2px 6px; background: var(--gris-zebre); border-radius: 4px; overflow-wrap: anywhere; }
.provisoire p { margin: 6px 0 0; font-size: 13px; color: var(--texte-soft); }

/* --- Page d'aide -------------------------------------------------------------------------------------------------- */
.page-simple { max-width: 860px; margin: 0 auto; padding: 24px 28px 40px; width: 100%; }
.page-simple h1 { margin-bottom: 10px; font-size: 26px; }
.page-simple h2 { margin-top: 24px; padding-bottom: 4px; font-size: 18px; border-bottom: 2px solid var(--vert-logo); }
.page-simple li { margin-bottom: 5px; }

/* --- Rechargement : l'affichage précédent reste en place, atténué -------------------------------------------------- */
.rechargement main { opacity: .6; transition: opacity .15s ease; }

/* --- Apparition ---------------------------------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .kpi, .tuile, .carte { animation: apparaitre .35s ease both; }
  .tuile:nth-child(2), .kpi:nth-child(2) { animation-delay: .03s; }
  .tuile:nth-child(3), .kpi:nth-child(3) { animation-delay: .06s; }
  .tuile:nth-child(4), .kpi:nth-child(4) { animation-delay: .09s; }
  .tuile:nth-child(5), .kpi:nth-child(5) { animation-delay: .12s; }
  .tuile:nth-child(6), .kpi:nth-child(6) { animation-delay: .15s; }
  .etage-barre { animation: deployer .5s ease both; }
  .barre-trace { animation: etirer .5s ease both; transform-origin: left center; }
}
@keyframes apparaitre { from { opacity: 0; transform: translateY(5px); } }
@keyframes deployer { from { transform: scaleX(.3); opacity: .4; } }
@keyframes etirer { from { transform: scaleX(.2); } }

/* --- Écrans intermédiaires ----------------------------------------------------------------------------------------- */
@media (max-width: 1250px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi { border-top: 1px solid rgba(255, 255, 255, .22); margin-top: -1px; }
  .kpi:first-child { padding-left: 16px; }
  .kpi:nth-child(3n + 1) { border-left: 0; }
  .kpi-vedette .kpi-valeur { font-size: 36px; }
  .tuiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .carte-entonnoir, .carte-mois, .carte-anciennete, .carte-clients, .carte-responsables { grid-column: span 12; }
}

@media (max-width: 1050px) {
  .entetes { display: none; }
  .ligne { grid-template-columns: minmax(0, 1fr) auto; }
  .ligne-nom { grid-column: 1 / -1; grid-row: 2; }
  .ligne-personne { grid-row: 3; }
  .ligne-etape { grid-row: 3; justify-self: end; font-size: 13px; }
  .ligne-montant { grid-row: 4; grid-column: 2; }
  .ligne-montant-vide { display: none; }
  .ligne-marque { grid-row: 1; grid-column: 2; }
}

/* --- Téléphone ------------------------------------------------------------------------------------------------------ */
@media (max-width: 620px) {
  .entete { padding: 10px 14px; }
  .logo { height: 28px; }
  .entete { justify-content: space-between; }
  .entete-actions { display: contents; }
  .navigation { order: 2; flex-basis: 100%; }
  .navigation a { padding: 8px 10px; }
  .fraicheur { order: 3; flex-basis: 100%; }
  .session { order: 4; flex-basis: 100%; padding-left: 0; border-left: 0; }
  .connexion { padding: 24px 20px; }
  .message { padding: 10px 14px; }
  .bandeau { padding: 16px 14px 18px; }
  .bandeau h1 { font-size: 22px; }
  .filtres-bandeau { width: 100%; }
  .filtres-bandeau .champ { flex: 1 1 140px; }
  .filtres-bandeau select { width: 100%; min-width: 0; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { padding: 12px; border-left: 0; }
  .kpi:first-child { grid-column: 1 / -1; padding-left: 12px; }
  .kpi:nth-child(odd):not(:first-child) { border-left: 1px solid rgba(255, 255, 255, .22); }
  .kpi-valeur { font-size: 22px; white-space: normal; }
  .kpi-vedette .kpi-valeur { font-size: 38px; }
  .contenu { padding: 14px 14px 28px; }
  .tuiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .carte { padding: 12px; }
  .etage, .pont { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; }
  .etage-nom { grid-column: 1; grid-row: 1; }
  .etage-chiffres { grid-column: 2; grid-row: 1; flex-direction: row; gap: 8px; align-items: baseline; }
  .etage-chiffres strong { font-size: 17px; }
  .etage-piste { grid-column: 1 / -1; grid-row: 2; }
  .etage-barre { height: 28px; }
  .pont { min-height: 0; padding: 4px; align-items: center; }
  .pont-cadre { display: none; }
  .pont-taux { text-align: left; }
  .barre-ligne { grid-template-columns: minmax(0, 1fr) auto; }
  .barre-piste { grid-column: 1 / -1; grid-row: 2; }
  .segments { display: flex; width: 100%; }
  .segments button { flex: 1 1 0; padding: 8px 4px; font-size: 13.5px; min-height: 44px; }
  .champ, .champ-recherche input, .champ select { width: 100%; }
  .cartes { grid-template-columns: minmax(0, 1fr); }
  .case { min-height: 32px; }
  .pied { padding: 12px 14px; }
  .contenu-liste .totaux { align-items: flex-start; }
}
