/* Application de saisie Uteloo. Pensée d'abord pour le téléphone, puis élargie
   pour l'ordinateur. Aucune bibliothèque, aucune police à télécharger. */

:root {
  --jaune: #FCC216;          /* la couleur Uteloo */
  --jaune-vif: #FFCC33;
  --jaune-fonce: #DBA30C;    /* ombre des boutons, comme l'ombre des lettres du logo */
  --jaune-pale: #FFF4D2;
  --jaune-voile: #FFFBEF;
  --encre: #2B2118;          /* brun très foncé, celui du slogan */
  --texte: #3B332B;
  --discret: #7A6F63;
  --fond: #F7F4EE;
  --carte: #FFFFFF;
  --bord: #ECE5D8;
  --bord-fort: #DDD3C2;
  --vert: #177245;
  --vert-pale: #E4F4EA;
  --rouge: #B83227;
  --rouge-pale: #FCEBE9;
  --orange: #A84A06;
  --orange-pale: #FFF0E0;
  --bleu: #1E5BB8;
  --bleu-pale: #E9F0FC;
  --rayon: 16px;
  --ombre: 0 1px 2px rgba(43, 33, 24, .05), 0 4px 14px rgba(43, 33, 24, .06);
  --ombre-forte: 0 10px 34px rgba(43, 33, 24, .14);
  --anneau: 0 0 0 4px rgba(252, 194, 22, .32);
}

/* --- Bases ------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 16px/1.5 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
  color: var(--encre);
  line-height: 1.25;
  font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em; margin: 0 0 8px; }
h2 { font-size: 1.15rem; font-weight: 750; margin: 0 0 12px; }
p { margin: 0 0 12px; }
a { color: var(--encre); text-decoration-color: var(--jaune-fonce); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .95em; }
address { font-style: normal; }
small { font-size: .85rem; }
hr { border: 0; border-top: 1px solid var(--bord); margin: 6px 0; }
:focus-visible { outline: 3px solid rgba(252, 194, 22, .75); outline-offset: 2px; }

.icone {
  width: 20px; height: 20px; flex: none; vertical-align: middle;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.discret { color: var(--discret); }
.aide { color: var(--discret); font-size: .85rem; margin: 8px 0 0; }
.vide { text-align: center; color: var(--discret); padding: 28px 8px; }
.centre { text-align: center; }

.conteneur { max-width: 900px; margin: 0 auto; padding: 18px 16px 48px; }
.conteneur.large { max-width: 1180px; }
.etroite { max-width: 480px; margin-left: auto; margin-right: auto; }

.bandeau-demo {
  background: var(--encre); color: #FFE39A; text-align: center;
  font-size: .85rem; font-weight: 600; padding: 6px 16px;
}

/* --- Barre du haut ----------------------------------------------------------- */

.barre { position: relative; z-index: 20; background: var(--jaune); box-shadow: 0 4px 18px rgba(219, 163, 12, .28); }
.barre-interieur {
  max-width: 1180px; margin: 0 auto; min-height: 64px; padding: 8px 16px;
  display: flex; align-items: center; gap: 12px;
}
.marque { display: flex; align-items: center; gap: 14px; margin-right: auto; color: var(--encre); text-decoration: none; }
.marque img { display: block; height: 28px; width: auto; }
.marque-titre { display: none; font-weight: 700; font-size: .95rem; padding-left: 14px; border-left: 2px solid rgba(43, 33, 24, .2); }
.navigation { display: none; }
.navigation a {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px;
  color: var(--encre); font-weight: 650; font-size: .95rem; text-decoration: none; transition: background .15s;
}
.navigation a:hover { background: rgba(255, 255, 255, .45); }
.navigation a.actif { background: #fff; box-shadow: 0 2px 0 var(--jaune-fonce); }
.navigation .icone { width: 18px; height: 18px; }

.deroulant { position: relative; }
.deroulant > summary {
  display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none;
  border-radius: 999px; user-select: none;
}
.deroulant > summary::-webkit-details-marker { display: none; }
.deroulant .panneau {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 30; min-width: 230px;
  display: grid; gap: 2px; padding: 8px; background: #fff;
  border: 1px solid var(--bord); border-radius: 16px; box-shadow: var(--ombre-forte);
}
.panneau a, .panneau button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 0; border-radius: 10px;
  background: none; color: var(--encre); font: inherit; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer;
}
.panneau a:hover, .panneau button:hover, .panneau a.actif { background: var(--jaune-pale); }
.panneau form { margin: 0; }
.panneau-titre { display: flex; align-items: center; gap: 10px; margin: 0; padding: 6px 12px 10px; font-weight: 700; color: var(--encre); }
.profil { display: none; }
.profil > summary { padding: 4px 14px 4px 4px; background: rgba(255, 255, 255, .4); }
.profil > summary:hover { background: rgba(255, 255, 255, .6); }
.profil-nom { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; color: var(--encre); }
.menu-mobile > summary {
  width: 44px; height: 44px; justify-content: center; border-radius: 12px;
  background: rgba(255, 255, 255, .45); color: var(--encre);
}
.menu-mobile .panneau { width: min(290px, calc(100vw - 32px)); }

.avatar {
  display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: #fff; color: var(--encre); font-size: .8rem; font-weight: 800; letter-spacing: .02em;
  box-shadow: 0 2px 0 var(--jaune-fonce);
}
.carte .avatar, .panneau .avatar { background: var(--jaune); }
.avatar.grand { width: 46px; height: 46px; font-size: .95rem; }

/* --- Éléments communs ----------------------------------------------------------- */

.carte {
  background: var(--carte); border: 1px solid rgba(43, 33, 24, .05); border-radius: var(--rayon);
  box-shadow: var(--ombre); padding: 20px; margin: 0 0 16px;
}
.carte.etroite { margin-left: auto; margin-right: auto; }
.titre-carte { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; margin: 0 0 18px; }
.titre-carte .icone { color: var(--jaune-fonce); }
.entete-page {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 12px 16px; margin: 4px 0 18px;
}
.entete-page h1 { font-size: 1.6rem; margin: 0; }
.entete-page p { margin: 2px 0 0; }
.titre-section { font-size: 1.1rem; margin: 28px 0 12px; }

.message {
  display: flex; align-items: flex-start; gap: 10px; margin: 0 0 16px; padding: 12px 16px;
  border: 1px solid #CFDDF6; border-radius: 14px; background: var(--bleu-pale); color: #173F7A; font-weight: 500;
}
.message .icone { margin-top: 2px; }
.message a { color: inherit; font-weight: 700; }
.message.succes { background: var(--vert-pale); border-color: #C5E6D1; color: #11562F; }
.message.erreur { background: var(--rouge-pale); border-color: #F3C9C4; color: #8E2219; }
.message.attention { background: var(--orange-pale); border-color: #F6D3AE; color: #8A3F06; }

.alerte { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid; border-radius: 14px; }
.alerte p { margin: 0; }
.alerte .icone { width: 22px; height: 22px; margin-top: 1px; }
.alerte.rouge { background: var(--rouge-pale); border-color: #F3C9C4; color: #8E2219; }
.alerte.orange { background: var(--orange-pale); border-color: #F6D3AE; color: #7D3A05; }
.alerte.bleue { background: var(--bleu-pale); border-color: #CFDDF6; color: #173F7A; }

.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px; vertical-align: middle;
  background: var(--jaune-pale); color: #6B4C00; font-size: .78rem; font-weight: 700;
}
.badge.vert { background: var(--vert-pale); color: var(--vert); }
.badge.gris { background: #EEE9E1; color: var(--discret); }

.pastille-grande {
  display: grid; place-items: center; width: 56px; height: 56px; margin: 0 0 14px; border-radius: 18px;
  background: var(--jaune); color: var(--encre); box-shadow: 0 3px 0 var(--jaune-fonce);
}
.pastille-grande .icone { width: 26px; height: 26px; }
.pastille-grande.vert { background: var(--vert-pale); color: var(--vert); box-shadow: none; }
.centre .pastille-grande { margin-left: auto; margin-right: auto; }
.code-erreur { margin: 0; font-size: 3.2rem; font-weight: 900; line-height: 1; color: var(--jaune-fonce); }

progress {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 8px;
  border: 0; border-radius: 999px; background: #EFE8DA; overflow: hidden;
}
progress::-webkit-progress-bar { background: #EFE8DA; border-radius: 999px; }
progress::-webkit-progress-value { background: linear-gradient(90deg, var(--jaune), var(--jaune-fonce)); border-radius: 999px; }
progress::-moz-progress-bar { background: linear-gradient(90deg, var(--jaune), var(--jaune-fonce)); border-radius: 999px; }

/* --- Boutons ------------------------------------------------------------------- */

.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 18px; border: 1.5px solid var(--bord-fort); border-radius: 12px;
  background: #fff; color: var(--encre); font: inherit; font-weight: 650; line-height: 1.2;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .08s;
}
.bouton:hover { border-color: var(--jaune-fonce); background: var(--jaune-voile); }
.bouton:active { transform: translateY(1px); }
.bouton.principal { background: var(--jaune); border-color: var(--jaune); box-shadow: 0 3px 0 var(--jaune-fonce); }
.bouton.principal:hover { background: var(--jaune-vif); border-color: var(--jaune-vif); }
.bouton.principal:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--jaune-fonce); }
.bouton.discret-bouton { border-color: transparent; background: transparent; color: var(--discret); }
.bouton.discret-bouton:hover { background: var(--fond); color: var(--encre); }
.bouton.petit { min-height: 36px; padding: 6px 12px; font-size: .88rem; }
.bouton.petit .icone { width: 16px; height: 16px; }
.bouton.large { width: 100%; }

/* --- Formulaires ------------------------------------------------------------------ */

/* :where() garde ces règles de base faciles à préciser ailleurs. */
:where(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea) {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--bord-fort); border-radius: 12px;
  background: #fff; color: var(--encre); font: inherit; font-size: 16px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--jaune-fonce); box-shadow: var(--anneau); }
input::placeholder, textarea::placeholder { color: #A99E8F; }
input:disabled { background: var(--fond); border-style: dashed; color: var(--discret); }
textarea { min-height: 96px; resize: vertical; }
select {
  appearance: none; padding-right: 40px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237A6F63' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
}
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
form > .etiquette { margin-top: 16px; }
.etiquette {
  display: flex; align-items: center; gap: 8px; margin: 0 0 8px;
  color: var(--encre); font-size: .95rem; font-weight: 700;
}
.etiquette .icone { width: 18px; height: 18px; color: var(--jaune-fonce); stroke-width: 2.2; }
.erreur-champ { margin: 8px 0 0; color: var(--rouge); font-size: .88rem; font-weight: 600; }
.en-erreur input:not([type=checkbox]):not([type=radio]), .en-erreur textarea { border-color: var(--rouge); background: #FFFBFA; }

.ligne { display: flex; flex-wrap: wrap; gap: 8px; }
.ligne > input { flex: 1 1 170px; min-width: 0; }

/* « Introuvable » : une case à cocher habillée en bouton. */
.bascule {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none;
  min-height: 46px; padding: 0 14px; border: 1.5px dashed var(--bord-fort); border-radius: 12px;
  color: var(--discret); font-size: .9rem; font-weight: 650; white-space: nowrap; cursor: pointer; user-select: none;
  transition: background .15s, border-color .15s, color .15s;
}
.bascule .icone { width: 16px; height: 16px; }
.bascule:hover { border-color: var(--encre); color: var(--encre); }
.bascule:has(input:checked) { background: var(--encre); border: 1.5px solid var(--encre); color: #fff; }
.bascule input, .pastille input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.bascule:has(input:focus-visible), .pastille:has(input:focus-visible) { outline: 3px solid rgba(252, 194, 22, .75); outline-offset: 2px; }

/* Source du numéro : des pastilles, jaunes une fois choisies. */
.pastilles { display: flex; flex-wrap: wrap; gap: 8px; }
.pastille {
  position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 7px 14px;
  border: 1.5px solid var(--bord-fort); border-radius: 999px; background: #fff; color: var(--texte);
  font-size: .92rem; font-weight: 600; cursor: pointer; user-select: none;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.pastille .icone { display: none; width: 16px; height: 16px; stroke-width: 2.8; }
.pastille:hover { border-color: var(--jaune-fonce); }
.pastille:has(input:checked) { background: var(--jaune); border-color: var(--jaune-fonce); color: var(--encre); box-shadow: 0 2px 0 var(--jaune-fonce); }
.pastille:has(input:checked) .icone { display: inline-block; }

/* --- Connexion ------------------------------------------------------------------ */

.page-connexion { background: #fff; }
.connexion { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; }
.connexion > .message { grid-column: 1 / -1; margin: 16px; }
.connexion-marque {
  position: relative; overflow: hidden; display: grid; place-items: center;
  padding: 44px 24px 72px; background: var(--jaune);
}
.connexion-marque::before, .connexion-marque::after { content: ""; position: absolute; border-radius: 50%; }
.connexion-marque::before { width: 340px; height: 340px; top: -130px; right: -100px; background: rgba(255, 255, 255, .16); }
.connexion-marque::after { width: 260px; height: 260px; bottom: -120px; left: -70px; background: rgba(219, 163, 12, .25); }
.connexion-marque img { position: relative; z-index: 1; width: min(300px, 82%); height: auto; }
.connexion-formulaire { display: flex; justify-content: center; padding: 0 16px 32px; }
.connexion-carte {
  position: relative; width: 100%; max-width: 400px; margin-top: -36px; padding: 28px 24px;
  background: #fff; border-radius: 22px; box-shadow: var(--ombre-forte);
}
.connexion-carte h1 { font-size: 1.7rem; margin: 8px 0 4px; }
.connexion-carte .bouton { margin-top: 24px; }
.surtitre {
  display: inline-flex; align-items: center; gap: 8px; margin: 0;
  color: #8A6A10; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.surtitre .icone { width: 16px; height: 16px; }

/* --- Écran de saisie --------------------------------------------------------------- */

.progression-lot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 20px; margin: 0 0 16px;
}
.progression-titre { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; flex: 1 1 0; min-width: 0; margin: 0; font-size: .95rem; }
.progression-titre .icone { color: var(--jaune-fonce); }
.progression-jauge {
  display: flex; align-items: center; gap: 12px; flex: 1 1 100%;
  color: var(--discret); font-size: .86rem; white-space: nowrap;
}
.progression-jauge progress { flex: 1; }

.fiche-grille { display: grid; gap: 16px; }
.fiche-infos { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fiche-infos > .carte { margin: 0; }

.identite h1 { font-size: 1.45rem; margin: 0; overflow-wrap: anywhere; }
.metier { margin: 0 0 8px; }
.raison-sociale { margin: 4px 0 0; color: var(--discret); font-size: .9rem; font-weight: 600; }
.details { display: grid; gap: 12px; margin: 16px 0 0; padding: 16px 0 0; border-top: 1px solid var(--bord); list-style: none; }
.details li { display: flex; align-items: flex-start; gap: 12px; }
.details li > .icone { margin-top: 2px; color: var(--jaune-fonce); }
.details small { display: block; margin-top: 2px; }
.details .badge { margin-left: 4px; }
.siret { font-size: .85rem; font-variant-numeric: tabular-nums; }

.recherches { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bouton-lien {
  display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px 12px;
  border: 1.5px solid var(--bord); border-radius: 14px; background: #fff; box-shadow: var(--ombre);
  color: var(--encre); font-size: .92rem; font-weight: 700; line-height: 1.2; text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.bouton-lien:hover { border-color: var(--jaune); box-shadow: var(--ombre-forte); transform: translateY(-1px); }
.bouton-lien:visited { color: #6D5E4C; }
.bouton-lien-icone {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px;
  background: var(--jaune); color: var(--encre); box-shadow: 0 2px 0 var(--jaune-fonce);
}

.saisie { margin: 0; padding-bottom: 0; }
.saisie .champ { margin: 0 0 22px; }
/* La barre d'enregistrement reste au bas de l'écran pendant qu'on remplit la fiche. */
.barre-actions {
  position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 0 -20px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--bord); border-radius: 0 0 var(--rayon) var(--rayon);
  background: #fff; box-shadow: 0 -10px 20px -14px rgba(43, 33, 24, .25);
}
.barre-actions .passer { order: 1; display: none; padding-left: 10px; padding-right: 10px; }
.barre-actions .rester { order: 2; display: none; }
.barre-actions .principal { order: 3; flex: 1 1 auto; }
.texte-long { display: none; }
/* Sur téléphone, « Passer » est en haut de la fiche : la barre du bas garde un seul bouton. */
.passer-haut { flex: none; min-height: 36px; padding: 6px 10px; font-size: .9rem; }

/* --- Listes de fiches ------------------------------------------------------------------ */

.chiffres { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 20px; }
.chiffre {
  display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 16px;
  border: 1px solid rgba(43, 33, 24, .05); border-radius: var(--rayon); background: #fff; box-shadow: var(--ombre);
  color: inherit; text-decoration: none;
}
.chiffre .valeur { color: var(--encre); font-size: 1.75rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.chiffre .libelle { color: var(--discret); font-size: .86rem; }
.chiffre .libelle strong { color: var(--encre); }
.chiffre progress { margin: 6px 0 2px; }
.chiffre-icone {
  display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 6px;
  border-radius: 11px; background: var(--jaune-pale); color: var(--encre);
}
.chiffre-icone.rouge { background: var(--rouge-pale); color: var(--rouge); }
.chiffre-lot { grid-column: 1 / -1; justify-content: center; }
a.chiffre-lot:hover { box-shadow: var(--ombre-forte); }

.filtres { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; }
.filtres select { flex: 1 1 170px; }
.filtres .recherche { flex: 2 1 220px; }
.filtres .bouton { flex: 1 1 100%; }
.recherche { position: relative; }
.recherche .icone { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--discret); pointer-events: none; }
.recherche input { padding-left: 42px; }

.liste-fiches { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ligne-fiche {
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "numero identite" "numero etat";
  align-items: center; gap: 6px 14px; padding: 12px 14px;
  border: 1px solid var(--bord); border-radius: 14px; background: #fff;
  color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s;
}
.ligne-fiche:hover { border-color: var(--jaune); box-shadow: var(--ombre); }
.numero {
  grid-area: numero; display: grid; place-items: center; align-content: center; width: 50px; height: 50px;
  border-radius: 12px; background: var(--jaune-pale); color: var(--encre);
  font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums;
}
.numero small { color: #8A6A10; font-size: .72rem; font-weight: 700; }
.ligne-identite { grid-area: identite; min-width: 0; }
.ligne-identite strong { display: block; overflow: hidden; color: var(--encre); text-overflow: ellipsis; white-space: nowrap; }
.ligne-identite small { color: var(--discret); }
.ligne-etat { grid-area: etat; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.ligne-telephone { color: var(--encre); font-weight: 650; font-variant-numeric: tabular-nums; }
.ligne-telephone:empty { display: none; }

.statut {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  background: #EEE9E1; color: var(--discret); font-size: .78rem; font-weight: 700; white-space: nowrap;
}
.statut::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.statut.a_traiter { background: var(--jaune-pale); color: #7A5A00; }
.statut.en_cours { background: var(--bleu-pale); color: var(--bleu); }
.statut.trouve { background: var(--vert-pale); color: var(--vert); }
.statut.introuvable { background: #EEE9E1; color: #5F564B; }
.statut.a_ne_pas_appeler, .statut.fermee { background: var(--rouge-pale); color: var(--rouge); }

.pages { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 18px; color: var(--discret); }

/* --- Tableau de bord ------------------------------------------------------------------ */

.grille-agents { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 12px; }
.agent { margin: 0; }
.agent.inactif { opacity: .7; }
.agent-tete { display: flex; align-items: center; gap: 12px; min-width: 0; }
.agent-tete strong { color: var(--encre); }
.agent-tete small { display: block; margin-top: 2px; }
.agent-chiffres { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 16px 0 0; }
.agent-chiffres div { padding: 8px 4px; border-radius: 10px; background: var(--fond); text-align: center; }
.agent-chiffres dt { color: var(--discret); font-size: .72rem; font-weight: 600; }
.agent-chiffres dd { margin: 2px 0 0; color: var(--encre); font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.agent-chiffres small { color: var(--discret); font-size: .68rem; font-weight: 600; }
.agent-fin { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; color: var(--discret); font-size: .9rem; }
.agent-fin .icone { width: 18px; height: 18px; color: var(--jaune-fonce); }
.agent-fin strong { color: var(--encre); }

.liste-lots { padding-top: 4px; padding-bottom: 4px; }
.lot {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--bord);
}
.lot:last-child { border-bottom: 0; }
.lot-entete { display: none; }
.lot-nom, .attribution, .lot-avancement, .lot-date { grid-column: 1 / -1; }
.lot-nom { font-weight: 700; white-space: nowrap; }
.attribution { display: flex; gap: 6px; margin: 0; }
.attribution select { min-height: 40px; padding-top: 6px; padding-bottom: 6px; }
.attribution .bouton { min-height: 40px; padding: 6px 14px; }
.lot-avancement { display: flex; align-items: center; gap: 10px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lot-chiffre { padding: 8px 10px; border-radius: 10px; background: var(--fond); color: var(--encre); font-weight: 800; font-variant-numeric: tabular-nums; }
.lot-chiffre::before { content: attr(data-libelle); display: block; color: var(--discret); font-size: .72rem; font-weight: 600; }
.lot-chiffre.rouge { color: var(--rouge); }
.lot-date { color: var(--discret); font-size: .85rem; }
.lot-date:empty { display: none; }

/* --- Comptes ------------------------------------------------------------------------------ */

.grille-comptes { display: grid; gap: 16px; align-items: start; }
.liste-comptes { margin: 0; padding: 0; list-style: none; }
.compte {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px 12px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--bord);
}
.compte:first-child { padding-top: 0; }
.compte:last-child { padding-bottom: 0; border-bottom: 0; }
.compte-infos strong { display: block; color: var(--encre); }
.compte-infos small { color: var(--discret); }
.compte.inactif .compte-infos, .compte.inactif .avatar { opacity: .55; }
.compte-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.compte-actions form { margin: 0; }
.identifiants {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px 16px;
  margin: 0 0 14px; padding: 16px; border-radius: 12px; background: var(--fond);
}
.identifiants dt { color: var(--discret); font-size: .9rem; font-weight: 700; }
.identifiants dd { margin: 0; }
.identifiants code { padding: 4px 10px; border: 1px solid var(--bord); border-radius: 8px; background: #fff; font-size: 1.1rem; }

/* --- Écrans plus larges ------------------------------------------------------------------ */

@media (max-width: 559px) {
  .pastille { min-height: 38px; padding: 6px 12px; font-size: .88rem; }
}

@media (min-width: 560px) {
  .marque img { height: 30px; }
  .marque-titre { display: inline; }
  .passer-haut { display: none; }
  .progression-jauge { flex: 0 1 440px; }
  .barre-actions .passer, .barre-actions .rester { display: inline-flex; }
  .barre-actions .principal { flex: 0 1 auto; margin-left: auto; }
  .texte-long { display: inline; }
  .texte-court { display: none; }
}

@media (min-width: 720px) {
  .conteneur { padding: 28px 24px 56px; }
  .carte { padding: 24px; }
  .barre-actions { margin: 0 -24px; padding: 16px 24px; }
  .chiffres { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .chiffre-lot { grid-column: span 2; }
  .filtres .bouton { flex: none; }
  .ligne-fiche { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "numero identite etat"; }
  .ligne-etat { flex-wrap: nowrap; justify-content: flex-end; gap: 16px; }
  .ligne-telephone { order: -1; }
  .compte { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .compte-actions { grid-column: auto; }
}

@media (min-width: 900px) {
  .navigation { display: flex; align-items: center; gap: 4px; }
  .profil { display: block; }
  .menu-mobile { display: none; }
  .connexion { grid-template-rows: none; grid-template-columns: 1.1fr 1fr; }
  .connexion-marque { padding: 48px; }
  .connexion-marque img { width: min(420px, 72%); }
  .connexion-formulaire { align-items: center; padding: 48px; }
  .connexion-carte { margin-top: 0; padding: 0; box-shadow: none; }
}

@media (min-width: 960px) {
  .fiche-grille { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 24px; align-items: start; }
  .fiche-infos { position: sticky; top: 16px; }
  .grille-comptes { grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); }
}

@media (min-width: 1024px) {
  .lot {
    grid-template-columns: minmax(170px, 1.2fr) minmax(240px, 1.5fr) minmax(140px, 1.1fr) repeat(4, minmax(56px, .5fr)) minmax(110px, .8fr);
    padding: 12px 0;
  }
  .lot-entete { display: grid; padding: 8px 0 10px; color: var(--discret); font-size: .78rem; font-weight: 700; }
  .lot-nom, .attribution, .lot-avancement, .lot-date { grid-column: auto; }
  .lot-chiffre { padding: 0; background: none; text-align: center; }
  .lot-chiffre::before { display: none; }
  .lot-entete span:nth-child(n+4):nth-child(-n+7) { text-align: center; }
  .lot-date:empty { display: block; }
}
