/* Bamako.space — styles propres aux écrans du client : mes chantiers, mon chantier, étape, notifications (app/js/views/client.js).
   Ce fichier appartient au module de ces écrans ; il est chargé après app/css/app.css.
   Le système de design commun (jetons :root, boutons, cartes, badges, formulaires, listes,
   dialogues, toasts, visionneuse) est dans app/css/app.css : réutilisez ses classes et ne les
   redéfinissez pas ici. Préfixes : chantiers- (liste), chantier- (un chantier), etape-, notifs-. */

/* ─── Listes sans puces ni marges (ol / ul servent à la structure pour les lecteurs d'écran) ─── */
.chantiers-liste,.chantier-etapes,.etape-rapports{list-style:none;margin:0;padding:0}
.chantiers-liste > li,.chantier-etapes > li,.etape-rapports > li{min-width:0}

/* ─── 1. Mes chantiers ─── */
.chantiers-carte{display:flex;flex-direction:column;gap:12px;padding-right:20px}
@media(min-width:640px){.chantiers-carte{padding-right:24px}}
.chantiers-carte::after{display:none}                     /* le bouton tient lieu de flèche */
.chantiers-nom{font-family:"Playfair Display",ui-serif,Georgia,serif;font-size:22px;line-height:1.25}
.chantiers-carte .carte-meta{margin-top:-6px}
.chantiers-infos{display:flex;flex-direction:column;gap:8px;padding-top:12px;border-top:1px solid var(--bordure)}
.chantiers-info{display:flex;align-items:flex-start;gap:10px;font-size:15px;line-height:1.45;color:var(--texte-3)}
.chantiers-info .ico{margin-top:1px;color:var(--or-ico)}
.chantiers-ouvrir{align-self:stretch;margin-top:4px;pointer-events:none}
@media(min-width:640px){.chantiers-ouvrir{align-self:flex-start}}
.chantiers-carte:hover .chantiers-ouvrir{filter:brightness(1.06)}
.chantiers-carte:hover .chantiers-ouvrir .ico{transform:translateX(3px)}
.chantiers-ouvrir .ico{transition:transform .2s}

/* ─── 2. Mon chantier ─── */
.chantier-lieu{display:inline-flex;align-items:center;gap:6px}
.chantier-lieu .ico{color:var(--or-ico)}

/* Carte « Dernière visite », mise en avant */
.chantier-derniere{display:flex;flex-direction:column;gap:12px;border-color:rgba(176,122,30,.35);
  background:radial-gradient(ellipse 120% 90% at 0% 0%,rgba(212,175,55,.14),transparent 65%),var(--carte-fond)}
.chantier-derniere-vide{border-color:var(--bordure);background:var(--carte-fond)}
.chantier-derniere-titre{display:flex;align-items:center;gap:8px;font-size:12.5px;font-weight:700;letter-spacing:.16em;
  text-transform:uppercase;color:var(--or-texte)}
.chantier-derniere-titre .ico{color:var(--or-ico)}
.chantier-derniere-date{font-family:"Playfair Display",ui-serif,Georgia,serif;font-size:clamp(24px,6.4vw,30px);
  font-weight:700;line-height:1.2;color:var(--texte)}
.chantier-derniere-infos{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px}
.chantier-derniere-etape{font-size:15px;color:var(--texte-3);overflow-wrap:anywhere}
.chantier-derniere-texte{font-size:15.5px;color:var(--texte-3)}
.chantier-derniere-bouton{margin-top:4px}
@media(min-width:640px){.chantier-derniere-bouton.btn-bloc{display:inline-flex;width:auto;align-self:flex-start}}

/* Titres de section */
.chantier-section-titre,.etape-section-titre{font-size:20px;font-weight:700;color:var(--texte)}

/* Résumé « Étape 4 sur 10 » */
.chantier-progression{display:flex;flex-direction:column;gap:10px;padding:2px 2px 6px}
.chantier-progression-texte{margin:0;font-size:15px;color:var(--gris)}
.chantier-progression-texte strong{color:var(--or-texte);font-size:17px;font-weight:800}
.chantier-progression-barre{height:8px;border-radius:999px;background:rgba(60,45,20,.10);overflow:hidden}
.chantier-progression-barre > span{display:block;height:100%;border-radius:inherit;background:var(--degrade-or);box-shadow:0 0 10px rgba(212,175,55,.35)}

/* Frise des étapes : un trait relie les numéros, doré jusqu'à l'étape actuelle, gris ensuite */
.chantier-etapes{gap:12px}
.chantier-etape-item{position:relative;--pad-x:20px;--pad-y:16px;--rond:40px}
@media(min-width:640px){.chantier-etape-item{--pad-x:24px;--pad-y:18px}}
.chantier-etape-item-passee{--pad-y:12px;--rond:34px}
@media(min-width:640px){.chantier-etape-item-passee{--pad-y:13px}}
.chantier-etape-item-actuelle{--pad-y:22px;--rond:46px}
@media(min-width:640px){.chantier-etape-item-actuelle{--pad-y:26px}}
.chantier-etape-item-a_venir{--pad-y:13px;--rond:34px}
.chantier-etape-item::before{content:"";position:absolute;z-index:2;pointer-events:none;width:2px;
  left:calc(var(--pad-x) + 22px);top:0;bottom:-12px;background:rgba(60,45,20,.15)}
.chantier-etape-item-passee::before{background:var(--or-ico)}
.chantier-etape-item-actuelle::before{background:linear-gradient(180deg,var(--or-ico) 0,var(--or-ico) calc(var(--pad-y) + var(--rond) / 2),rgba(60,45,20,.15) calc(var(--pad-y) + var(--rond) / 2))}
.chantier-etape-item:first-child::before{top:calc(var(--pad-y) + var(--rond) / 2)}
.chantier-etape-item:last-child::before{bottom:auto;height:calc(var(--pad-y) + var(--rond) / 2)}
.chantier-etape-item:only-child::before{display:none}

.chantier-etape{display:flex;align-items:flex-start;gap:14px;padding-top:var(--pad-y);padding-bottom:var(--pad-y);padding-left:var(--pad-x)}
@media(min-width:640px){.chantier-etape{gap:16px}}
.chantier-etape-numero{position:relative;z-index:3;flex:none;display:grid;place-items:center;width:var(--rond);height:var(--rond);border-radius:50%;margin:0 calc((46px - var(--rond)) / 2);
  font-size:15px;font-weight:800;font-variant-numeric:tabular-nums;color:var(--gris-2);
  background:var(--fond);border:1.5px dashed rgba(60,45,20,.30)}
.chantier-etape-corps{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-width:0;flex:1}
.chantier-etape .carte-titre{font-size:17px}
.chantier-etape .carte-meta{margin-top:0}
.chantier-etape-badge{display:flex}

/* Étape passée : compacte, atténuée, coche dorée */
.chantier-etape-passee{box-shadow:none;background:rgba(255,255,255,.6)}
.chantier-etape-passee .chantier-etape-corps{flex-direction:row;flex-wrap:wrap;align-items:center;column-gap:12px;row-gap:6px;min-height:var(--rond)}
.chantier-etape-passee .carte-titre{font-size:15.5px;color:var(--texte-3);font-weight:600}
.chantier-etape-passee .carte-meta{flex-basis:100%}
.chantier-etape-passee .chantier-etape-numero{color:#fff;background:var(--or-ico);border:0}
.chantier-etape-passee .badge{font-size:12px;padding-top:3px;padding-bottom:3px}

/* Étape actuelle : la vedette */
.chantier-etape-actuelle{border-color:rgba(212,175,55,.8);
  background:radial-gradient(ellipse at top left,rgba(212,175,55,.16),transparent 70%),var(--carte-fond);
  box-shadow:0 0 0 1px rgba(212,175,55,.35),0 18px 44px -20px rgba(176,122,30,.45)}
.chantier-etape-actuelle:hover{border-color:rgba(176,122,30,.95)}
.chantier-etape-actuelle .carte-titre{font-size:20px}
.chantier-etape-actuelle .chantier-etape-numero{font-size:18px;color:#1b1406;background:var(--degrade-or);border:0;
  box-shadow:0 0 0 5px rgba(212,175,55,.20),0 8px 22px -8px rgba(176,122,30,.8)}
.chantier-etape-ici{font-size:11.5px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--or-texte)}

/* Étapes à venir : en retrait */
.chantier-etape-a_venir{background:transparent;box-shadow:none;border-style:dashed;border-color:rgba(60,45,20,.18)}
.chantier-etape-a_venir:hover{background:rgba(255,255,255,.5)}
.chantier-etape-a_venir .chantier-etape-corps{flex-direction:row;flex-wrap:wrap;align-items:center;column-gap:12px;row-gap:6px;min-height:var(--rond)}
.chantier-etape-a_venir .carte-titre{font-size:15.5px;color:var(--gris);font-weight:600}
.chantier-etape-a_venir .carte-meta{flex-basis:100%}
.chantier-etape-a_venir .badge{font-size:12px;padding-top:3px;padding-bottom:3px;opacity:.8}

.chantier-note{font-size:13.5px;line-height:1.55;color:var(--gris-2);padding:0 4px}
.chantier-mentions{gap:10px}

/* ─── 3. Étape ─── */
.etape-avancement{display:flex;margin-top:-10px}
.etape-rapports{gap:16px}
.etape-rapport{display:flex;flex-direction:column;gap:16px;outline:none;
  scroll-margin-top:calc(var(--hauteur-entete) + var(--zone-haut) + 16px);
  transition:border-color .4s,box-shadow .4s}
.etape-rapport:focus-visible{outline:2px solid var(--or);outline-offset:3px}
.etape-rapport-surligne{border-color:rgba(212,175,55,.85);
  box-shadow:var(--ombre-carte),0 0 0 4px rgba(212,175,55,.22);animation:etape-surligne 1.2s ease-out 1}
@keyframes etape-surligne{0%{box-shadow:var(--ombre-carte),0 0 0 10px rgba(212,175,55,.35)}100%{box-shadow:var(--ombre-carte),0 0 0 4px rgba(212,175,55,.22)}}
.etape-rapport-entete{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 14px}
.etape-rapport-titre{font-family:"Playfair Display",ui-serif,Georgia,serif;font-size:21px;line-height:1.25}
.etape-rapport-bloc{display:flex;flex-direction:column;gap:6px}
.etape-rapport-sous-titre{font-size:12.5px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--or-texte)}
.etape-rapport-texte{font-size:16px;line-height:1.6;color:var(--texte-2)}
.etape-rapport-points strong{color:var(--rouge-texte)}
.etape-rapport-medias{display:flex;flex-direction:column;gap:12px}
.etape-rapport-sans-media{display:flex;align-items:center;gap:8px;padding:12px 14px;border-radius:var(--rayon-petit);
  font-size:14.5px;color:var(--gris);background:var(--fond);border:1px dashed rgba(60,45,20,.18)}
.etape-rapport-sans-media .ico{color:var(--gris-2)}

/* ─── 4. Notifications ─── */
.notifs-ligne{flex-wrap:nowrap;align-items:flex-start;gap:12px;padding-top:16px;padding-bottom:16px}
.notifs-ligne > .ico{flex:none;margin-top:3px;color:var(--or-ico)}
button.notifs-ligne:disabled{cursor:default}
button.notifs-ligne:disabled:hover{background:none}
.notifs-ligne[aria-busy="true"]{cursor:progress;opacity:.7}
.notifs-marque{flex:none;display:grid;place-items:center;width:10px;height:22px}
.notifs-point{width:10px;height:10px;border-radius:50%;background:var(--degrade-or);box-shadow:0 0 0 3px rgba(212,175,55,.18)}
.notifs-corps{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0}
.notifs-titre{font-size:15.5px;font-weight:500;line-height:1.4;color:var(--texte-3);overflow-wrap:anywhere}
.notifs-message{font-size:14.5px;line-height:1.45;color:var(--gris);overflow-wrap:anywhere}
.notifs-date{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--gris-2)}
.notifs-non-lue{background:rgba(212,175,55,.08)}
.notifs-non-lue .notifs-titre{font-weight:700;color:var(--texte)}
.notifs-non-lue .notifs-message{color:var(--texte-3)}

@media(forced-colors:active){
  .notifs-point,.chantier-etape-numero{border:1px solid CanvasText}
  .chantier-etape-actuelle,.etape-rapport-surligne{outline:2px solid Highlight}
}
