@font-face { font-family:"Lora"; font-style:normal; font-weight:400; font-display:swap; src:url("fonts/lora-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family:"Lora"; font-style:italic; font-weight:400; font-display:swap; src:url("fonts/lora-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family:"Lora"; font-style:normal; font-weight:600; font-display:swap; src:url("fonts/lora-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family:"Lora"; font-style:normal; font-weight:700; font-display:swap; src:url("fonts/lora-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family:"Lora"; font-style:italic; font-weight:700; font-display:swap; src:url("fonts/lora-latin-700-italic.woff2") format("woff2"); }
/* Transparence Citoyenne — Demandes CADA. Bleu : celui du site (--color-primary #16233f). */
:root {
  --bleu:#16233f; --bleu-fonce:#0f1a30; --bleu-clair:#24365c; --encre:#1f2733; --fond:#f4f5f7; --carte:#ffffff;
  --trait:#dfe2e8; --sourd:#5d6675; --alerte:#9b1c1c; --ok:#e6f0e8; --accent:var(--bleu); --rouge:#a13327; --serif:"Lora",Georgia,"Times New Roman",serif;
}
* { box-sizing:border-box; }
html { font-size:17px; }
body { margin:0; font-family:Arial,Helvetica,sans-serif; line-height:1.65; color:var(--encre); background:var(--fond); }
.conteneur { max-width:1180px; margin:0 auto; padding:0 28px; }

/* Bandeau */
.bandeau { background:var(--bleu); color:#fff; box-shadow:0 2px 6px rgba(0,0,0,.18); }
.bandeau .conteneur { display:flex; flex-wrap:wrap; gap:18px; justify-content:space-between; align-items:center; padding-top:16px; padding-bottom:16px; }
.marque { display:flex; align-items:center; gap:16px; color:#fff; text-decoration:none; font-weight:bold; font-size:1.15rem; }
.marque .logo { height:92px; width:auto; display:block; }
.marque div { font-weight:normal; font-size:1rem; opacity:.9; border-left:1px solid rgba(255,255,255,.35); padding-left:16px; }
.bandeau nav { display:flex; flex-wrap:wrap; align-items:center; gap:6px 22px; }
.bandeau nav a, .bandeau .lien { color:#fff; text-decoration:none; padding:6px 0; border-bottom:2px solid transparent; }
.bandeau nav a:hover, .bandeau .lien:hover { border-bottom-color:#fff; }
.lien { background:none; border:0; font:inherit; cursor:pointer; padding:0; margin:0; }
.en-ligne { display:inline; }

main { padding-top:34px; padding-bottom:64px; }
h1 { font-size:1.75rem; margin:.2em 0 .6em; color:var(--bleu-fonce); }
h2 { font-size:1.3rem; margin:2.2em 0 .8em; color:var(--bleu-fonce); }
p { margin:0 0 1em; }
a { color:var(--bleu); }
.entete-page { display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap; margin-bottom:22px; }
.actions { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }

/* Boutons */
.bouton, button { display:inline-block; background:var(--bleu); color:#fff; border:0; padding:11px 20px; border-radius:6px; font:inherit; font-size:.95rem; text-decoration:none; cursor:pointer; line-height:1.3; }
.bouton:hover, button:hover { background:var(--bleu-clair); }
.bouton.secondaire, button.secondaire { background:#e9ebf0; color:var(--encre); }
.bouton.secondaire:hover, button.secondaire:hover { background:#dadde5; }
button.danger, .bouton.danger { background:var(--alerte); }
.lien, .lien:hover { background:none; }

/* Cartes et tableaux */
.carte { background:var(--carte); border:1px solid var(--trait); border-radius:8px; padding:24px 28px; margin-bottom:24px; }
table { width:100%; border-collapse:separate; border-spacing:0; background:var(--carte); border:1px solid var(--trait); border-radius:8px; overflow:hidden; }
th, td { text-align:left; padding:15px 18px; border-bottom:1px solid var(--trait); vertical-align:top; }
tr:last-child td, tr:last-child th { border-bottom:0; }
th { font-weight:bold; background:#eceef3; color:var(--bleu-fonce); font-size:.92rem; }
tbody tr:hover { background:#f8f9fb; }
.dates th { width:16rem; }
td.case, th.case { width:44px; padding-right:0; }
input[type=checkbox] { width:18px; height:18px; cursor:pointer; }

/* Filtres et recherche */
.filtres { display:flex; flex-wrap:wrap; gap:10px; margin:0 0 24px; }
.filtres a { display:inline-block; padding:7px 16px; border:1px solid var(--trait); border-radius:20px; text-decoration:none; color:var(--encre); background:#fff; font-size:.92rem; }
.filtres a:hover { border-color:var(--bleu); }
.filtres a.actif { background:var(--bleu); border-color:var(--bleu); color:#fff; }
.recherche { display:flex; gap:12px; margin:0 0 20px; } .recherche input { flex:1; }
.barre-selection { display:flex; flex-wrap:wrap; align-items:center; gap:14px; margin:0 0 14px; color:var(--sourd); font-size:.92rem; }

/* Formulaires */
input[type=text], input[type=email], input[type=url], input[type=date], input[type=search], input[type=password], select, textarea {
  width:100%; padding:11px 13px; border:1px solid #b9bfcb; border-radius:6px; font:inherit; background:#fff; }
input:focus, select:focus, textarea:focus { outline:2px solid #9db4d8; border-color:var(--bleu); }
textarea { line-height:1.55; }
.formulaire { background:var(--carte); border:1px solid var(--trait); border-radius:8px; padding:28px 32px; max-width:860px; }
.formulaire p { margin:0 0 22px; } .formulaire label { display:block; font-weight:bold; margin-bottom:7px; }
.formulaire .helptext, .aide { font-size:.88rem; color:var(--sourd); margin-top:5px; display:block; }
.etroit { max-width:460px; }
.errorlist { color:var(--alerte); list-style:none; padding:0; margin:0 0 8px; }
.message { padding:14px 18px; border-radius:6px; background:var(--ok); margin:0 0 22px; }
.message.error { background:#f6e1e1; color:var(--alerte); }
.bandeau-corbeille { background:#fbf0d4; border:1px solid #e3cf95; border-radius:6px; padding:14px 18px; margin:0 0 22px; }

/* Fiche et journal */
.fiche { display:grid; grid-template-columns:14rem 1fr; gap:14px 20px; background:var(--carte); border:1px solid var(--trait); border-radius:8px; padding:24px 28px; }
.fiche dt { font-weight:bold; color:var(--bleu-fonce); } .fiche dd { margin:0; }
.journal { list-style:none; padding:0; margin:0; background:var(--carte); border:1px solid var(--trait); border-radius:8px; }
.journal li { padding:16px 22px; border-bottom:1px solid var(--trait); } .journal li:last-child { border-bottom:0; }
.horodatage { display:block; font-size:.82rem; color:var(--sourd); margin-bottom:3px; }
.statut { margin-bottom:18px; }

.message-mail { border:1px solid var(--trait); background:var(--carte); border-radius:8px; padding:18px 22px; margin:0 0 16px; }
.message-mail.sortant { border-left:5px solid var(--bleu); } .message-mail.entrant { border-left:5px solid #a67c1b; }
.message-mail .apercu { margin:10px 0; white-space:normal; } .pieces { font-size:.88rem; margin:8px 0 0; }
.etiquette { background:#f4e9c8; border-radius:10px; padding:2px 10px; font-size:.78rem; margin-left:8px; }
.rattachement { display:flex; gap:12px; margin-top:14px; } .rattachement select { flex:1; }

@media (max-width:760px) {
  html { font-size:16px; } .conteneur { padding:0 16px; }
  .fiche { grid-template-columns:1fr; gap:4px; } .fiche dd { margin-bottom:12px; }
  table { font-size:.9rem; } th, td { padding:11px 10px; }
  .marque .logo { height:68px; } .marque div { display:none; } .formulaire { padding:20px; }
}


/* ---------- Typographie variée : Lora (titres, accents) + Arial (texte courant) ---------- */
h1, h2, h3, .tuile .nombre, .marque div { font-family:var(--serif); }
h1 { font-weight:700; font-size:2.1rem; letter-spacing:-.01em; margin-bottom:.3em; }
h1::after { content:""; display:block; width:64px; height:4px; margin-top:10px; background:linear-gradient(90deg,var(--bleu) 0 50%,var(--rouge) 50% 100%); border-radius:2px; }
h2 { font-weight:600; font-size:1.4rem; padding-bottom:6px; border-bottom:1px solid var(--trait); }
.sous-titre { font-family:var(--serif); font-style:italic; color:var(--sourd); font-size:1.05rem; margin:0 0 26px; }
.etiquette-section, th, .fiche dt { text-transform:uppercase; letter-spacing:.07em; font-size:.74rem; font-weight:700; }
th { color:var(--bleu); }
.fiche dt { color:var(--sourd); padding-top:3px; }
.formulaire label { text-transform:uppercase; letter-spacing:.05em; font-size:.78rem; color:var(--bleu-fonce); }
.formulaire .helptext, .aide { font-style:italic; }
td a { font-weight:700; text-decoration:none; border-bottom:1px solid transparent; } td a:hover { border-bottom-color:var(--bleu); }
td.autorite { font-family:var(--serif); font-style:italic; }
td.objet { font-weight:600; }
td.date { color:var(--sourd); font-variant-numeric:tabular-nums; white-space:nowrap; }
.reference { font-weight:700; letter-spacing:.02em; font-variant-numeric:tabular-nums; }
.citation { font-family:var(--serif); font-style:italic; border-left:4px solid var(--rouge); padding:6px 0 6px 16px; margin:0; background:linear-gradient(90deg,#fbf4f3,transparent); }
strong { font-weight:700; } em { font-style:italic; }

/* ---------- Bandeau ---------- */
.bandeau { border-bottom:4px solid var(--rouge); }
.bandeau nav a { text-transform:uppercase; letter-spacing:.09em; font-size:.8rem; font-weight:700; padding:8px 2px; }
.bandeau nav a.actif { border-bottom-color:#fff; }
.badge-nav { background:var(--rouge); border-radius:10px; padding:1px 7px; font-size:.7rem; margin-left:4px; letter-spacing:0; }

/* ---------- Tuiles de statut ---------- */
.tuiles { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin:0 0 28px; }
.tuile { display:block; background:var(--carte); border:1px solid var(--trait); border-top:4px solid var(--bleu); border-radius:8px; padding:14px 18px 12px; text-decoration:none; color:var(--encre); transition:transform .12s, box-shadow .12s; }
.tuile:hover { transform:translateY(-2px); box-shadow:0 6px 16px rgba(22,35,63,.12); }
.tuile .nombre { display:block; font-size:2rem; font-weight:700; line-height:1.1; color:var(--bleu-fonce); }
.tuile .libelle { display:block; font-size:.78rem; text-transform:uppercase; letter-spacing:.06em; color:var(--sourd); margin-top:4px; }
.tuile.actif { background:var(--bleu); color:#fff; } .tuile.actif .nombre, .tuile.actif .libelle { color:#fff; }
.tuile.t-refus { border-top-color:var(--rouge); } .tuile.t-cloturee { border-top-color:#7b8494; }
.tuile.t-reception_prouvee { border-top-color:#2f7d5b; } .tuile.t-saisine_cada, .tuile.t-avis_ou_silence, .tuile.t-recours_ta { border-top-color:#5b4b9a; }
.lien-tout { font-size:.9rem; margin:0 0 12px; display:flex; gap:18px; flex-wrap:wrap; align-items:center; }

/* ---------- Pastilles de statut ---------- */
.pastille { display:inline-block; padding:3px 11px; border-radius:12px; font-size:.76rem; font-weight:700; letter-spacing:.03em; white-space:nowrap; background:#e6e9ef; color:#36415a; }
.statut-brouillon { background:#eceef1; color:#4b5565; } .statut-envoyee { background:#dce6f7; color:#1d3f7c; }
.statut-reception_prouvee { background:#d9efe4; color:#1f6a49; } .statut-refus { background:#f7dcd8; color:#8c2a1f; }
.statut-saisine_cada, .statut-avis_ou_silence { background:#e6e0f5; color:#46387f; } .statut-recours_ta { background:#f1d4e0; color:#7d1f4a; }
.statut-cloturee { background:#d5d9e0; color:#2c3442; }

/* ---------- Sélection ---------- */
.barre-selection { min-height:46px; }
.barre-selection [hidden] { display:none; }
tr.selectionnee { background:#eaf0fa !important; }

/* ---------- Page compte ---------- */
.grille-compte { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:20px; max-width:860px; }
.grille-compte .carte h2 { margin-top:0; }
.carte.rouge { border-top:4px solid var(--rouge); } .carte.bleue { border-top:4px solid var(--bleu); }

/* ---------- Import ---------- */
.apercu-total { display:flex; flex-wrap:wrap; gap:12px; margin:0 0 20px; }
.apercu-total span { background:var(--carte); border:1px solid var(--trait); border-radius:20px; padding:6px 16px; font-size:.9rem; }
.apercu-total b { font-family:var(--serif); font-size:1.15rem; }
tr.erreur td { background:#fbeceb; } tr.ignorer td { color:var(--sourd); font-style:italic; }
.petit { font-size:.82rem; color:var(--sourd); display:block; }

@media (max-width:900px) { .tuiles { grid-template-columns:repeat(2,1fr); } h1 { font-size:1.7rem; } }
