/* Bénévoles Connect — thème « verre dépoli » arrondi
   Charte : Poppins, rouge #E2001A, anthracite, pastels (rose, jaune, vert, bleu, violet) */
:root {
  --red: #E2001A;
  --red-d: #B80015;
  --red-soft: rgba(226, 0, 26, .1);
  --ink: #1E1E22;
  --ink-2: #44444c;
  --muted: #6c6c78;
  --line: rgba(30, 30, 40, .08);
  --bg: #f3f3f7;
  --rose: #F8C8CC; --jaune: #FFF27F; --vert: #CDEDEA; --bleu: #BEE6F7; --violet: #E0D6EE;
  --glass: rgba(255, 255, 255, .55);
  --glass-strong: rgba(255, 255, 255, .78);
  --glass-border: rgba(255, 255, 255, .75);
  --blur: saturate(170%) blur(22px);
  --shadow: 0 10px 30px -12px rgba(40, 30, 60, .22), 0 2px 6px rgba(40, 30, 60, .05);
  --shadow-lg: 0 24px 60px -20px rgba(40, 30, 60, .35);
  --r-xl: 28px; --r-lg: 22px; --r-md: 16px; --r-sm: 12px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --nav-h: 68px;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink);
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px; line-height: 1.45; overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 700; }
h2 { font-size: 1.1rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: .35rem 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--red); }
img { max-width: 100%; }
:focus-visible { outline: 3px solid rgba(226, 0, 26, .45); outline-offset: 2px; border-radius: 10px; }

/* ---------- Fond : taches colorées sous le verre ---------- */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: radial-gradient(120% 80% at 50% 0%, #fff 0%, var(--bg) 60%); }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .75; animation: float 22s ease-in-out infinite alternate; }
.b1 { width: 60vmax; height: 60vmax; background: #ffd0d6; top: -20vmax; left: -18vmax; }
.b2 { width: 45vmax; height: 45vmax; background: var(--bleu); top: 30%; right: -20vmax; animation-delay: -6s; }
.b3 { width: 40vmax; height: 40vmax; background: var(--violet); bottom: -15vmax; left: -10vmax; animation-delay: -12s; }
.b4 { width: 26vmax; height: 26vmax; background: #fff6b0; top: 12%; right: 10%; opacity: .55; animation-delay: -3s; }
@keyframes float { to { transform: translate3d(4vmax, 3vmax, 0) scale(1.08); } }

/* ---------- Verre ---------- */
.glass, .glass-strong {
  background: var(--glass); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--shadow); border-radius: var(--r-lg);
}
.glass-strong { background: var(--glass-strong); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(255, 255, 255, .9); } .glass-strong { background: #fff; }
}

/* ---------- Écran de chargement ----------
   L'affiche (fond blanc) occupe tout l'espace disponible au-dessus de la carte de chargement,
   centrée et sans déformation ; le fond blanc la prolonge sans bandes visibles. */
#splash { position: fixed; inset: 0; z-index: 100; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(10px, 2.5vh, 24px); padding: calc(clamp(12px, 3vh, 32px) + var(--safe-t)) 16px calc(clamp(12px, 2.5vh, 24px) + var(--safe-b));
  overflow: hidden; transition: opacity .6s ease, transform .6s ease; }
#splash.out { opacity: 0; transform: scale(1.03); pointer-events: none; }
.splash-poster { flex: 0 1 auto; min-height: 0; width: 100%; max-width: 1100px; height: auto; object-fit: contain; object-position: center; display: block; animation: posterIn 1.2s ease-out both; }
@keyframes posterIn { from { transform: scale(1.04); opacity: 0; } to { transform: none; opacity: 1; } }
.splash-card { flex: none; display: flex; align-items: center; gap: 16px; padding: 14px 20px 14px 14px; border-radius: 999px; width: min(100%, 420px);
  animation: cardIn .8s .3s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(24px) scale(.95); } }
.loader { position: relative; width: 76px; height: 76px; flex: none; }
.loader-ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring-track { fill: rgba(255,255,255,.7); stroke: rgba(30,30,40,.08); stroke-width: 6; }
.ring-fill { fill: none; stroke: var(--red); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 339.3; stroke-dashoffset: calc(339.3 * (1 - var(--load, 0))); }
.loader-cross { position: absolute; inset: 15px; width: 46px; height: 46px; animation: pulse 1.2s ease-in-out infinite; }
.cross-fill { transform: translateY(calc(100% * (1 - var(--load, 0)))); transform-box: fill-box; }
.cross-shine { animation: shine 1.6s ease-in-out infinite; }
@keyframes shine { from { transform: translateX(0) skewX(-20deg); } to { transform: translateX(220px) skewX(-20deg); } }
@keyframes pulse { 50% { transform: scale(1.08); } }
.splash-txt { flex: 1; min-width: 0; display: grid; gap: 4px; }
.splash-logo { height: 34px; width: auto; object-fit: contain; object-position: left; }
.splash-app { font-size: .95rem; color: var(--ink-2); }
.splash-app b { color: var(--red); }
.splash-progress { height: 6px; border-radius: 99px; background: rgba(30,30,40,.08); overflow: hidden; }
.splash-progress span { display: block; height: 100%; background: linear-gradient(90deg, #ff5a6c, var(--red)); transform-origin: left; transform: scaleX(0); border-radius: inherit; }
#splash-pct { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Connexion ---------- */
#login { position: relative; z-index: 1; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px calc(24px + var(--safe-b)); }
.login-card { width: min(100%, 440px); padding: 28px 22px; border-radius: var(--r-xl); text-align: center; animation: rise .5s ease both; }
.login-logo { width: 220px; max-width: 70%; margin: 0 auto 10px; display: block; }
.login-card h1 { font-size: 1.7rem; }
.red { color: var(--red); }
.green { color: #0f7a52; }
.warn-t { color: #8a5b00; }
.login-list, .login-user, .login-card .note { text-align: left; }
.login-list { display: grid; gap: 10px; margin: 16px 0 10px; }
.login-user { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); transition: transform .15s; box-shadow: none; }
.login-user:hover { transform: translateY(-1px); background: rgba(255,255,255,.8); }
.login-user:disabled { opacity: .5; }
.lu-txt { flex: 1; display: grid; }
.lu-txt small { color: var(--muted); font-size: .76rem; }

/* ---------- Structure ---------- */
#app { position: relative; z-index: 1; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  margin: 0; padding: calc(8px + var(--safe-t)) 14px 8px; border-radius: 0 0 var(--r-lg) var(--r-lg); border-top: 0; }
.brand { border: 0; background: none; padding: 0; display: flex; }
.brand img { height: 38px; width: auto; }
.tb-app { flex: 1; text-align: right; font-size: .8rem; color: var(--muted); padding-right: 4px; }
.tb-app strong { color: var(--red); font-weight: 600; }
.view { width: 100%; max-width: 680px; margin: 0 auto; padding: 16px 16px calc(var(--nav-h) + 40px + var(--safe-b)); animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.tabbar { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(10px + var(--safe-b));
  width: min(calc(100% - 20px), 520px); display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); padding: 6px; border-radius: 26px; }
.tab { border: 0; background: none; display: grid; justify-items: center; gap: 1px; padding: 7px 2px 5px; border-radius: 20px; color: var(--muted); min-height: 54px; transition: background .2s, color .2s; }
.tab .ic { width: 23px; height: 23px; }
.tab-ic { position: relative; display: grid; }
.tab-lb { font-size: .68rem; font-weight: 500; }
.tab.on { color: var(--red); background: var(--red-soft); }
.tab.on .tab-lb { font-weight: 600; }

.fab { position: fixed; z-index: 29; right: max(16px, calc(50% - 330px)); bottom: calc(var(--nav-h) + 26px + var(--safe-b));
  width: 58px; height: 58px; border-radius: 20px; border: 1px solid rgba(255,255,255,.4); color: #fff;
  background: linear-gradient(145deg, #ff3349, var(--red) 55%, var(--red-d)); box-shadow: 0 14px 30px -10px rgba(226, 0, 26, .7); display: grid; place-items: center; transition: transform .15s; }
.fab .ic { width: 28px; height: 28px; }
.fab:active { transform: scale(.94); }

@media (min-width: 960px) {
  .tabbar { left: 20px; top: 50%; bottom: auto; transform: translateY(-50%); width: 92px; grid-template-columns: 1fr; gap: 6px; padding: 10px 8px; }
  .tab { min-height: 64px; }
  .view { padding-bottom: 60px; }
  .fab { bottom: 32px; }
  .topbar { max-width: 680px; margin: 0 auto; border-radius: 0 0 var(--r-lg) var(--r-lg); }
}

/* ---------- Icônes et pictos ---------- */
.ic { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.picto { width: 44px; height: 44px; object-fit: contain; flex: none; user-select: none; }
.picto.lg { width: 64px; height: 64px; }
.icon-btn { border: 0; background: rgba(255,255,255,.6); width: 40px; height: 40px; border-radius: 14px; display: inline-grid; place-items: center; color: var(--ink-2); position: relative; flex: none; }
.icon-btn:hover { background: #fff; }
.icon-btn.sm { width: 34px; height: 34px; border-radius: 12px; }
.icon-btn.xs { width: 30px; height: 30px; border-radius: 10px; background: transparent; color: var(--muted); }
.icon-btn.xs .ic { width: 15px; height: 15px; }
.icon-btn.red { background: var(--red); color: #fff; }
.bell .ic { width: 21px; height: 21px; }
.dot { position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font-size: .66rem; font-weight: 600; display: grid; place-items: center; border: 2px solid #fff; }
.dot.sm { min-width: 16px; height: 16px; font-size: .6rem; top: -5px; right: -9px; }
.dot.inline { position: static; display: inline-grid; margin-left: 6px; border: 0; }

/* ---------- Typo utilitaires ---------- */
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.tiny { font-size: .74rem; }
.center { text-align: center; justify-content: center; }
.block { display: block; }
.pre { white-space: pre-wrap; }
.mt { margin-top: 14px; } .mt-s { margin-top: 4px; } .mb { margin-bottom: 12px; }
.row { display: flex; align-items: center; }
.row.wrap, .wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; }
.gap { gap: 10px; } .gap-s { gap: 6px; }
.between { justify-content: space-between; }
.end { justify-content: flex-end; align-items: flex-end; }
.grow { flex: 1; min-width: 0; }
.right { text-align: right; }
.clamp2, .clamp3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp2 { -webkit-line-clamp: 2; } .clamp3 { -webkit-line-clamp: 3; }
.pad { padding: 14px; }
.stack { display: grid; gap: 12px; }

/* ---------- Boutons ---------- */
.btn { --h: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--h); padding: 0 18px; border-radius: 16px; border: 1px solid transparent; font-weight: 600; font-size: .92rem; text-decoration: none; transition: transform .12s, background .2s, box-shadow .2s; white-space: nowrap; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.block { display: flex; width: 100%; }
.btn.sm { --h: 36px; padding: 0 12px; font-size: .82rem; border-radius: 12px; }
.btn.xs { --h: 30px; padding: 0 10px; font-size: .76rem; border-radius: 10px; }
.btn.primary { background: linear-gradient(145deg, #ff2b42, var(--red) 60%, var(--red-d)); color: #fff; box-shadow: 0 10px 22px -10px rgba(226, 0, 26, .75); }
.btn.danger { background: var(--ink); color: #fff; }
.btn.soft { background: rgba(255,255,255,.75); border-color: rgba(255,255,255,.9); color: var(--ink); box-shadow: 0 2px 8px rgba(30,30,40,.06); }
.btn.ghost { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn.danger-soft { background: var(--red-soft); color: var(--red-d); }
.btn .ic { width: 17px; height: 17px; }

/* ---------- Badges & chips ---------- */
.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 99px; font-size: .7rem; font-weight: 600; white-space: nowrap; line-height: 1.6; }
.t-gris { background: rgba(30,30,40,.07); color: var(--ink-2); }
.t-rouge { background: rgba(226,0,26,.12); color: var(--red-d); }
.t-vert, .t-ok { background: #d5f1e8; color: #0d6b48; }
.t-bleu { background: #d6eefa; color: #0b5878; }
.t-jaune { background: #fff4b3; color: #6f5200; }
.t-rose { background: #fbdde0; color: #9b1d2b; }
.t-violet { background: #e8e0f4; color: #533c86; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -16px 4px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; margin: 0; padding: 4px 0; }
.chip { flex: none; border: 1px solid rgba(255,255,255,.9); background: rgba(255,255,255,.6); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-radius: 99px; padding: 7px 14px; font-size: .82rem; font-weight: 500; color: var(--ink-2); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.radio { cursor: pointer; padding: 0; overflow: hidden; }
.chip.radio input { position: absolute; opacity: 0; pointer-events: none; }
.chip.radio span { display: block; padding: 7px 14px; }
.chip.radio input:checked + span { background: var(--red); color: #fff; }
.chip.radio input:focus-visible + span { outline: 3px solid rgba(226,0,26,.4); }

.seg { display: flex; padding: 4px; border-radius: 16px; gap: 2px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; box-shadow: none; }
.seg button { flex: 1; border: 0; background: none; padding: 8px 10px; border-radius: 12px; font-size: .84rem; font-weight: 500; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; }
.seg button.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 2px 8px rgba(30,30,40,.08); }
.row .seg { margin: 0; }
.pill-select { border-radius: 14px; padding: 8px 12px; border: 1px solid var(--glass-border); font-size: .84rem; box-shadow: none; max-width: 60%; }

/* ---------- En-têtes ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 14px; }
.page-head p { margin: 2px 0 0; font-size: .86rem; }
.page-picto { width: 62px; height: 62px; border-radius: 20px; background: rgba(255,255,255,.65); display: grid; place-items: center; box-shadow: var(--shadow); border: 1px solid #fff; flex: none; }
.sec-head { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 10px; gap: 10px; }

/* ---------- Accueil ---------- */
.hello { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px; border-radius: var(--r-xl); position: relative; overflow: hidden; }
.hello::after { content: ''; position: absolute; width: 160px; height: 160px; right: -30px; top: -40px; background: radial-gradient(circle, rgba(226,0,26,.14), transparent 70%); }
.hello h1 { font-size: 1.7rem; }
.hello p { margin: 0; }
.hello-picto { width: 78px; height: 78px; position: relative; z-index: 1; }
.wave { display: inline-block; animation: wave 2.2s ease-in-out 1s 2; transform-origin: 70% 70%; }
@keyframes wave { 10%, 30% { transform: rotate(14deg); } 20% { transform: rotate(-8deg); } 40% { transform: rotate(0); } }

.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.quick-tile { display: grid; justify-items: center; gap: 6px; padding: 12px 6px 10px; border-radius: var(--r-lg); text-align: center; font-size: .74rem; line-height: 1.2; color: var(--ink-2); transition: transform .15s; }
.quick-tile:active { transform: scale(.96); }
.quick-tile .picto { width: 40px; height: 40px; }
.quick-tile b { display: block; color: var(--ink); font-weight: 600; font-size: .8rem; }

.hscroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 4px 16px 14px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.ann { isolation: isolate; flex: 0 0 78%; max-width: 320px; scroll-snap-align: start; padding: 14px; border-radius: var(--r-lg); display: flex; flex-direction: column; gap: 4px; cursor: pointer; position: relative; overflow: hidden; }
.ann::before { content: ''; position: absolute; inset: 0; opacity: .5; z-index: -1; }
.tone-rose::before { background: linear-gradient(140deg, var(--rose), transparent 70%); }
.tone-bleu::before { background: linear-gradient(140deg, var(--bleu), transparent 70%); }
.tone-vert::before { background: linear-gradient(140deg, var(--vert), transparent 70%); }
.tone-jaune::before { background: linear-gradient(140deg, var(--jaune), transparent 70%); }
.ann-top { display: flex; justify-content: space-between; align-items: center; }
.pin { color: var(--red); }
.ann h3 { font-size: .98rem; margin-top: 4px; }
.ann-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; }
.ann-picto { width: 46px; height: 46px; opacity: .9; }
.ann-detail .meta { color: var(--ink-2); font-weight: 500; }

/* ---------- Publications ---------- */
.card { padding: 14px; border-radius: var(--r-lg); }
.feed { display: grid; gap: 14px; }
.post { padding: 12px; display: grid; gap: 8px; }
.post-head { display: flex; align-items: center; gap: 10px; }
.ph-txt { flex: 1; min-width: 0; display: grid; }
.ph-txt b { font-size: .92rem; }
.ph-txt small { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: .74rem; }
.caption { margin: 0; font-size: .92rem; }
.media { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--r-md); scrollbar-width: none; cursor: pointer; }
.media::-webkit-scrollbar { display: none; }
.media .photo { flex: 0 0 100%; scroll-snap-align: center; border-radius: var(--r-md); aspect-ratio: 4/3; }
.media.multi .photo { flex-basis: 88%; }
.media-count { font-size: .72rem; color: var(--muted); text-align: right; margin-top: -4px; }
.photo { position: relative; overflow: hidden; background: #eee; width: 100%; aspect-ratio: 1; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo.demo { background: linear-gradient(140deg, var(--g1), var(--g2)); display: grid; place-items: center; }
.photo.demo .picto { width: 46%; height: 46%; filter: drop-shadow(0 6px 12px rgba(0,0,0,.08)); }
.demo-tag { position: absolute; left: 8px; bottom: 8px; font-size: .6rem; padding: 2px 7px; border-radius: 99px; background: rgba(255,255,255,.7); color: var(--muted); }
.post-foot { display: flex; justify-content: space-between; align-items: center; }
.reacts { display: flex; gap: 6px; }
.react { border: 1px solid var(--line); background: rgba(255,255,255,.6); border-radius: 99px; padding: 4px 10px; display: inline-flex; gap: 4px; align-items: center; font-size: .9rem; min-height: 36px; transition: transform .15s; }
.react span { font-size: .76rem; font-weight: 600; color: var(--ink-2); min-width: 6px; }
.react.on { background: var(--red-soft); border-color: rgba(226,0,26,.3); }
.react:active { transform: scale(1.15); }
.last-com { margin: 0; color: var(--ink-2); cursor: pointer; }
.is-hidden { opacity: .6; outline: 2px dashed rgba(226,0,26,.35); }

.avatar { --s: 40px; width: var(--s); height: var(--s); border-radius: 50%; background: var(--av); display: inline-grid; place-items: center; font-weight: 600; font-size: calc(var(--s) * .36); color: var(--ink); flex: none; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.06); vertical-align: middle; }
.avatar.sm { --s: 32px; }
.avatar.xs { --s: 22px; border-width: 1px; }
.avatar.xl { --s: 84px; }

.comments { display: grid; gap: 10px; margin: 10px 0; }
.comment { display: flex; gap: 8px; align-items: flex-start; }
.bubble { flex: 1; background: rgba(255,255,255,.7); border-radius: 4px 16px 16px 16px; padding: 8px 12px; font-size: .86rem; }
.bubble p { margin: 2px 0 0; }
.comment-form { position: sticky; bottom: 0; display: flex; gap: 8px; align-items: center; padding: 8px; border-radius: 20px; margin-top: 8px; }
.comment-form input { flex: 1; border: 0; background: transparent; padding: 8px 4px; min-width: 0; outline: none; }

.consent-box { padding: 12px; border-radius: var(--r-md); margin: 10px 0; display: grid; gap: 6px; box-shadow: none; }
.consent-box .btn { justify-self: start; }

/* ---------- Grille photos ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.grid.sm { grid-template-columns: repeat(4, 1fr); }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.tile { border: 0; padding: 0; border-radius: 14px; overflow: hidden; position: relative; background: none; aspect-ratio: 1; box-shadow: 0 2px 10px rgba(30,30,40,.08); transition: transform .15s; }
.tile:active { transform: scale(.97); }
.tile .photo { height: 100%; }
.tile-n { position: absolute; top: 6px; right: 6px; background: rgba(30,30,34,.55); color: #fff; font-size: .7rem; border-radius: 99px; padding: 2px 7px; display: flex; gap: 3px; align-items: center; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.tile-n .ic { width: 12px; height: 12px; }
.tile-badge { position: absolute; left: 6px; bottom: 6px; }
.tile .demo-tag { display: none; }

/* ---------- Formulaires ---------- */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field > legend { font-size: .8rem; font-weight: 600; color: var(--ink-2); padding: 0; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%; border: 1px solid rgba(30,30,40,.1); background: rgba(255,255,255,.8); border-radius: 14px; padding: 12px 14px; font-size: 16px; outline: none; transition: border .2s, box-shadow .2s; min-height: 48px; }
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus { border-color: rgba(226,0,26,.5); box-shadow: 0 0 0 4px rgba(226,0,26,.1); }
select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236c6c78' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.pill-select { min-height: 40px !important; font-size: .84rem !important; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 380px) { .two { grid-template-columns: 1fr; } }
.toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: .9rem; min-height: 44px; }
.toggle input { position: absolute; opacity: 0; }
.sw { width: 46px; height: 28px; border-radius: 99px; background: rgba(30,30,40,.15); position: relative; flex: none; transition: background .2s; }
.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .2s; }
.toggle input:checked + .sw { background: var(--red); }
.toggle input:checked + .sw::after { transform: translateX(18px); }
.toggle input:focus-visible + .sw { outline: 3px solid rgba(226,0,26,.4); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; padding: 6px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--red); flex: none; margin-top: 1px; }
.checks { border: 0; padding: 0; margin: 0; }

.uploader { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.up-item { position: relative; border-radius: 14px; overflow: hidden; }
.up-item .rm { position: absolute; top: 4px; right: 4px; background: rgba(255,255,255,.85); color: var(--ink); }
.up-add { aspect-ratio: 1; border-radius: 14px; border: 2px dashed rgba(226,0,26,.35); background: rgba(255,255,255,.55); display: grid; place-content: center; justify-items: center; gap: 4px; color: var(--red); font-size: .8rem; font-weight: 600; cursor: pointer; }
.up-add .ic { width: 26px; height: 26px; }
.consent { border-radius: var(--r-md); padding: 12px 14px; margin: 0; display: grid; gap: 8px; border: 1px solid rgba(226,0,26,.25); box-shadow: none; }
.consent legend { font-weight: 600; font-size: .9rem; padding: 0 6px; display: flex; gap: 6px; align-items: center; }
.consent .opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.7); cursor: pointer; font-size: .88rem; border: 1px solid transparent; }
.consent .opt input { accent-color: var(--red); width: 20px; height: 20px; flex: none; margin-top: 1px; }
.consent .opt:has(input:checked) { border-color: rgba(226,0,26,.45); background: #fff; }
.shake { animation: shake .5s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(226,0,26,.2); border-top-color: var(--red); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Notes ---------- */
.note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; margin: 8px 0; }
.note .ic { margin-top: 2px; }
.note.info { background: rgba(190, 230, 247, .55); color: #0b4f6c; }
.note.warn { background: rgba(255, 242, 127, .45); color: #5e4600; }
.note.danger { background: rgba(226, 0, 26, .09); color: var(--red-d); }
.note.ok { background: #d5f1e8; color: #0d6b48; }

/* ---------- Listes ---------- */
.list { padding: 4px; border-radius: var(--r-lg); display: grid; }
.li { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; text-align: left; }
.li + .li { border-top: 1px solid var(--line); border-radius: 0; }
.li-btn { border: 0; background: none; width: 100%; font-size: .92rem; }
.li-btn:hover { background: rgba(255,255,255,.55); }
.li-ic { width: 42px; height: 42px; display: grid; place-items: center; flex: none; }
.li-ic .picto { width: 38px; height: 38px; }
.li-ic.round { border-radius: 14px; background: rgba(255,255,255,.8); color: var(--red); box-shadow: 0 2px 6px rgba(0,0,0,.04); }
.li-thumb { width: 46px; height: 46px; border-radius: 12px; overflow: hidden; flex: none; }
.li-thumb .photo { height: 100%; }
.li-thumb .demo-tag { display: none; }
.notif.unread { background: rgba(226,0,26,.05); }
.unread-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); flex: none; }
.menu { display: grid; gap: 4px; }
.menu-item { display: flex; gap: 12px; align-items: center; padding: 14px 12px; border: 0; background: rgba(255,255,255,.6); border-radius: 14px; text-align: left; font-size: .92rem; }
.menu-item.danger { color: var(--red-d); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.stats.four { grid-template-columns: repeat(4, 1fr); margin: 0 0 12px; gap: 8px; }
.stat { padding: 12px 6px; text-align: center; display: grid; border-radius: var(--r-md); border: 1px solid var(--glass-border); }
button.stat { cursor: pointer; font: inherit; }
.stat.on { outline: 2px solid var(--red); }
.stat b { font-size: 1.35rem; line-height: 1.1; }
.stat span { font-size: .7rem; color: var(--muted); }

.empty { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 26px 18px; border-radius: var(--r-lg); }
.empty .picto { width: 72px; height: 72px; opacity: .85; margin-bottom: 6px; }

/* ---------- Véhicules ---------- */
.veh { display: grid; gap: 10px; }
.veh-top { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.veh-pic { isolation: isolate; width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; flex: none; position: relative; overflow: hidden; background: rgba(255,255,255,.7); }
.veh-pic::before { content: ''; position: absolute; inset: 0; opacity: .7; }
.veh-pic .picto { position: relative; width: 48px; height: 48px; }
.veh h3 { font-size: 1rem; }
.veh p { margin: 1px 0; }
.resa { display: grid; gap: 4px; }
.resa p { margin: 0; }
.trip { display: grid; gap: 6px; cursor: pointer; }
.trip p { margin: 0; }
.trip-line { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; font-size: .78rem; background: rgba(255,255,255,.55); border-radius: 14px; padding: 8px 10px; }
.trip-dist { padding: 4px 10px; border-radius: 99px; background: var(--red-soft); color: var(--red-d); font-size: .82rem; position: relative; }
.sched { padding: 10px 12px; border-radius: var(--r-md); display: grid; gap: 4px; box-shadow: none; }
.sched p { margin: 0; }
.live-check { margin: -6px 0 0; min-height: 1.2em; }
.timeline { display: grid; gap: 10px; padding-left: 6px; }
.tl { display: flex; gap: 12px; position: relative; }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--red); border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(226,0,26,.3); margin-top: 4px; flex: none; }
.tl + .tl::before { content: ''; position: absolute; left: 5px; top: -12px; height: 14px; border-left: 2px dotted rgba(226,0,26,.3); }
details summary { cursor: pointer; list-style: none; }
details summary::-webkit-details-marker { display: none; }

/* ---------- Idées ---------- */
.idea { display: grid; gap: 8px; }
.idea-main { display: flex; gap: 12px; cursor: pointer; }
.idea-pic { width: 54px; height: 54px; border-radius: 16px; background: rgba(255,255,255,.75); display: grid; place-items: center; flex: none; }
.idea-pic .picto { width: 40px; height: 40px; }
.idea h3 { margin: 4px 0 2px; }
.resp { display: flex; gap: 6px; background: rgba(255,255,255,.6); padding: 8px 10px; border-radius: 12px; margin: 0; }
.resp-box { padding: 12px; border-radius: var(--r-md); margin: 12px 0; border-left: 4px solid var(--red); box-shadow: none; }
.support { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: rgba(255,255,255,.7); border-radius: 99px; padding: 6px 12px; min-height: 38px; font-size: .82rem; transition: transform .15s; }
.support span { font-weight: 700; }
.support small { color: var(--muted); }
.support.on { background: var(--red); border-color: var(--red); color: #fff; }
.support.on small { color: rgba(255,255,255,.85); }
.support:active { transform: scale(1.06); }

/* ---------- Profil ---------- */
.profile { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 22px 16px; border-radius: var(--r-xl); }
.profile h1 { font-size: 1.4rem; margin-top: 4px; }
.profile p { margin: 0; }

/* ---------- Communication ---------- */
.control { display: grid; gap: 14px; }
.control-photo .photo { border-radius: var(--r-md); aspect-ratio: 4/3; }
@media (min-width: 720px) { .control { grid-template-columns: 1fr 1fr; align-items: start; } .control-photo { position: sticky; top: 0; } }

/* ---------- Feuilles (bottom sheets) ---------- */
#sheets { position: relative; z-index: 60; }
.sheet-wrap { position: fixed; inset: 0; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(20, 16, 30, .28); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s; }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: 92dvh; display: flex; flex-direction: column; border-radius: 30px 30px 0 0; border-bottom: 0; transform: translateY(100%); transition: transform .34s cubic-bezier(.2, .9, .25, 1); box-shadow: var(--shadow-lg); background: rgba(255,255,255,.86); }
.sheet.wide { max-width: 720px; }
.sheet-wrap.in .sheet { transform: none; }
.sheet-wrap.in .sheet-backdrop { opacity: 1; }
.grab { width: 44px; height: 5px; border-radius: 9px; background: rgba(30,30,40,.18); margin: 8px auto 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px 6px 20px; }
.sheet-head h2 { font-size: 1.05rem; }
.sheet-body { overflow-y: auto; padding: 6px 18px calc(22px + var(--safe-b)); overscroll-behavior: contain; }
.sheet-body > .post { box-shadow: none; }
.lead { font-size: .98rem; }
@media (min-width: 760px) {
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 30px; border-bottom: 1px solid var(--glass-border); transform: translateY(30px) scale(.97); opacity: 0; transition: transform .3s, opacity .3s; }
  .sheet-wrap.in .sheet { opacity: 1; }
  .grab { display: none; }
}

/* ---------- Toasts ---------- */
#toasts { position: fixed; z-index: 90; top: calc(12px + var(--safe-t)); left: 50%; transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 18px; font-size: .88rem; font-weight: 500; opacity: 0; transform: translateY(-14px) scale(.98); transition: all .3s cubic-bezier(.2, .9, .3, 1.2); background: rgba(255,255,255,.88); }
.toast.in { opacity: 1; transform: none; }
.toast.t-ok .ic { color: #0f7a52; }
.toast.t-err { color: var(--red-d); }
.toast.t-info .ic { color: #0b5878; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .cross-fill { transition: none; }
}

/* ---------- Authentification ---------- */
.form.left { text-align: left; margin-top: 14px; }
.pwd { position: relative; display: block; }
.pwd input { padding-right: 48px !important; }
.pwd .icon-btn { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.temp-pwd { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-radius: var(--r-md); margin: 12px 0; box-shadow: none; }
.temp-pwd code { font-size: 1.3rem; font-weight: 600; letter-spacing: .06em; user-select: all; word-break: break-all; }
.spinner.sm { width: 16px; height: 16px; border-width: 2px; border-color: rgba(255,255,255,.4); border-top-color: #fff; }

/* ---------- Finitions ---------- */
.media-dots { display: flex; justify-content: center; gap: 6px; margin-top: -2px; }
.media-dots span { width: 6px; height: 6px; border-radius: 99px; background: rgba(30,30,40,.18); transition: width .25s, background .25s; }
.media-dots span.on { width: 18px; background: var(--red); }
.toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.toolbar .pill-select { max-width: none; }
.toolbar .seg { margin: 0; }
.toolbar .seg button { padding: 8px 10px; flex: none; }
.back { border: 0; background: rgba(255,255,255,.6); border-radius: 99px; padding: 6px 12px 6px 8px; display: inline-flex; align-items: center; gap: 4px; font-size: .82rem; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }
.back:hover { background: #fff; }
.offline { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 99px; background: var(--red-soft); color: var(--red-d); font-weight: 600; font-size: .74rem; }
.offline .ic { width: 14px; height: 14px; }
.comments { padding-bottom: 6px; }
.comment-form { margin-bottom: 4px; }

/* ---------- Paramètres du site ---------- */
.set-card { padding: 16px; border-radius: var(--r-lg); margin-bottom: 14px; scroll-margin-top: 90px; }
.set-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.set-head h2 { font-size: 1.05rem; }
.set-head p { margin: 2px 0 0; }
.set-card .btn.primary { justify-self: start; }
.num-wrap { position: relative; display: block; }
.num-wrap em { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: .8rem; color: var(--muted); pointer-events: none; }
.num-wrap input { padding-right: 56px !important; }
input[type=range] { accent-color: var(--red); min-height: 32px !important; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; }
.test-row { display: flex; gap: 10px; align-items: flex-end; margin-top: 14px; flex-wrap: wrap; }
.test-row .field { flex: 1; min-width: 200px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.spinner.sm.dark { border-color: rgba(226,0,26,.2); border-top-color: var(--red); display: inline-block; vertical-align: middle; }
.toggle small.block { display: block; margin-top: 2px; }

/* Écran de chargement en paysage sur téléphone : affiche et chargement côte à côte */
@media (orientation: landscape) and (max-height: 540px) {
  #splash { flex-direction: row; padding: calc(10px + var(--safe-t)) calc(16px + env(safe-area-inset-right, 0px)) calc(10px + var(--safe-b)) calc(16px + env(safe-area-inset-left, 0px)); gap: 24px; }
  .splash-poster { width: auto; height: 100%; max-width: 55vw; }
  .splash-card { width: min(40vw, 360px); }
}

/* ---------- Page Annonces ---------- */
.ann-row { display: grid; gap: 10px; }
.ann-row-main { display: flex; gap: 12px; cursor: pointer; }
.ann-row h3 { margin: 4px 0 2px; }
.ann-row p { margin: 2px 0; }
.ann-row.is-past { opacity: .75; }
.tab-lb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* Barre d'onglets à 6 entrées (responsables communication) */
.tabbar.compact { padding: 5px 4px; }
.tabbar.compact .tab { padding: 7px 0 5px; border-radius: 16px; }
.tabbar.compact .tab-lb { font-size: .6rem; letter-spacing: -.01em; }
.tabbar.compact .tab .ic { width: 22px; height: 22px; }
@media (max-width: 340px) { .tabbar.compact .tab-lb { font-size: .55rem; } }

/* ---------- Installation (PWA) ---------- */
.install-banner { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: var(--r-lg); margin-bottom: 12px; }
.install-banner img { border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,.08); flex: none; }
.install-banner p { margin: 0; }
.install-hero { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.install-hero img { border-radius: 18px; box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.install-hero p { margin: 2px 0 0; }
.steps { margin: 0; padding-left: 22px; display: grid; gap: 10px; font-size: .92rem; }
.key { display: inline-grid; place-items: center; min-width: 28px; height: 26px; padding: 0 6px; border-radius: 8px; background: #fff; border: 1px solid var(--line); vertical-align: middle; color: #0a84ff; font-weight: 700; }
.key .ic { width: 16px; height: 16px; }
