:root {
  --navy: #0b233d; --navy-2: #163a5f; --or: #c09644; --or-clair: #f3ead8;
  --texte: #1d1d1b; --discret: #6b7280; --fond: #f5f6f8; --carte: #fff; --bord: #e2e5ea;
  --rouge: #b42318; --vert: #1a7f4b;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--texte); background: var(--fond); }
a { color: var(--navy-2); }
.entete { background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; flex-wrap: wrap; }
.marque { display: flex; align-items: center; gap: 10px; color: var(--or); text-decoration: none; font-weight: 700; font-size: 18px; }
.marque img { width: 38px; height: 38px; border-radius: 6px; }
.marque small { color: #fff; font-weight: 400; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-left: 4px; }
.nav { display: flex; align-items: center; gap: 14px; }
.nav a, .nav .lien { color: #fff; text-decoration: none; }
.nav form { margin: 0; }
.contenu { max-width: 1150px; margin: 0 auto; padding: 20px 16px 60px; }
h1 { font-size: 22px; margin: 0 0 14px; color: var(--navy); }
h2 { font-size: 16px; margin: 0 0 10px; color: var(--navy); }
h3 { font-size: 14px; margin: 14px 0 4px; }
.carte { background: var(--carte); border: 1px solid var(--bord); border-radius: 10px; padding: 18px; margin-bottom: 16px; }
.etroite { max-width: 420px; margin: 40px auto; }
.vide { text-align: center; color: var(--discret); padding: 40px 18px; }
.alerte { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: #fff4e5; color: #7a4700; border: 1px solid #f5d29a; border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; }
.alerte form { margin: 0; }
.alerte .lien { color: #7a4700; text-decoration: underline; }
.discret { color: var(--discret); font-size: 13px; }
.erreur { background: #fdecea; color: var(--rouge); padding: 10px 12px; border-radius: 8px; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 9px 10px; font: inherit; font-weight: 400; border: 1px solid #cfd4dc; border-radius: 8px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--or); border-color: var(--or); }
.bouton { display: inline-block; background: var(--or); color: var(--navy); border: 0; border-radius: 8px; padding: 10px 16px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.bouton:hover { filter: brightness(1.05); }
.bouton.petit { padding: 6px 12px; font-size: 14px; }
.lien { background: none; border: 0; font: inherit; cursor: pointer; padding: 0; }
.frise { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.frise a { background: #fff; border: 1px solid var(--bord); border-radius: 999px; padding: 5px 12px; text-decoration: none; color: var(--texte); font-size: 13px; }
.frise a b { color: var(--discret); margin-left: 4px; }
.frise a.actif { background: var(--navy); color: #fff; border-color: var(--navy); }
.frise a.actif b { color: var(--or); }
.recherche { display: flex; gap: 8px; margin-bottom: 16px; }
.recherche input { margin: 0; }
.liste { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--bord); border-radius: 10px; overflow: hidden; }
.liste th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--discret); background: #fafbfc; padding: 10px 12px; border-bottom: 1px solid var(--bord); }
.liste td { padding: 10px 12px; border-bottom: 1px solid var(--bord); vertical-align: top; }
.liste tbody tr { cursor: pointer; }
.liste tbody tr:hover { background: var(--or-clair); }
.etape { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: #eef1f5; color: var(--navy); vertical-align: middle; }
.e-a_programmer { background: #fff4e5; color: #9a5b00; }
.e-programme { background: #e8f0fb; color: var(--navy-2); }
.e-visite_faite { background: #e6f4f7; color: #0d6476; }
.e-rapports_en_ligne { background: #efe8fb; color: #5b3a9a; }
.e-paye { background: #e6f5ec; color: var(--vert); }
.e-clos { background: #eef1f5; color: var(--discret); }
.e-annule { background: #fdecea; color: var(--rouge); }
fieldset { border: 0; border-top: 1px solid var(--bord); padding: 14px 0 0; margin: 0 0 6px; }
fieldset:first-of-type { border-top: 0; padding-top: 0; }
legend { font-weight: 700; color: var(--navy); padding-right: 8px; }
.grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; }
.cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 14px; margin-bottom: 12px; }
.case { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 0; padding: 4px 0; }
.case input { width: auto; margin: 0; }
.actions { display: flex; justify-content: flex-end; align-items: center; gap: 18px; margin-top: 8px; }
.titre-ligne { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.titre-ligne h1 { margin: 0; }
.deux-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
dl { display: grid; grid-template-columns: 130px 1fr; gap: 4px 10px; margin: 0; }
dt { color: var(--discret); font-size: 13px; }
dd { margin: 0; }
.notes { white-space: pre-wrap; }
.historique { list-style: none; margin: 0; padding: 0; }
.historique li { padding: 6px 0; border-bottom: 1px solid var(--bord); }
.fichiers { list-style: none; margin: 0 0 14px; padding: 0; }
.fichiers li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--bord); }
.actions-fichier { margin-left: auto; display: flex; gap: 14px; }
.actions-fichier form { margin: 0; }
.actions-fichier label { margin: 0; font-weight: 400; color: var(--navy-2); text-decoration: underline; cursor: pointer; }
.lien.rouge { color: var(--rouge); text-decoration: underline; }
.zone-depot { display: block; border: 2px dashed #cfd4dc; border-radius: 10px; padding: 26px; text-align: center; cursor: pointer; font-weight: 400; margin: 0; }
.zone-depot.survol { border-color: var(--or); background: var(--or-clair); }
.zone-depot.envoi { opacity: .6; pointer-events: none; }
.apercu { white-space: pre-wrap; background: #fafbfc; border: 1px solid var(--bord); border-radius: 8px; padding: 12px; font: inherit; }
.contact-entete { color: #fff; text-decoration: none; font-weight: 600; }
.etroit-client { max-width: 720px; }
.telechargements { list-style: none; margin: 0 0 12px; padding: 0; }
.telechargements a { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px; margin-bottom: 8px; border: 1px solid var(--bord); border-radius: 10px; text-decoration: none; color: var(--texte); font-weight: 600; }
.telechargements a:hover { border-color: var(--or); background: var(--or-clair); }
.centre { text-align: center; }
.pied { text-align: center; color: var(--discret); font-size: 12px; padding: 20px 16px 30px; }
@media (max-width: 760px) {
  .deux-col { grid-template-columns: 1fr; }
  .liste thead { display: none; }
  .liste, .liste tbody, .liste tr, .liste td { display: block; width: 100%; }
  .liste tr { border-bottom: 1px solid var(--bord); padding: 8px 0; }
  .liste td { border: 0; padding: 3px 12px; }
  .liste td::before { content: attr(data-l); display: inline-block; width: 95px; color: var(--discret); font-size: 12px; }
  .recherche { flex-direction: column; }
  dl { grid-template-columns: 1fr; }
}
