/* Feuille de style de base — sobre, lisible, utilisable sur mobile */
:root {
  --accent: #1f6feb; --fond: #f6f7f9; --carte: #fff; --texte: #1d2330; --discret: #667085;
  --bordure: #e3e6eb; --ok: #1a7f37; --alerte: #b42318;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--texte);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--fond); }
a { color: var(--accent); }
.entete { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between;
  padding: .6rem 1rem; background: var(--carte); border-bottom: 3px solid var(--accent); }
.marque { display: flex; align-items: center; gap: .5rem; font-weight: 600; text-decoration: none; color: var(--texte); }
.marque img { height: 32px; }
nav { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
nav a { text-decoration: none; }
.contenu { max-width: 1100px; margin: 0 auto; padding: 1rem; }
.carte { background: var(--carte); border: 1px solid var(--bordure); border-radius: 8px; padding: 1.25rem; }
.etroite { max-width: 480px; margin: 1.5rem auto; }
h1 { font-size: 1.4rem; margin: 0 0 1rem; }
h2 { font-size: 1.1rem; margin-top: 2rem; }
label, form > div { display: block; margin-bottom: .8rem; }
input, select, textarea { display: block; width: 100%; padding: .55rem; margin-top: .25rem; font: inherit;
  border: 1px solid var(--bordure); border-radius: 6px; background: #fff; }
input[type=checkbox] { display: inline; width: auto; }
input[type=color] { height: 2.4rem; padding: .15rem; }
button, .bouton { display: inline-block; padding: .55rem 1rem; font: inherit; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--bordure); background: #fff; color: var(--texte); text-decoration: none; }
.principal { background: var(--accent); border-color: var(--accent); color: #fff; }
button.lien { border: 0; background: none; color: var(--accent); padding: 0; }
.en-ligne { display: inline; margin: 0; }
.actions { display: flex; gap: 1rem; justify-content: flex-end; align-items: center; }
.barre { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.recherche { max-width: 360px; }
.tableau { width: 100%; border-collapse: collapse; background: var(--carte); }
.tableau th, .tableau td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--bordure); }
@media (max-width: 640px) { .tableau { display: block; overflow-x: auto; } }
.discret { color: var(--discret); }
.helptext { color: var(--discret); font-size: .85rem; }
.errorlist { color: var(--alerte); margin: .2rem 0; padding-left: 1rem; }
.message { padding: .6rem .8rem; border-radius: 6px; margin-bottom: 1rem; background: #e8f3ec; color: var(--ok); }
.message.error { background: #fdecea; color: var(--alerte); }
.pastille { padding: .1rem .5rem; border-radius: 99px; font-size: .85rem; }
.pastille.active { background: #e8f3ec; color: var(--ok); }
.pastille.suspendue { background: #fdecea; color: var(--alerte); }
.journal { padding-left: 1rem; } .journal time { color: var(--discret); }
.apercu-logo { max-height: 80px; }
code { background: #eef1f5; padding: .1rem .35rem; border-radius: 4px; }

/* --- Étape 2 : référentiels --- */
.grille { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.carte + .carte { margin-top: 1rem; }
.carte h2 { margin-top: 0; }
.pastille-couleur { display: inline-block; width: .9rem; height: .9rem; border-radius: 50%; vertical-align: middle; margin-right: .35rem; border: 1px solid rgba(0,0,0,.15); }
.jours { display: flex; flex-wrap: wrap; gap: .25rem .9rem; padding: 0; margin: .3rem 0; list-style: none; }
.jours div, .jours li { display: inline-flex; }
.jours label { display: inline-flex; gap: .3rem; align-items: center; margin: 0; }
.jours input { width: auto; margin: 0; }
.suggestions { position: relative; }
.suggestions ul { position: absolute; z-index: 10; left: 0; right: 0; margin: 0; padding: 0; list-style: none; background: #fff; border: 1px solid var(--bordure); border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.suggestions li button { display: block; width: 100%; text-align: left; border: 0; border-radius: 0; padding: .5rem .7rem; }
.suggestions li button:hover { background: #f0f4ff; }
.alerte { color: #a15c00; }
.message.warning { background: #fff4e5; color: #a15c00; }
.deux-colonnes { display: grid; gap: 0 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .deux-colonnes { grid-template-columns: 1fr; } }
.ligne-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.petit { font-size: .85rem; }
.site { border-left: 4px solid var(--accent); }
.inactif { opacity: .55; }
fieldset { border: 1px solid var(--bordure); border-radius: 6px; margin: 0 0 1rem; padding: .6rem .9rem; }
legend { padding: 0 .3rem; font-weight: 600; }
td form { display: inline; }
.feries { columns: 2; padding-left: 1rem; font-size: .9rem; }

/* --- Étape 3 : échéances --- */
.indicateurs { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.indicateurs div { display: flex; flex-direction: column; }
.indicateurs strong { font-size: 1.5rem; }
.indicateurs span { color: var(--discret); font-size: .85rem; }
tr.retard td:first-child { border-left: 4px solid var(--alerte); }
.nombre { text-align: right; font-variant-numeric: tabular-nums; }
.etiquette { display: inline-block; font-size: .75rem; padding: 0 .4rem; border-radius: 4px; background: #eef1f5; color: var(--discret); }
details > summary { cursor: pointer; margin: 1.5rem 0 .5rem; }

/* --- Étape 4 : calendrier --- */
.contenu:has(.calendrier-zone) { max-width: 1500px; }
.barre-calendrier { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; align-items: center; margin-bottom: .75rem; }
.titre-periode { font-size: 1.15rem; margin: 0 0 0 .5rem; }
.onglets { display: inline-flex; border: 1px solid var(--bordure); border-radius: 6px; overflow: hidden; }
.onglets a { padding: .45rem .8rem; text-decoration: none; color: var(--texte); background: #fff; }
.onglets a.actif { background: var(--accent); color: #fff; }
.filtre-laveurs { display: flex; gap: .8rem; flex-wrap: wrap; }
.filtre-laveurs label { display: inline-flex; align-items: center; gap: .25rem; margin: 0; }
.filtre-laveurs input { width: auto; margin: 0; }
.barre-propositions { margin-bottom: .75rem; }
.calendrier-zone { display: grid; grid-template-columns: 1fr 270px; gap: 1rem; align-items: start; }
.calendrier-zone.en-cours { opacity: .6; pointer-events: none; }
@media (max-width: 900px) { .calendrier-zone { grid-template-columns: 1fr; } }
.grille-calendrier { display: grid; gap: 4px; overflow-x: auto; }
.grille-calendrier.vue-semaine { grid-template-columns: 110px repeat(var(--colonnes), minmax(150px, 1fr)); }
.grille-calendrier.vue-jour { grid-template-columns: repeat(var(--colonnes), minmax(280px, 1fr)); }
.entete-jour, .entete-laveur, .coin { background: var(--carte); border: 1px solid var(--bordure); border-radius: 6px; padding: .4rem; font-size: .9rem; }
.entete-jour { display: flex; flex-direction: column; gap: .15rem; }
.entete-jour.aujourdhui { border-color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
.entete-jour.ferme, .jour-mois.ferme { background: #f3f3f3; }
.entete-laveur { border-left: 4px solid; font-weight: 600; }
.cellule { background: var(--carte); border: 1px solid var(--bordure); border-radius: 6px; padding: .35rem; min-height: 90px; display: flex; flex-direction: column; gap: .3rem; }
.cellule.indisponible { background: repeating-linear-gradient(45deg, #fafafa, #fafafa 6px, #f0f0f0 6px, #f0f0f0 12px); }
.cellule.survol, .a-placer.survol { outline: 2px dashed var(--accent); }
.jauge { display: flex; align-items: baseline; gap: .3rem; flex-wrap: wrap; padding: .15rem .3rem; border-radius: 4px; }
.jauge .total { font-weight: 700; font-variant-numeric: tabular-nums; }
.etat-ok .jauge { background: #e8f3ec; color: var(--ok); }
.etat-sous .jauge { background: #fff4e5; color: #a15c00; }
.etat-sur .jauge { background: #fdecea; color: var(--alerte); }
.etat-vide .jauge { background: #f3f4f6; }
.liste-cartes { display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.carte-int { background: #fff; border: 1px solid var(--bordure); border-left: 4px solid var(--accent); border-radius: 5px; padding: .3rem .4rem; font-size: .8rem; cursor: grab; }
.carte-int.statut-proposee { border-style: dashed; background: #f7faff; }
.carte-int.statut-realisee { opacity: .7; border-left-color: var(--ok); }
.carte-int.hors-fenetre, .carte-int.retard { border-left-color: var(--alerte); }
.carte-int.glisse { opacity: .4; }
.carte-int .ligne1 { display: flex; gap: .3rem; align-items: baseline; }
.carte-int .ligne1 strong { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carte-int .ligne2 { color: var(--discret); }
.carte-int .heure { font-variant-numeric: tabular-nums; color: var(--discret); }
.carte-int .pts { font-weight: 600; font-variant-numeric: tabular-nums; }
.actions-cellule { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.etape { border-bottom: 1px dotted var(--bordure); padding-bottom: .4rem; }
.etape .motif { display: inline; width: auto; max-width: 160px; padding: .2rem .3rem; font-size: .8rem; }
.a-placer { background: var(--carte); border: 1px solid var(--bordure); border-radius: 8px; padding: .6rem; max-height: 80vh; overflow-y: auto; display: flex; flex-direction: column; gap: .3rem; position: sticky; top: .5rem; }
.a-placer h2 { margin: 0; font-size: 1rem; }
.notification { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); background: #1d2330; color: #fff; padding: .7rem 1rem; border-radius: 8px; max-width: 90vw; z-index: 1000; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.notification.erreur { background: var(--alerte); }
.notification.avertissement { background: #a15c00; }
.grille-mois { display: grid; grid-template-columns: repeat(var(--colonnes), 1fr); gap: 4px; }
.jour-mois { background: var(--carte); border: 1px solid var(--bordure); border-radius: 6px; padding: .35rem; min-height: 80px; text-decoration: none; color: var(--texte); display: flex; flex-direction: column; gap: .15rem; }
.jour-mois:hover { border-color: var(--accent); }
.jour-mois.hors-mois { opacity: .45; }
.jour-mois .numero { font-weight: 600; }
.total-laveur { font-size: .8rem; font-variant-numeric: tabular-nums; border-radius: 4px; padding: 0 .3rem; }
.total-laveur.etat-ok { background: #e8f3ec; } .total-laveur.etat-sous { background: #fff4e5; } .total-laveur.etat-sur { background: #fdecea; }
.carte-tournee { height: 65vh; min-height: 360px; border-radius: 8px; border: 1px solid var(--bordure); margin-bottom: 1rem; }
.etape-carte span { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; font-weight: 700; font-size: .8rem; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }

/* --- Étape 5 : preuves --- */
.mini-preuve { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; border: 1px solid var(--bordure); margin-right: .2rem; vertical-align: middle; }
.preuve { display: inline-block; margin: 0 .5rem .8rem 0; max-width: 220px; }
.preuve img { max-width: 220px; max-height: 220px; border-radius: 6px; border: 1px solid var(--bordure); background: #fff; }

/* --- Étape 6 : e-mails --- */
.apercu-email { white-space: pre-wrap; font-family: inherit; background: #f8f9fb; border: 1px solid var(--bordure); border-radius: 6px; padding: .8rem; font-size: .9rem; }

/* --- Étape 7 : assistant IA --- */
.demande-ia { position: relative; }
.demande-ia > summary { list-style: none; display: inline-block; margin: 0; }
.demande-ia > summary::-webkit-details-marker { display: none; }
.demande-ia[open] > form { position: absolute; z-index: 20; top: 2.6rem; left: 0; width: min(440px, 90vw); box-shadow: 0 10px 30px rgba(0,0,0,.15); }

/* --- Étape 8 : plateforme --- */
.bandeau-acces { background: #3b0764; color: #fff; text-align: center; padding: .45rem 1rem; font-size: .9rem; }
.zone-danger { border-color: var(--alerte); }
