/* Les Jardins d'Idalie — thème issu du logo (verts) + accents colorés */
:root {
  --vert: #3f7d3a;
  --vert-fonce: #1f5c17;
  --vert-clair: #e8f2e4;
  --olive: #667f10;
  --olive-clair: #f0f4dc;
  --orange: #d9831a;
  --orange-clair: #fdf0dc;
  --rouge: #c0392b;
  --rouge-clair: #fbe6e2;
  --bleu: #2f6fa8;
  --bleu-clair: #e2eef8;
  --gris: #6b7280;
  --gris-clair: #eceeea;
  --fond: #f3f6ef;
  --carte: #ffffff;
  --texte: #1c291a;
  --texte-doux: #5d6b5a;
  --bordure: #dbe3d5;
  --rayon: 14px;
  --ombre: 0 1px 2px rgba(31, 60, 23, .06), 0 6px 18px rgba(31, 60, 23, .06);
  --largeur-menu: 268px;
  --fond-menu: #eef1ea;
}

/* ---------- Thème sombre (automatique ou forcé) ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --vert: #5aa352; --vert-fonce: #8fd486; --vert-clair: #22331f;
  --olive: #a9c24a; --olive-clair: #2a3315; --orange: #e9a04a; --orange-clair: #3a2a14;
  --rouge: #ef6b5b; --rouge-clair: #3b1d19; --bleu: #6aa8e0; --bleu-clair: #172a3b;
  --gris: #9aa3ad; --gris-clair: #2a2f2a; --fond: #121612; --carte: #1b211a; --fond-menu: #161b15;
  --texte: #e6ece3; --texte-doux: #a2afa0; --bordure: #2e382c;
  --ombre: 0 1px 2px rgba(0,0,0,.4);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
  --vert: #5aa352; --vert-fonce: #8fd486; --vert-clair: #22331f;
  --olive: #a9c24a; --olive-clair: #2a3315; --orange: #e9a04a; --orange-clair: #3a2a14;
  --rouge: #ef6b5b; --rouge-clair: #3b1d19; --bleu: #6aa8e0; --bleu-clair: #172a3b;
  --gris: #9aa3ad; --gris-clair: #2a2f2a; --fond: #121612; --carte: #1b211a; --fond-menu: #161b15;
  --texte: #e6ece3; --texte-doux: #a2afa0; --bordure: #2e382c;
  --ombre: 0 1px 2px rgba(0,0,0,.4);
  }
}


* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--fond);
  color: var(--texte);
  line-height: 1.5;
  font-size: 15px;
}
a { color: var(--vert-fonce); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-size: 1.7rem; font-family: Georgia, "Times New Roman", serif; font-weight: 600; color: var(--vert-fonce); }
h2 { font-size: 1.05rem; }
h3 { font-size: .95rem; margin-bottom: .3rem; }
.muted { color: var(--texte-doux); }
small { font-size: .8rem; }

/* ---------- Mise en page ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--largeur-menu);
  background: var(--fond-menu);
  border-right: 1px solid var(--bordure);
  display: flex; flex-direction: column; gap: .7rem; padding: .9rem .8rem; overflow-y: auto; z-index: 30;
}
.carte-menu { background: var(--carte); border-radius: 16px; box-shadow: var(--ombre); }
.marque { display: block; padding: .5rem .7rem; background: #fff; }
.marque img { width: 100%; height: auto; display: block; border-radius: 8px; }
.copro-active { display: flex; align-items: center; gap: .7rem; padding: .65rem .8rem; }
.copro-active small { display: block; font-size: .64rem; letter-spacing: .07em; color: var(--texte-doux); font-weight: 600; }
.copro-active strong { display: block; font-size: .95rem; line-height: 1.2; }
.copro-ico { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--vert-clair); color: var(--vert-fonce); }
.menu-outils { display: flex; gap: .6rem; }
.outil { flex: 1; display: grid; place-items: center; height: 44px; color: var(--texte-doux); text-decoration: none; }
.outil:hover { color: var(--vert-fonce); }

nav { border-top: 1px solid var(--bordure); padding-top: .4rem; }
.nav-section {
  --accent: var(--texte-doux); --fond-section: transparent; --fond-actif: rgba(63, 125, 58, .14);
  border-radius: 14px; padding: .15rem .35rem .3rem; margin-bottom: .45rem; background: var(--fond-section);
}
.s-haut { --accent: var(--texte); --fond-section: transparent; --fond-actif: rgba(63, 125, 58, .16); padding: 0 .35rem; }
.s-suivi { --accent: #0b6b60; --fond-section: #dcefec; --fond-actif: #bfe2dc; }
.s-decisions { --accent: #93400f; --fond-section: #fbe6d6; --fond-actif: #f6cfb2; }
.s-echanges { --accent: #6228c9; --fond-section: #ebe4fb; --fond-actif: #d8cbf6; }
.s-ressources { --accent: #4b5563; --fond-section: #e6e8ea; --fond-actif: #d1d5d9; }
:root[data-theme="dark"] .s-suivi { --accent: #5fd3c4; --fond-section: #14302c; --fond-actif: #1d4a43; }
:root[data-theme="dark"] .s-decisions { --accent: #f4a46e; --fond-section: #38220f; --fond-actif: #55331a; }
:root[data-theme="dark"] .s-echanges { --accent: #bfa2fb; --fond-section: #2a1f47; --fond-actif: #3d2d68; }
:root[data-theme="dark"] .s-ressources { --accent: #b6bec8; --fond-section: #23282c; --fond-actif: #343b41; }
:root[data-theme="dark"] .s-haut { --fond-actif: #2b3d28; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .s-suivi { --accent: #5fd3c4; --fond-section: #14302c; --fond-actif: #1d4a43; }
  :root:not([data-theme="light"]) .s-decisions { --accent: #f4a46e; --fond-section: #38220f; --fond-actif: #55331a; }
  :root:not([data-theme="light"]) .s-echanges { --accent: #bfa2fb; --fond-section: #2a1f47; --fond-actif: #3d2d68; }
  :root:not([data-theme="light"]) .s-ressources { --accent: #b6bec8; --fond-section: #23282c; --fond-actif: #343b41; }
  :root:not([data-theme="light"]) .s-haut { --fond-actif: #2b3d28; }
}
.nav-groupe {
  margin: .55rem .5rem .2rem; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  font-weight: 800; color: var(--accent);
}
.nav-lien {
  display: flex; align-items: center; gap: .75rem;
  padding: .5rem .7rem; margin: 1px 0; border-radius: 10px; text-decoration: none;
  color: var(--texte); font-weight: 500; font-size: .98rem;
}
.nav-ico { display: grid; place-items: center; color: var(--accent); flex: none; }
.nav-lien:hover { background: var(--fond-actif); }
.nav-lien.actif { background: var(--fond-actif); color: var(--texte); font-weight: 700; box-shadow: inset 3px 0 0 var(--accent); }
.ico { display: block; }
.nav-lien.discret { color: var(--texte-doux); font-size: .92rem; padding: .4rem .5rem; gap: .6rem; }

.sidebar-pied { margin-top: auto; padding-top: .6rem; border-top: 1px solid var(--bordure); display: flex; flex-direction: column; gap: .3rem; }
.reglages-ligne { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.theme-choix { display: flex; gap: 2px; background: var(--gris-clair); border-radius: 12px; padding: 3px; }
.theme-choix button { border: 0; background: none; color: var(--texte-doux); width: 34px; height: 30px; border-radius: 9px; cursor: pointer; display: grid; place-items: center; padding: 0; }
.theme-choix button .ico { width: 17px; height: 17px; }
.theme-choix button.actif { background: var(--carte); color: var(--vert-fonce); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.deconnexion { display: flex; align-items: center; gap: .6rem; padding: .4rem .5rem; }
.deconnexion .ico { width: 18px; height: 18px; }
.recherche-form { display: flex; gap: .6rem; margin-bottom: 1.2rem; max-width: 560px; }
.recherche-form input { flex: 1; padding: .6rem .8rem; border: 1px solid var(--bordure); border-radius: 10px; font: inherit; background: var(--carte); color: var(--texte); }
.profil-lien { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--texte); padding: .3rem; border-radius: 10px; }
.profil-lien:hover { background: rgba(63, 125, 58, .1); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--vert); color: #fff;
  display: grid; place-items: center; font-weight: 700; flex: none;
}
.profil-texte { display: flex; flex-direction: column; min-width: 0; }
.profil-texte strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profil-texte small { color: var(--texte-doux); }
.lien-discret { background: none; border: 0; padding: .4rem .3rem; color: var(--texte-doux); cursor: pointer; font: inherit; font-size: .85rem; }
.lien-discret:hover { color: var(--rouge); text-decoration: underline; }

.topbar { display: none; }
.voile { display: none; }

.avec-menu .contenu { margin-left: var(--largeur-menu); }
.contenu { padding: 2rem 2.2rem 3rem; max-width: 1280px; }
.sans-menu .contenu { padding: 0; max-width: none; margin: 0; }

.entete {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
  margin-bottom: 1.4rem; flex-wrap: wrap;
}
.entete p { margin: .35rem 0 0; max-width: 62ch; }
.retour { display: inline-block; margin-bottom: .8rem; text-decoration: none; color: var(--texte-doux); font-size: .9rem; }
.retour:hover { color: var(--vert-fonce); }
.etiquette {
  display: inline-block; background: var(--olive-clair); color: var(--olive); font-size: .72rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 2px 10px;
  border-radius: 99px; margin-bottom: .4rem;
}

/* ---------- Cartes ---------- */
.cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.carte-stat {
  background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre);
  padding: 1rem 1.1rem; border-left: 5px solid var(--vert); display: flex; flex-direction: column; gap: .15rem;
}
.carte-stat span { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--texte-doux); }
.carte-stat strong { font-size: 1.6rem; font-family: Georgia, serif; }
.carte-stat small { color: var(--texte-doux); }
.carte-stat.vert { border-color: var(--vert); }
.carte-stat.olive { border-color: var(--olive); }
.carte-stat.orange { border-color: var(--orange); }
.carte-stat.rouge { border-color: var(--rouge); }
.carte-stat.bleu { border-color: var(--bleu); }
.carte-stat.gris { border-color: var(--gris); }

.panneau { background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 1.1rem 1.2rem; margin-bottom: 1.4rem; }
.panneau-tete { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .9rem; }
.deux-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.deux-colonnes .panneau { margin-bottom: 1.4rem; }

.onglets { display: inline-flex; gap: .25rem; background: var(--gris-clair); padding: 4px; border-radius: 99px; flex-wrap: wrap; }
.onglets a {
  text-decoration: none; color: var(--texte-doux); padding: .35rem .9rem; border-radius: 99px;
  font-weight: 600; font-size: .88rem;
}
.onglets a.actif { background: var(--vert); color: #fff; }
.compteur {
  display: inline-block; min-width: 1.4em; text-align: center; background: rgba(0, 0, 0, .08);
  border-radius: 99px; padding: 0 .4em; font-size: .78rem; margin-left: .2rem;
}
.onglets a.actif .compteur { background: rgba(255, 255, 255, .25); }

/* ---------- Liste « À traiter » ---------- */
.liste-traiter { list-style: none; margin: 0; padding: 0; }
.liste-traiter li + li { border-top: 1px solid var(--bordure); }
.liste-traiter a { display: flex; align-items: center; gap: .9rem; padding: .8rem .3rem; text-decoration: none; color: inherit; border-radius: 10px; }
.liste-traiter a:hover { background: var(--vert-clair); }
.liste-texte { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.liste-texte small { color: var(--texte-doux); }
.pastille { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.p-renegocier { background: var(--rouge); }
.p-preparer { background: var(--orange); }
.p-manquante { background: var(--gris); }
.p-ok { background: var(--vert); }

.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.b-renegocier { background: var(--rouge-clair); color: var(--rouge); }
.b-preparer { background: var(--orange-clair); color: #a35f08; }
.b-manquante { background: var(--gris-clair); color: var(--gris); }
.b-ok { background: var(--vert-clair); color: var(--vert-fonce); }

.vide { text-align: center; padding: 2rem 1rem; display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.vide.petit { padding: 1rem; }
.vide p { margin: 0 0 .6rem; }
.vide-icone {
  width: 52px; height: 52px; border-radius: 50%; background: var(--vert-clair); color: var(--vert);
  display: grid; place-items: center; font-size: 1.5rem; font-weight: 700;
}

/* ---------- Tableaux ---------- */
.table-defilement { overflow-x: auto; }
.tableau { width: 100%; border-collapse: collapse; }
.tableau th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--texte-doux); padding: .5rem .7rem; border-bottom: 2px solid var(--bordure); }
.tableau td { padding: .75rem .7rem; border-bottom: 1px solid var(--bordure); vertical-align: top; }
.tableau.compact td, .tableau.compact th { padding: .5rem .6rem; }
.ligne-lien { cursor: pointer; }
.ligne-lien:hover td { background: var(--vert-clair); }
.tableau a { text-decoration: none; }
tr.inactif td { opacity: .55; }

.infos { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.2rem; margin: 0; }
.infos dt { color: var(--texte-doux); font-weight: 600; font-size: .88rem; }
.infos dd { margin: 0; }
.notes { margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--bordure); }
.notes p { margin: 0; white-space: pre-wrap; }

/* ---------- Boutons & formulaires ---------- */
.bouton {
  display: inline-block; border: 1px solid var(--bordure); background: var(--carte); color: var(--texte);
  padding: .55rem 1.05rem; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer;
  text-decoration: none; text-align: center;
}
.bouton:hover { border-color: var(--vert); color: var(--vert-fonce); }
.bouton-plein { background: var(--vert); border-color: var(--vert); color: #fff; box-shadow: 0 3px 10px rgba(63, 125, 58, .25); }
.bouton-plein:hover { background: var(--vert-fonce); border-color: var(--vert-fonce); color: #fff; }
.bouton-danger { color: var(--rouge); border-color: #efc2bb; }
.bouton-danger:hover { background: var(--rouge); border-color: var(--rouge); color: #fff; }
.bouton.petit { padding: .3rem .7rem; font-size: .82rem; }
.actions, .actions-tete { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; }
.actions form { margin: 0; }

.formulaire { display: flex; flex-direction: column; gap: 1rem; }
.formulaire-large { max-width: 900px; }
.formulaire label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .9rem; }
.formulaire label small { font-weight: 400; }
.formulaire input[type=text], .formulaire input[type=email], .formulaire input[type=password],
.formulaire input[type=tel], .formulaire input[type=date], .formulaire input[type=number],
.formulaire select, .formulaire textarea, .en-ligne select, .en-ligne input[type=text] {
  font: inherit; font-weight: 400; padding: .55rem .7rem; border: 1px solid var(--bordure);
  border-radius: 10px; background: var(--carte); color: var(--texte); width: 100%;
}
.formulaire input:focus, .formulaire select:focus, .formulaire textarea:focus,
.en-ligne select:focus, .en-ligne input:focus {
  outline: 3px solid rgba(63, 125, 58, .25); border-color: var(--vert);
}
.formulaire fieldset { border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 1rem 1.1rem 1.1rem; background: var(--carte); margin: 0; }
.formulaire legend { padding: 0 .5rem; font-weight: 700; color: var(--vert-fonce); }
.grille { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.grille .plein { grid-column: 1 / -1; }
.formulaire label.case-form { flex-direction: row; align-items: flex-start; align-content: flex-start; flex-wrap: wrap; column-gap: .5rem; row-gap: .15rem; font-weight: 600; }
.formulaire label.case-form input { width: auto; margin-top: .25rem; }
.formulaire label.case-form small { flex-basis: 100%; }
.en-ligne { display: flex; gap: .4rem; align-items: center; }
.en-ligne select { width: auto; padding: .3rem .5rem; }

.menu-actions summary { list-style: none; cursor: pointer; }
.menu-actions summary::-webkit-details-marker { display: none; }
.menu-actions-corps { display: flex; flex-direction: column; gap: .5rem; margin-top: .5rem; min-width: 240px; }

.flash { padding: .75rem 1rem; border-radius: 10px; margin-bottom: 1.1rem; font-weight: 500; }
.flash ul { margin: 0; padding-left: 1.1rem; }
.flash-ok { background: var(--vert-clair); color: var(--vert-fonce); border: 1px solid #c3dcbb; }
.flash-erreur { background: var(--rouge-clair); color: #8f2a1f; border: 1px solid #efc2bb; }

/* ---------- Connexion ---------- */
.login-fond {
  min-height: 100vh; display: grid; place-items: center; padding: 1.5rem;
  background:
    linear-gradient(rgba(243, 246, 239, .82), rgba(243, 246, 239, .9)),
    url("/static/img/residence.jpg") center / cover no-repeat;
}
.login-carte {
  background: rgba(255, 255, 255, .95); border-radius: 20px; box-shadow: 0 10px 40px rgba(31, 60, 23, .18);
  padding: 2rem 2rem 2.2rem; width: 100%; max-width: 420px; text-align: center;
  display: flex; flex-direction: column; gap: .8rem; align-items: stretch;
}
.login-carte h1 { font-size: 1.35rem; }
.login-carte p { margin: 0; }
.login-carte .formulaire { text-align: left; margin-top: .4rem; }
.login-carte .bouton { margin-top: .4rem; }
.login-logo { width: 78%; max-width: 280px; margin: 0 auto .2rem; height: auto; }

/* ---------- Travaux, interventions, journal ---------- */
.carte-lien { text-decoration: none; color: inherit; transition: transform .12s ease, box-shadow .12s ease; }
.carte-lien:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(31, 60, 23, .08), 0 10px 24px rgba(31, 60, 23, .1); }
.prio-faible { background: var(--gris-clair); color: var(--gris); }
.prio-normale { background: var(--bleu-clair); color: var(--bleu); }
.prio-haute { background: var(--orange-clair); color: #a35f08; }
.prio-critique { background: var(--rouge-clair); color: var(--rouge); }

.liste-simple { list-style: none; margin: 0 0 1rem; padding: 0; }
.liste-simple li { padding: .6rem 0; border-top: 1px solid var(--bordure); }
.liste-simple li:first-child { border-top: 0; }
.liste-simple a { text-decoration: none; }
.liste-simple .badge { margin-left: .4rem; }
.liste-simple li.fichier { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.liste-simple li.fichier form { margin: 0 0 0 auto; }
.texte-libre { margin: 0; white-space: pre-wrap; }
.espace-haut { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--bordure); }

.recherche { flex: 1; max-width: 460px; }
.recherche input { flex: 1; }
.filtres { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filtres input[type=text], .filtres select {
  font: inherit; padding: .45rem .7rem; border: 1px solid var(--bordure); border-radius: 10px;
  background: var(--carte); color: var(--texte); min-width: 0; flex: 1 1 160px; max-width: 260px;
}

.journal { list-style: none; margin: 1rem 0 0; padding: 0; }
.journal li { padding: .7rem .9rem; border-radius: 12px; background: var(--fond); margin-bottom: .6rem; }
.journal li.systeme { background: transparent; border: 1px dashed var(--bordure); color: var(--texte-doux); }
.journal-meta { font-size: .78rem; color: var(--texte-doux); margin-bottom: .15rem; }
.journal-texte { white-space: pre-wrap; }
.journal-form { margin-bottom: .6rem; }

.etapes { list-style: none; display: flex; gap: .4rem; flex-wrap: wrap; padding: 0; margin: 0 0 1.2rem; counter-reset: etape; }
.etapes li {
  counter-increment: etape; background: var(--gris-clair); color: var(--gris); border-radius: 99px;
  padding: .3rem .8rem .3rem .5rem; font-size: .8rem; font-weight: 600; display: flex; align-items: center; gap: .4rem;
}
.etapes li::before {
  content: counter(etape); width: 20px; height: 20px; border-radius: 50%; background: var(--carte);
  display: grid; place-items: center; font-size: .72rem;
}
.etapes li.fait { background: var(--vert-clair); color: var(--vert-fonce); }
.etapes li.courant { background: var(--vert); color: #fff; }
.etapes li.courant::before { color: var(--vert-fonce); }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .topbar {
    display: flex; align-items: center; gap: .8rem; position: sticky; top: 0; z-index: 20;
    background: var(--carte); border-bottom: 1px solid var(--bordure); padding: .6rem 1rem;
  }
  .topbar-titre { font-family: Georgia, serif; font-weight: 700; color: var(--vert-fonce); text-decoration: none; font-size: 1.05rem; }
  .burger { background: var(--vert-clair); border: 0; border-radius: 10px; width: 42px; height: 42px; display: grid; place-content: center; gap: 4px; cursor: pointer; }
  .burger span { display: block; width: 20px; height: 2px; background: var(--vert-fonce); border-radius: 2px; }
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: none; }
  .menu-ouvert .sidebar { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .25); }
  .menu-ouvert .voile { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 25; }
  .avec-menu .contenu { margin-left: 0; padding: 1.2rem 1rem 2.5rem; }
  .deux-colonnes { grid-template-columns: 1fr; }
  .grille { grid-template-columns: 1fr; }
  h1 { font-size: 1.4rem; }

  /* Tableaux en cartes */
  .tableau thead { display: none; }
  .tableau, .tableau tbody, .tableau tr, .tableau td { display: block; width: 100%; }
  .tableau tr { border: 1px solid var(--bordure); border-radius: 12px; margin-bottom: .8rem; padding: .3rem .2rem; }
  .tableau td { border: 0; padding: .35rem .7rem; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  .tableau td:first-child { display: block; text-align: left; }
  .tableau td:first-child::before { display: none; }
  .tableau td::before { content: attr(data-label); font-weight: 600; color: var(--texte-doux); text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
  .tableau.compact tr { border: 0; border-bottom: 1px solid var(--bordure); border-radius: 0; margin: 0; }
}

/* ---------- To-do, consultations, décisions ---------- */
.taches { list-style: none; margin: 0; padding: 0; }
.taches li { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-top: 1px solid var(--bordure, #e3e9dc); }
.taches li:first-child { border-top: 0; }
.taches li.fait .tache-corps strong { text-decoration: line-through; color: var(--texte-doux); }
.tache-corps { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.tache-corps a { text-decoration: none; color: inherit; }
button.case {
  width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--vert); background: var(--carte);
  color: #fff; font-weight: 800; cursor: pointer; padding: 0; line-height: 1;
}
button.case:hover { background: var(--vert-clair); }
button.case.cochee { background: var(--vert); }
.ajout-rapide .grille { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.resultats { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: .8rem; }
.resultat-ligne { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .25rem; }
.barre { height: 12px; border-radius: 99px; background: var(--gris-clair); overflow: hidden; }
.barre div { height: 100%; background: var(--olive); border-radius: 99px; }
.resultats li.tete .barre div { background: var(--vert); }
.resultats li.tete .resultat-ligne span { font-weight: 700; }
.choix { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .8rem; }
.choix-option {
  display: flex !important; flex-direction: row !important; align-items: center; gap: .6rem;
  padding: .65rem .9rem; border: 1px solid var(--bordure, #d5dfcc); border-radius: 12px; cursor: pointer; font-weight: 600;
}
.choix-option:has(input:checked) { border-color: var(--vert); background: var(--vert-clair); }
.choix-option input { width: auto; }
@media (max-width: 700px) {
  .taches li { flex-wrap: wrap; row-gap: .35rem; }
  .tache-corps { flex-basis: calc(100% - 44px); }
  .taches li .badge:first-of-type { margin-left: 40px; }
}

/* ---------- AG, agenda, absences ---------- */
.ordre-jour { margin: 0 0 1rem; padding-left: 1.4rem; display: flex; flex-direction: column; gap: 1rem; }
.ordre-jour li::marker { font-weight: 800; color: var(--vert); }
.point-tete { display: flex; justify-content: space-between; gap: .8rem; align-items: center; }
.point-actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-top: .4rem; }
.point-actions select { padding: .3rem .5rem; border-radius: 8px; border: 1px solid #d5dfcc; background: var(--carte); font: inherit; }
.mois { text-transform: capitalize; margin: 1.2rem 0 .4rem; font-size: 1rem; color: var(--vert-fonce); }
.agenda { list-style: none; margin: 0; padding: 0; }
.agenda li { display: flex; align-items: center; gap: 1rem; padding: .6rem 0; border-top: 1px solid #e3e9dc; }
.agenda li:first-child { border-top: 0; }
.agenda-date {
  min-width: 54px; text-align: center; border-radius: 12px; padding: .35rem .3rem;
  background: var(--bleu-clair); color: var(--bleu); display: flex; flex-direction: column; line-height: 1.1;
}
.agenda-date strong { font-size: 1.25rem; font-family: Georgia, serif; }
.agenda-date span { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.agenda li.ag .agenda-date { background: var(--vert-clair); color: var(--vert-fonce); }
.agenda-corps { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.agenda-corps a { color: inherit; text-decoration: none; }

/* ---------- Documents, messages, passation, exports ---------- */
.flash-info { background: var(--bleu-clair); color: var(--bleu); border: 1px solid #c4d7ea; }
.case-ligne { flex-direction: row !important; align-items: center; gap: .6rem; }
.case-ligne input { width: auto; }
.carte-lien-nu { display: flex; flex-direction: column; gap: .25rem; color: inherit; text-decoration: none; }
.cartes-dossiers .carte-stat strong { font-size: 1.15rem; }
.cartes-dossiers details { margin-top: .5rem; }
.liste-simple li.non-lu { background: linear-gradient(90deg, var(--orange-clair), transparent 40%); border-radius: 8px; padding-left: .5rem; }
.fil { display: flex; flex-direction: column; gap: .8rem; margin-bottom: 1.2rem; }
.bulle { background: var(--carte); border-radius: 16px; padding: .8rem 1.1rem; box-shadow: 0 1px 3px rgba(31,60,23,.08); max-width: 820px; border: 1px solid transparent; }
.bulle header { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: .2rem; }
.bulle.moi { align-self: flex-end; background: var(--vert-clair); }
.bulle.nouveau { border-color: var(--orange); }
.bulle .texte-libre { margin: .2rem 0 0; }
.fiches { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.fiches li { border-left: 4px solid var(--vert); padding-left: .9rem; }
details > summary { cursor: pointer; margin: .5rem 0; }

/* ---------- Comparateur de devis ---------- */
.matrice { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 560px; }
.matrice th, .matrice td { padding: .6rem .8rem; border-bottom: 1px solid #e3e9dc; text-align: left; vertical-align: top; }
.matrice thead th { background: var(--vert-clair); color: var(--vert-fonce); font-size: .95rem; }
.matrice thead th a { color: inherit; font-weight: 700; text-decoration: none; }
.matrice thead th.retenu { background: #cfe5c8; }
.matrice tbody th { font-weight: 600; color: var(--texte-doux); font-size: .85rem; min-width: 150px; background: #fafcf8; position: sticky; left: 0; }
.matrice .badges { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .3rem; }
.matrice .ligne-prix td { font-family: Georgia, serif; font-size: 1.25rem; font-weight: 700; }
.matrice .separateur th { background: var(--gris-clair); position: static; }
.matrice td.poste select { width: 100%; padding: .35rem .4rem; border-radius: 8px; border: 1px solid #d5dfcc; background: var(--carte); font: inherit; font-size: .88rem; }
.matrice td.e-oui select { background: var(--vert-clair); border-color: var(--vert); }
.matrice td.e-non select { background: var(--rouge-clair); border-color: var(--rouge); }
.matrice td.e-option select { background: var(--orange-clair); border-color: var(--orange); }
.matrice .total-postes td { font-weight: 700; }
.petit-texte { font-size: .85rem; margin-top: .8rem; }

/* ---- Courriers au syndic (V7) ---- */
.modeles { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.carte-stat.modele strong { font-size: 1.05rem; }
.carte-stat.modele small { opacity: .9; }
.lettre { background: var(--carte); border: 1px solid var(--bordure, #d8e2d4); border-radius: 8px; padding: 1.4rem 1.6rem;
  font-family: Georgia, "Times New Roman", serif; line-height: 1.55; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.lettre-dest { margin-left: 45%; }
.lettre-date { text-align: right; }
.lettre-corps { white-space: pre-wrap; }
.courrier-texte { font-family: Georgia, serif; line-height: 1.5; }
@media (max-width: 700px) { .lettre { padding: 1rem; } .lettre-dest { margin-left: 0; } }
.version { text-align: center; font-size: .72rem; color: var(--texte-doux); opacity: .8; padding-top: .2rem; }
.version-login { position: fixed; bottom: .6rem; left: 0; right: 0; text-align: center; font-size: .75rem; color: var(--texte-doux); }
