/* Interface pensée pour un usage sans formation : gros boutons, gros texte, couleurs franches.
   Fond doux, cartes blanches, une seule couleur d'action (bleu), des couleurs d'état (vert, orange, rouge). */
:root {
  --fond: #f3f5f9;
  --carte: #ffffff;
  --texte: #172033;
  --doux: #5d6778;
  --bord: #dce1ea;
  --bleu: #1f5fbf;
  --bleu-fonce: #174a96;
  --bleu-pale: #e9f0fc;
  --vert: #1a7a3c;
  --vert-pale: #e6f5ec;
  --rouge: #b42318;
  --rouge-pale: #fdecea;
  --orange: #b54708;
  --orange-pale: #fff3e2;
  --gris: #6b7280;
  --gris-pale: #eef0f4;
  --rayon: 14px;
  --ombre: 0 1px 2px rgba(16, 24, 40, 0.06), 0 4px 16px rgba(16, 24, 40, 0.06);
  --ombre-forte: 0 2px 4px rgba(16, 24, 40, 0.08), 0 10px 28px rgba(16, 24, 40, 0.10);
  color-scheme: light;
}

* { box-sizing: border-box; }
/* L'attribut hidden doit toujours cacher, même un élément stylé en flex ou grid (.message, .bouton…). */
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 19px;
  line-height: 1.45;
  color: var(--texte);
  background: var(--fond);
  -webkit-font-smoothing: antialiased;
}
h1 { font-size: 1.6em; line-height: 1.2; margin: 0.3em 0 0.5em; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; text-wrap: balance; }
h1 > .ico { width: 1.15em; height: 1.15em; color: var(--bleu); }
a { color: var(--bleu); }
:focus-visible { outline: 3px solid var(--bleu); outline-offset: 2px; }
.aide { color: var(--doux); }
strong { font-weight: 700; }

/* Icônes (sprite static/img/icones.svg) */
.ico { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.25em; }

/* Bandeau du haut */
.bandeau {
  position: sticky; top: 0; z-index: 10;
  background: var(--carte); box-shadow: 0 1px 0 var(--bord), 0 4px 14px rgba(16, 24, 40, 0.04);
}
.bandeau-in {
  max-width: 1000px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 14px;
}
.bandeau-marque {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  color: var(--texte); font-weight: 800; font-size: 1.1em; letter-spacing: -0.01em;
}
.bandeau-marque .ico { width: 34px; height: 34px; padding: 6px; border-radius: 10px; background: var(--bleu); color: #fff; }
.bandeau-qui { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; color: var(--doux); font-weight: 600; text-decoration: none; border-radius: 999px; padding: 2px 8px 2px 2px; }
.bandeau-qui:hover { background: var(--bleu-pale); }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--bleu-pale); color: var(--bleu); font-weight: 800;
}
#form-quitter { margin: 0; }
.contenu { max-width: 1000px; margin: 0 auto; padding: 16px 16px 48px; }

/* Boutons */
.bouton, .touche, .vignette, .tuile {
  min-height: 64px; border-radius: var(--rayon); border: 2px solid var(--bord);
  font: inherit; font-weight: 650; cursor: pointer;
}
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 22px; background: var(--carte); color: var(--texte); text-decoration: none;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  transition: border-color 0.15s, background-color 0.15s, transform 0.1s;
}
.bouton:hover { border-color: var(--bleu); }
.bouton:active, .touche:active, .tuile:active, .vignette:active { transform: scale(0.98); }
.bouton-principal { background: var(--bleu); border-color: var(--bleu); color: #fff; box-shadow: 0 2px 8px rgba(31, 95, 191, 0.28); }
.bouton-principal:hover { background: var(--bleu-fonce); border-color: var(--bleu-fonce); }
.bouton-danger { background: var(--carte); border-color: #f1b8b2; color: var(--rouge); }
.bouton-danger:hover { border-color: var(--rouge); background: var(--rouge-pale); }
.bouton-quitter { min-height: 48px; padding: 8px 16px; color: var(--doux); }

/* Tuiles de l'accueil et vignettes de connexion */
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.vignette, .tuile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 22px 16px; background: var(--carte); color: var(--texte); text-decoration: none; text-align: center;
  font-size: 1.1em; min-height: 150px; border-color: transparent; box-shadow: var(--ombre);
  position: relative; transition: box-shadow 0.15s, border-color 0.15s, transform 0.1s;
}
.vignette:hover, .tuile:hover, .vignette:focus-visible, .tuile:focus-visible {
  border-color: var(--bleu); box-shadow: var(--ombre-forte); outline: none;
}
.icone {
  width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center;
  background: var(--bleu-pale); color: var(--bleu);
}
.icone .ico { width: 32px; height: 32px; }
.tuile:first-child .icone { background: var(--bleu); color: #fff; }
.vignette .avatar { width: 64px; height: 64px; font-size: 1.5em; }
.vignette-bloquee { color: var(--doux); border: 2px dashed var(--bord); box-shadow: none; background: var(--gris-pale); }
.vignette-bloquee .avatar { background: var(--carte); color: var(--doux); }
.cadenas { position: absolute; top: 12px; right: 12px; color: var(--orange); }

/* Messages */
.message {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 14px 18px; border-radius: 12px; font-weight: 600; border: 0; border-left: 6px solid;
}
.message-erreur, .message-error { background: var(--rouge-pale); border-color: var(--rouge); color: var(--rouge); }
.message-info { background: var(--bleu-pale); border-color: var(--bleu); color: var(--bleu-fonce); }
.message-success { background: var(--vert-pale); border-color: var(--vert); color: var(--vert); }

.lien-retour { display: inline-flex; align-items: center; gap: 6px; padding: 10px 0; font-weight: 600; text-decoration: none; }
.lien-retour:hover { text-decoration: underline; }

/* Clavier du code */
.clavier-form { max-width: 380px; }
.ronds { display: flex; gap: 20px; justify-content: center; margin: 18px 0; }
.ronds span { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--bleu); transition: background-color 0.12s; }
.ronds span.plein { background: var(--bleu); }
.champ-code { width: 100%; font-size: 1.5em; padding: 10px; text-align: center; letter-spacing: 0.5em; }
.avec-clavier .champ-code { position: absolute; left: -9999px; }
.clavier { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.touche { background: var(--carte); font-size: 1.7em; min-height: 78px; border-color: transparent; box-shadow: var(--ombre); color: var(--texte); }
.touche:hover { border-color: var(--bleu); }
.touche-effacer, .touche-valider { font-size: 0.85em; }
.touche-effacer { color: var(--doux); background: var(--gris-pale); box-shadow: none; }
.touche-valider { background: var(--bleu); color: #fff; }
.avec-clavier .touche-valider { visibility: hidden; }

/* Tableaux (équipe, historique) */
table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); overflow: hidden; }
th, td { padding: 14px; border-bottom: 1px solid var(--bord); text-align: left; vertical-align: middle; }
th { font-size: 0.72em; text-transform: uppercase; letter-spacing: 0.07em; color: var(--doux); background: #f8f9fc; }
tr:last-child td { border-bottom: 0; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px;
  font-weight: 700; font-size: 0.8em; white-space: nowrap;
}
.badge .ico { width: 1.1em; height: 1.1em; }
.badge-active { background: var(--vert-pale); color: var(--vert); }
.badge-bloquee { background: var(--orange-pale); color: var(--orange); }
.badge-desactivee { background: var(--gris-pale); color: var(--gris); }
.badge-retard { background: var(--rouge-pale); color: var(--rouge); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.actions form { margin: 0; }
.actions .bouton { min-height: 52px; padding: 8px 16px; }
.filtres { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: end; margin-bottom: 16px; }
.filtres label { margin-top: 8px; }

/* Champs de formulaire */
label { display: block; font-weight: 700; margin: 16px 0 6px; }
input[type=text], input[type=password], input[type=email], input[type=date], input[type=search], select {
  width: 100%; max-width: 420px; min-height: 58px; font: inherit; padding: 12px 14px;
  border: 2px solid var(--bord); border-radius: 12px; background: var(--carte); color: var(--texte);
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea {
  width: 100%; font: inherit; padding: 12px 14px; min-height: 160px; resize: vertical;
  border: 2px solid var(--bord); border-radius: 12px; background: var(--carte); color: var(--texte);
}
/* Mot de passe avec le petit œil pour l'afficher */
.champ-mdp { position: relative; display: block; max-width: 420px; }
.champ-mdp input { padding-right: 58px; }
.oeil {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  width: 46px; height: 46px; display: grid; place-items: center;
  border: 0; border-radius: 10px; background: transparent; color: var(--gris); cursor: pointer;
}
.oeil:hover, .oeil:focus-visible { background: var(--bleu-pale); color: var(--bleu); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--bleu); box-shadow: 0 0 0 4px var(--bleu-pale); outline: none; }
.code-affiche {
  font-size: 3.6em; font-weight: 800; letter-spacing: 0.3em; margin: 16px 0; padding: 18px 24px;
  display: inline-block; color: var(--bleu); background: var(--bleu-pale); border-radius: var(--rayon);
  font-variant-numeric: tabular-nums;
}

/* Prothèses : formulaire de commande */
.formulaire { background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 8px 22px 22px; }
.champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px 20px; }
.champ { min-width: 0; }
.champ input, .champ select { max-width: none; }
.champ .aide { display: block; font-size: 0.82em; margin-top: 5px; }
.champ-erreur input, .champ-erreur select { border-color: var(--rouge); background: #fffafa; }
.erreur { display: block; color: var(--rouge); font-weight: 600; font-size: 0.88em; margin-top: 5px; }
.bloc { margin: 22px 0; padding-top: 18px; border-top: 2px solid var(--fond); }
.libelle { font-weight: 700; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.libelle .ico { color: var(--bleu); }
.facultatif { font-weight: 400; color: var(--doux); }
.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puce {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 8px 18px; margin: 0;
  border: 2px solid var(--bord); border-radius: 12px; background: var(--carte); color: var(--texte);
  font-weight: 650; cursor: pointer; text-decoration: none; transition: border-color 0.15s, background-color 0.15s;
}
.puce:hover { border-color: var(--bleu); }
.puce input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.puce:has(input:checked), .puce-active { background: var(--bleu); border-color: var(--bleu); color: #fff; }
.puce:has(input:focus-visible) { outline: 3px solid var(--bleu); outline-offset: 2px; }
.puce-teinte { min-width: 66px; font-variant-numeric: tabular-nums; }

/* Schéma dentaire (numérotation FDI) */
.schema-boite { overflow-x: auto; padding: 14px; margin: 6px 0 10px; background: #f8f9fc; border-radius: var(--rayon); }
.schema { min-width: 620px; display: flex; flex-direction: column; gap: 6px; }
.arcade { display: grid; grid-template-columns: repeat(8, 1fr) 14px repeat(8, 1fr); gap: 5px; align-items: end; }
.arcade.bas { align-items: start; }
.milieu { align-self: stretch; border-left: 2px dashed var(--bord); margin-left: 6px; }
.dent { display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: 0; cursor: pointer; padding: 2px; color: var(--texte); font: inherit; }
.arcade.bas .dent { flex-direction: column-reverse; }
.dent .forme { width: 100%; border: 2px solid #b7bfcc; background: var(--carte); transition: background-color 0.12s, border-color 0.12s; }
.arcade.haut .forme { border-radius: 12px 12px 45% 45%; }
.arcade.bas .forme { border-radius: 45% 45% 12px 12px; }
.dent[data-g="m"] .forme { height: 46px; max-width: 40px; }
.dent[data-g="p"] .forme { height: 50px; max-width: 32px; }
.dent[data-g="c"] .forme { height: 58px; max-width: 28px; }
.dent[data-g="i"] .forme { height: 54px; max-width: 26px; }
.dent b { font-size: 0.78em; color: var(--doux); font-variant-numeric: tabular-nums; }
.dent.choisie .forme { background: var(--bleu); border-color: var(--bleu); }
.dent.inter .forme { background: repeating-linear-gradient(45deg, var(--bleu-pale) 0 5px, var(--bleu) 5px 8px); border-color: var(--bleu); }
.dent.choisie b, .dent.inter b { color: var(--bleu); font-weight: 800; }
.dent:hover .forme, .dent:focus-visible .forme { border-color: var(--bleu); }
.separ { display: flex; justify-content: space-between; font-size: 0.72em; color: var(--doux); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }

/* Prothèses : liste et fiche */
.recherche { background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 4px 18px 18px; margin: 16px 0; }
.recherche input[type=search] { flex: 1 1 240px; max-width: none; }
.filtres-puces { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.liste-cas { display: flex; flex-direction: column; gap: 12px; }
.carte-cas {
  display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 16px 22px; background: var(--carte);
  border: 2px solid transparent; border-radius: var(--rayon); color: var(--texte); text-decoration: none;
  box-shadow: var(--ombre); position: relative; overflow: hidden; transition: border-color 0.15s, box-shadow 0.15s;
}
.carte-cas::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--orange); }
.carte-cas:hover, .carte-cas:focus-visible { border-color: var(--bleu); box-shadow: var(--ombre-forte); outline: none; }
.carte-retard::before { background: var(--rouge); }
.carte-tete { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 1.05em; }
.carte-cas .aide { font-size: 0.88em; }
h1 .badge { font-size: 0.5em; }
.infos {
  display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0;
  background: var(--carte); padding: 20px 22px; border-radius: var(--rayon); box-shadow: var(--ombre);
}
.infos dt { color: var(--doux); }
.infos dd { margin: 0; font-weight: 650; }
form.bloc { background: var(--carte); border: 0; border-radius: var(--rayon); box-shadow: var(--ombre); padding: 18px 22px; }

/* Livraisons du matin et réception */
.bouton-vert { background: var(--vert); border-color: var(--vert); color: #fff; box-shadow: 0 2px 8px rgba(26, 122, 60, 0.28); }
.bouton-vert:hover { background: #14612f; border-color: #14612f; }
.tuile .compteur {
  position: absolute; top: 12px; right: 12px; min-width: 34px; height: 34px; padding: 0 9px; border-radius: 17px;
  background: var(--orange); color: #fff; font-weight: 800; display: grid; place-items: center; font-variant-numeric: tabular-nums;
}
h2.groupe { font-size: 0.82em; text-transform: uppercase; letter-spacing: 0.07em; color: var(--doux); margin: 28px 0 10px; display: flex; align-items: center; gap: 10px; }
.compteur-petit { background: var(--gris-pale); color: var(--texte); border-radius: 999px; padding: 1px 10px; letter-spacing: 0; }
.vide { color: var(--doux); background: var(--carte); border: 2px dashed var(--bord); border-radius: var(--rayon); padding: 18px; text-align: center; margin: 0; }
.carte-matin { flex-direction: row; align-items: center; gap: 14px; flex-wrap: wrap; }
.carte-lien { flex: 1 1 260px; display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none; min-width: 0; }
.carte-matin .bouton { flex: 0 0 auto; min-width: 150px; }
.carte-recue::before { background: var(--vert); }
.comparer { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 12px; }
.comparer > div { background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 14px 18px; display: flex; flex-direction: column; gap: 4px; }
.comparer .grand { font-size: 1.6em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.cache-fichier { position: absolute; width: 1px; height: 1px; opacity: 0; }
.zone-photo {
  display: grid; place-items: center; min-height: 200px; margin: 0; padding: 16px; border: 3px dashed var(--bord);
  border-radius: var(--rayon); background: #f8f9fc; color: var(--bleu); cursor: pointer; text-align: center; font-weight: 700;
}
.zone-photo:hover { border-color: var(--bleu); }
.zone-photo #invite { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.zone-photo #invite .ico { width: 56px; height: 56px; }
.zone-photo img { max-width: 100%; max-height: 320px; border-radius: 10px; }
.encadre-vert { background: var(--vert-pale); border-radius: var(--rayon); padding: 16px 20px; margin: 0 0 18px; }
.encadre-vert .libelle .ico { color: var(--vert); }
.texte-copie {
  background: var(--carte); border: 2px dashed var(--bord); border-radius: 12px; padding: 12px 14px; margin: 6px 0 12px;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.92em; user-select: all;
}

@media (max-width: 520px) {
  body { font-size: 18px; }
  .grille { grid-template-columns: 1fr 1fr; gap: 12px; }
  .vignette, .tuile { min-height: 120px; font-size: 1em; padding: 14px 10px; }
  .icone { width: 52px; height: 52px; border-radius: 15px; }
  .icone .ico { width: 26px; height: 26px; }
  .bandeau-nom { display: none; }
  .bandeau-marque span { display: none; }
  .formulaire { padding: 4px 14px 16px; }
  .infos { grid-template-columns: 1fr; gap: 2px; }
  .infos dd { margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Alertes et relance du labo */
.cloche { position: relative; display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; color: var(--doux); margin-left: auto; }
.cloche:hover { background: var(--gris-pale); }
.cloche-active { color: var(--rouge); }
.cloche .ico { width: 26px; height: 26px; }
.cloche .pastille {
  position: absolute; top: 2px; right: 0; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: var(--rouge); color: #fff; font-size: 0.7em; font-weight: 800; display: grid; place-items: center;
}
.cloche + .bandeau-qui { margin-left: 0; }
.compteur-rouge { background: var(--rouge) !important; }
.icone-alerte { background: var(--rouge-pale); color: var(--rouge); }
.alerte { display: flex; gap: 10px; align-items: flex-start; padding: 14px 18px; border-radius: 12px; margin: 0 0 12px; border-left: 6px solid; }
.alerte-rouge { background: var(--rouge-pale); border-color: var(--rouge); color: var(--rouge); }
.alerte-orange { background: var(--orange-pale); border-color: var(--orange); color: var(--orange); }
.alerte span { color: var(--texte); }
.alerte strong { color: inherit; }
.alerte-rouge strong { color: var(--rouge); }
.alerte-orange strong { color: var(--orange); }
.carte-alerte-rouge::before { background: var(--rouge); }
.carte-alerte-orange::before { background: var(--orange); }
.carte-alerte-rouge .titre-alerte { color: var(--rouge); }
.carte-alerte-orange .titre-alerte { color: var(--orange); }
.bloc-relance { background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 16px 22px; margin: 0 0 18px; }
.bouton-whatsapp { border-color: #25a244; color: #157a32; }
.bouton-whatsapp:hover { background: #ebf8ee; border-color: #157a32; }
.noter-relance { border-top: 2px solid var(--fond); margin-top: 14px; padding-top: 6px; }
.relances { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.alerte-pose label { margin-top: 0; }

/* Tarifs du labo */
.tableau-tarifs { overflow-x: auto; border-radius: var(--rayon); box-shadow: var(--ombre); margin-bottom: 20px; }
.tableau-tarifs table { box-shadow: none; min-width: 640px; }
td.prix { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.prix-form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 0; }
.prix-form input { min-height: 46px; padding: 8px 10px; max-width: 150px; }
.prix-form input[name=prix] { max-width: 100px; }
.prix-form .bouton { min-height: 46px; padding: 6px 14px; }
.anciens { margin-top: 6px; font-size: 0.85em; color: var(--doux); }
.anciens summary { cursor: pointer; }
.deux-colonnes { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; align-items: start; }
.deux-colonnes .formulaire { margin: 0; }
.mot-de-passe-affiche { font-size: 2em; letter-spacing: 0.08em; }

/* Contrôle des factures */
.chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 14px 0 6px; }
.chiffre { border-radius: var(--rayon); padding: 14px 18px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--ombre); }
.chiffre strong { font-size: 1.9em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.chiffre-rouge { background: var(--rouge-pale); color: var(--rouge); }
.chiffre-orange { background: var(--orange-pale); color: var(--orange); }
.chiffre-bleu { background: var(--bleu-pale); color: var(--bleu-fonce); }
pre.texte-copie { white-space: pre-wrap; }

/* Suggestions (F9) */
.suggestions { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.suggestions li { background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 14px 18px; }
.suggestions .texte-suggestion { white-space: pre-wrap; margin: 8px 0; }

/* Refaits (F8 bis) */
.bouton-orange { border-color: #f3c48c; color: var(--orange); }
.bouton-orange:hover { border-color: var(--orange); background: var(--orange-pale); }
.refait-a-valider { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.refait-a-valider form { display: inline; }

/* Tableaux larges : ils défilent dans leur cadre au lieu d'élargir toute la page (téléphone). */
.tableau-defile { overflow-x: auto; border-radius: var(--rayon); box-shadow: var(--ombre); margin-bottom: 20px; -webkit-overflow-scrolling: touch; }
.tableau-defile table { box-shadow: none; }
.case-droit { width: 28px; height: 28px; accent-color: var(--bleu); cursor: pointer; }
.badge-refait { background: var(--orange-pale); color: var(--orange); }
.filtre { display: flex; flex-direction: column; min-width: 200px; flex: 1 1 200px; }
.refait-a-valider .actions { display: flex; flex-wrap: wrap; gap: 10px; }
/* Choix d'un fichier (facture PDF, tableau CSV) : un vrai gros bouton. */
input[type=file] { font: inherit; max-width: 100%; }
input[type=file]::file-selector-button {
  font: inherit; font-weight: 700; min-height: 58px; padding: 12px 18px; margin-right: 12px; cursor: pointer;
  border: 2px solid var(--bleu); border-radius: 12px; background: var(--carte); color: var(--bleu);
}

/* Avatars (Mon profil) */
.avatar-dessin { background: var(--bleu-pale); font-size: 1.4em; line-height: 1; }
.vignette .avatar-dessin { font-size: 2.2em; }
.choix-avatars { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.choix-avatar {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px;
  background: var(--carte); border: 2px solid var(--bord); border-radius: 14px; cursor: pointer; font-weight: 600;
  text-align: center;
}
.choix-avatar .avatar { width: 56px; height: 56px; font-size: 1.8em; }
.choix-avatar input { position: absolute; opacity: 0; }
.choix-avatar:has(input:checked) { border-color: var(--bleu); box-shadow: 0 0 0 3px var(--bleu-pale); }
.choix-avatar:has(input:focus-visible) { outline: 3px solid var(--bleu); outline-offset: 2px; }
.actions-avatar { grid-column: 1 / -1; margin: 8px 0 0; }
