/* Veille — feuille de style. Direction : noir profond, grandes images d'ambiance, cartes arrondies,
   corail pour l'action, or pour les membres, bleu pour l'Eau et les rappels. */
:root {
  --bg: #000; --bg1: #0B0B0C; --card: #141416; --card2: #1E1E21; --card3: #26262A; --line: #262629; --line2: #333338;
  --tx: #fff; --tx2: #D8D8DC; --mute: #9C9CA3; --mute2: #6A6A70;
  --acc: #FF4D4A; --acc2: #FF7A74; --accbg: rgba(255, 77, 74, .15); --gold: #E8B34A; --goldtx: #F2C766; --blue: #4C9AFF; --green: #3FBF6A; --orange: #F46A2A;
  --nav: rgba(30, 30, 33, .94); --sheet: linear-gradient(160deg, #232326 0%, #141416 60%); --scrim: #0B0B0C; --shadow: 0 -20px 50px rgba(0, 0, 0, .5);
  --f: 'Poppins', 'Helvetica Neue', Arial, sans-serif; --s: 'Lora', Georgia, serif; --fs: 1;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F4F3F0; --bg1: #FAF9F7; --card: #FFFFFF; --card2: #F0EFEC; --card3: #E6E4E0; --line: #E3E1DC; --line2: #D4D2CC;
    --tx: #141416; --tx2: #2A2A2E; --mute: #5F5F66; --mute2: #8A8A90; --acc: #E23D3A; --acc2: #C9302D; --accbg: rgba(226, 61, 58, .1);
    --gold: #B5860F; --goldtx: #8A6508; --blue: #2B6FD6; --nav: rgba(255, 255, 255, .95); --sheet: linear-gradient(160deg, #FFFFFF 0%, #F6F5F2 60%); --scrim: #F4F3F0; --shadow: 0 -12px 40px rgba(0, 0, 0, .12);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #F4F3F0; --bg1: #FAF9F7; --card: #FFFFFF; --card2: #F0EFEC; --card3: #E6E4E0; --line: #E3E1DC; --line2: #D4D2CC;
  --tx: #141416; --tx2: #2A2A2E; --mute: #5F5F66; --mute2: #8A8A90; --acc: #E23D3A; --acc2: #C9302D; --accbg: rgba(226, 61, 58, .1);
  --gold: #B5860F; --goldtx: #8A6508; --blue: #2B6FD6; --nav: rgba(255, 255, 255, .95); --sheet: linear-gradient(160deg, #FFFFFF 0%, #F6F5F2 60%); --scrim: #F4F3F0; --shadow: 0 -12px 40px rgba(0, 0, 0, .12);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: calc(16px * var(--fs)); }
html, body { overflow-x: clip; margin: 0; background: var(--bg); color: var(--tx); font-family: var(--f); }
body { min-height: 100vh; min-height: 100dvh; line-height: 1.45; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: var(--acc); text-decoration: none; }
img { max-width: 100%; }
input, textarea, select { font: inherit; font-size: 1rem; color: var(--tx); background: var(--card2); border: 1px solid var(--line2); border-radius: 16px; padding: 12px 14px; width: 100%; outline: none; min-height: 48px; }
input:focus, textarea:focus, select:focus { border-color: var(--acc); }
textarea { resize: vertical; min-height: 96px; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

#app { max-width: 480px; margin: 0 auto; overflow-x: clip; min-height: 100vh; min-height: 100dvh; position: relative; background: var(--bg); }
@media (min-width: 520px) { #app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }
.page { padding: 0 0 120px; }
.pad { padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
.row { display: flex; align-items: center; gap: 12px; }
.col { display: flex; flex-direction: column; }
.g6 { gap: 6px } .g8 { gap: 8px } .g10 { gap: 10px } .g12 { gap: 12px } .g14 { gap: 14px } .g16 { gap: 16px } .g20 { gap: 20px }
.sp { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }
.mt8 { margin-top: 8px } .mt12 { margin-top: 12px } .mt16 { margin-top: 16px } .mt24 { margin-top: 24px }
.mute { color: var(--mute); } .tx2 { color: var(--tx2); } .gold { color: var(--goldtx); } .acc { color: var(--acc); } .blue { color: var(--blue); }
.sm { font-size: .8125rem; } .xs { font-size: .75rem; } .b { font-weight: 600; }
.center { text-align: center; }
.tab { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: .6875rem; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--acc2); }
h1, h2, h3 { margin: 0; text-wrap: balance; }
.h1 { font-size: 2.1rem; font-weight: 700; letter-spacing: -.5px; line-height: 1.1; }
.h2 { font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.h3 { font-size: 1.1rem; font-weight: 600; line-height: 1.25; }
.ser { font-family: var(--s); }
p { margin: 0; }

/* Décors */
.scene { position: absolute; inset: 0; overflow: hidden; }
.sc-dusk { background: radial-gradient(70% 26% at 50% 104%, #0d0907 60%, transparent 61%), radial-gradient(95% 30% at 6% 96%, #1b120c 58%, transparent 59%), radial-gradient(85% 28% at 96% 92%, #2a1a10 58%, transparent 59%), radial-gradient(circle at 64% 58%, rgba(255, 220, 160, .95) 0, rgba(255, 165, 85, .6) 6%, rgba(220, 120, 60, .25) 18%, transparent 42%), linear-gradient(180deg, #5d5550 0%, #a2856a 42%, #7a5236 66%, #24170f 100%); }
.sc-eau { background: radial-gradient(120% 30% at 50% 100%, #04090c 55%, transparent 56%), radial-gradient(circle at 72% 32%, rgba(210, 235, 255, .7) 0, rgba(120, 170, 210, .3) 14%, transparent 38%), linear-gradient(180deg, #5f8aa3 0%, #2d5873 40%, #14303f 70%, #081820 100%); }
.sc-riviere { background: radial-gradient(70% 30% at 50% 100%, #1b2a1b 60%, transparent 61%), repeating-linear-gradient(170deg, rgba(255, 255, 255, .08) 0 2px, transparent 2px 11px), linear-gradient(180deg, #9bb4bf 0%, #4a6d6a 55%, #1d2c2a 100%); }
.sc-feu { background: radial-gradient(60% 30% at 50% 100%, #120806 60%, transparent 61%), radial-gradient(circle at 50% 72%, #FFC064 0, #F07A2A 10%, rgba(160, 50, 15, .65) 28%, transparent 55%), linear-gradient(180deg, #3a2a24 0%, #24150f 50%, #0d0705 100%); }
.sc-filtre { background: linear-gradient(180deg, #8c7a5e 0 22%, #6f5f48 22% 40%, #4f4234 40% 58%, #2a2420 58% 76%, #d8d0c0 76% 84%, #11100e 84%); }
.sc-pastille { background: radial-gradient(circle at 40% 38%, rgba(220, 255, 240, .55) 0, transparent 30%), radial-gradient(circle at 70% 70%, rgba(120, 220, 210, .3) 0, transparent 35%), linear-gradient(160deg, #4a8a86, #173a3a 70%, #0b1d1d); }
.sc-carte { background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 28px), repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 28px), radial-gradient(circle at 30% 40%, rgba(76, 154, 255, .45) 0, transparent 30%), radial-gradient(circle at 75% 65%, rgba(244, 106, 42, .35) 0, transparent 28%), linear-gradient(160deg, #2a3a44, #121a20); }
.sc-food { background: radial-gradient(circle at 30% 25%, rgba(240, 230, 160, .5) 0, transparent 35%), linear-gradient(180deg, #8a9b5a 0%, #4c6a34 45%, #233a1a 72%, #0e1a0b 100%); }
.sc-sante { background: radial-gradient(circle at 60% 30%, rgba(255, 200, 190, .45) 0, transparent 35%), linear-gradient(180deg, #a3605a 0%, #7a2f2c 45%, #3d1514 72%, #1a0909 100%); }
.sc-securite { background: radial-gradient(circle at 40% 30%, rgba(255, 230, 150, .4) 0, transparent 35%), linear-gradient(180deg, #8a7a3a 0%, #5a4c1c 50%, #1f1a08 100%); }
.sc-defense { background: radial-gradient(circle at 50% 30%, rgba(220, 220, 230, .25) 0, transparent 40%), linear-gradient(180deg, #5a5a60 0%, #2e2e33 55%, #111113 100%); }
.sc-liens { background: radial-gradient(circle at 35% 35%, rgba(210, 190, 255, .4) 0, transparent 35%), linear-gradient(180deg, #7a64b8 0%, #3f2f6e 55%, #170f2c 100%); }
.sc-atelier { background: radial-gradient(circle at 30% 30%, rgba(255, 230, 190, .35) 0, transparent 40%), linear-gradient(180deg, #6b6a66 0%, #3a3936 50%, #121211 100%); }
.sc-crise { background: radial-gradient(circle at 50% 20%, rgba(255, 120, 90, .5) 0, transparent 45%), linear-gradient(180deg, #5a1716 0%, #2a0b0a 60%, #100404 100%); }
.scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, 0) 24%, rgba(0, 0, 0, 0) 45%, color-mix(in srgb, var(--scrim) 85%, transparent) 80%, var(--scrim) 100%); }
.shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, .78) 100%); }

/* Photos des grands thèmes (posées sur les dégradés, qui restent en secours) */
.sc-eau, .sc-food, .sc-sante, .sc-feu, .sc-securite, .sc-defense, .sc-liens { background-size: cover; background-position: center; }
.sc-eau { background-image: url(../img/theme-1-eau.webp); }
.sc-food { background-image: url(../img/theme-2-nourriture.webp); }
.sc-sante { background-image: url(../img/theme-3-sante.webp); }
.sc-feu { background-image: url(../img/theme-4-energie.webp); background-position: center 60%; }
.sc-securite { background-image: url(../img/theme-5-securite.webp); }
.sc-defense { background-image: url(../img/theme-6-defense.webp); }
.sc-liens { background-image: url(../img/theme-7-liens.webp); }
.sc-crise { background: linear-gradient(180deg, rgba(90, 23, 22, .35), #100404 95%), url(../img/crise-stress.webp) center 25% / cover, #100404; }
.silh { position: absolute; width: 190px; height: 190px; left: 50%; margin-left: -45px; top: 30%; fill: #140d09; }

/* En-têtes */
.top-hdr { position: absolute; top: calc(14px + env(safe-area-inset-top)); left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start; z-index: 2; }
.brand { display: flex; flex-direction: column; color: #fff; }
.brand b { font-size: 1.9rem; font-weight: 700; letter-spacing: -.5px; line-height: 1.1; }
.brand span { font-size: .95rem; color: rgba(255, 255, 255, .78); }
.pill-flame { height: 44px; padding: 0 16px; border-radius: 22px; background: rgba(40, 40, 44, .75); display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 1.05rem; color: #fff; }
.pill-flame svg { color: #F0A93A; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--orange); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem; flex: none; }
.avatar.sm { width: 38px; height: 38px; font-size: .95rem; }
.avatar.lg { width: 64px; height: 64px; font-size: 1.6rem; }
.page-hdr { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-top: calc(24px + env(safe-area-inset-top)); padding-bottom: 6px; }
.icon-btn { width: 48px; height: 48px; border-radius: 50%; background: var(--card2); color: var(--tx); display: flex; align-items: center; justify-content: center; flex: none; position: relative; }
.icon-btn.glass { background: rgba(30, 30, 33, .7); color: #fff; }
.icon-btn .dot { position: absolute; top: 3px; right: 3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--acc); color: #fff; font-size: .68rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* Héros */
.hero { position: relative; height: 520px; color: #fff; }
.hero.md { height: 340px; } .hero.sm { height: 260px; }
.hero-body { position: absolute; left: 0; right: 0; bottom: 22px; display: flex; flex-direction: column; gap: 12px; z-index: 1; }
.hero-title { font-size: 1.95rem; line-height: 1.12; font-weight: 700; text-wrap: balance; }
.tag { align-self: flex-start; background: var(--acc); color: #fff; font-size: .6875rem; font-weight: 600; letter-spacing: 2px; padding: 6px 14px; border-radius: 16px; text-transform: uppercase; }
.tag.gold { background: var(--gold); color: #1a1205; }
.tag.blue { background: var(--blue); }

/* Boutons */
.btn { min-height: 56px; border-radius: 28px; background: var(--acc); color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 1.05rem; font-weight: 600; padding: 0 22px; text-align: center; width: 100%; }
.btn:disabled, .btn.off { background: var(--card2); color: var(--mute); pointer-events: none; }
.btn.sm { min-height: 44px; font-size: .9rem; padding: 0 18px; width: auto; }
.btn.ghost { background: transparent; color: var(--mute); min-height: 44px; }
.btn.line { background: transparent; border: 1px solid var(--line2); color: var(--tx); }
.btn.white { background: #fff; color: #0B0B0C; }
.btn.dark { background: var(--card2); color: var(--tx); }
.btn.gold { background: transparent; color: var(--goldtx); }
.btn.danger { background: #B3261E; }
.btn.auto { width: auto; }
.link { color: var(--mute); font-weight: 500; font-size: .95rem; padding: 8px; text-align: center; }

/* Cartes */
.card { border-radius: 26px; background: var(--card); border: 1px solid var(--line); padding: 18px; }
.card.flush { padding: 0; overflow: hidden; }
a.card:not(.row):not(.li) { display: block; }
.card.red { background: linear-gradient(135deg, #3A1615 0%, var(--card) 60%); border-color: #4A2422; }
.card.ember { background: linear-gradient(140deg, #3a1d10 0%, var(--card) 60%); border-color: #3a2a20; }
.card.goldc { background: linear-gradient(110deg, #3a2c12 0%, var(--card) 100%); border-color: #5c4415; }
:root[data-theme="light"] .card.red, :root[data-theme="light"] .card.ember, :root[data-theme="light"] .card.goldc { background: var(--card); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .card.red, :root:not([data-theme="dark"]) .card.ember, :root:not([data-theme="dark"]) .card.goldc { background: var(--card); } }
.card-hd { position: relative; height: 112px; display: flex; flex-direction: column; justify-content: flex-end; padding: 14px 18px; color: #fff; }
.card-hd > * { position: relative; }
.card-hd > .scene, .card-hd > .shade { position: absolute; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.cards { display: flex; flex-direction: column; gap: 16px; padding: 0 14px; }
.promo { border-radius: 22px; background: linear-gradient(110deg, var(--acc2) 0%, var(--acc) 100%); padding: 18px; display: flex; gap: 14px; align-items: center; color: #fff; text-align: left; width: 100%; }
.promo.promo-crise { background: linear-gradient(110deg, #E5413E 0%, #F46A2A 100%); }
.promo .ico { width: 46px; height: 46px; border-radius: 50%; background: rgba(0, 0, 0, .2); display: flex; align-items: center; justify-content: center; flex: none; }

/* Listes réglages */
.group-t { font-size: 1.25rem; font-weight: 700; margin: 22px 4px 10px; }
.list { border-radius: 22px; background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.li { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; color: var(--tx); min-height: 56px; }
.li:last-child { border-bottom: 0; }
.li .ico { width: 36px; height: 36px; border-radius: 12px; background: var(--card2); color: var(--tx2); display: flex; align-items: center; justify-content: center; flex: none; }
.li .t { font-size: .95rem; font-weight: 500; }
.li .d { font-size: .75rem; color: var(--mute); line-height: 1.35; }
.li .chev { color: var(--mute2); flex: none; }
.li.red .t { color: #FF6B66; }
.settings { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.seg button { min-height: 42px; border-radius: 21px; background: var(--card2); color: var(--mute); font-size: .875rem; }
.seg button.on { background: var(--tx); color: var(--bg); font-weight: 600; }
.tog { flex: none; width: 52px; height: 32px; border-radius: 16px; background: var(--card3); border: 1px solid var(--line2); position: relative; transition: background .15s; }
.tog::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 12px; background: var(--mute); transition: transform .15s, background .15s; }
.tog.on { background: var(--acc); border-color: var(--acc); }
.tog.on::after { transform: translateX(20px); background: #fff; }
.hr { height: 1px; background: var(--line); }
input[type=range] { padding: 0; min-height: 30px; background: transparent; border: 0; accent-color: var(--acc); }

/* Choix, chips */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 40px; padding: 0 18px; border-radius: 20px; background: var(--card2); border: 1px solid var(--line2); color: var(--mute); display: inline-flex; align-items: center; font-size: .875rem; white-space: nowrap; }
.chip.on { background: var(--tx); color: var(--bg); border-color: var(--tx); font-weight: 600; }
.choice { border: 1px solid var(--line2); background: var(--card2); color: var(--tx); border-radius: 20px; padding: 14px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.choice.on { border-color: var(--acc); background: var(--acc); color: #fff; box-shadow: 0 8px 24px rgba(255, 77, 74, .3); }
.choice .big { font-size: 1.6rem; font-weight: 700; }
.choice .lab { font-size: .75rem; font-weight: 600; letter-spacing: 1.2px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.opt { width: 100%; text-align: left; min-height: 56px; padding: 12px 16px; border-radius: 18px; border: 1px solid var(--line2); background: var(--card); color: var(--tx); font-size: 1rem; display: flex; gap: 12px; align-items: center; }
.opt .k { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line2); display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 600; flex: none; color: var(--mute); }
.opt.sel { border-color: var(--acc); background: var(--accbg); }
.opt.ok { border-color: var(--green); background: rgba(63, 191, 106, .14); }
.opt.ko { border-color: #E5484D; background: rgba(229, 72, 77, .12); }
.opt.dim { opacity: .55; }
.fb { border-radius: 18px; padding: 14px 16px; font-size: .95rem; line-height: 1.5; }
.fb.ok { background: rgba(63, 191, 106, .14); border: 1px solid rgba(63, 191, 106, .4); }
.fb.ko { background: rgba(229, 72, 77, .12); border: 1px solid rgba(229, 72, 77, .4); }
.fb.info { background: var(--card2); border: 1px solid var(--line2); }

/* Encadrés normalisés des modules */
.box { border-radius: 18px; padding: 14px 16px; border: 1px solid var(--line2); background: var(--card); font-size: .95rem; line-height: 1.55; }
.box .bt { font-size: .7rem; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.box.danger { border-color: rgba(229, 72, 77, .55); background: rgba(229, 72, 77, .1); } .box.danger .bt { color: #FF6B66; }
.box.astuce { border-color: rgba(232, 179, 74, .5); background: rgba(232, 179, 74, .08); } .box.astuce .bt { color: var(--goldtx); }
.box.info .bt { color: var(--blue); }
.box.systeme { border-color: rgba(63, 191, 106, .5); background: rgba(63, 191, 106, .08); } .box.systeme .bt { color: var(--green); }
.box.legal .bt { color: var(--tx2); }
.big-line { font-size: 1.05rem; font-weight: 700; line-height: 1.45; padding: 14px 16px; border-radius: 18px; background: var(--card2); text-align: center; }
.rich p { font-size: 1rem; line-height: 1.65; color: var(--tx2); }
.rich ul, .rich ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--tx2); line-height: 1.55; }
.tbl-w { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); }
.tbl { border-collapse: collapse; width: 100%; font-size: .82rem; min-width: 320px; }
.tbl th { background: var(--card2); text-align: left; padding: 10px; font-weight: 600; color: var(--tx); }
.tbl td { padding: 10px; border-top: 1px solid var(--line); color: var(--tx2); vertical-align: top; }

/* Navigation flottante */
.nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom)); width: calc(min(480px, 100vw) - 28px); height: 70px; border-radius: 35px; background: var(--nav); border: 1px solid var(--line2); display: flex; align-items: center; justify-content: space-between; padding: 0 6px; z-index: 20; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: 26px; color: var(--mute); font-size: .6875rem; position: relative; }
.nav a.on { background: var(--card3); color: var(--tx); }
.nav .dot { position: absolute; top: 4px; right: calc(50% - 20px); width: 9px; height: 9px; border-radius: 50%; background: var(--acc); }

/* Feuilles (onboarding, modales) */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .55); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease; }
.sheet-wrap.out { opacity: 0; transition: opacity .18s; }
.sheet { width: 100%; max-width: 480px; max-height: 88vh; overflow: auto; background: var(--sheet); border: 1px solid var(--line2); border-radius: 32px 32px 0 0; padding: 12px 22px calc(24px + env(safe-area-inset-bottom)); box-shadow: var(--shadow); animation: up .22s ease; }
.grip { width: 44px; height: 5px; border-radius: 3px; background: var(--line2); margin: 0 auto 14px; }
.sh-t { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.ob { position: absolute; left: 12px; right: 12px; bottom: calc(16px + env(safe-area-inset-bottom)); border-radius: 38px; background: var(--sheet); border: 1px solid var(--line2); padding: 24px 24px 20px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow); z-index: 3; animation: up .25s ease; }
.dots { display: flex; gap: 6px; align-items: center; }
.dots i { width: 8px; height: 8px; border-radius: 4px; background: #4A4A4F; }
.dots i.on { background: var(--acc); }
.dots i.cur { width: 28px; background: var(--acc); }
.logo-sq { width: 52px; height: 52px; border-radius: 15px; background: var(--acc); display: flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.tcard { flex: 0 0 150px; height: 196px; border-radius: 26px; position: relative; overflow: hidden; color: #fff; text-align: left; }
.tcard.on { outline: 3px solid var(--acc); outline-offset: -3px; }
.tcard .nm { position: absolute; left: 14px; right: 10px; bottom: 14px; font-size: 1.05rem; font-weight: 600; line-height: 1.2; }
.tcard .ck { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 15px; background: var(--acc); border: 2px solid #fff; display: flex; align-items: center; justify-content: center; }
.tcard .soon { position: absolute; top: 12px; left: 12px; font-size: .65rem; font-weight: 600; letter-spacing: 1px; background: rgba(0, 0, 0, .55); padding: 4px 8px; border-radius: 10px; }
.tcard svg.big { position: absolute; left: 50%; top: 34px; margin-left: -31px; }
.hscroll { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; margin-right: -24px; padding-right: 24px; }
.hscroll::-webkit-scrollbar { display: none; }
.circles { display: flex; justify-content: space-between; }
.circle { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line2); background: var(--card2); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 1.05rem; color: var(--tx); }
.circle.on { background: var(--acc); border-color: var(--acc); color: #fff; }
.circle.done { background: var(--green); border-color: var(--green); color: #fff; }
.circle.lock { border-color: #A07A2E; background: transparent; color: var(--gold); }

/* Lecteur de module */
.player { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.p-top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); padding: calc(12px + env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 10px max(18px, env(safe-area-inset-left)); display: flex; flex-direction: column; gap: 8px; }
.bar8 { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.bar8 span { height: 5px; border-radius: 3px; background: var(--card3); overflow: hidden; }
.bar8 span i { display: block; height: 100%; background: var(--acc); }
.p-body { flex: 1; padding: 8px max(18px, env(safe-area-inset-right)) 130px max(18px, env(safe-area-inset-left)); display: flex; flex-direction: column; gap: 16px; animation: fade .2s ease; }
.p-foot { position: fixed; left: 50%; transform: translateX(-50%); width: calc(min(480px, 100vw) - 28px); bottom: calc(18px + env(safe-area-inset-bottom)); display: flex; gap: 10px; align-items: center; z-index: 6; }
.p-foot .round { width: 60px; height: 60px; border-radius: 30px; background: var(--nav); border: 1px solid var(--line2); color: var(--tx); display: flex; align-items: center; justify-content: center; flex: none; }
.p-foot .grp { height: 60px; border-radius: 30px; background: var(--nav); border: 1px solid var(--line2); display: flex; align-items: center; padding: 0 4px; }
.p-foot .grp button { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; color: var(--tx); font-size: 1.1rem; font-weight: 600; border-radius: 24px; }
.p-foot .grp button.on { background: var(--card3); color: var(--acc); }
.p-foot .btn { flex: 1; min-height: 60px; border-radius: 30px; }
.p-hero { position: relative; height: 300px; margin: 0 calc(-1 * max(18px, env(safe-area-inset-left))); color: #fff; }
.alert-q { font-family: var(--s); font-size: 1.15rem; line-height: 1.6; font-style: italic; color: var(--tx2); }
.alert-q p + p { margin-top: 10px; }
.flash { border-radius: 20px; border: 1px dashed var(--line2); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.steps { counter-reset: s; display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; line-height: 1.5; }
.steps li::before { counter-increment: s; content: counter(s); width: 30px; height: 30px; border-radius: 50%; background: var(--acc); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.regle { font-size: 1.45rem; font-weight: 700; line-height: 1.25; text-wrap: balance; }
.lex { display: flex; flex-direction: column; gap: 8px; }
.lex div { font-size: .9rem; line-height: 1.5; color: var(--tx2); }
.ordre-it { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line2); }
.ordre-it .n { width: 26px; height: 26px; border-radius: 50%; background: var(--card3); display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; flex: none; }
.ordre-it .mv { width: 40px; height: 40px; border-radius: 12px; background: var(--card2); color: var(--tx); display: flex; align-items: center; justify-content: center; }
.conf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.conf button { min-height: 44px; border-radius: 14px; background: var(--card2); color: var(--mute); font-size: .85rem; }
.conf button.on { background: var(--blue); color: #fff; }
.badge-big { width: 120px; height: 120px; border-radius: 50%; margin: 0 auto; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .25), transparent 50%), var(--blue); color: #fff; box-shadow: 0 10px 40px rgba(76, 154, 255, .35); }
.badge-big.ko { background: var(--card3); color: var(--mute); box-shadow: none; }
.tool { border-radius: 22px; background: var(--card); border: 1px solid var(--line2); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 44px; height: 44px; border-radius: 50%; background: var(--card2); font-size: 1.3rem; font-weight: 600; color: var(--tx); }
.stepper .v { min-width: 44px; text-align: center; font-size: 1.3rem; font-weight: 700; }
.result { font-size: 2.6rem; font-weight: 800; line-height: 1; }
.chrono { font-size: 4rem; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.layer { border-radius: 12px; padding: 12px 14px; color: #fff; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }

/* Fil / sections */
.sec-hd { display: flex; justify-content: space-between; align-items: baseline; padding: 0 18px; }
.sec-hd h2 { font-size: 1.3rem; font-weight: 700; }
.mcard { flex: 0 0 210px; display: flex; flex-direction: column; gap: 8px; color: var(--tx); text-align: left; }
.mcard .th { height: 140px; border-radius: 18px; position: relative; overflow: hidden; }
.lockb { position: absolute; top: 10px; left: 10px; width: 32px; height: 32px; border-radius: 16px; background: rgba(0, 0, 0, .6); display: flex; align-items: center; justify-content: center; color: var(--gold); z-index: 1; }
.donb { position: absolute; top: 10px; left: 10px; width: 32px; height: 32px; border-radius: 16px; background: var(--green); display: flex; align-items: center; justify-content: center; color: #fff; z-index: 1; }
.mrow { display: flex; gap: 16px; align-items: center; color: var(--tx); text-align: left; width: 100%; }
.mrow .th { flex: 0 0 100px; height: 100px; border-radius: 18px; position: relative; overflow: hidden; }
.ring { width: 64px; height: 64px; flex: none; position: relative; }
.ring svg { transform: rotate(-90deg); }
.ring .v { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.week7 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; text-align: center; font-size: .75rem; color: var(--mute2); }
.week7 > div { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.week7 .d { width: 30px; height: 30px; border-radius: 15px; background: var(--card3); }
.week7 .d.on { background: var(--acc); }
.week7 .d.now { background: transparent; border: 2px solid var(--acc); }
.stat { display: flex; flex-direction: column; }
.stat b { font-size: 1.7rem; font-weight: 700; line-height: 1.1; }
.stat span { font-size: .75rem; color: var(--mute); }
.tile { border-radius: 20px; background: var(--card); border: 1px solid var(--line); padding: 16px; }
.seg8 { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.seg8 span { height: 4px; border-radius: 2px; background: var(--card3); }
.seg8 span.on { background: var(--acc); }
.badges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 8px; }
.badge { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.badge .c { width: 60px; height: 60px; border-radius: 50%; background: var(--card2); border: 1px solid var(--line2); color: var(--mute2); display: flex; align-items: center; justify-content: center; }
.badge.on .c { background: rgba(76, 154, 255, .18); border: 2px solid var(--blue); color: var(--blue); }
.badge.pale .c { opacity: .45; }
.badge b { font-size: .85rem; line-height: 1.2; }
.badge span { font-size: .7rem; color: var(--mute); line-height: 1.3; }

/* Posts / Secteur / Mag */
.post { display: flex; gap: 14px; align-items: flex-start; }
.post .th { flex: 0 0 88px; height: 88px; border-radius: 18px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 700; color: #fff; position: relative; overflow: hidden; }
.k-alerte { background: linear-gradient(160deg, #E5413E, #5a1716); } .k-attente { background: linear-gradient(160deg, #8a6a2a, #3a2a0a); }
.k-eau { background: linear-gradient(160deg, #4C9AFF, #1d3d66); } .k-aide { background: linear-gradient(160deg, #9b7be0, #33245a); }
.k-offre { background: linear-gradient(160deg, #3FBF6A, #154a26); } .k-membre { background: linear-gradient(160deg, #E8B34A, #5c4415); }
.k-vert { background: linear-gradient(160deg, #3FBF6A, #154a26); } .k-orange { background: linear-gradient(160deg, #F46A2A, #5a2408); } .k-rouge { background: linear-gradient(160deg, #E5484D, #5a1716); }
.art { font-family: var(--s); }
.art p { font-size: 1.05rem; line-height: 1.75; color: var(--tx2); margin-bottom: 14px; }
.fab { position: fixed; right: max(20px, calc(50vw - 240px + 20px)); bottom: calc(100px + env(safe-area-inset-bottom)); width: 58px; height: 58px; border-radius: 29px; background: var(--acc); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); z-index: 15; }

/* Messagerie */
.chat { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 100px; }
.bub { max-width: 82%; padding: 9px 12px 6px; border-radius: 18px; background: var(--card2); align-self: flex-start; word-wrap: break-word; white-space: pre-wrap; font-size: .95rem; line-height: 1.4; }
.bub.me { align-self: flex-end; background: var(--acc); color: #fff; border-bottom-right-radius: 6px; }
.bub:not(.me) { border-bottom-left-radius: 6px; }
.bub .who { font-size: .7rem; font-weight: 600; color: var(--acc2); margin-bottom: 2px; }
.bub .tm { font-size: .65rem; opacity: .75; text-align: right; margin-top: 2px; }
.bub.okm { background: rgba(63, 191, 106, .2); border: 1px solid var(--green); color: var(--tx); }
.bub.alm { background: rgba(229, 72, 77, .18); border: 1px solid #E5484D; color: var(--tx); }
.daysep { align-self: center; font-size: .7rem; color: var(--mute); padding: 4px 12px; border-radius: 12px; background: var(--card); margin: 8px 0; }
.composer { position: fixed; left: 50%; transform: translateX(-50%); width: min(480px, 100vw); bottom: 0; background: var(--bg); border-top: 1px solid var(--line); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 8px; align-items: flex-end; z-index: 10; }
.composer textarea { min-height: 48px; max-height: 120px; border-radius: 24px; }
.composer .icon-btn { background: var(--acc); color: #fff; }
.composer .icon-btn.plain { background: var(--card2); color: var(--tx); }

/* Mode crise */
.crise { min-height: 100vh; min-height: 100dvh; background: #100404; color: #fff; padding: calc(20px + env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 40px max(18px, env(safe-area-inset-left)); display: flex; flex-direction: column; gap: 16px; }
.bigbtn { min-height: 92px; border-radius: 28px; font-size: 1.45rem; font-weight: 700; color: #fff; width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px; }
.bigbtn.ok { background: #1f7a3e; } .bigbtn.help { background: #B3261E; }

/* Verrou PIN */
.lockscr { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px; }
.pin-dots { display: flex; gap: 14px; } .pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--mute); } .pin-dots i.on { background: var(--acc); border-color: var(--acc); }
.keypad { display: grid; grid-template-columns: repeat(3, 72px); gap: 14px; }
.keypad button { width: 72px; height: 72px; border-radius: 50%; background: var(--card2); font-size: 1.5rem; font-weight: 600; color: var(--tx); }

/* Splash, toast */
#splash { position: fixed; inset: 0; z-index: 200; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; color: #fff; transition: opacity .4s; overflow: hidden; }
#splash.out { opacity: 0; pointer-events: none; }
#splash .logo-sq { width: 76px; height: 76px; border-radius: 22px; animation: pop .6s cubic-bezier(.2, 1.4, .4, 1); }
#splash b { font-size: 2rem; font-weight: 700; letter-spacing: 4px; }
#splash span { font-size: .75rem; letter-spacing: 3px; color: #9C9CA3; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(100px + env(safe-area-inset-bottom)); background: var(--tx); color: var(--bg); padding: 12px 18px; border-radius: 22px; font-weight: 600; font-size: .9rem; z-index: 300; max-width: 90%; box-shadow: 0 6px 24px rgba(0, 0, 0, .4); animation: up .2s ease; }
.toast.err { background: #B3261E; color: #fff; }
.empty { text-align: center; padding: 28px 16px; color: var(--mute); border: 1px dashed var(--line2); border-radius: 22px; font-size: .9rem; line-height: 1.5; }
.banner { border-radius: 18px; padding: 12px 14px; background: var(--card2); border: 1px solid var(--line2); font-size: .82rem; color: var(--tx2); line-height: 1.45; }
.fiche-a5 { background: #fff; color: #111; border-radius: 12px; padding: 24px; font-family: var(--f); }
.fiche-a5 h1 { font-size: 1.3rem; } .fiche-a5 .regle { color: #C9302D; }
@media print { .nav, .noprint { display: none !important; } body, #app { background: #fff; } .fiche-a5 { box-shadow: none; } }
@keyframes up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01s !important; transition-duration: .01s !important; } }

/* Mode crise : la photo en tête d'écran, fondue dans le noir */
.crise { background: linear-gradient(180deg, rgba(16, 4, 4, .45) 0, rgba(16, 4, 4, .8) 240px, #100404 420px) , url(../img/crise-stress.webp) center top / 100% auto no-repeat, #100404; }
@media (min-width: 700px) { .crise { background-size: auto, 700px auto, auto; } }

/* Le Mag : éditeur et mise en forme des articles */
.toolbar { display: flex; gap: 2px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; background: var(--card2); border: 1px solid var(--line2); border-bottom: 0; border-radius: 16px 16px 0 0; padding: 4px; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 4; }
.toolbar button { min-width: 42px; height: 42px; border-radius: 12px; color: var(--tx); font-size: 1rem; font-weight: 600; display: flex; align-items: center; justify-content: center; padding: 0 8px; }
.toolbar button:active, .toolbar button:hover { background: var(--card3); }
.art h3 { font-family: var(--f); font-size: 1.25rem; font-weight: 700; color: var(--tx); margin: 22px 0 10px; line-height: 1.3; }
.art ul, .art ol { margin: 0 0 14px; padding-left: 22px; font-size: 1.05rem; line-height: 1.7; color: var(--tx2); }
.art li { margin-bottom: 4px; }
.art blockquote { margin: 0 0 16px; padding: 4px 0 4px 16px; border-left: 3px solid var(--acc); font-style: italic; font-size: 1.1rem; line-height: 1.6; color: var(--tx); }
.art a { color: var(--acc); text-decoration: underline; }
.art figure { margin: 6px 0 18px; }
.art figure img { width: 100%; border-radius: 18px; display: block; }
.art figcaption { font-family: var(--f); font-size: .82rem; color: var(--mute); margin-top: 8px; line-height: 1.4; }
.vid { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 18px; background: #111 center/cover no-repeat; position: relative; overflow: hidden; }
.vid-play { position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%; background: var(--acc); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 24px rgba(0, 0, 0, .4); }
.vid-f figcaption { font-weight: 600; color: var(--tx2); }

/* Recadrage photo */
.crop-wrap { position: fixed; inset: 0; z-index: 400; background: #000; color: #fff; display: flex; flex-direction: column; }
.crop-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(12px + env(safe-area-inset-top)) 14px 10px; }
.crop-top .icon-btn { font-size: 1.4rem; }
.crop-zone { flex: 1; position: relative; overflow: hidden; touch-action: none; cursor: grab; }
.crop-zone canvas { position: absolute; inset: 0; }
.crop-frame { position: absolute; border: 2px solid #fff; border-radius: 6px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .6); pointer-events: none; }
.crop-frame::before, .crop-frame::after { content: ""; position: absolute; border: 0 solid rgba(255, 255, 255, .35); }
.crop-frame::before { left: 33.33%; right: 33.33%; top: 0; bottom: 0; border-left-width: 1px; border-right-width: 1px; }
.crop-frame::after { top: 33.33%; bottom: 33.33%; left: 0; right: 0; border-top-width: 1px; border-bottom-width: 1px; }
.crop-bot { padding: 14px 18px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.galerie { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.galerie button { aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--card2) center/cover no-repeat; position: relative; }
.galerie .add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--mute); font-size: .75rem; border: 1px dashed var(--line2); }
.lieu-blk { border: 1px solid var(--line2); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.ct-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px; gap: 6px; align-items: center; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.ct-row input { min-height: 42px; padding: 8px 10px; font-size: .9rem; }
.ct-row input[data-c=tel] { grid-column: 1 / 3; }
.ct-row button { grid-column: 3; grid-row: 1 / 3; }
.opt.on { border-color: var(--acc); background: var(--accbg); }

/* Visionneuse plein écran (carte d'urgence) */
.vis-wrap { position: fixed; inset: 0; z-index: 300; background: #000; color: #fff; display: flex; flex-direction: column; }
.vis-top { display: flex; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top)) 14px 8px 18px; }
.vis-img { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 8px; touch-action: pan-y; }
.vis-img img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; user-select: none; -webkit-user-drag: none; }
.vis-leg { text-align: center; padding: 10px 18px 0; font-size: 1rem; }
.vis-th { display: flex; gap: 8px; overflow-x: auto; padding: 12px 14px calc(16px + env(safe-area-inset-bottom)); scrollbar-width: none; }
.vis-th button { flex: none; width: 64px; height: 64px; border-radius: 12px; background: #222 center/cover no-repeat; border: 2px solid transparent; opacity: .6; }
.vis-th button.on { border-color: #fff; opacity: 1; }

/* Impression d'un document seul */
#print-zone { display: none; }
@media print {
  html, body { background: #fff !important; }
  body.printing > *:not(#print-zone) { display: none !important; }
  body.printing #print-zone { display: block; color: #000; background: #fff; font-family: Arial, sans-serif; padding: 0; }
  #print-zone h1 { font-size: 16pt; margin: 0 0 10pt; }
  #print-zone h2 { font-size: 13pt; margin: 12pt 0 4pt; }
  #print-zone p, #print-zone li, #print-zone td { font-size: 11pt; }
  #print-zone img { display: block; max-width: 100%; max-height: 90vh; margin: 0 auto 12pt; page-break-inside: avoid; }
}

/* Carte (Mes plans) */
.carte-wrap { position: relative; margin-top: 8px; }
.carte { height: 52vh; min-height: 300px; border-radius: 22px; overflow: hidden; background: #1b1b1b; z-index: 0; }
.carte-bar { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 8px; z-index: 500; }
.carte-bar .icon-btn { width: 44px; height: 44px; background: rgba(20, 20, 20, .82); color: #fff; backdrop-filter: blur(6px); }
.carte-msg { position: absolute; left: 64px; right: 10px; top: 10px; z-index: 500; background: var(--acc); color: #fff; border-radius: 14px; padding: 10px 12px; font-size: .85rem; font-weight: 600; }
.pin { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .45); font-size: .85rem; flex: none; }
.pin.on { transform: scale(1.25); box-shadow: 0 0 0 4px rgba(229, 72, 77, .45), 0 2px 6px rgba(0, 0, 0, .45); }
.pin.sm { width: 24px; height: 24px; border-width: 1.5px; font-size: .75rem; box-shadow: none; }
.pin svg { width: 14px; height: 14px; }
.leaflet-container { font-family: var(--f); }
.lieux-l { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; font-size: .85rem; opacity: .9; }
.art-form { box-shadow: inset 4px 0 0 var(--gold); }

/* Photos des modules */
.mimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Alertes du Clan (signalements façon Waze) */
.sig-rond { border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; flex: none; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .18); }
.sig-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 8px; }
.sig-tuile { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: .8rem; line-height: 1.2; color: var(--tx); padding: 4px 2px; border-radius: 14px; }
.sig-tuile:active { background: var(--line); }
.sig-cta { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 20px; color: #fff; background: linear-gradient(110deg, var(--acc) 0%, var(--acc2) 100%); }
.sig-pin { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .45); position: relative; }
.sig-pin.neuf::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid currentColor; opacity: 0; animation: sigPulse 1.8s ease-out infinite; color: #fff; }
@keyframes sigPulse { 0% { transform: scale(.8); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sig-pin.neuf::after { animation: none; } }
.g4 { gap: 4px; } .mt4 { margin-top: 4px; } .mt10 { margin-top: 10px; } .mb12 { margin-bottom: 12px; }
/* Fil : articles mis en avant qui défilent à l'horizontale */
.car { position: absolute; inset: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.car::-webkit-scrollbar { display: none; }
.car-slide { position: relative; flex: 0 0 100%; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; }
.car-slide .hero-body { bottom: 34px; }
.car-dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; z-index: 2; pointer-events: none; }
.car-dots span { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .45); transition: width .2s, background .2s; }
.car-dots span.on { width: 18px; background: #fff; }
/* Mon programme */
.prog-lien { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 14px; background: var(--line); color: var(--tx); font-size: .75rem; text-decoration: none; }
.prog-badge { display: inline-flex; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #E5484D; color: #fff; font-size: .68rem; font-weight: 700; align-items: center; justify-content: center; vertical-align: 1px; }
.prog-tabs button { position: relative; font-size: .82rem; padding-left: 4px; padding-right: 4px; white-space: nowrap; }
.prog-dot { position: absolute; top: 5px; right: 6px; width: 8px; height: 8px; border-radius: 4px; background: #E5484D; }
.prog-bloc { padding: 14px 14px 4px; }
.prog-cal { width: 50px; height: 54px; border-radius: 12px; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; line-height: 1; }
.prog-cal b { font-size: 1.35rem; } .prog-cal small { font-size: .62rem; margin-top: 2px; opacity: .9; }
.prog-eng { padding: 14px 0; border-top: 1px solid var(--line); }
.prog-bloc .prog-eng:first-child { margin-top: 12px; }
.prog-eng.retard { margin: 0 -14px; padding: 14px; background: rgba(229, 72, 77, .08); box-shadow: inset 4px 0 0 #E5484D; }
.prog-temps { display: block; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.prog-temps span { display: block; height: 100%; border-radius: 3px; }
.sig-minicarte { isolation: isolate; height: 230px; margin: 0; border-top: 1px solid var(--line); background: #1b1b1d; z-index: 0; position: relative; }
.li.sig-sel { background: var(--line); box-shadow: inset 4px 0 0 var(--acc); }

/* Le Clan : 4 boutons carrés illustrés, titre seul */
.clan-tuile { position: relative; display: block; aspect-ratio: 1 / 1; border-radius: 24px; overflow: hidden; color: #fff; text-decoration: none; background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--c) 55%, transparent) 0, transparent 60%), linear-gradient(160deg, color-mix(in srgb, var(--c) 45%, #111) 0%, #0b0b0b 100%); }
.clan-tuile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.clan-tuile .shade { background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, .8) 100%); }
.clan-tuile b { position: absolute; left: 14px; right: 12px; bottom: 14px; font-size: 1.05rem; line-height: 1.2; font-weight: 600; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.clan-tuile .dot { position: absolute; top: 12px; right: 12px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--acc); color: #fff; font-size: .78rem; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.clan-tuile:active { transform: scale(.98); }

/* Services sur la carte : épingle colorée avec pictogramme */
.svc-pin { position: relative; display: flex; align-items: center; justify-content: center; width: var(--t); height: var(--t); border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); background: var(--c); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .45); color: #fff; }
.svc-pin svg { transform: rotate(45deg); }
.svc-ico { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 11px; color: #fff; margin-right: 6px; flex: none; }

/* Annuaire : un membre par ligne */
.ann-row { display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; min-height: 54px; }
.ann-nom { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-align: left; color: var(--tx); background: none; border: 0; padding: 0; }
.ann-t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ann-d { flex: none; font-size: .72rem; color: var(--mute); border: 1px solid var(--line2); border-radius: 8px; padding: 1px 6px; }
.ann-g { flex: none; font-size: .72rem; font-weight: 600; color: var(--mute); white-space: nowrap; }
.ann-c { flex: none; font-size: .72rem; font-weight: 600; color: var(--goldtx); border: 1px solid var(--gold); border-radius: 8px; padding: 1px 7px; white-space: nowrap; }
.ann-m { flex: none; width: 40px; height: 40px; border-radius: 20px; display: flex; align-items: center; justify-content: center; background: var(--card2); color: var(--tx); border: 0; }
.ann-m:active, .ann-nom:active { opacity: .7; }

/* Troc et Entraide : style petites annonces */
.pa-search { display: flex; align-items: center; gap: 10px; background: var(--card2); border: 1px solid var(--line2); border-radius: 24px; padding: 0 16px; color: var(--mute); }
.pa-search input { flex: 1; min-width: 0; border: 0; background: none; padding: 13px 0; color: var(--tx); outline: none; box-shadow: none; }
.pa-cats { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; }
.pa-cats::-webkit-scrollbar { display: none; }
.pa-cat { flex: 0 0 74px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .7rem; line-height: 1.15; text-align: center; color: var(--tx2, var(--tx)); background: none; border: 0; padding: 0; }
.pa-ci { width: 54px; height: 54px; border-radius: 18px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--c) 16%, var(--card2)); color: var(--c); border: 2px solid transparent; }
.pa-cat.on .pa-ci { border-color: var(--c); background: color-mix(in srgb, var(--c) 28%, var(--card2)); }
.pa-cat.on { font-weight: 700; color: var(--tx); }
/* Tri par catégorie : tuiles portrait (1:2) avec photo, nom posé en bas sur un dégradé. Sans photo : l'icône reste. */
.pa-cat { flex: 0 0 66px; }
.pa-cat .pa-ci { position: relative; width: 66px; height: auto; aspect-ratio: 1 / 2; border-radius: 16px; overflow: hidden; }
.pa-cat .pa-ci img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pa-cat .pa-ci::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .15) 45%, transparent 70%); pointer-events: none; }
.pa-cl { position: absolute; left: 4px; right: 4px; bottom: 7px; z-index: 1; color: #fff; font-size: .68rem; font-weight: 600; line-height: 1.15; text-align: center; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
.pa-cat.on .pa-ci { border-width: 3px; }
/* Menu déroulant avec sa propre flèche, décalée du bord droit. */
select.sel-fleche { -webkit-appearance: none; appearance: none; padding-right: 46px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 18px center; background-size: 18px; }
.pa-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
@media (min-width: 640px) { .pa-grille { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pa-carte { position: relative; }
.pa-zone { display: flex; flex-direction: column; gap: 3px; width: 100%; text-align: left; background: none; border: 0; padding: 0; color: var(--tx); }
.pa-img { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1 / 1; border-radius: 16px; background: #222 center / cover no-repeat; margin-bottom: 6px; }
.pa-vide { background: linear-gradient(150deg, color-mix(in srgb, var(--c) 30%, var(--card2)), var(--card)); color: var(--c); }
.pa-badge { position: absolute; left: 8px; top: 8px; font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: 8px; background: var(--acc); color: #fff; }
.pa-badge.cherche { background: var(--gold); color: #111; }
.pa-res { position: absolute; left: 8px; top: 34px; font-size: .68rem; font-weight: 700; padding: 3px 8px; border-radius: 8px; background: rgba(0, 0, 0, .7); color: #fff; }
.pa-t { font-weight: 600; font-size: .92rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pa-m { font-size: .74rem; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Annonce VIP : toute la largeur de la grille, image en paysage, étoile en bas à gauche de la photo. */
.pa-vip { grid-column: 1 / -1; }
.pa-vip .pa-img { aspect-ratio: 2 / 1; }
.pa-vip .pa-t { font-size: 1rem; }
.pa-vip .pa-img { position: relative; }
.pa-etoile { position: absolute; left: 8px; bottom: 8px; width: 30px; height: 30px; border-radius: 15px; display: flex; align-items: center; justify-content: center; background: var(--gold); color: #111; box-shadow: 0 2px 6px rgba(0, 0, 0, .45); pointer-events: none; }
.pa-fav { position: absolute; right: 8px; top: 8px; width: 34px; height: 34px; border-radius: 17px; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .55); color: #fff; border: 0; }
.pa-fav.on, .pa-fav-f.on { color: var(--acc); }
.pa-fav.on { background: #fff; }
.pa-photos { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 16px; scrollbar-width: none; }
.pa-photos::-webkit-scrollbar { display: none; }
.pa-photos img, .pa-photos .pa-img { flex: 0 0 100%; width: 100%; max-height: 300px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px; scroll-snap-align: start; margin: 0; }

/* Coffre : loupe sur les images (plein écran au toucher) */
.coffre-zoom { position: absolute; right: 10px; bottom: 10px; width: 32px; height: 32px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .6); color: #fff; }

/* Sacs d'évacuation : une ligne par objet, quantité abrégée à droite */
.sac-li { padding: 0 6px 0 0 !important; gap: 4px; }
.sac-ok { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; background: none; border: 0; color: inherit; padding: 10px 0 10px 14px; text-align: left; }
.sac-ok .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sac-q { flex: none; font-size: .8rem; font-weight: 600; color: var(--mute); white-space: nowrap; }
.sac-ed { flex: none; width: 34px !important; height: 34px !important; background: none !important; color: var(--mute); }
.sac-add { display: flex; gap: 6px; align-items: center; }
.sac-add input:first-child, .sac-add #sacN { flex: 1; min-width: 0; }
.sac-add .sac-qi, .sac-add #sacQ { flex: 0 0 62px; width: 62px; text-align: center; padding-left: 6px; padding-right: 6px; }
.sac-add .sac-ui, .sac-add #sacU { flex: 0 0 74px; width: 74px; }

/* Objets communs (bleu) et glisser-déposer */
.sac-rep { background: color-mix(in srgb, var(--blue) 14%, var(--card)); border: 1px solid color-mix(in srgb, var(--blue) 45%, transparent); border-radius: 18px; padding: 12px 14px; color: var(--tx); transition: box-shadow .15s; }
.sac-rep b { color: var(--blue); }
.sac-rep-l { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sac-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 14px; background: var(--blue); color: #fff; font-size: .8rem; font-weight: 600; border: 0; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.sac-chip span { font-weight: 400; opacity: .85; }
.sac-commun { box-shadow: inset 4px 0 0 var(--blue); }
.sac-commun .t { color: var(--blue); }
.sac-li { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.sac-tabs .chip.sac-v { border-color: var(--orange); color: var(--orange); }
.sac-tabs .chip.sac-v.on { background: var(--orange); color: #fff; }
.sac-tabs .chip svg { margin-right: 2px; }
.sac-src { opacity: .35; }
.sac-fantome { opacity: .95; transform: scale(1.03); box-shadow: 0 12px 30px rgba(0, 0, 0, .5); border-radius: 16px; background: var(--card2); list-style: none; }
.sac-cible { outline: 3px solid var(--acc) !important; outline-offset: 2px; }
body.sac-glisse { user-select: none; -webkit-user-select: none; }

/* Journal : enregistrement vocal en cours */
.rec-on { background: #B3261E !important; color: #fff !important; }
.rec-pt { width: 10px; height: 10px; border-radius: 5px; background: #fff; margin-right: 6px; animation: recpulse 1s infinite; }
@keyframes recpulse { 50% { opacity: .25; } }

/* Messagerie : photos et notes vocales */
.bub-img { display: block; width: 100%; max-width: 260px; border-radius: 12px; cursor: zoom-in; }
.bub-audio { display: block; width: 240px; max-width: 100%; height: 38px; }

/* Annonces sans photo : image d'illustration de la catégorie */
.pa-gen { position: relative; background-color: color-mix(in srgb, var(--c) 30%, var(--card2)); }
.pa-gen-ic { position: absolute; right: 8px; bottom: 8px; width: 28px; height: 28px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--c); color: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }

/* Réglages : choix de la couleur dominante */
.pastilles { display: flex; flex-wrap: wrap; gap: 10px; }
.pastille { width: 38px; height: 38px; border-radius: 50%; background: var(--p); border: 3px solid transparent; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.pastille.on { border-color: var(--tx); }

/* Inventaire : listes façon « liste de tâches » dans un cadre blanc. Jaune pâle = matériel des formations. */
.todo { background: #FFFFFF; color: #141416; border-radius: 22px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.todo .empty { color: #5F5F66; border-color: #E3E1DC; }
.todo-li { display: flex; align-items: center; gap: 10px; padding: 11px 12px; background: #FFFFFF; border: 1px solid #DEDCD6; border-radius: 14px; color: #141416; }
.todo-li.art-form { background: #FFF5CF; border-color: #EDD98C; box-shadow: none; }
.todo-li b { color: #141416; }
.todo-li .mute, .todo-li .xs.mute { color: #6A6A70 !important; }
.todo-fo { color: #8A6508; font-weight: 600; }
.todo-li .stepper { gap: 6px; }
.todo-li .stepper button { width: 38px; height: 38px; background: #F0EFEC; color: #141416; }
.todo-li .stepper .v { min-width: 34px; font-size: 1.1rem; color: #141416; }
.todo-leg { color: var(--goldtx); }

/* Appel à l'aide : remplissage pendant l'appui long, alarme plein écran à la réception */
.aide-prog { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(255,255,255,.28); pointer-events: none; }
.aide-alarme { position: fixed; inset: 0; z-index: 9999; background: #B3261E; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; animation: aideFlash 1s infinite; }
.aide-alarme .sos { font-size: 4.5rem; font-weight: 800; letter-spacing: 6px; line-height: 1; }
.aide-alarme h2 { font-size: 1.7rem; margin: 0; }
.aide-alarme .btn { width: 100%; max-width: 360px; }
@keyframes aideFlash { 0%, 100% { background: #B3261E; } 50% { background: #6d0f0b; } }
@media (prefers-reduced-motion: reduce) { .aide-alarme { animation: none; } }

/* Carte partagée : épingles, bulles de regroupement, calques, fiches de résultats */
.epingle { position: relative; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50% 50% 50% 3px; transform: rotate(-45deg); background: var(--c); border: 2px solid #fff; box-shadow: 0 3px 8px rgba(0,0,0,.55); color: #fff; }
.epingle > span { transform: rotate(45deg); display: flex; align-items: center; justify-content: center; }
.epingle.grand { width: 40px; height: 40px; border-width: 3px; }
.epingle.grand b { font-size: 1.05rem; font-weight: 800; }
.bulle { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(20,20,20,.88); color: #fff; font-weight: 800; border: 3px solid var(--acc); box-shadow: 0 3px 8px rgba(0,0,0,.5); }
.marker-cluster { background: transparent !important; }
.calq-l { display: flex; align-items: center; gap: 10px; min-height: 52px; border-bottom: 1px solid var(--line); }
.calq-f { width: 30px; height: 30px; flex: none; background: none; }
.calq-f[aria-expanded="true"] svg { transform: rotate(90deg); }
.calq-p { width: 12px; height: 12px; border-radius: 50%; flex: none; border: 1px solid rgba(255,255,255,.5); }
.tog.half { background: var(--acc); border-color: var(--acc); opacity: .55; }
.tog.half::after { transform: translateX(10px); background: #fff; }
.fiche-lieu.sel { border-color: var(--acc); box-shadow: 0 0 0 2px var(--acc) inset; }
.num-res { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--c); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; border: 2px solid #fff; }
.carte-wrap { isolation: isolate; } /* les boutons de la carte restent sous les fenêtres (sheets) */

/* Carte partagée : tri rapide en deux rangées de pastilles. */
.rap1 .chip { height: 38px; font-weight: 600; }
.rap1 .chip.on { background: var(--tx); color: var(--bg, #0B0B0B); border-color: var(--tx); }
.rap1 .chip.rap-grave:not(.on) { border-color: #E5484D; color: #FF6B66; }
.rap-n { margin-left: 6px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #E5484D; color: #fff; font-size: .7rem; display: inline-flex; align-items: center; justify-content: center; }
.chip.rap { gap: 7px; padding: 0 14px 0 6px; height: 36px; }
.rap-i { width: 26px; height: 26px; border-radius: 13px; background: var(--c); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.rap-i svg { width: 14px; height: 14px; }
.chip.rap.on { background: color-mix(in srgb, var(--c) 28%, var(--card2)); border-color: var(--c); color: var(--tx); font-weight: 700; }

/* Plan d'évacuation : sections repliables */
.card.evsec { padding: 0; overflow: hidden; }
.evsec-h { display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px 18px; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.evsec-i { width: 38px; height: 38px; border-radius: 12px; background: var(--card2); display: flex; align-items: center; justify-content: center; flex: none; }
.evsec-c { flex: none; color: var(--mute); transition: transform .2s; display: flex; }
.evsec-h[aria-expanded="true"] .evsec-c { transform: rotate(90deg); }
.evsec-b { padding: 0 18px 18px; border-top: 1px solid var(--line); padding-top: 14px; }

/* Plan d'évacuation : points de rassemblement (contour orange, ouverture sur place) */
.evp { display: block; width: 100%; border: 2px solid var(--orange); border-radius: 22px; overflow: hidden; background: transparent; }
.evp.on { background: var(--card); }
.evp-h { width: 100%; min-height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 18px; color: var(--tx); font-size: 1rem; font-weight: 700; text-align: left; }
.evp-c { display: flex; color: var(--tx); transition: transform .2s; flex: none; }
.evp.on > .evp-h .evp-c { transform: rotate(90deg); }
.evp-b { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.evsq { aspect-ratio: 1; border-radius: 20px; border: 2px solid var(--line2); background: var(--card2); color: var(--tx); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px; text-align: center; }
.evsq-l { font-size: 2.75rem; font-weight: 700; line-height: 1; }
.evsq.on.A { border-color: #3D8BFD; background: rgba(61, 139, 253, .16); }
.evsq.on.B { border-color: #E8A317; background: rgba(232, 163, 23, .16); }
.evsq.vide { border-style: dashed; } .evsq.vide .evsq-l { color: var(--mute); }
.evd { border-radius: 16px; background: var(--card2); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.evrep { display: flex; align-items: center; gap: 10px; width: 100%; padding: 4px 0; color: var(--tx); }
.btn.ev-add { background: var(--orange); color: #111; font-weight: 700; min-height: 60px; border-radius: 22px; }
/* Fond de carte et étapes du tracé */
.carte-fonds { position: absolute; top: 10px; right: 10px; z-index: 500; display: flex; gap: 2px; padding: 4px; border-radius: 18px; background: rgba(20, 20, 20, .82); backdrop-filter: blur(6px); }
.carte-fonds button { height: 30px; padding: 0 10px; border-radius: 14px; color: #ddd; font-size: .75rem; font-weight: 600; }
.carte-fonds button.on { background: #fff; color: #111; }
.etape { display: block; width: 20px; height: 20px; margin: 4px; border-radius: 50%; background: #111; border: 3px solid #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, .6); box-sizing: border-box; }
.etape.deb { background: #fff; border-color: #111; }
.etape.fin { background: var(--acc); }
.etape-mid { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin: 2px; border-radius: 50%; background: rgba(255, 255, 255, .88); color: #111; font-weight: 800; font-size: 15px; line-height: 1; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }

/* Plan d'évacuation : véhicule */
.vfiche { border-radius: 18px; background: var(--card2); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.plaque { flex: none; border-radius: 6px; padding: 2px 8px; background: #fff; color: #111; border: 2px solid #111; font-weight: 700; font-size: .8rem; letter-spacing: 1px; }
.vdoc { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 2px; color: var(--tx); font-size: .9rem; }
.vdoc-ok { width: 24px; height: 24px; border-radius: 50%; background: var(--green); color: #111; display: flex; align-items: center; justify-content: center; flex: none; }
.vdoc-vide { width: 24px; height: 24px; border-radius: 50%; border: 2px dashed var(--mute2); flex: none; box-sizing: border-box; }
.vjauge { display: flex; gap: 10px; align-items: flex-start; border-radius: 14px; border: 1px solid rgba(229, 72, 77, .6); background: rgba(229, 72, 77, .12); padding: 12px 14px; color: #FF6B66; font-weight: 600; font-size: .9rem; }
.vjauge svg { flex: none; }
.ventre { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; border-radius: 22px; border: 1px solid var(--line2); padding: 0 16px; color: var(--tx); }
.sac-reste { background: rgba(76, 154, 255, .12) !important; box-shadow: inset 4px 0 0 var(--blue); }
.sac-reste .t { color: var(--blue); }
.kit-l { width: 12px; height: 12px; border-radius: 4px; background: var(--card3); border: 1px solid var(--line2); display: inline-block; }
.kit-l.reste { background: var(--blue); border-color: var(--blue); }
.g14 { gap: 14px; } .g4 { gap: 4px; } .mt4 { margin-top: 4px; }

/* Sacs d'évacuation : tranche, poids, péremption */
.sac-info { border-radius: 16px; background: var(--card2); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.sac-jauge { height: 8px; border-radius: 4px; background: var(--card3); overflow: hidden; }
.sac-jauge span { display: block; height: 100%; border-radius: 4px; }
.sac-per { display: block; font-size: .7rem; font-weight: 600; }

/* Répertoire radio : fréquences autour de vous */
.fm-g { display: flex; flex-direction: column; gap: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.fm-l { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.fm-f { flex: none; min-width: 92px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--mute); }
.fm-l.un .fm-f { color: var(--tx); font-size: 1.1rem; }

/* Journal de bord : bouton WhatsApp */
.btn.jp-wa { background: #1FA855; color: #fff; }

/* Écran de chargement : version */
#splash small { position: absolute; left: 16px; right: 16px; bottom: calc(24px + env(safe-area-inset-bottom)); text-align: center; font-size: .7rem; color: #6A6A70; letter-spacing: .3px; }

/* Installation de Veille */
.inst-b { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-color: var(--blue); background: linear-gradient(135deg, rgba(76, 154, 255, .14) 0%, var(--card) 70%); }
.inst-i { width: 44px; height: 44px; border-radius: 14px; background: rgba(76, 154, 255, .18); color: var(--blue); display: flex; align-items: center; justify-content: center; flex: none; }
.inst-et { margin: 12px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; font-size: .95rem; line-height: 1.45; }
.inst-et svg { vertical-align: -3px; }

/* Écran d'ouverture DAMOCLÈS : l'épée se balance (0-1,5 s), le crin cède, elle tombe (1,55-2,3 s), le nom reste jusqu'à 3 s */
#splash .sp-pendule { position: absolute; left: 0; right: 0; top: 0; height: 64vh; transform-origin: 50% 0; animation: sp-balance 1.5s ease-in-out both; }
#splash .sp-crin { position: absolute; left: 50%; top: 0; width: 1px; height: 26vh; margin-left: -.5px; background: #9C9CA3; transform-origin: 50% 0; animation: sp-crin .3s 1.5s ease-out forwards; }
#splash .sp-flash { position: absolute; left: 50%; top: 4px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: #fff; box-shadow: 0 0 18px 6px rgba(255, 255, 255, .7); opacity: 0; animation: sp-flash .35s 1.45s ease-out both; }
#splash .sp-epee { position: absolute; left: 50%; top: 26vh; height: 34vh; width: auto; aspect-ratio: 110 / 300; transform: translateX(-50%); animation: sp-chute .75s 1.55s cubic-bezier(.55, 0, 1, .45) forwards; }
#splash .sp-nom { position: absolute; z-index: 1; left: 0; right: 0; top: 66vh; display: flex; flex-direction: column; align-items: center; gap: 12px; animation: sp-nom .6s .2s ease-out both; }
@keyframes sp-balance { 0% { transform: rotate(0); } 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } 100% { transform: rotate(0); } }
@keyframes sp-crin { to { transform: scaleY(0); opacity: 0; } }
@keyframes sp-flash { 0% { opacity: 0; } 30% { opacity: .9; } 100% { opacity: 0; } }
@keyframes sp-chute { 0% { transform: translateX(-50%) translateY(0); } 8% { transform: translateX(-50%) translateY(-4px); } 100% { transform: translateX(-50%) translateY(110vh) rotate(4deg); opacity: 1; } }
@keyframes sp-nom { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
#splash.passe .sp-pendule, #splash.passe .sp-crin, #splash.passe .sp-epee, #splash.passe .sp-flash { animation: none; }
@media (prefers-reduced-motion: reduce) { #splash .sp-pendule, #splash .sp-crin, #splash .sp-epee, #splash .sp-flash, #splash .sp-nom { animation: none !important; } }

/* ---------- Formation : théorie puis pratique (tous les modules) ---------- */
:root { --pra: color-mix(in srgb, var(--acc) 45%, #fff); --pratx: var(--pra); }
:root[data-theme="light"] { --pratx: color-mix(in srgb, var(--acc) 70%, #000); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --pratx: color-mix(in srgb, var(--acc) 70%, #000); } }
.bar8 span.pra { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pra) 55%, transparent); }
.bar8 span.pra i { background: var(--pra); }
.bar8 span.or { box-shadow: none; }
.bar8 span.or i { background: var(--gold); transition: background .6s ease; }
.bar8l { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; margin-top: 5px; font-size: .62rem; font-weight: 700; letter-spacing: 1.3px; }
.bar8l .th { grid-column: 1 / 7; color: var(--acc); }
.bar8l .pr { grid-column: 7 / 9; color: var(--pratx); }
.btn.pra { background: var(--pra); color: #111; }
.btn.or { background: var(--gold); color: #111; }

/* Courte animation d'ouverture d'étape */
.ia-ov { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: flex; justify-content: center; overflow: hidden; cursor: pointer; transition: opacity .25s ease; --c: var(--acc); --ctx: var(--acc); }
.ia-ov.pra { --c: var(--pra); --ctx: var(--pratx); }
.ia-ov.out { opacity: 0; pointer-events: none; }
.ia-ov.photo { background: #0B0B0C; --tx: #fff; --mute: #E2E2E6; --mute2: #C2C2C8; --bg1: #1A1414; --ctx: var(--acc2); color: #fff; }
.ia-ov.photo.pra { --ctx: var(--pra); }
.ia-ov.photo::before { content: ''; position: absolute; top: 0; bottom: 0; left: 0; right: 0; margin: 0 auto; max-width: 480px; background: linear-gradient(180deg, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, .3) 35%, rgba(0, 0, 0, .45) 60%, rgba(0, 0, 0, .85) 100%), var(--fond) center / cover no-repeat; animation: ia-fond 1.6s ease-out both; }
.ia-ov.photo .ia-in { position: relative; }
.ia-ov.photo .ia-rond { background: rgba(11, 11, 12, .55); }
.ia-ov.photo .ia-t h1 { text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
.ia-ov.photo .ia-k { text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.ia-ov.photo.fort::before { background: linear-gradient(180deg, rgba(0, 0, 0, .72) 0%, rgba(0, 0, 0, .55) 35%, rgba(0, 0, 0, .62) 60%, rgba(0, 0, 0, .9) 100%), var(--fond) center / cover no-repeat; }
/* Transitions plein écran avec photo (« Place à la pratique », « Module terminé ») */
.player.plein { position: relative; z-index: 0; background: transparent; --tx: #fff; --tx2: #E8E8EC; --mute: #D0D0D6; --card: rgba(20, 20, 22, .82); --line: #3A3A40; --card3: rgba(255, 255, 255, .18); color: #fff; }
.player.plein .p-top { background: transparent; backdrop-filter: none; }
.pl-fond { position: fixed; top: 0; bottom: 0; left: 0; right: 0; margin: 0 auto; max-width: 480px; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, .3) 30%, rgba(0, 0, 0, .55) 55%, rgba(0, 0, 0, .88) 100%), var(--fond) center / cover no-repeat #0B0B0C; }
.player.plein .tp-titre h1, .player.plein .mf-texte h1 { text-shadow: 0 2px 14px rgba(0, 0, 0, .6); }
.player.plein .tp-titre p, .player.plein .mf-texte p { text-shadow: 0 1px 8px rgba(0, 0, 0, .8); }
@keyframes ia-fond { 0% { transform: scale(1.08); opacity: 0; } 25% { opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
.ia-in { width: min(480px, 100vw); box-sizing: border-box; padding: calc(14px + env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) calc(26px + env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); display: flex; flex-direction: column; }
.ia-c { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; }
.ia-t { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; animation: ia-texte 1s ease-out both; }
.ia-k { font-size: .75rem; font-weight: 700; letter-spacing: 2px; color: var(--ctx, var(--acc)); }
.ia-t h1 { margin: 0; font-size: 2rem; font-weight: 700; }
.ia-t .sub { font-size: .875rem; color: var(--mute); max-width: 300px; }
.ia-skip { margin: 0; text-align: center; font-size: .75rem; color: var(--mute2); }
.ia-rond { position: relative; width: 150px; height: 150px; border-radius: 50%; background: color-mix(in srgb, var(--c) 12%, transparent); border: 2px solid var(--c); display: flex; align-items: center; justify-content: center; box-sizing: border-box; animation: ia-rond .36s ease-out both; }
.ia-rond.clip { overflow: hidden; }
.ia-zone { position: relative; width: 150px; height: 150px; display: flex; align-items: center; justify-content: center; }
@keyframes ia-rond { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ia-texte { 0%, 60% { opacity: 0; transform: translateY(10px); } 100% { opacity: 1; transform: none; } }
/* 1 Briefing : ondes radio */
.ia-onde { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--c); box-sizing: border-box; opacity: 0; animation: ia-onde 1.2s ease-out infinite; }
.ia-poste { width: 110px; height: 110px; border-radius: 50%; background: color-mix(in srgb, var(--c) 14%, transparent); border: 2px solid var(--c); display: flex; align-items: center; justify-content: center; animation: ia-rond .36s ease-out both; }
@keyframes ia-onde { 0% { transform: scale(.72); opacity: 0; } 12% { opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
/* 2 Comprendre : le livre s'ouvre */
.ia-livre { position: relative; width: 96px; height: 66px; perspective: 400px; }
.ia-livre span { position: absolute; top: 0; width: 47px; height: 66px; background: #F3E3E2; }
.ia-livre .g { left: 0; border-radius: 6px 2px 2px 6px; }
.ia-livre .d, .ia-livre .p1, .ia-livre .p2 { left: 49px; border-radius: 2px 6px 6px 2px; }
.ia-livre .p1, .ia-livre .p2 { box-shadow: 0 0 0 1px #E2B6B4 inset; transform-origin: 0 50%; }
.ia-livre .p1 { background: #fff; animation: ia-p1 1s cubic-bezier(.5, 0, .3, 1) both; }
.ia-livre .p2 { background: #FFF6F5; animation: ia-p2 1s cubic-bezier(.5, 0, .3, 1) both; }
.ia-livre .dos { left: 47px; top: -2px; width: 2px; height: 70px; background: var(--c); }
@keyframes ia-p1 { 0%, 30% { transform: rotateY(0); } 72%, 100% { transform: rotateY(-180deg); } }
@keyframes ia-p2 { 0%, 54% { transform: rotateY(0); } 96%, 100% { transform: rotateY(-180deg); } }
/* 3 Le Geste : la main se pose */
.ia-main { animation: ia-main 1s cubic-bezier(.4, 0, .3, 1) both; }
.ia-sol { position: absolute; left: 45px; top: 92px; width: 60px; height: 20px; border-radius: 30px / 10px; border: 2px solid var(--tx); box-sizing: border-box; opacity: 0; animation: ia-sol 1.2s ease-out both; }
@keyframes ia-main { 0%, 18% { transform: translateY(-40px); opacity: 0; } 36% { opacity: 1; } 60% { transform: translateY(4px); } 72%, 100% { transform: none; opacity: 1; } }
@keyframes ia-sol { 0%, 47% { transform: scale(.3); opacity: 0; } 52% { opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }
/* 4 À retenir : l'étoile */
.ia-etoile { animation: ia-etoile 1s cubic-bezier(.3, 0, .2, 1) both; }
.ia-ec { position: absolute; border-radius: 50%; opacity: 0; animation: ia-ec 1.2s ease-out both; }
@keyframes ia-etoile { 0% { transform: scale(.2) rotate(-120deg); opacity: 0; } 54% { transform: scale(1.2) rotate(10deg); opacity: 1; } 72%, 100% { transform: none; opacity: 1; } }
@keyframes ia-ec { 0%, 45% { transform: scale(0); opacity: 0; } 60% { transform: scale(1.2); opacity: 1; } 85% { transform: scale(.6); opacity: .9; } 100% { transform: scale(0); opacity: 0; } }
/* 5 Entraînement : la flèche dans la cible */
.ia-cible { position: absolute; animation: ia-cible 1s ease-out both; }
.ia-fleche { position: absolute; left: -60px; top: 65px; animation: ia-fleche 1s cubic-bezier(.3, 0, .2, 1) both; }
.ia-impact { position: absolute; width: 60px; height: 60px; border-radius: 50%; border: 3px solid var(--tx); box-sizing: border-box; opacity: 0; animation: ia-impact 1.26s ease-out both; }
@keyframes ia-cible { 0% { transform: scale(.6); opacity: 0; } 36% { transform: none; opacity: 1; } 72% { transform: none; } 81% { transform: scale(.94); } 93%, 100% { transform: none; opacity: 1; } }
@keyframes ia-fleche { 0%, 24% { transform: translateX(-260px); opacity: 0; } 30% { opacity: 1; } 72% { transform: none; } 78% { transform: translateX(-4px); } 84%, 100% { transform: none; opacity: 1; } }
@keyframes ia-impact { 0%, 55% { transform: scale(.2); opacity: 0; } 60% { opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }
/* 6 Épreuve théorique : les coches */
.ia-coche { stroke-dasharray: 14; stroke-dashoffset: 14; opacity: 0; animation: ia-coche .27s ease-out both; }
@keyframes ia-coche { 0% { stroke-dashoffset: 14; opacity: 0; } 10% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 1; } }
/* 7 Paquetage : le sac tombe et se ferme */
.ia-sac { transform-origin: 50% 100%; animation: ia-sac 1s cubic-bezier(.5, 0, .5, 1) both; }
.ia-rabat { transform-origin: 8px 6px; animation: ia-rabat 1s ease-out both; }
@keyframes ia-sac { 0%, 18% { transform: translateY(-120px); opacity: 0; } 30% { opacity: 1; } 54% { transform: translateY(0) scaleY(.9); } 66% { transform: translateY(-14px) scaleY(1.03); } 78% { transform: translateY(0) scaleY(.97); } 87%, 100% { transform: none; opacity: 1; } }
@keyframes ia-rabat { 0%, 78% { transform: rotate(-70deg); } 99%, 100% { transform: none; } }
/* 8 Terrain : les roues crantées tournent */
.ia-g1, .ia-g2 { display: block; transform-origin: 50% 50%; }
.ia-g1 { animation: ia-tourne 3s linear infinite; }
.ia-g2 { animation: ia-tourne-inv 3s linear infinite; }
@keyframes ia-tourne { to { transform: rotate(360deg); } }
@keyframes ia-tourne-inv { to { transform: rotate(-480deg); } }

/* Transition « Place à la pratique » : l'épée tombe et fend l'écran Théorie */
.tp { display: flex; flex-direction: column; gap: 14px; min-height: calc(100dvh - 150px); }
.tp-titre { margin-top: 36px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.tp-titre h1 { margin: 0; font-size: 2.75rem; line-height: 1; font-weight: 700; letter-spacing: 3px; }
.tp-titre p { margin: 0; color: var(--tx2); }
.tp-roues { position: relative; width: 140px; height: 92px; align-self: center; }
.tp-bas { flex: 1; display: flex; flex-direction: column; gap: 10px; justify-content: flex-end; }
.tp-regle { border-radius: 18px; background: var(--card); border: 1px solid var(--line); padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.tp-et { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 16px; background: var(--card); }
.tp-et .n { width: 28px; height: 28px; border-radius: 50%; background: var(--pra); color: #111; font-weight: 700; font-size: .8rem; display: flex; align-items: center; justify-content: center; flex: none; }
.tp.anim .tp-titre { animation: tp-titre 7s ease-out both; }
.tp.anim .tp-roues { animation: tp-app 7s ease-out both; }
.tp.anim .tp-bas { animation: tp-bas 7s ease-out both; }
.tp.fin .tp-titre, .tp.fin .tp-roues, .tp.fin .tp-bas { animation: none; }
.tp-vol { position: fixed; top: 0; bottom: 0; left: 0; right: 0; margin: 0 auto; max-width: 480px; z-index: 40; overflow: hidden; cursor: pointer; animation: tp-vol 7s linear forwards; }
.tp-g, .tp-d { position: absolute; top: 0; bottom: 0; width: 50%; overflow: hidden; background: color-mix(in srgb, var(--acc) 55%, #000); color: #fff; }
.tp-g { left: 0; animation: tp-gauche 7s cubic-bezier(.7, 0, .3, 1) forwards; }
.tp-d { right: 0; animation: tp-droite 7s cubic-bezier(.7, 0, .3, 1) forwards; }
.tp-pan { position: absolute; top: 0; width: 200%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.tp-g .tp-pan { left: 0; } .tp-d .tp-pan { right: 0; }
.tp-pan b { font-size: 2.5rem; letter-spacing: 3px; }
.tp-pan > span:last-child { font-size: .95rem; color: #FFE3E2; }
.tp-trait { position: absolute; left: calc(50% - 1px); top: 0; width: 2px; height: 100%; background: #fff; box-shadow: 0 0 14px 3px rgba(255, 255, 255, .8); transform-origin: 50% 0; animation: tp-trait 7s linear forwards; }
.tp-epee { position: absolute; left: calc(50% - 30px); top: 0; animation: tp-epee 7s cubic-bezier(.55, 0, 1, .45) forwards; }
@keyframes tp-vol { 0%, 24.9% { visibility: visible; } 25%, 100% { visibility: hidden; } }
@keyframes tp-epee { 0% { transform: translateY(-260px); opacity: 1; } 12% { transform: translateY(105vh); opacity: 1; } 13%, 100% { transform: translateY(105vh); opacity: 0; } }
@keyframes tp-trait { 0%, 11% { transform: scaleY(0); opacity: 0; } 13% { transform: scaleY(1); opacity: 1; } 18%, 100% { opacity: 0; } }
@keyframes tp-gauche { 0%, 13% { transform: translateX(0); } 24%, 100% { transform: translateX(-102%); } }
@keyframes tp-droite { 0%, 13% { transform: translateX(0); } 24%, 100% { transform: translateX(102%); } }
@keyframes tp-titre { 0%, 22% { opacity: 0; transform: scale(.85); } 30%, 100% { opacity: 1; transform: none; } }
@keyframes tp-app { 0%, 28% { opacity: 0; transform: translateY(6px); } 32%, 100% { opacity: 1; transform: none; } }
@keyframes tp-bas { 0%, 38% { opacity: 0; transform: translateY(14px); } 46%, 100% { opacity: 1; transform: none; } }

/* Transition « Module terminé » : la médaille tombe */
.mf { display: flex; flex-direction: column; gap: 12px; min-height: calc(100dvh - 150px); }
.mf-scene { position: relative; height: 230px; margin-top: 16px; display: flex; align-items: center; justify-content: center; }
.mf-rayons { position: absolute; }
.mf-eclat { position: absolute; width: 120px; height: 120px; border-radius: 50%; border: 3px solid var(--goldtx); box-sizing: border-box; opacity: 0; }
.mf-med { width: 120px; height: 120px; border-radius: 50%; background: color-mix(in srgb, var(--gold) 16%, var(--bg)); border: 3px solid var(--gold); color: var(--goldtx); display: flex; align-items: center; justify-content: center; position: relative; box-sizing: border-box; }
.mf-texte { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.mf-texte h1 { margin: 0; font-size: 2rem; line-height: 1.1; font-weight: 700; letter-spacing: 2px; }
.mf-texte p { margin: 0; color: var(--tx2); }
.mf-bas { flex: 1; display: flex; flex-direction: column; gap: 10px; justify-content: flex-end; }
.mf-tuiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mf-tuiles > div { border-radius: 16px; background: var(--card); border: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.mf-tuiles b { font-size: 1.25rem; }
.mf-tuiles .th .ia-k { color: var(--acc); letter-spacing: 1.2px; }
.mf-tuiles .pr .ia-k { color: var(--pratx); letter-spacing: 1.2px; }
.mf.anim .mf-med { animation: mf-medaille 7s cubic-bezier(.5, 0, .5, 1) both; }
.mf.anim .mf-eclat { animation: mf-eclat 7s ease-out both; }
.mf.anim .mf-rayons { animation: mf-rayons 7s linear both; }
.mf.anim .mf-texte { animation: mf-texte 7s ease-out both; }
.mf.anim .mf-bas { animation: mf-bas 7s ease-out both; }
.mf.fin .mf-med, .mf.fin .mf-eclat, .mf.fin .mf-rayons, .mf.fin .mf-texte, .mf.fin .mf-bas { animation: none; }
@keyframes mf-medaille { 0%, 12% { transform: translateY(-420px) rotate(-25deg); } 24% { transform: translateY(0) rotate(6deg); } 28% { transform: translateY(-26px) rotate(-3deg); } 32%, 100% { transform: none; } }
@keyframes mf-eclat { 0%, 23% { transform: scale(.3); opacity: 0; } 26% { opacity: .9; } 40%, 100% { transform: scale(2.2); opacity: 0; } }
@keyframes mf-rayons { 0%, 24% { opacity: 0; transform: rotate(0); } 32% { opacity: 1; } 100% { opacity: 1; transform: rotate(90deg); } }
@keyframes mf-texte { 0%, 32% { opacity: 0; transform: translateY(12px); } 40%, 100% { opacity: 1; transform: none; } }
@keyframes mf-bas { 0%, 42% { opacity: 0; transform: translateY(14px); } 50%, 100% { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ia-g1, .ia-g2 { animation: none !important; } .tp-vol { display: none; } }
