:root { --encre: #1d1a16; --doux: #4a443c; --trait: #e3ded6; --accent: #1f5fbf; --accent-fonce: #164a96; --accent-pale: #eef3fb; --vert: #1f6b43; --rouge: #b3261e; --fond: #f4f2ee; }
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 "Segoe UI", system-ui, -apple-system, sans-serif; color: var(--encre); background: var(--fond); }
a { color: var(--accent-fonce); }
h1 { font-size: 26px; margin: 0; }
h2 { font-size: 19px; margin: 0; }
small { color: var(--doux); }

.menu { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; padding: 14px 40px; background: #fff; border-bottom: 1px solid var(--trait); }
.menu a { color: var(--encre); text-decoration: none; font-weight: 600; padding: 6px 0; border-bottom: 3px solid transparent; }
.menu a.actif { border-color: var(--accent); }
.menu .marque { font-size: 20px; font-weight: 800; margin-right: 14px; }
.menu .sortie { margin-left: auto; font-weight: 400; color: var(--doux); }
.pastille { display: inline-block; min-width: 22px; padding: 0 7px; border-radius: 11px; background: var(--accent); color: #fff; font-size: 13px; text-align: center; }

main { max-width: 1240px; margin: 0 auto; padding: 28px 40px 60px; }
.barre { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 22px; }
.barre .actions { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.barre .info { margin: 0; }
.barre select { width: auto; max-width: min(420px, 100%); margin: 0; font-weight: 600; }
.barre form.filtre { min-width: 0; max-width: 100%; }
.carte > header h2 { min-width: 0; overflow-wrap: anywhere; }
.post textarea[name="texte"] { overflow: hidden; resize: vertical; }

.flash { padding: 12px 16px; border-radius: 10px; margin: 0 0 18px; font-weight: 600; }
.flash.ok { background: #e4f1e9; color: var(--vert); }
.flash.erreur { background: #fbeceb; color: var(--rouge); }

.carte { background: #fff; border: 1px solid var(--trait); border-radius: 12px; padding: 20px 22px; margin-bottom: 20px; }
.carte > header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; margin-bottom: 14px; }
.carte > header p { margin: 0; color: var(--doux); }
.carte > header .statut { margin-left: auto; }
.carte.etroit { max-width: 420px; margin: 12vh auto 0; }
.carte.etroit h1 { margin-bottom: 18px; }
.carte.etroit label { margin-bottom: 14px; }
.carte.alerte { border-color: var(--rouge); }

.post-grille { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px 26px; }
.post-grille > div { display: grid; gap: 14px; align-content: start; }
.post textarea[name="texte"] { min-height: 260px; line-height: 1.55; }
.deux { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 14px; }
.apercu { margin: 0; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--fond); display: flex; align-items: center; justify-content: center; color: var(--doux); }
.apercu img { width: 100%; height: 100%; object-fit: cover; display: block; }
.compteur { font-weight: 400; }
.compteur.trop { color: var(--rouge); font-weight: 700; }
ul.controles { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 15px; }
ul.controles .avert { color: #8a5a00; }
ul.controles .avert::before { content: "À vérifier : "; font-weight: 600; }

.defile { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-weight: 600; color: var(--doux); padding: 8px 10px; border-bottom: 2px solid var(--trait); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--trait); vertical-align: top; }
.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.pale td { color: #8a8379; }
tr.jour th { padding-top: 18px; color: var(--encre); font-size: 16px; }
tr.retard td { background: #fdf3f2; }
td.actions-cellule { white-space: nowrap; text-align: right; }
td.actions-cellule > * { display: inline-block; margin-left: 10px; vertical-align: middle; }
img.vignette { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; display: block; }
.manque { color: var(--rouge); font-weight: 600; white-space: nowrap; }
.vide, .info { color: var(--doux); }

label { display: block; font-weight: 600; font-size: 15px; }
input, select, textarea { display: block; width: 100%; margin-top: 5px; padding: 10px 12px; font: inherit; color: var(--encre); background: #fff; border: 1px solid #bdb6ab; border-radius: 8px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
label.case { display: flex; gap: 8px; align-items: center; font-weight: 400; margin: 8px 0; }
label.case input { width: auto; margin: 0; }

button, .bouton { display: inline-block; padding: 11px 20px; font: inherit; font-size: 17px; font-weight: 700; color: #fff; background: var(--accent); border: 0; border-radius: 8px; cursor: pointer; text-decoration: none; }
button:hover, .bouton:hover { background: var(--accent-fonce); }
button.secondaire { background: #fff; color: var(--doux); border: 1px solid #bdb6ab; font-weight: 600; }
button.secondaire:hover { background: var(--fond); }
button.danger { background: #fff; color: var(--rouge); border: 1px solid var(--rouge); }
button.danger:hover { background: #fbeceb; }
p.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 18px 0 0; }
p.actions button.danger { margin-left: auto; }
button.petit, a.petit-lien { padding: 5px 12px; font-size: 14px; background: #fff; color: var(--accent-fonce); border: 1px solid var(--accent); border-radius: 8px; font-weight: 600; white-space: nowrap; }
button.petit:hover, a.petit-lien:hover { background: var(--accent-pale); }
button.etat { padding: 4px 12px; font-size: 14px; border-radius: 20px; white-space: nowrap; }
button.etat.fait { background: #e4f1e9; color: var(--vert); }
button.etat.afaire { background: #fff; color: var(--doux); border: 1px solid #bdb6ab; }
.erreur { color: var(--rouge); font-weight: 600; }

.statut { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 13px; font-weight: 600; white-space: nowrap; background: var(--fond); color: var(--doux); }
.statut.attente { color: var(--accent-fonce); background: var(--accent-pale); }
.statut.fait { background: #e4f1e9; color: var(--vert); }
.statut.refus { background: #fbeceb; color: var(--rouge); }

details.retrait { display: inline-block; text-align: left; }
details.retrait summary { cursor: pointer; color: var(--rouge); font-size: 14px; }
details.retrait form { margin-top: 8px; white-space: normal; max-width: 260px; }
details.refuses summary { cursor: pointer; font-weight: 600; color: var(--doux); }
details.refuses ul { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 8px; }

@media (max-width: 900px) {
  .post-grille { grid-template-columns: 1fr; }
  .post-grille > div:last-child { order: -1; }
}
@media (max-width: 800px) {
  .menu { padding: 12px 18px; }
  main { padding: 20px 18px 40px; }
  .barre .actions { margin-left: 0; }
  .deux { grid-template-columns: 1fr; }
  .menu .sortie { margin-left: 0; }
  .carte { padding: 16px; }
  p.actions button { flex: 1 1 100%; }
  p.actions button.danger { margin-left: 0; }
  td.actions-cellule { white-space: normal; text-align: left; }
  td.actions-cellule > * { display: block; margin: 6px 0 0; }
}

/* ---------- Espaces clients (2026-10-20) ---------- */
.menu .site { margin-left: auto; font-weight: 400; color: var(--doux); }
.menu .site + .sortie { margin-left: 0; }
.sur { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--doux); }
h2.section { margin: 34px 0 14px; font-size: 21px; display: flex; align-items: center; gap: 10px; }
.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 18px; margin-bottom: 10px; }
.tuile { display: block; background: #fff; border: 1px solid var(--trait); border-radius: 12px; padding: 20px 22px; color: var(--encre); text-decoration: none; }
a.tuile:hover { border-color: var(--accent); }
.tuile h2 { margin-bottom: 8px; }
.tuile p { margin: 4px 0; }
.tuile .gros { font-size: 38px; font-weight: 800; line-height: 1.1; margin: 6px 0 0; }
.tuile .gros small { font-size: 18px; color: var(--doux); }
.tuile details { margin-top: 12px; }
.tuile details summary, details.modif summary, details.refus summary, details.carte summary { cursor: pointer; color: var(--accent-fonce); font-weight: 600; }
details.refus { margin-top: 16px; }
details.modif { display: inline-block; text-align: left; }
details.modif form { margin-top: 10px; min-width: 260px; display: grid; gap: 10px; white-space: normal; }
details.carte form { margin-top: 14px; }
pre.a-copier { margin: 0; padding: 14px 16px; white-space: pre-wrap; font: inherit; line-height: 1.55; background: var(--fond); border-radius: 10px; }
form.ligne { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px; margin-top: 18px; }
form.ligne label { flex: 1 1 280px; }
.statut.vert { background: #e4f1e9; color: var(--vert); }
.statut.rouge { background: #fbeceb; color: var(--rouge); }
.statut.ambre { background: #fdf3e1; color: #8a5a00; }
.statut.gris { background: var(--fond); color: var(--doux); }
.carte.alerte { border-width: 2px; }
