/*
 * ÜTOPIYA : couche « jungle numérique ». Dark mode total, vert sauge rare et précieux, Montserrat,
 * photographies de nuit en forêt, l'équipage des neuf guides. Chargée après app.css.
 */

:root {
  --nuit: #060706;
  --verre: rgba(18, 19, 18, .74);
  --verre-fort: rgba(14, 15, 14, .9);
  --liseré: rgba(255, 255, 255, .07);
  --liseré-fort: rgba(255, 255, 255, .12);
  --sauge-halo: rgba(178, 205, 193, .22);
  --ombre: 0 24px 60px rgba(0, 0, 0, .55);
  --largeur-nav: 252px;
  --flou: saturate(120%) blur(18px);
}

/* ---------- Atmosphère : la forêt de nuit, derrière tout ---------- */
.atmosphere { position: fixed; inset: 0; z-index: -1; background: var(--nuit) url("/media/decors/D2_canopee_b.webp") center / cover no-repeat; }
.atmosphere::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 70% 0%, rgba(6,7,6,.55), rgba(6,7,6,.93) 60%, var(--nuit) 100%); }
body.admin, body.espace-client { background: var(--nuit); }

/* ---------- Cartes en verre ---------- */
.bloc { background: var(--verre); border: 1px solid var(--liseré); border-radius: 4px; backdrop-filter: var(--flou); -webkit-backdrop-filter: var(--flou); }
.bloc-tete h2, h2 { letter-spacing: .22em; }
.etiquette { border-radius: 20px; padding: 2px 10px; }
.bouton { border-radius: 2px; transition: border-color .2s, background .2s, transform .2s, filter .2s; }
.bouton.plein { box-shadow: 0 8px 24px rgba(178,205,193,.12); }
.bouton.plein:hover { transform: translateY(-1px); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=url], select, textarea { background: rgba(6,7,6,.7); border-color: var(--liseré-fort); }
.flash { background: var(--verre); backdrop-filter: var(--flou); -webkit-backdrop-filter: var(--flou); }
.entete { border-bottom: 1px solid var(--liseré); }
.liste > li { border-top-color: var(--liseré); }
.bouton-icone { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--liseré-fort); background: transparent; color: var(--texte); cursor: pointer; text-decoration: none; }
.bouton-icone:hover { border-color: var(--sauge); color: var(--blanc); }
.bouton-icone .pastille { position: absolute; top: -4px; right: -6px; }
.ico { flex: none; }

/* ---------- Navigation admin ---------- */
.cadre { grid-template-columns: var(--largeur-nav) minmax(0, 1fr); }
.nav { background: rgba(8, 9, 8, .82); backdrop-filter: var(--flou); -webkit-backdrop-filter: var(--flou); border-right: 1px solid var(--liseré); padding: 26px 16px 20px; gap: 22px; }
.marque-bloc { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 0 6px; }
.sceau { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--sauge); color: var(--blanc); display: flex; align-items: center; justify-content: center; font-weight: 300; font-size: 17px; box-shadow: 0 0 0 4px rgba(178,205,193,.06); }
.marque-sous { display: block; font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: var(--brume); margin-top: 2px; }
.nav-groupe { display: flex; flex-direction: column; gap: 4px; }
.nav-titre { font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: #5f6762; margin: 0 0 4px 12px; }
.nav a.lien { gap: 12px; padding: 9px 12px; border-left: 0; border-radius: 3px; font-size: 13px; letter-spacing: .03em; position: relative; }
.nav a.lien .lien-texte { flex: 1; }
.nav a.lien .ico { color: #6f7873; transition: color .2s; }
.nav a.lien:hover { background: rgba(255,255,255,.04); }
.nav a.lien:hover .ico { color: var(--texte); }
.nav a.lien.actif { background: rgba(178,205,193,.08); color: var(--blanc); }
.nav a.lien.actif .ico { color: var(--sauge); }
.nav a.lien.actif::before { content: ""; position: absolute; left: -16px; top: 8px; bottom: 8px; width: 2px; background: var(--sauge); border-radius: 2px; }
.nav-pied { gap: 12px; }
.installer-app { width: 100%; }
.profil { display: flex; align-items: center; gap: 10px; padding: 10px 6px 0; border-top: 1px solid var(--liseré); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: rgba(178,205,193,.12); color: var(--sauge); display: flex; align-items: center; justify-content: center; font-size: 13px; }
.profil-nom { flex: 1; color: var(--texte); font-size: 13px; }
.barre-mobile, .onglets-bas { display: none; }
main { max-width: 1320px; padding: 34px 44px 90px; }
main.large { max-width: none; }

/* ---------- Héros du camp de base ---------- */
.heros { position: relative; overflow: hidden; border-radius: 6px; border: 1px solid var(--liseré); min-height: 260px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; padding: 36px 38px; margin-bottom: 24px; isolation: isolate; }
.heros-fond { position: absolute; inset: 0; z-index: -2; background: url("/media/decors/D1_sentier_a.webp") center 60% / cover no-repeat; transform: scale(1.04); animation: respiration 28s ease-in-out infinite alternate; }
.heros::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(6,7,6,.92) 0%, rgba(6,7,6,.6) 48%, rgba(6,7,6,.2) 100%), linear-gradient(0deg, rgba(6,7,6,.85), transparent 55%); }
.heros h1 { font-size: clamp(26px, 3.4vw, 44px); letter-spacing: .12em; line-height: 1.12; margin: 6px 0 10px; }
.heros p { max-width: 52ch; color: #cfd4d1; }
.heros .compteurs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.compteur { display: flex; flex-direction: column; min-width: 120px; padding: 12px 16px; border: 1px solid var(--liseré-fort); border-radius: 4px; background: rgba(6,7,6,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); text-decoration: none; color: var(--brume); font-size: 12px; letter-spacing: .06em; transition: border-color .2s, transform .2s; }
.compteur strong { font-size: 26px; font-weight: 300; color: var(--blanc); letter-spacing: .02em; }
.compteur.chaud { border-color: rgba(178,205,193,.55); }
.compteur.chaud strong { color: var(--sauge); }
.compteur:hover { transform: translateY(-2px); border-color: var(--sauge); }
.lucioles { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.lucioles span { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #e9f3c4; box-shadow: 0 0 8px 2px rgba(220,240,170,.55); opacity: 0; animation: luciole 9s ease-in-out infinite; }
.lucioles span:nth-child(1) { left: 62%; top: 38%; animation-delay: 0s; }
.lucioles span:nth-child(2) { left: 78%; top: 58%; animation-delay: 2.2s; animation-duration: 11s; }
.lucioles span:nth-child(3) { left: 70%; top: 22%; animation-delay: 4.1s; }
.lucioles span:nth-child(4) { left: 88%; top: 34%; animation-delay: 1.3s; animation-duration: 12s; }
.lucioles span:nth-child(5) { left: 55%; top: 70%; animation-delay: 5.6s; }
.lucioles span:nth-child(6) { left: 92%; top: 72%; animation-delay: 3.3s; animation-duration: 10s; }
@keyframes luciole { 0%, 100% { opacity: 0; transform: translate(0, 0); } 20% { opacity: .9; } 50% { opacity: .35; transform: translate(-18px, -26px); } 80% { opacity: .8; transform: translate(10px, -40px); } }
@keyframes respiration { from { transform: scale(1.04); } to { transform: scale(1.12) translate(-1%, -1%); } }

/* ---------- L'équipage ---------- */
.equipage { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 10px; }
.membre { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 4px 12px; border-radius: 4px; border: 1px solid var(--liseré); background: rgba(10,11,10,.6); overflow: hidden; min-width: 0; }
.membre img { width: 100%; height: 150px; object-fit: cover; object-position: center 8%; -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent); mask-image: linear-gradient(180deg, #000 62%, transparent); transition: transform .5s ease; }
.membre:hover img { transform: scale(1.05) translateY(-3px); }
.membre-nom { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--blanc); margin-top: -6px; }
.membre-role { font-size: 10.5px; color: var(--brume); line-height: 1.35; margin-top: 3px; min-height: 28px; }
.membre-etat { margin-top: 8px; font-size: 11px; color: var(--brume); display: flex; align-items: flex-start; gap: 6px; justify-content: center; line-height: 1.35; padding: 0 4px; }
.membre-etat::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: #4a524e; }
.membre.mission { border-color: rgba(178,205,193,.35); }
.membre.mission .membre-etat { color: var(--sauge); }
.membre.mission .membre-etat::before { background: var(--sauge); box-shadow: 0 0 0 0 rgba(178,205,193,.6); animation: pouls 1.8s infinite; }
.membre.mission img { animation: flotte 5s ease-in-out infinite; }
.membre.attend { border-color: rgba(224,142,123,.45); }
.membre.attend .membre-etat { color: var(--alerte); }
.membre.attend .membre-etat::before { background: var(--alerte); }
@keyframes pouls { 0% { box-shadow: 0 0 0 0 rgba(178,205,193,.55); } 70% { box-shadow: 0 0 0 8px rgba(178,205,193,0); } 100% { box-shadow: 0 0 0 0 rgba(178,205,193,0); } }
@keyframes flotte { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* ---------- Notifications ---------- */
.notifs { list-style: none; margin: 0; padding: 0; }
.notifs li { display: flex; gap: 14px; padding: 14px 4px; border-top: 1px solid var(--liseré); }
.notifs li:first-child { border-top: 0; }
.notifs li.nouvelle { background: rgba(178,205,193,.035); }
.notif-ico { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--liseré-fort); display: flex; align-items: center; justify-content: center; color: var(--brume); }
.nouvelle .notif-ico { border-color: var(--sauge); color: var(--sauge); }
.notif-titre { color: var(--blanc); text-decoration: none; }
.bureau-etapes { counter-reset: b; list-style: none; padding: 0; margin: 0 0 16px; }
.bureau-etapes li { counter-increment: b; position: relative; padding: 4px 0 10px 34px; font-size: 14px; }
.bureau-etapes li::before { content: counter(b); position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--sauge); color: var(--sauge); font-size: 12px; display: flex; align-items: center; justify-content: center; }

/* ---------- Mobile admin ---------- */
@media (max-width: 1180px) { .equipage { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .barre-mobile { display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 20; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); background: rgba(6,7,6,.86); backdrop-filter: var(--flou); -webkit-backdrop-filter: var(--flou); border-bottom: 1px solid var(--liseré); }
  .barre-mobile .sceau { width: 32px; height: 32px; font-size: 15px; }
  .onglets-bas { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(6,7,6,.92); backdrop-filter: var(--flou); -webkit-backdrop-filter: var(--flou); border-top: 1px solid var(--liseré); padding-bottom: env(safe-area-inset-bottom); }
  .onglets-bas > a, .onglets-bas summary { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0 8px; font-size: 10px; letter-spacing: .08em; color: var(--brume); text-decoration: none; list-style: none; cursor: pointer; }
  .onglets-bas summary::-webkit-details-marker { display: none; }
  .onglets-bas .actif { color: var(--sauge); }
  .onglets-bas .pastille { position: absolute; top: 4px; left: 54%; }
  .plus-menu { position: fixed; left: 12px; right: 12px; bottom: 74px; background: var(--verre-fort); border: 1px solid var(--liseré-fort); border-radius: 8px; padding: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; box-shadow: var(--ombre); }
  .plus-menu a { display: flex; align-items: center; gap: 10px; padding: 12px; color: var(--texte); text-decoration: none; font-size: 13px; border-radius: 4px; }
  .plus-menu a:hover { background: rgba(255,255,255,.05); }
  main { padding: 20px 14px 110px; }
  .heros { padding: 24px 20px; grid-template-columns: 1fr; min-height: 220px; }
  .equipage { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .membre img { height: 120px; }
}

/* ======================================================================
   ESPACE CLIENT : « ça doit en jeter »
   ====================================================================== */
.espace-client .cl-tete { position: absolute; top: 0; left: 0; right: 0; z-index: 10; border-bottom: 0; padding: 22px 44px; background: linear-gradient(180deg, rgba(6,7,6,.75), transparent); }
.espace-client .cl-tete .marque-bloc .sceau { width: 34px; height: 34px; font-size: 15px; }
.cl-compte { display: flex; align-items: center; gap: 12px; color: var(--texte); font-size: 13px; }
.cl-main { max-width: 1120px; padding: 0 24px 90px; }
.cl-main.large { max-width: 1520px; padding-top: 96px; }
.cl-main.sans-heros { padding-top: 110px; }
.cl-pied { border-top: 1px solid var(--liseré); background: rgba(6,7,6,.7); }
.cl-pied .devise { display: block; font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--sauge); margin-bottom: 6px; }

/* Héros client : pleine largeur, la jungle de nuit */
.cl-heros { position: relative; margin: 0 calc(50% - 50vw); min-height: min(72vh, 680px); display: flex; align-items: flex-end; padding: 140px max(24px, calc(50vw - 560px)) 120px; overflow: hidden; isolation: isolate; }
.cl-heros-fond { position: absolute; inset: 0; z-index: -2; background: url("/media/decors/D1_sentier_a.webp") center 55% / cover no-repeat; transform: scale(1.06); animation: respiration 34s ease-in-out infinite alternate; }
.cl-heros.projet .cl-heros-fond { background-image: url("/media/decors/D2_canopee_a.webp"); }
.cl-heros::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, var(--nuit) 0%, rgba(6,7,6,.55) 38%, rgba(6,7,6,.25) 70%, rgba(6,7,6,.6) 100%), linear-gradient(90deg, rgba(6,7,6,.75), transparent 70%); }
.cl-heros-texte { max-width: 680px; }
.cl-heros .sur-titre { color: var(--sauge); }
.cl-heros h1 { font-size: clamp(32px, 5.2vw, 68px); line-height: 1.04; letter-spacing: .1em; font-weight: 300; margin: 10px 0 18px; text-shadow: 0 6px 40px rgba(0,0,0,.5); }
.cl-heros h1 em { font-style: normal; color: var(--sauge); }
.cl-heros p.accroche { font-size: 17px; color: #d7dcd9; max-width: 50ch; }
.cl-heros .guide { position: absolute; right: max(24px, calc(50vw - 560px)); bottom: 0; height: 88%; max-height: 560px; z-index: -1; opacity: .96; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); animation: apparition 1.4s ease both .2s, flotte 7s ease-in-out infinite 1.6s; }
.cl-heros .guide-legende { position: absolute; right: max(24px, calc(50vw - 560px)); bottom: 60px; text-align: right; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--brume); }
.cl-heros .guide-legende strong { display: block; color: var(--blanc); font-weight: 400; letter-spacing: .16em; font-size: 13px; }
@keyframes apparition { from { opacity: 0; transform: translateY(24px); } to { opacity: .96; transform: none; } }

/* La mission du moment : la carte qui chevauche le héros */
.prochaine { position: relative; z-index: 2; margin: -84px auto 0; max-width: 1120px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 28px 32px; border-radius: 6px; background: var(--verre-fort); border: 1px solid rgba(178,205,193,.45); box-shadow: var(--ombre), 0 0 0 6px rgba(178,205,193,.04); backdrop-filter: var(--flou); -webkit-backdrop-filter: var(--flou); }
.prochaine.calme { border-color: var(--liseré-fort); box-shadow: var(--ombre); }
.prochaine-sur { font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--sauge); margin: 0 0 8px; display: flex; align-items: center; gap: 10px; }
.prochaine-sur::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sauge); animation: pouls 2s infinite; }
.prochaine.calme .prochaine-sur::before { background: var(--brume); animation: none; }
.prochaine-titre { font-size: clamp(18px, 2.2vw, 24px); color: var(--blanc); font-weight: 300; margin: 0 0 6px; letter-spacing: .02em; }
.prochaine .discret { margin: 0; }
.prochaine .action-form { margin-top: 14px; }
.prochaine .bouton.plein { padding: 14px 24px; font-size: 12px; }

/* Les expéditions */
.cl-section { display: flex; align-items: center; gap: 16px; font-size: 12px; letter-spacing: .3em; color: var(--brume); margin: 64px 0 22px; }
.cl-section::after { content: ""; flex: 1; height: 1px; background: var(--liseré); }
.expeditions { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 500px), 1fr)); gap: 20px; }
.expedition { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 150px; min-height: 260px; overflow: hidden; border-radius: 6px; border: 1px solid var(--liseré); background: var(--verre); backdrop-filter: var(--flou); -webkit-backdrop-filter: var(--flou); text-decoration: none; color: inherit; transition: border-color .3s, transform .3s, box-shadow .3s; isolation: isolate; }
.expedition:hover { border-color: rgba(178,205,193,.45); transform: translateY(-3px); box-shadow: var(--ombre); }
.expedition-corps { padding: 26px 0 24px 28px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.expedition-type { font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--brume); }
.expedition-nom { font-size: 21px; font-weight: 300; color: var(--blanc); letter-spacing: .04em; margin-bottom: 14px; }
.expedition-guide { position: relative; }
.expedition-guide img { position: absolute; bottom: 0; right: -6px; height: 112%; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent), linear-gradient(90deg, transparent, #000 25%); mask-image: linear-gradient(180deg, #000 70%, transparent); transition: transform .6s ease; }
.expedition:hover .expedition-guide img { transform: translateY(-6px) scale(1.03); }
.expedition-pied { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 14px; }
.expedition-ouvrir { margin-left: auto; padding-right: 4px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--sauge); display: inline-flex; gap: 6px; align-items: center; }

/* Le sentier : l'avancement en 4 haltes */
.sentier { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 6px 0 2px; }
.sentier::before { content: ""; position: absolute; left: 6px; right: 6px; top: 6px; border-top: 1px dashed rgba(255,255,255,.18); }
.sentier .trace { position: absolute; left: 6px; top: 5px; height: 2px; background: var(--sauge); box-shadow: 0 0 10px rgba(178,205,193,.45); }
.sentier .trace.p1 { width: 0; } .sentier .trace.p2 { width: calc(33.3% - 4px); } .sentier .trace.p3 { width: calc(66.6% - 8px); } .sentier .trace.p4, .sentier .trace.p5 { width: calc(100% - 12px); }
.halte { position: relative; padding-top: 22px; min-width: 0; }
.halte:last-of-type { text-align: right; } .halte:not(:first-of-type):not(:last-of-type) { text-align: center; }
.halte i { position: absolute; top: 0; width: 13px; height: 13px; border-radius: 50%; background: var(--nuit); border: 1px solid rgba(255,255,255,.28); }
.halte:first-of-type i { left: 0; } .halte:last-of-type i { right: 0; } .halte:not(:first-of-type):not(:last-of-type) i { left: calc(50% - 6px); }
.halte.faite i { background: var(--sauge); border-color: var(--sauge); }
.halte.ici i { background: var(--nuit); border: 2px solid var(--sauge); animation: pouls 2s infinite; }
.halte span { font-size: 11.5px; color: var(--brume); letter-spacing: .03em; display: block; hyphens: auto; }
.halte.ici span { color: var(--blanc); }
.sentier-legende { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--brume); margin-top: 12px; }
.sentier-legende strong { color: var(--blanc); font-weight: 400; }

/* Page projet client */
.cl-heros.projet { min-height: min(60vh, 560px); padding-bottom: 110px; }
.cl-heros.projet h1 { font-size: clamp(30px, 4.4vw, 58px); }
.cl-heros .sentier { max-width: 560px; margin-top: 22px; }
.onglets-projet { background: transparent; }
.cl-main .bloc { padding: 26px; }
.documents li { align-items: center; }
.doc-ico { flex: none; width: 42px; height: 42px; border-radius: 4px; border: 1px solid var(--liseré-fort); display: flex; align-items: center; justify-content: center; color: var(--sauge); margin-right: 14px; }
.bulle { border-radius: 14px 14px 14px 4px; background: rgba(28,30,28,.85); }
.bulle.moi { border-radius: 14px 14px 4px 14px; background: rgba(178,205,193,.1); }

/* Porte d'entrée (sans session) */
.porte.jungle { position: relative; overflow: hidden; isolation: isolate; }
.porte.jungle::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url("/media/decors/D5_rideau_a.webp") center / cover no-repeat; transform: scale(1.08); animation: respiration 30s ease-in-out infinite alternate; }
.porte.jungle::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(70% 60% at 50% 45%, rgba(6,7,6,.35), rgba(6,7,6,.9)); }
.porte.jungle .bloc { max-width: 440px; padding: 44px 40px; background: var(--verre-fort); border-color: var(--liseré-fort); box-shadow: var(--ombre); text-align: center; }
.porte.jungle .sceau { margin: 0 auto 18px; width: 54px; height: 54px; font-size: 24px; }
.porte.jungle h1 { font-size: 22px; letter-spacing: .26em; }
.porte .devise { font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--sauge); margin-bottom: 22px; }

/* Compléments espace client */
/* Les portraits ont un fond quasi noir : fondus dans la nuit (éclaircir) et adoucis sur les bords */
.cl-heros .guide, .expedition-guide img { width: auto; mix-blend-mode: lighten; -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent), linear-gradient(180deg, #000 72%, transparent); mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent), linear-gradient(180deg, #000 72%, transparent); -webkit-mask-composite: source-in; mask-composite: intersect; }
.cl-heros .guide { z-index: 0; }
.cl-heros .guide-legende { bottom: 128px; z-index: 1; }
.expedition-guide img { right: 0; height: 104%; }
.espace-client { overflow-x: clip; }
.espace-client .cl-tete { display: flex; align-items: center; justify-content: space-between; }
.espace-client .marque-bloc { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--blanc); }
.espace-client .marque-sous { display: block; font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--brume); }
.prochaine-corps { min-width: 0; }
.prochaine .bouton.plein, .expedition-ouvrir { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.prochaine .bouton .ico, .expedition-ouvrir .ico { width: 16px; height: 16px; }
.titre-ico { display: flex; align-items: center; gap: 12px; }
.titre-ico .ico { color: var(--sauge); }
.documents .doc-ico .ico { width: 20px; height: 20px; }
.cl-heros .avancement { margin-top: 8px; }
.cl-heros .sentier-legende { max-width: 560px; }
.expedition .sentier { margin-top: 4px; }
.expedition .sentier-legende { font-size: 12.5px; flex-direction: column; gap: 4px; }
.cl-heros .sur-titre a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(178,205,193,.35); }
.cl-heros .sur-titre a:hover { color: var(--blanc); }
.cl-pied { text-align: center; font-size: 12.5px; color: var(--brume); padding: 34px 20px 40px; }
.cl-pied a { color: var(--texte); }

/* Revue d'un document côté client : un peu plus d'air */
.espace-client .revue-tete { padding-top: 6px; }
.espace-client .scene-vue { border-radius: 6px; box-shadow: var(--ombre); }

@media (prefers-reduced-motion: reduce) {
  .heros-fond, .cl-heros-fond, .porte.jungle::before, .cl-heros .guide, .membre.mission img, .lucioles span { animation: none !important; }
}
@media (max-width: 860px) {
  .espace-client .cl-tete { padding: 16px; }
  .cl-heros { min-height: 76vh; padding: 120px 20px 110px; }
  .cl-heros .guide { right: -40px; height: 62%; opacity: .55; }
  .cl-heros .guide-legende { display: none; }
  .prochaine { grid-template-columns: 1fr; margin-top: -70px; padding: 22px; }
  .expedition { grid-template-columns: minmax(0, 1fr) 96px; }
  .expedition-corps { padding: 20px 0 18px 20px; }
  .cl-main.large { padding-top: 80px; }
  .expedition .halte span { display: none; }
  .expedition .halte { padding-top: 14px; }
  .expedition-guide img { opacity: .8; }
  .halte span { font-size: 10.5px; letter-spacing: 0; }
}
.equipage-bloc { margin-bottom: 20px; }

/* ---------- Maintenance : les voyants ---------- */
.heros-gardien .heros-fond { background-image: url("/media/decors/D4_tronc_a.webp"); }
.heros-perso { position: absolute; right: 30px; bottom: 0; height: 120%; z-index: -1; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); opacity: .95; }
.compteur.alerte strong { color: var(--alerte); }
.compteur.chaud.alerte { border-color: rgba(224,142,123,.6); }
.sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 560px), 1fr)); gap: 18px; margin-bottom: 20px; }
.site { display: flex; flex-direction: column; gap: 14px; }
.site-tete { display: flex; gap: 16px; align-items: center; }
.site-tete h2 { margin: 0 0 2px; font-size: 15px; }
.site-tete h2 a { text-decoration: none; }
.site-tete .discret a { color: var(--brume); }
.voyant { flex: none; width: 18px; height: 18px; border-radius: 50%; background: #4a524e; box-shadow: 0 0 0 5px rgba(255,255,255,.04); }
.voyant-vert .voyant { background: #7fd1a3; box-shadow: 0 0 0 5px rgba(127,209,163,.12), 0 0 18px rgba(127,209,163,.5); }
.voyant-orange .voyant { background: #e8c547; box-shadow: 0 0 0 5px rgba(232,197,71,.12), 0 0 18px rgba(232,197,71,.45); }
.voyant-rouge .voyant { background: #e0705c; box-shadow: 0 0 0 5px rgba(224,112,92,.15), 0 0 22px rgba(224,112,92,.6); animation: alarme 1.4s ease-in-out infinite; }
.site.voyant-rouge { border-color: rgba(224,112,92,.5); }
@keyframes alarme { 50% { box-shadow: 0 0 0 9px rgba(224,112,92,.05), 0 0 30px rgba(224,112,92,.8); } }
.site-chiffres { display: flex; gap: 18px; text-align: right; font-size: 11px; color: var(--brume); letter-spacing: .04em; }
.site-chiffres strong { display: block; font-size: 18px; font-weight: 300; color: var(--blanc); }
.frise { display: grid; grid-template-columns: repeat(48, 1fr); gap: 2px; height: 22px; }
.frise i { border-radius: 2px; background: #2c312e; }
.frise i.vert { background: rgba(127,209,163,.65); } .frise i.orange { background: rgba(232,197,71,.75); } .frise i.rouge { background: #e0705c; }
.constats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.constats li { padding-left: 18px; position: relative; color: var(--texte); }
.constats li::before { content: ""; position: absolute; left: 0; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: #7fd1a3; }
.constats li.orange::before { background: #e8c547; } .constats li.rouge::before { background: #e0705c; } .constats li.info::before { background: var(--brume); }
.constats li.info { color: var(--brume); }
.incident { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 14px; border-radius: 4px; border: 1px solid rgba(232,197,71,.35); background: rgba(232,197,71,.05); font-size: 13.5px; }
.incident.rouge { border-color: rgba(224,112,92,.55); background: rgba(224,112,92,.07); }
.incident.resolu { border-color: var(--liseré); background: transparent; color: var(--brume); }
.site-pied { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--liseré); margin-top: auto; }
@media (max-width: 760px) { .heros-perso { opacity: .35; height: 100%; } .site-chiffres { display: none; } .frise { grid-template-columns: repeat(24, 1fr); } .frise i:nth-child(-n+24) { display: none; } }

/* ---------- Publicité : la Chasseuse ---------- */
.heros-chasseuse .heros-fond { background-image: url("/media/decors/D3_sol_a.webp"); }
.heros-messager .heros-fond { background-image: url("/media/decors/D2_canopee_a.webp"); }
.site.ads-en_ligne .voyant { background: var(--sauge); box-shadow: 0 0 12px rgba(178,205,193,.6); }
.site.ads-en_pause .voyant, .site.ads-preparation .voyant { background: #8a918d; }
.site.ads-arretee .voyant { background: #3a3f3c; }
.site.ads-en_ligne.voyant-orange .voyant { background: #e2a54a; box-shadow: 0 0 12px rgba(226,165,74,.6); }
.periode { margin: 14px 0 6px; font-size: 12px; letter-spacing: .04em; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--liseré); border: 1px solid var(--liseré); border-radius: 4px; overflow: hidden; }
.kpis span { background: rgba(10,12,11,.92); padding: 12px 14px; font-size: 11px; color: var(--brume); letter-spacing: .03em; }
.kpis strong { display: block; font-size: 20px; font-weight: 300; color: var(--blanc); letter-spacing: .02em; margin-bottom: 2px; }
.var { font-style: normal; font-size: 10.5px; margin-left: 4px; color: var(--brume); }
.var.mieux { color: var(--sauge); }
.var.moins { color: #e2a54a; }
.barres { display: flex; align-items: flex-end; gap: 6px; height: 46px; margin: 14px 0 4px; }
.barres i { flex: 1; height: 2px; background: linear-gradient(0deg, rgba(178,205,193,.25), rgba(178,205,193,.6)); border-radius: 2px 2px 0 0; }
.barres i:last-child { background: var(--sauge); }
.releve { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--liseré); }
@media (max-width: 760px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Réseaux : le calendrier du Messager ---------- */
.calendrier .site-tete { flex-wrap: wrap; margin-bottom: 8px; }
.calendrier .site-tete .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.semaine { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--brume); font-weight: 400; margin: 22px 0 8px; }
.publications { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.publication { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--liseré); border-radius: 4px; background: rgba(10,12,11,.6); }
.publication.passee { opacity: .55; }
.publication.etat-a_verifier { border-color: rgba(178,205,193,.45); }
.publication.etat-annulee { opacity: .35; }
.publication.etat-annulee .titre-ligne { text-decoration: line-through; }
.publication.etat-idee { border-style: dashed; }
.pub-date { text-align: center; font-size: 10.5px; color: var(--brume); text-transform: uppercase; letter-spacing: .1em; }
.pub-date strong { display: block; font-size: 22px; font-weight: 300; color: var(--blanc); letter-spacing: 0; }
.pub-reseau { display: block; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--sauge); }
.publication .titre-ligne { display: block; }
.pub-texte { display: block; }
.publication .actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pub-publiee { display: inline-flex; gap: 6px; }
.pub-publiee input { width: 150px; padding: 6px 8px; font-size: 12px; }
@media (max-width: 760px) {
  .publication { grid-template-columns: 44px minmax(0, 1fr); }
  .publication .etiquette, .publication .actions { grid-column: 2; justify-self: start; }
}
.barres i.h1 { height: 10%; }
.barres i.h2 { height: 20%; }
.barres i.h3 { height: 30%; }
.barres i.h4 { height: 40%; }
.barres i.h5 { height: 50%; }
.barres i.h6 { height: 60%; }
.barres i.h7 { height: 70%; }
.barres i.h8 { height: 80%; }
.barres i.h9 { height: 90%; }
.barres i.h10 { height: 100%; }
.semaine { white-space: nowrap; }
.heros-perso { width: auto; mix-blend-mode: lighten; -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%, #000 80%, transparent), linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(90deg, transparent, #000 22%, #000 80%, transparent), linear-gradient(180deg, #000 70%, transparent); -webkit-mask-composite: source-in; mask-composite: intersect; }
.porte-form { text-align: left; margin-top: 8px; }
.porte.jungle .flash { text-align: left; }
.aide-installer { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--liseré-fort); border-radius: 4px; background: rgba(10,12,11,.9); font-size: 12px; line-height: 1.5; color: var(--texte); }
.aide-installer p { margin: 0 0 6px; }
.aide-installer p:last-child { margin: 0; }

/* ---------- Portraits en pied (2/10) : jamais coupés, fondus dans la nuit ---------- */
.heros.heros-gardien, .heros.heros-chasseuse, .heros.heros-messager { min-height: 420px; padding-right: 260px; }
.heros-perso { right: 48px; bottom: 0; top: auto; height: calc(100% - 18px); max-height: none; width: auto; opacity: 1; mix-blend-mode: lighten;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent), linear-gradient(180deg, transparent, #000 6%, #000 86%, transparent); mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent), linear-gradient(180deg, transparent, #000 6%, #000 86%, transparent); -webkit-mask-composite: source-in; mask-composite: intersect; }
.heros:has(.heros-perso)::before { content: ""; position: absolute; z-index: -1; right: 0; bottom: -40px; width: 380px; height: 420px; background: radial-gradient(closest-side, rgba(178,205,193,.12), transparent); pointer-events: none; }
@media (max-width: 760px) { .heros.heros-gardien, .heros.heros-chasseuse, .heros.heros-messager { padding-right: 20px; } .heros-perso { right: -20px; top: 40px; opacity: .35; } }

/* L'équipage : chaque guide en pied ; l'état se voit sur le portrait */
.equipage { gap: 12px; }
.membre { padding: 14px 6px 14px; justify-content: flex-start; background: radial-gradient(120% 70% at 50% 30%, rgba(30,38,34,.55), rgba(8,9,8,.85)); transition: border-color .4s, box-shadow .4s, transform .3s; }
.membre img { width: auto; height: 210px; max-width: 100%; object-fit: contain; object-position: center bottom; mix-blend-mode: lighten; -webkit-mask-image: linear-gradient(180deg, #000 86%, transparent); mask-image: linear-gradient(180deg, #000 86%, transparent); transition: filter .6s, opacity .6s, transform .5s; margin-bottom: 10px; }
.membre-nom { margin-top: 0; }
/* en veille : le guide se repose, portrait éteint */
.membre.veille img { filter: grayscale(1) brightness(.5); opacity: .75; }
.membre.veille:hover img { filter: grayscale(.3) brightness(.85); opacity: 1; }
/* en mission : pleine couleur, halo et léger mouvement */
.membre.mission { box-shadow: 0 0 0 1px rgba(178,205,193,.25), 0 18px 40px -18px rgba(178,205,193,.45); }
.membre.mission::before { content: ""; position: absolute; left: 50%; top: 40px; width: 160px; height: 160px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(178,205,193,.22), transparent); animation: respire 3.2s ease-in-out infinite; pointer-events: none; }
.membre.mission img { filter: none; }
/* attend l'équipe : pleine couleur, liseré d'alerte */
.membre.attend img { filter: saturate(.95); }
.membre.attend { box-shadow: 0 0 0 1px rgba(224,142,123,.25); }
@keyframes respire { 0%, 100% { opacity: .55; transform: translateX(-50%) scale(.92); } 50% { opacity: 1; transform: translateX(-50%) scale(1.06); } }
@media (max-width: 1180px) { .membre img { height: 230px; } }
@media (max-width: 760px) { .membre img { height: 170px; } }
@media (prefers-reduced-motion: reduce) { .membre.mission::before { animation: none; } }
