/* =========================================================================
   Espace membres Atelier 1896 : feuille de style unique.
   Pas de framework ni d'étape de compilation : on modifie ce fichier directement.
   Couleurs : variables ci-dessous (mode clair + mode sombre automatique).
   ========================================================================= */

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --police-titres: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --police-texte: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --fond: #f6f5fa;
  --surface: #ffffff;
  --surface-2: #f0eef7;
  --bordure: #e2deec;
  --texte: #1b1726;
  --texte-doux: #5f5970;
  --accent: #6b3fd9;
  --accent-fort: #5330b5;
  --accent-doux: #eee8fd;
  --sur-accent: #ffffff;
  --barre: #16121f;          /* bandeau du haut : toujours sombre (identité visuelle) */
  --sur-barre: #f2eefb;
  --sur-barre-doux: #b7aed0;

  --danger: #b42318;   --danger-doux: #fdecea;
  --attention: #8a5a00; --attention-doux: #fff3d6;
  --succes: #17754a;   --succes-doux: #e2f4ea;
  --info: #2455c3;     --info-doux: #e8effd;

  --rayon: 10px;
  --rayon-petit: 6px;
  --ombre: 0 1px 2px rgb(20 12 40 / 6%), 0 4px 16px rgb(20 12 40 / 5%);
  --largeur: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond: #110f17;
    --surface: #1a1722;
    --surface-2: #231f2e;
    --bordure: #332d42;
    --texte: #ece9f4;
    --texte-doux: #a59eb8;
    --accent: #a88bff;
    --accent-fort: #c1adff;
    --accent-doux: #2a2242;
    --sur-accent: #140f22;
    --barre: #0b0a10;
    --danger: #ff8a80;   --danger-doux: #3a1c1c;
    --attention: #f2c14e; --attention-doux: #3a2e12;
    --succes: #6fd3a0;   --succes-doux: #15301f;
    --info: #8fb2ff;     --info-doux: #1a2440;
    --ombre: 0 1px 2px rgb(0 0 0 / 40%);
    color-scheme: dark;
  }
}

/* ---------------------------------------------------------------- Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 16px/1.55 var(--police-texte);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
h1, h2, h3, h4 { font-family: var(--police-titres); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); font-weight: 650; }
h2 { font-size: 1.25rem; font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-fort); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.visuellement-cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.doux { color: var(--texte-doux); }
.petit { font-size: .875rem; }
.nombres { font-variant-numeric: tabular-nums; }

.conteneur { width: 100%; max-width: var(--largeur); margin: 0 auto; padding: 0 16px; }
main.conteneur { flex: 1; padding-top: 28px; padding-bottom: 48px; }

/* ---------------------------------------------------------------- Bandeau */
.bandeau { background: var(--barre); color: var(--sur-barre); }
.bandeau .conteneur { display: flex; align-items: center; gap: 24px; min-height: 60px; }
.marque {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--sur-barre); text-decoration: none;
  font-family: var(--police-titres); font-weight: 650; font-size: 1.05rem; letter-spacing: .01em;
}
.marque:hover { color: #fff; }
.losange { width: 12px; height: 12px; background: var(--accent); transform: rotate(45deg); border-radius: 2px; flex: none; }
.marque small { font-weight: 400; color: var(--sur-barre-doux); font-size: .8rem; }

.nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav a {
  color: var(--sur-barre-doux); text-decoration: none; font-family: var(--police-titres);
  font-size: .95rem; padding: 8px 12px; border-radius: var(--rayon-petit);
}
.nav a:hover { color: var(--sur-barre); background: rgb(255 255 255 / 6%); }
.nav a[aria-current="page"] { color: var(--sur-barre); background: rgb(255 255 255 / 10%); }
.nav .pousse { margin-left: auto; }

.menu-utilisateur { position: relative; }
.menu-utilisateur > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
  color: var(--sur-barre); padding: 4px; border-radius: 999px;
}
.menu-utilisateur > summary::-webkit-details-marker { display: none; }
.menu-utilisateur .panneau {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; z-index: 20;
  background: var(--surface); color: var(--texte); border: 1px solid var(--bordure);
  border-radius: var(--rayon); box-shadow: var(--ombre); padding: 6px;
}
.menu-utilisateur .panneau a, .menu-utilisateur .panneau button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: var(--rayon-petit);
  color: var(--texte); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer;
}
.menu-utilisateur .panneau a:hover, .menu-utilisateur .panneau button:hover { background: var(--surface-2); }
.menu-utilisateur .identite { padding: 8px 12px 10px; border-bottom: 1px solid var(--bordure); margin-bottom: 6px; }

/* Menu mobile : <details> natif, aucun JavaScript nécessaire */
.menu-mobile { display: none; }
@media (max-width: 760px) {
  .bandeau .conteneur { gap: 12px; }
  .nav { display: none; }
  .menu-mobile { display: block; margin-left: auto; }
  .menu-mobile > summary {
    list-style: none; cursor: pointer; color: var(--sur-barre); font-family: var(--police-titres);
    padding: 8px 12px; border: 1px solid rgb(255 255 255 / 18%); border-radius: var(--rayon-petit);
  }
  .menu-mobile > summary::-webkit-details-marker { display: none; }
  .menu-mobile nav { position: absolute; left: 0; right: 0; top: 60px; background: var(--barre); padding: 8px 16px 16px; z-index: 30; }
  .menu-mobile nav a { display: block; color: var(--sur-barre); text-decoration: none; padding: 12px 4px; border-bottom: 1px solid rgb(255 255 255 / 8%); font-family: var(--police-titres); }
  .menu-utilisateur { display: none; }
}

/* ---------------------------------------------------------------- En-tête de page */
.entete-page { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.entete-page .surtitre {
  font-family: var(--police-titres); text-transform: uppercase; letter-spacing: .08em;
  font-size: .75rem; color: var(--accent); font-weight: 600; margin-bottom: 6px;
}
.entete-page h1 { margin: 0; }
.entete-page .actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------------------------------------------------------------- Cartes et grilles */
.carte { background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 20px; box-shadow: var(--ombre); }
.carte + .carte { margin-top: 16px; }
.carte > h2:first-child, .carte > h3:first-child { margin-top: 0; }
.grille-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .grille-2 { grid-template-columns: minmax(0, 1fr); } }
.carte { min-width: 0; }
.pile > * + * { margin-top: 16px; }
.ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.vide { text-align: center; color: var(--texte-doux); padding: 32px 16px; }

/* ---------------------------------------------------------------- Formulaires */
.champ { margin-bottom: 18px; }
.champ label, .etiquette { display: block; font-family: var(--police-titres); font-weight: 550; font-size: .95rem; margin-bottom: 6px; }
.champ .aide { color: var(--texte-doux); font-size: .85rem; margin-top: 6px; }
.champ .erreur { color: var(--danger); font-size: .875rem; margin-top: 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="number"], input[type="search"], input[type="url"], input[type="tel"], select, textarea {
  width: 100%; font: inherit; color: var(--texte); background: var(--surface);
  border: 1px solid var(--bordure); border-radius: var(--rayon-petit); padding: 10px 12px; min-height: 44px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.champ.en-erreur input, .champ.en-erreur select, .champ.en-erreur textarea { border-color: var(--danger); }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); vertical-align: -3px; }
.case { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.case input[type="checkbox"] { flex: none; margin: 3px 0 0; }
input[type="file"] { font: inherit; font-size: .9rem; max-width: 100%; color: var(--texte-doux); }
input[type="file"]::file-selector-button {
  font: 550 .9rem var(--police-titres); margin-right: 10px; padding: 8px 14px; cursor: pointer;
  border: 1px solid var(--bordure); border-radius: var(--rayon-petit); background: var(--surface-2); color: var(--texte);
}
.mdp { position: relative; }
.mdp input { padding-right: 92px; }
.mdp .bascule-mdp {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: var(--accent); font: 500 .85rem var(--police-titres); padding: 6px 8px; cursor: pointer;
}
.formulaire-etroit { max-width: 560px; }

/* ---------------------------------------------------------------- Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 550 .95rem var(--police-titres); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; border-radius: var(--rayon-petit); padding: 10px 18px; min-height: 44px;
  background: var(--accent); color: var(--sur-accent);
}
.btn:hover { background: var(--accent-fort); color: var(--sur-accent); }
.btn-secondaire { background: var(--surface); color: var(--texte); border-color: var(--bordure); }
.btn-secondaire:hover { background: var(--surface-2); color: var(--texte); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger); filter: brightness(.92); color: #fff; }
.btn-contour { background: transparent; color: var(--sur-barre); border-color: rgb(255 255 255 / 25%); margin-top: 12px; }
.btn-contour:hover { background: rgb(255 255 255 / 8%); color: #fff; }
.btn-lien { background: none; border: 0; color: var(--accent); padding: 0; min-height: auto; font-weight: 500; text-decoration: underline; }
.btn-lien:hover { background: none; color: var(--accent-fort); }
.btn-plein { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.fleche::after { content: "→"; font-family: var(--police-titres); }

/* ---------------------------------------------------------------- Alertes et badges */
.alerte { border-radius: var(--rayon-petit); padding: 12px 14px; margin-bottom: 20px; border: 1px solid transparent; }
.alerte ul { margin: 6px 0 0; padding-left: 18px; }
.alerte-succes { background: var(--succes-doux); color: var(--succes); border-color: color-mix(in srgb, var(--succes) 25%, transparent); }
.alerte-erreur { background: var(--danger-doux); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.alerte-info { background: var(--info-doux); color: var(--info); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.alerte-attention { background: var(--attention-doux); color: var(--attention); border-color: color-mix(in srgb, var(--attention) 25%, transparent); }

.badge {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font: 550 .78rem var(--police-titres); padding: 3px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--texte-doux); border: 1px solid var(--bordure);
}
.badge-accent { background: var(--accent-doux); color: var(--accent); border-color: transparent; }
.badge-succes { background: var(--succes-doux); color: var(--succes); border-color: transparent; }
.badge-danger { background: var(--danger-doux); color: var(--danger); border-color: transparent; }
.badge-attention { background: var(--attention-doux); color: var(--attention); border-color: transparent; }
.badge-info { background: var(--info-doux); color: var(--info); border-color: transparent; }

/* ---------------------------------------------------------------- Avatars */
.avatar {
  --taille: 36px;
  width: var(--taille); height: var(--taille); border-radius: 999px; flex: none;
  display: inline-grid; place-items: center; overflow: hidden;
  background: var(--accent-doux); color: var(--accent); font: 600 calc(var(--taille) * .38) var(--police-titres);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-petit { --taille: 28px; }
.avatar-grand { --taille: 96px; }
.bandeau .avatar { background: #2c2440; color: var(--sur-barre); }

/* ---------------------------------------------------------------- Tableaux */
.defilement { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tableau { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tableau th {
  text-align: left; font: 600 .78rem var(--police-titres); text-transform: uppercase; letter-spacing: .06em;
  color: var(--texte-doux); padding: 10px 12px; border-bottom: 1px solid var(--bordure); white-space: nowrap;
}
.tableau td { padding: 12px; border-bottom: 1px solid var(--bordure); vertical-align: middle; }
.tableau tr:last-child td { border-bottom: 0; }

/* ---------------------------------------------------------------- Pages de connexion */
.page-accueil { display: grid; place-items: center; padding: 40px 16px; flex: 1; }
.page-accueil .boite { width: 100%; max-width: 420px; }
.page-accueil .marque { color: var(--texte); justify-content: center; width: 100%; margin-bottom: 20px; font-size: 1.2rem; }
.page-accueil .marque:hover { color: var(--texte); }
.page-accueil h1 { font-size: 1.4rem; margin-bottom: 6px; }
.page-accueil .sous-titre { color: var(--texte-doux); margin-bottom: 22px; }
.page-accueil .pied { text-align: center; margin-top: 18px; font-size: .9rem; }

/* ---------------------------------------------------------------- Pied de page */
.pied-page { color: var(--texte-doux); font-size: .85rem; padding: 24px 0 32px; border-top: 1px solid var(--bordure); }

/* ---------------------------------------------------------------- Progression */
progress.progression {
  appearance: none; width: 100%; height: 8px; border: 0; border-radius: 999px; overflow: hidden; background: var(--surface-2);
}
progress.progression::-webkit-progress-bar { background: var(--surface-2); border-radius: 999px; }
progress.progression::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
progress.progression::-moz-progress-bar { background: var(--accent); border-radius: 999px; }

@media (prefers-reduced-motion: no-preference) {
  .btn, .nav a, input, select, textarea { transition: background-color .15s, border-color .15s, color .15s; }
}

/* Lien d'évitement : invisible sauf au clavier */
.lien-evitement { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--surface); color: var(--texte); padding: 8px 12px; border-radius: var(--rayon-petit); }
.lien-evitement:focus { top: 12px; }

/* ---------------------------------------------------------------- Panel admin */
.onglets { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--bordure); margin: -8px 0 24px; }
.onglets a {
  white-space: nowrap; padding: 10px 14px; text-decoration: none; color: var(--texte-doux);
  font: 550 .95rem var(--police-titres); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.onglets a:hover { color: var(--texte); }
.onglets a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

.statistiques { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 16px; }
.carte.statistique { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--texte); margin: 0; }
.carte.statistique:hover { border-color: var(--accent); }
.statistique .nombre { font: 650 2rem/1 var(--police-titres); color: var(--accent); }

.filtres { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 12px; align-items: end; margin-bottom: 16px; }
.filtres .champ { margin: 0; }
@media (max-width: 760px) { .filtres { grid-template-columns: minmax(0, 1fr); } }

.personne { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--texte); }
.personne:hover strong { color: var(--accent); }

.journal { list-style: none; margin: 0; padding: 0; }
.journal li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--bordure); }
.journal li:last-child { border-bottom: 0; }
@media (max-width: 760px) { .journal li { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
.details-journal summary { cursor: pointer; color: var(--accent); font-size: .85rem; margin-top: 4px; }
.details-journal pre, pre.code {
  background: var(--surface-2); border-radius: var(--rayon-petit); padding: 10px; font-size: .8rem;
  overflow-x: auto; white-space: pre-wrap; word-break: break-word; margin: 6px 0 0;
}

.copie { display: flex; gap: 8px; margin-top: 8px; }
.copie input { font-family: ui-monospace, monospace; font-size: .85rem; }

details.zone-danger, details.bloc-repliable { margin-top: 18px; border-top: 1px solid var(--bordure); padding-top: 14px; }
details.zone-danger > summary, details.bloc-repliable > summary { cursor: pointer; font: 550 .95rem var(--police-titres); }
details.zone-danger > summary { color: var(--danger); }
details.zone-danger[open] > summary, details.bloc-repliable[open] > summary { margin-bottom: 12px; }

dl.infos { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 16px 0 0; font-size: .95rem; }
dl.infos dt { color: var(--texte-doux); }
dl.infos dd { margin: 0; }

fieldset { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
fieldset .case { margin-bottom: 8px; }
.sous-titre-form { font-size: 1rem; margin: 8px 0 12px; }
.ligne.entre { justify-content: space-between; }
.ligne.petit-espace { gap: 6px; margin-top: 6px; }
.sans-marge { margin: 0; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.pagination [aria-disabled="true"] { opacity: .45; pointer-events: none; }

.grille-permissions { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.grille-permissions fieldset { background: var(--surface-2); border-radius: var(--rayon); padding: 14px; margin: 0; }
.grille-permissions legend { float: left; width: 100%; font: 600 .9rem var(--police-titres); padding: 0; margin-bottom: 10px; }
.grille-permissions legend + * { clear: both; }
.case.desactivee { opacity: .55; }
.titre-section { margin: 28px 0 14px; }
.marge-haut { margin-top: 20px; }
.aligner-droite { text-align: right; }
.ligne-membre { padding: 6px 0; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .8em; }
.centre { text-align: center; }
.coche { color: var(--succes); font-weight: 700; }
input.champ-court { max-width: 160px; }
details.carte > summary { cursor: pointer; }
.filtres.filtres-journal { grid-template-columns: 2fr 1.4fr 1.4fr 1fr 1fr auto; }
@media (max-width: 1000px) { .filtres.filtres-journal { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .filtres.filtres-journal { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- Mandats et clients (étape 4) */
.formulaire-large { max-width: 860px; }
.grille-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .grille-3 { grid-template-columns: minmax(0, 1fr); } }
.marge-haut-petit { margin-top: 10px; }
.entete-page .surtitre a { color: inherit; text-decoration: none; }
.entete-page .surtitre a:hover { text-decoration: underline; }
.texte-libre { white-space: pre-line; overflow-wrap: anywhere; }
.texte-danger, .btn-lien.texte-danger { color: var(--danger); }
.carte-proposition { border: 2px solid var(--accent); margin-bottom: 16px; }
.carte-proposition details.refus { flex: 1 1 260px; }
.carte-a-venir { background: var(--surface-2); box-shadow: none; }

.liste-membres { list-style: none; margin: 0; padding: 0; }
.liste-membres li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--bordure); }
.liste-membres li:last-child { border-bottom: 0; }
.liste-membres .grandit { flex: 1 1 160px; min-width: 0; }
.actions-membre { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 16px; padding-left: 38px; }
.liste-simple { margin: 8px 0 0; padding-left: 18px; }
.liste-simple li + li { margin-top: 6px; }
.ajout-membre { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.ajout-membre .btn { margin-top: 26px; }
@media (max-width: 560px) { .ajout-membre { grid-template-columns: minmax(0, 1fr); } .ajout-membre .btn { margin-top: 0; } }
.filtres.filtres-clients { grid-template-columns: 2fr 1.4fr auto; }
@media (max-width: 760px) { .filtres.filtres-clients { grid-template-columns: minmax(0, 1fr); } }

.tableau-bord-liste { list-style: none; margin: 0; padding: 0; }
.tableau-bord-liste li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 0; border-bottom: 1px solid var(--bordure); }
.tableau-bord-liste li:last-child { border-bottom: 0; }
.tableau-bord-liste .grandit { flex: 1 1 220px; min-width: 0; }
.carte-proposition details.refus { margin-top: 0; border-top: 0; padding-top: 0; }
.carte-proposition details.refus > summary {
  display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px; list-style: none;
  border: 1px solid var(--bordure); border-radius: var(--rayon-petit); background: var(--surface); color: var(--texte);
}
.carte-proposition details.refus > summary::-webkit-details-marker { display: none; }
.carte-proposition details.refus > summary:hover { background: var(--surface-2); }
.carte-proposition details.refus[open] { flex-basis: 100%; }
/* Fiche mandat sur téléphone : statut et membres juste après les informations, l'activité ensuite. */
@media (max-width: 760px) {
  .grille-mandat > .pile { display: contents; }
  .grille-mandat > .pile > .carte { margin-top: 0; }
  .ordre-1 { order: 1; } .ordre-2 { order: 2; } .ordre-3 { order: 3; } .ordre-4 { order: 4; } .ordre-5 { order: 5; }
}
.formulaire-large details.bloc-repliable { margin-bottom: 18px; padding-bottom: 4px; border-bottom: 1px solid var(--bordure); }
.tableau .aligner-droite { text-align: right; }

/* ---------------------------------------------------------------- Comité, notifications, filtres (retours étape 4) */
.liste-postes { list-style: none; margin: 0; padding: 0; }
.liste-postes li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 8px 0; border-bottom: 1px solid var(--bordure); }
.liste-postes li:last-child { border-bottom: 0; }
.liste-postes input[type="text"] { max-width: 260px; }
.qualite { color: var(--texte-doux); }
.filtres-mandats { margin-bottom: 16px; display: grid; gap: 12px; }
.filtres-ligne { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; align-items: end; }
.filtres-ligne .champ, .filtres-mandats .champ { margin: 0; }
@media (max-width: 760px) { .filtres-ligne { grid-template-columns: minmax(0, 1fr); } }
.statuts-filtre { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.statuts-filtre legend { width: 100%; margin-bottom: 6px; float: none; }
.puce-case { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--bordure); border-radius: 999px; background: var(--surface); cursor: pointer; font-size: .9rem; min-height: 36px; }
.puce-case:has(input:checked) { background: var(--accent-doux); border-color: var(--accent); color: var(--accent-fort); }
.puce-case input { margin: 0; }
.cloche { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; color: var(--sur-barre-doux); }
.cloche:hover, .cloche[aria-current="page"] { color: var(--sur-barre); background: rgb(255 255 255 / 10%); }
.cloche .pastille {
  position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--danger); color: #fff; font: 650 .7rem/18px var(--police-titres); text-align: center;
}
@media (max-width: 760px) {
  .cloche { margin-left: auto; }
  .menu-mobile { margin-left: 0; }
}
.tableau-bord-liste li.non-lue strong { color: var(--accent-fort); }
.liste-refus { margin: 8px 0 0; padding-left: 18px; }
.liste-refus li + li { margin-top: 10px; }
.traitement-refus { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 8px; }
.traitement-refus select { max-width: 360px; }
.statistique-alerte { border-color: var(--danger); }
.statistique-alerte .nombre { color: var(--danger); }

/* ---------------------------------------------------------------- Kanban (étape 5) */
.nouvelle-tache > summary { cursor: pointer; }
.kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; margin-top: 16px; }
@media (max-width: 900px) { .kanban { grid-template-columns: minmax(0, 1fr); } }
.colonne-kanban { background: var(--surface-2); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 12px; min-width: 0; }
.colonne-kanban h2 { font-size: 1rem; margin: 2px 4px 10px; display: flex; gap: 8px; align-items: baseline; }
.cartes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; min-height: 56px; border-radius: var(--rayon-petit); }
.cartes.survol { outline: 2px dashed var(--accent); outline-offset: 4px; }
.carte-tache { background: var(--surface); border: 1px solid var(--bordure); border-left: 4px solid var(--bordure); border-radius: var(--rayon-petit); padding: 10px 12px; box-shadow: var(--ombre); display: grid; gap: 6px; min-width: 0; }
.carte-tache[draggable="true"] { cursor: grab; }
.carte-tache.glisse { opacity: .5; }
.carte-tache.priorite-haute { border-left-color: var(--attention); }
.carte-tache.priorite-urgente { border-left-color: var(--danger); }
.colonne-termine .carte-tache { opacity: .8; }
.colonne-termine .carte-tache-titre { text-decoration: line-through; text-decoration-color: var(--texte-doux); }
.carte-tache-titre { font-weight: 600; overflow-wrap: anywhere; }
.carte-tache-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.carte-tache-actions { display: flex; align-items: center; gap: 6px; }
.carte-tache-actions .pousse { margin-left: auto; }
.btn-fleche { min-width: 36px; min-height: 32px; border: 1px solid var(--bordure); border-radius: var(--rayon-petit); background: var(--surface); color: var(--texte); cursor: pointer; font-size: 1rem; }
.btn-fleche:hover { background: var(--accent-doux); border-color: var(--accent); }
.colonne-vide { text-align: center; padding: 14px 8px; border: 1px dashed var(--bordure); border-radius: var(--rayon-petit); list-style: none; }
.btn-petit { min-height: 32px; padding: 4px 10px; font-size: .85rem; }
@media (max-width: 420px) { .marque small { display: none; } }

/* ---------------------------------------------------------------- Fichiers, liens, commentaires (étape 6) */
.grille-fichiers { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .grille-fichiers { grid-template-columns: minmax(0, 1fr); } }
.liste-pieces { list-style: none; margin: 8px 0 0; padding: 0; }
.liste-pieces li { padding: 10px 0; border-bottom: 1px solid var(--bordure); }
.liste-pieces li:last-child { border-bottom: 0; }
.piece { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.piece-texte { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.piece-visuel { flex: none; width: 56px; height: 56px; border-radius: var(--rayon-petit); overflow: hidden; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--bordure); }
.piece-visuel img { width: 100%; height: 100%; object-fit: cover; }
.piece-icone { font: 650 .7rem var(--police-titres); color: var(--texte-doux); }
.piece-icone-lien { font-size: 1.3rem; color: var(--accent); }
.piece-compacte { margin-top: 6px; padding: 8px; border: 1px solid var(--bordure); border-radius: var(--rayon-petit); background: var(--surface-2); }
.piece-compacte .piece-visuel { width: 40px; height: 40px; }
.choix-type { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0 0 12px; }
.choix-type legend { width: 100%; margin-bottom: 6px; float: none; }
.form-piece:has(input[name="type"][value="lien"]:checked) .si-fichier,
.form-piece:has(input[name="type"][value="fichier"]:checked) .si-lien,
.form-piece:has(input[name="piece"][value="lien"]:checked) .si-fichier,
.form-piece:has(input[name="piece"][value="fichier"]:checked) .si-lien,
.form-piece:has(input[name="piece"][value="aucune"]:checked) :is(.si-fichier, .si-lien, .si-piece) { display: none; }
.envoi-etat { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.envoi-etat progress { flex: 1; }
.fil-commentaires { list-style: none; margin: 0 0 16px; padding: 0; }
.fil-commentaires > li { padding: 12px 0; border-bottom: 1px solid var(--bordure); }
.fil-commentaires > li.commentaire { display: flex; gap: 10px; align-items: flex-start; }
.commentaire-corps { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.commentaire-auto { padding-left: 38px !important; }
.modifier-commentaire > summary { cursor: pointer; color: var(--accent); }
.modifier-commentaire textarea { margin: 6px 0; }
.voir-fichiers { color: var(--texte-doux); text-decoration: none; }
.voir-fichiers:hover { color: var(--accent); text-decoration: underline; }
.compteur { color: var(--texte-doux); text-decoration: none; }
.carte-tache-titre a { color: inherit; text-decoration: none; }
.carte-tache-titre a:hover { color: var(--accent); text-decoration: underline; }
.stockage-chiffres { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 0 0 8px; }
.nombre-grand { font: 650 2rem/1 var(--police-titres); color: var(--accent); }
progress.progression-large { width: 100%; height: 14px; }
progress.progression-alerte::-webkit-progress-value { background: var(--danger); }
progress.progression-alerte::-moz-progress-bar { background: var(--danger); }
[hidden] { display: none !important; }
.onglet-verrouille { align-self: center; padding: 0 12px; }
.bandeau-liberer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
