/* Mobile-first : styles de base pour téléphone, élargis au-delà de 720px. */

/* ---------- Mode sombre (data-theme posé par js/i18n.js) ---------- */
:root[data-theme="dark"] {
  --bg: #121014; --card: #1d1a21; --text: #f2eef5; --muted: #a8a1b0; --border: #2e2a35;
  --primary-light: #3a1331; --shadow: 0 1px 3px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  color-scheme: dark;
}
[data-theme="dark"] :is(.choice span, input, select, textarea, .segments button, .socials button, .legal-box, .legal-toc,
  .legal-card, .stats > *, .friend-row, .bubble:not(.mine), .admin-row, .fp-qr, .cookie-banner, .features i,
  .gb-entry footer button, .avatar-cam, .btn-ghost) { background-color: var(--card); color: var(--text); border-color: var(--border); }
[data-theme="dark"] .tabbar { background: rgba(29,26,33,.96); }
[data-theme="dark"] .btn-light { color: #ff8cc8; }
[data-theme="dark"] .btn-light:hover { background: #4a1842; }
[data-theme="dark"] .segments button.active, [data-theme="dark"] .choice input:checked + span { background: var(--primary-light); color: #ff8cc8; border-color: var(--primary); }
[data-theme="dark"] .badge { background: #16301f; }
[data-theme="dark"] .badge.private, [data-theme="dark"] .report-badge, [data-theme="dark"] .legal .todo { background: #3a2a10; color: #f5c77a; }
[data-theme="dark"] .notice { color: var(--text); }
[data-theme="dark"] .hero-collage { mix-blend-mode: normal; }
[data-theme="dark"] .legal-box p, [data-theme="dark"] .legal-box li { color: #d8d2de; }
[data-theme="dark"] .toast { background: #f2eef5; color: #121014; }
[data-theme="dark"] .see-all, [data-theme="dark"] .legal-card, [data-theme="dark"] .friend-row { color: var(--text); }
[data-theme="dark"] .logo span { color: var(--text); }
:root {
  --bg: #faf7f8;
  --card: #ffffff;
  --text: #1d1a20;
  --muted: #6e6873;
  --border: #efe7ea;
  --primary: #e8137a;
  --primary-dark: #c20f68;
  --primary-light: #ffe8f3;
  --accent: #fe7320;
  --danger: #d64545;
  --success: #2f8f5b;
  --radius: 16px;
  --shadow: 0 1px 3px rgba(60, 20, 30, .05), 0 8px 24px rgba(60, 20, 30, .07);
  --font: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-title: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Aucun défilement gauche/droite sur tout le site (iOS compris) : clip ne casse pas les en-têtes collants. */
html, body { overflow-x: clip; max-width: 100%; overscroll-behavior-x: none; }
/* Pas de zoom au double-tap (comportement d'application). */
html { touch-action: manipulation; }
@supports not (overflow: clip) { html, body { overflow-x: hidden; } }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.5; overflow-x: clip; }
img, video, iframe { max-width: 100%; }
img { max-width: 100%; display: block; }
a { color: var(--primary); }
h1, h2, h3 { font-family: var(--font-title); font-weight: 800; letter-spacing: -.01em; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.3rem; }

.container { max-width: 720px; margin: 0 auto; padding: 16px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.brand { font-weight: 800; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.muted { color: var(--muted); }
.small { font-size: .92rem; } /* lisible pour tous, y compris les seniors */
.hidden { display: none !important; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1 1 140px; }

/* Formulaires : champs larges et hauts pour le tactile, 16px pour éviter le zoom iOS. */
label { display: block; font-weight: 600; font-size: .9rem; margin: 14px 0 6px; }
input, select, textarea { width: 100%; font: inherit; font-size: 16px; padding: 14px 14px 11px; line-height: 1.35; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: transparent; }
textarea { min-height: 110px; resize: vertical; }
/* Safari iOS : les champs date / heure ignorent width:100% et débordent ; on les remet dans le rang. */
input, select, textarea { max-width: 100%; min-width: 0; }
input[type="date"], input[type="time"] { -webkit-appearance: none; appearance: none; display: block; width: 100% !important; min-width: 0; max-width: 100%; min-height: 48px; line-height: 1.4; }
input[type="file"] { width: 100%; font-size: 14px; overflow: hidden; }
input::-webkit-date-and-time-value { text-align: center; }
.row > * { min-width: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; gap: 8px; min-height: 46px; padding: 10px 18px; border: 0; border-radius: 12px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; background: var(--primary); color: #fff; }
.btn:hover { background: var(--primary-dark); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-light { background: var(--primary-light); color: var(--primary-dark); }
.btn-light:hover { background: #ffd6ea; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-ghost:hover { background: #f4f1f6; }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid #f1caca; }
.btn-danger:hover { background: #fdf0f0; }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 6px 12px; font-size: .9rem; }

.error { color: var(--danger); font-size: .9rem; margin-top: 10px; }
.notice { background: var(--primary-light); border-radius: 12px; padding: 14px; margin: 12px 0; }
.code { font-family: ui-monospace, Menlo, monospace; font-size: 1.4rem; letter-spacing: .2em; font-weight: 700; }

/* Choix sous forme de pastilles (type d'événement, style, visibilité) */
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; pointer-events: none; }
.choice span { min-width: 0; min-height: 92px !important; overflow-wrap: normal; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px; padding: 8px; border: 1.5px solid var(--border); border-radius: 12px; background: #fff; text-align: center; font-size: .82rem; font-weight: 600; cursor: pointer; }
.choice span b { font-size: 1.4rem; font-weight: 400; }
.choice input:checked + span { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); }
.choice input:focus-visible + span { outline: 2px solid var(--primary); }

.cover-preview { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; margin-top: 10px; background: var(--primary-light); }

/* Liste organisateur */
.event-item { display: grid; grid-template-columns: 72px 1fr; gap: 14px; }
.event-thumb { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.event-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: #eef7f1; color: var(--success); }
.badge.private { background: #fff4e0; color: #9a6400; }

.toast { text-align: center; position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--text); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: .95rem; z-index: 100; box-shadow: var(--shadow); max-width: calc(100% - 32px); }

/* Page publique */
.hero { position: relative; min-height: 46vh; display: flex; align-items: flex-end; color: #fff; background: linear-gradient(135deg, #e8137a, #3b0a4a) center / cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.65), rgba(0,0,0,.05) 60%); }
.hero-content { position: relative; z-index: 1; padding: 24px 16px; width: 100%; max-width: 720px; margin: 0 auto; }
.hero h1 { font-size: 2rem; margin: 6px 0 0; }
.lock { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px; background: rgba(255,255,255,.2); backdrop-filter: blur(6px); font-size: .85rem; font-weight: 600; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.countdown div { background: var(--primary-light); border-radius: 12px; padding: 12px 4px; }
.countdown strong { display: block; font-size: 1.6rem; font-family: var(--font-title); color: var(--primary-dark); }
.countdown span { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.info-list li:last-child { border-bottom: 0; }
.info-list .ico { font-size: 1.3rem; width: 28px; text-align: center; }
.share-bar { position: sticky; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(250,248,245,.95); backdrop-filter: blur(8px); border-top: 1px solid var(--border); }
.share-bar .row { max-width: 720px; margin: 0 auto; }
.locked-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: linear-gradient(135deg, #e8137a, #3b0a4a); }
.locked-screen .card { width: 100%; max-width: 400px; text-align: center; }
.big-lock { font-size: 3rem; }
.code-input { text-align: center; text-transform: uppercase; letter-spacing: .3em; font-size: 1.4rem; font-weight: 700; }

@media (min-width: 720px) {
  .container { padding: 32px 16px; }
  h1 { font-size: 2.1rem; }
  .hero h1 { font-size: 2.8rem; }
  .event-item { grid-template-columns: 96px 1fr auto; align-items: center; }
  .event-thumb { width: 96px; height: 96px; }
  .event-actions { grid-column: auto; flex-direction: column; }
}

/* ---------- Charte MaFeliza ---------- */
.logo { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; }
.logo img { width: 34px; height: 34px; object-fit: contain; }
.logo b { color: var(--primary); font-weight: 800; }
.logo-lg { flex-direction: column; font-size: 1.9rem; gap: 2px; }
.logo-lg img { width: 72px; height: 72px; }

/* Barre d'onglets (mobile) */
.has-tabbar { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.tabbar a, .tabbar span { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .72rem; color: var(--muted); text-decoration: none; }
.tabbar .ico { font-size: 1.25rem; line-height: 1; filter: grayscale(1); opacity: .75; }
.tabbar .active { color: var(--primary); font-weight: 600; }
.tabbar .active .ico { filter: none; opacity: 1; }
.tabbar .soon { opacity: .45; }
.tabbar .plus { width: 52px; height: 52px; margin: -22px auto 0; border-radius: 50%; background: var(--primary); color: #fff; font-size: 1.8rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(216,31,79,.35); }

/* Rangée « stories » */
.stories { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story { flex: none; width: 72px; text-align: center; font-size: .72rem; color: var(--text); text-decoration: none; }
.story-img { position: relative; width: 72px; height: 88px; border-radius: 16px; overflow: hidden; background: var(--primary-light) center / cover; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; border: 2px solid var(--border); }
.story.new .story-img { background: var(--primary); color: #fff; border-color: var(--primary); font-size: 2rem; }
.story-badge { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.6); color: #fff; font-size: .65rem; font-weight: 700; padding: 1px 6px; border-radius: 6px; white-space: nowrap; }
.story-badge.today { background: var(--primary); }
.story span { display: block; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Onglets segmentés */
.segments { display: flex; gap: 6px; margin: 6px 0 14px; }
.segments button { flex: 1; font: inherit; font-size: .88rem; font-weight: 600; padding: 9px 6px; border-radius: 10px; border: 1px solid var(--border); background: #fff; color: var(--muted); cursor: pointer; }
.segments button.active { background: var(--primary-light); border-color: #fbc3de; color: var(--primary); }

/* Carte événement (accueil) */
.ev-card.event-item { display: block; }
.ev-card { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); margin-bottom: 18px; overflow: hidden; }
.ev-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.ev-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-light) center / cover; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex: none; }
.ev-head h3 { margin: 0; font-size: 1rem; }
.ev-head .muted { font-size: .8rem; }
.ev-head .badge { margin-left: auto; flex: none; }
.ev-cover { position: relative; aspect-ratio: 16 / 10; background: linear-gradient(135deg, #e8137a, #3b0a4a) center / cover; display: flex; flex-direction: column; justify-content: flex-end; padding: 14px; color: #fff; }
.ev-cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.65), transparent 60%); }
.ev-cover > * { position: relative; }
.ev-cover .when { font-size: 1.15rem; font-weight: 800; letter-spacing: .02em; }
.ev-cover .btn { margin-top: 10px; background: #fff; color: var(--primary); }
.ev-info { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; }
.ev-info div { display: flex; gap: 8px; font-size: .85rem; }
.ev-info b { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; }
.ev-tools { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 14px; }

/* Page d'accueil publique */
.collage { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 86px; gap: 8px; margin: 4px 0 18px; }
.collage div { border-radius: 22px; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; }
.collage div.has-photo { background-size: cover !important; background-position: center !important; font-size: 0; box-shadow: var(--shadow); }
.collage div:nth-child(1) { grid-row: span 2; background: linear-gradient(160deg, #fde2e8, #f7b6c5); }
.collage div:nth-child(2) { background: linear-gradient(160deg, #fff1d6, #f9d58f); }
.collage div:nth-child(3) { grid-row: span 2; background: linear-gradient(160deg, #e3ecff, #b9cdfb); }
.collage div:nth-child(4) { background: linear-gradient(160deg, #e7f7ee, #b5e6c9); }
.collage div:nth-child(5) { background: linear-gradient(160deg, #f3e8ff, #d8c2fb); }
.collage div:nth-child(6) { background: linear-gradient(160deg, #ffe9dd, #fbc3a3); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; margin: 22px 0; font-size: .82rem; font-weight: 600; }
.features i { display: flex; width: 54px; height: 54px; margin: 0 auto 6px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); align-items: center; justify-content: center; font-size: 1.5rem; font-style: normal; }
.divider { text-align: center; color: var(--muted); font-size: .82rem; margin: 16px 0 10px; }
.socials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.socials button { min-height: 48px; border-radius: 12px; border: 1px solid var(--border); background: #fff; color: var(--text); font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; margin: 26px 0 10px; }
.section-title h2 { font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; margin: 0; }
.h-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.h-scroll::-webkit-scrollbar { display: none; }
.pub-card { flex: none; width: 150px; height: 190px; border-radius: 16px; overflow: hidden; position: relative; color: #fff; text-decoration: none; background: linear-gradient(135deg, #e8137a, #3b0a4a) center / cover; display: flex; flex-direction: column; justify-content: flex-end; padding: 10px; font-size: .78rem; }
.pub-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,.35) 50%, transparent 75%); }
.pub-card > * { position: relative; }
.pub-card b { font-size: .9rem; }
.pub-card .tag { position: absolute; top: 8px; left: 8px; background: var(--primary); padding: 1px 8px; border-radius: 6px; font-weight: 700; font-size: .7rem; }
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(20,10,15,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet .card { width: 100%; max-width: 480px; border-radius: 22px 22px 0 0; margin: 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
@media (min-width: 720px) { .sheet { align-items: center; } .sheet .card { border-radius: 22px; } }

/* ---------- Page événement : carte d'invitation fleurie ---------- */
.invite-hero { position: relative; overflow: hidden; text-align: center; padding: 34px 20px 52px; border-radius: 22px; margin-bottom: 18px;
  background:
    radial-gradient(circle at 0 0, rgba(233,180,170,.45), transparent 28%),
    radial-gradient(circle at 100% 0, rgba(180,200,170,.45), transparent 26%),
    radial-gradient(circle at 0 100%, rgba(180,200,170,.35), transparent 26%),
    radial-gradient(circle at 100% 100%, rgba(233,180,170,.4), transparent 28%),
    #fbf6f1;
  box-shadow: var(--shadow); color: #2b2622; }
.invite-hero::before, .invite-hero::after { position: absolute; font-size: 2rem; opacity: .55; pointer-events: none; }
.invite-hero::before { content: "🌸🌿"; top: 6px; left: 8px; }
.invite-hero::after { content: "🌿🌸"; bottom: 6px; right: 8px; }
.invite-hero-heart { width: 44px; height: 44px; margin: 0 auto 6px; opacity: .55; filter: sepia(1) saturate(.6); }
.lock-chip { position: absolute; top: 12px; right: 12px; font-size: .75rem; font-weight: 600; background: rgba(255,255,255,.8); padding: 3px 10px; border-radius: 99px; }
.script { font-family: "Great Vibes", "Fraunces", cursive; font-weight: 400; font-size: 2.9rem; line-height: 1.1; margin: 8px 0 0; letter-spacing: 0; }
.script-sub { font-family: "Great Vibes", "Fraunces", cursive; font-size: 1.6rem; margin: 4px 0 10px; color: #4a423c; }
.date-big { font-size: 1.6rem; margin: 6px 0 4px; }
.ornament { display: flex; align-items: center; gap: 8px; margin: 6px auto 12px; max-width: 240px; color: #c9a88a; font-size: .7rem; }
.ornament::before, .ornament::after { content: ""; flex: 1; border-top: 1px solid #d9c7b6; }
.countdown-plain { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 320px; margin: 0 auto; }
.countdown-plain strong { display: block; font-size: 1.9rem; font-weight: 600; }
.countdown-plain span { font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: #6d625a; }
.countdown-plain.done { display: block; font-weight: 600; }
.cta-stories { display: block; text-align: center; max-width: 300px; margin: 22px auto 0; line-height: 1.25; padding: 12px 18px; background: #fd1a85; box-shadow: 0 10px 24px rgba(224,69,123,.3); }
.cta-stories:hover { background: #c93a6b; }
.cta-stories small { font-weight: 400; font-size: .9rem; }
.stories-preview { margin-bottom: 18px; }
.stories-preview h2 { font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.soon-tag { font-size: .72rem; font-weight: 700; color: var(--primary); background: var(--primary-light); padding: 2px 8px; border-radius: 99px; }
.stories-row { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.stories-row::-webkit-scrollbar { display: none; }
.story-circle { flex: none; width: 76px; height: 76px; border-radius: 50%; padding: 3px; background: linear-gradient(135deg, #fe7320, #fd1a85 55%, #8a1de9); }
.story-circle div { width: 100%; height: 100%; border-radius: 50%; border: 3px solid var(--bg); background: #eadfd6 center / cover; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.story-circle.locked div { filter: blur(0); background: linear-gradient(135deg, #f1e4dc, #e3d3c7); }

/* Visionneuse photo plein écran */
.viewer { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; }
.viewer img, .viewer video { max-width: 100%; max-height: calc(100vh - 110px); border-radius: 12px; object-fit: contain; }
.viewer-bar { display: flex; align-items: center; gap: 10px; margin-top: 14px; color: #fff; font-size: .9rem; }
.viewer-bar span { margin-right: auto; }
.stories-row .story-circle { cursor: pointer; border: 0; }

/* Livre d'or */
.guestbook { margin: 22px 0 10px; }
.guestbook .segments button { font-size: .8rem; }
.gb-entry { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; }
.gb-entry.pinned { outline: 2px solid var(--accent); }
.gb-entry header { display: flex; gap: 10px; align-items: center; }
.gb-entry header i { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #fe7320, #fd1a85 55%, #8a1de9); color: #fff; font-style: normal; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
.gb-entry header b { display: block; }
.gb-entry p { white-space: pre-line; margin: 10px 0 0; }
.gb-entry img { margin-top: 10px; border-radius: 12px; max-height: 320px; object-fit: cover; width: 100%; cursor: pointer; }
.gb-entry audio { width: 100%; margin-top: 10px; }
.gb-entry footer { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.gb-entry footer button { font: inherit; font-size: .82rem; font-weight: 600; border: 1px solid var(--border); background: #fff; border-radius: 99px; padding: 5px 12px; cursor: pointer; color: var(--text); }
.gb-entry footer .gb-like.on { background: var(--primary-light); border-color: #fbc3de; color: var(--primary); }
.gb-entry footer .danger { color: var(--danger); }

/* Bandeau cookies */
.cookie-banner { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 70; max-width: 520px; margin: 0 auto; background: #fff; color: var(--text); border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,.2); padding: 14px 16px; font-size: .85rem; }
.cookie-banner p { margin: 0 0 10px; }
.has-tabbar .cookie-banner { bottom: calc(84px + env(safe-area-inset-bottom)); }
.site-footer { text-align: center; font-size: .8rem; color: var(--muted); padding: 24px 16px 32px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.legal h2 { font-size: 1.1rem; margin-top: 1.6em; }
.legal p, .legal li { color: #3b3640; }
.legal .todo { background: #fff4e0; padding: 0 4px; border-radius: 4px; }

/* ---------- Fidélité maquettes ---------- */
/* Collage d'accueil fondu dans la page : blanc de l'image = fond de page (multiply), bords estompés, pleine largeur. */
.hero-collage {
  display: block; width: calc(100% + 32px); max-width: none; margin: -16px -16px 0;
  mix-blend-mode: multiply;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 5%, #000 90%, transparent 100%), linear-gradient(to right, transparent 0, #000 2%, #000 98%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent 0, #000 5%, #000 90%, transparent 100%), linear-gradient(to right, transparent 0, #000 2%, #000 98%, transparent 100%);
  mask-composite: intersect;
}
.hero-collage + p .logo-lg, picture + p .logo-lg { margin-top: -34px; position: relative; }
.hero-collage { height: auto; }
@media (min-width: 520px) { .hero-collage { border-radius: 0 0 32px 32px; } }
.features i svg { display: block; }
.socials button { display: flex; align-items: center; justify-content: center; }
.i { display: inline-block; vertical-align: middle; flex: none; }
.tabbar .ico .i { width: 24px; height: 24px; }
.tabbar .ico { filter: none; opacity: 1; }
.live-tag { display: inline-flex; align-items: center; gap: 4px; background: var(--primary); color: #fff; font-size: .7rem; font-weight: 800; padding: 2px 8px; border-radius: 6px; letter-spacing: .03em; }
.live-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.ev-cover .live-now { display: flex; align-items: center; gap: 8px; font-size: 1.3rem; font-weight: 800; }
.ev-cover .live-now::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px rgba(216,31,79,.35); }
.ev-pot { margin: 0 14px 14px; padding: 12px; border-radius: 14px; background: var(--primary-light); display: flex; align-items: center; gap: 10px; }
.ev-pot b { display: block; }
.ev-pot .btn { margin-left: auto; }
.story-circle.teaser div { background-size: cover; }
.story-img.live { border-color: var(--primary); }

/* ---------- Pages légales : design moderne en encadrés ---------- */
.legal-hero { text-align: center; color: #fff; padding: 36px 20px 64px; background: radial-gradient(circle at 20% 0, rgba(255,255,255,.18), transparent 40%), linear-gradient(135deg, #e8137a, #7a1234); }
.legal-hero h1 { font-size: 1.8rem; margin: 10px 0 6px; }
.legal-hero p { max-width: 520px; margin: 0 auto 12px; color: #fff; opacity: .92; }
.legal-hero-ico { display: inline-flex; width: 64px; height: 64px; border-radius: 20px; background: rgba(255,255,255,.18); align-items: center; justify-content: center; font-size: 2rem; }
.legal-date { display: inline-block; font-size: .78rem; background: rgba(0,0,0,.18); padding: 4px 12px; border-radius: 99px; }
.legal-date .todo { color: var(--text); }
.legal .container { max-width: 760px; margin-top: -40px; position: relative; }
.legal-toc { display: flex; gap: 8px; overflow-x: auto; padding: 12px; background: #fff; border-radius: 18px; box-shadow: var(--shadow); margin-bottom: 18px; scrollbar-width: none; }
.legal-toc::-webkit-scrollbar { display: none; }
.legal-toc a { flex: none; font-size: .8rem; font-weight: 600; color: var(--primary); background: var(--primary-light); padding: 6px 12px; border-radius: 99px; text-decoration: none; white-space: nowrap; }
.legal-box { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 20px; margin-bottom: 14px; scroll-margin-top: 16px; border: 1px solid var(--border); }
.legal-box-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.legal-box-head h2 { margin: 0; font-size: 1.05rem; }
.legal-ico { width: 42px; height: 42px; border-radius: 14px; background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex: none; }
.legal-num { font-size: .75rem; font-weight: 800; color: var(--primary); margin-left: auto; opacity: .6; }
.legal-box p, .legal-box li { color: #3b3640; font-size: .95rem; }
.legal-box p:last-child, .legal-box ul:last-child { margin-bottom: 0; }
.legal-box ul { padding-left: 18px; }
.legal-box li { margin-bottom: 6px; }
.legal-others { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 20px 0 8px; }
.legal-card { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 16px; background: #fff; box-shadow: var(--shadow); text-decoration: none; color: var(--text); font-weight: 700; font-size: .9rem; }
.legal-card span { font-size: 1.3rem; }
.legal-card::after { content: "›"; margin-left: auto; font-size: 1.4rem; color: var(--primary); }
.legal { overflow-x: clip; }
.legal-box, .legal-toc, .legal-card { max-width: 100%; }
.legal-box p, .legal-box li { overflow-wrap: anywhere; }

/* « En direct actuellement » (accueil) */
#upcoming .section-title h2 { font-size: .85rem; letter-spacing: .06em; }
.see-all { font-size: .85rem; font-weight: 600; color: var(--text); text-decoration: none; }
.live-card { flex: none; width: 150px; height: 200px; border-radius: 16px; overflow: hidden; position: relative; color: #fff; text-decoration: none; background: linear-gradient(135deg, #e8137a, #3b0a4a) center / cover; display: flex; flex-direction: column; justify-content: flex-end; padding: 10px 10px 12px; font-size: .72rem; box-shadow: var(--shadow); }
.live-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.8), transparent 55%); }
.live-card > * { position: relative; }
.live-card b { font-size: .85rem; line-height: 1.2; margin-bottom: 2px; padding-right: 22px; }
.live-card span:not(.tag) { opacity: .85; padding-right: 22px; }
.live-card .tag { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.55); padding: 2px 8px; border-radius: 6px; font-weight: 700; font-size: .66rem; display: inline-flex; align-items: center; gap: 4px; }
.live-card .tag.is-live { background: var(--primary); }
.live-card .tag.is-live::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #fff; }
.live-card .heart { position: absolute; right: 8px; bottom: 12px; color: #fff; font-style: normal; }
.site-footer .footer-cam { display: block; margin-top: 18px; }
.cam-badge { flex: none; white-space: nowrap; gap: 6px; padding: 6px 12px; background: var(--primary-light); color: var(--primary); }
.topbar .logo { min-width: 0; }

/* Pages centrées (Découvrir, Profil…) et logo centré quand il est seul dans l'en-tête */
.topbar > :only-child { margin: 0 auto; }
.centered { text-align: center; }
.centered h1 { margin-top: 8px; }
.centered label { text-align: center; }
.centered .notice.code { text-align: center; padding-left: .3em; padding-right: 0; letter-spacing: .3em; }
.centered .card p { margin-left: auto; margin-right: auto; }
.centered #list { text-align: left; }

/* Menu de modération */
.menu-card { display: grid; gap: 8px; }
.menu-card .btn-ghost { color: var(--text); justify-content: flex-start; }
.more-btn { background: none; border: 0; color: inherit; opacity: .6; font-size: 1.1rem; cursor: pointer; padding: 0 6px; margin-left: auto; }
.report-badge { display: inline-block; margin-top: 4px; font-size: .75rem; font-weight: 700; color: #9a6400; background: #fff4e0; padding: 2px 8px; border-radius: 99px; text-decoration: none; }
.chat-msg .more-btn { color: #fff; }

/* Feuille de partage */
.share-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 8px; margin-top: 8px; }
.share-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; font: inherit; font-size: .78rem; font-weight: 600; color: var(--text); text-decoration: none; background: none; border: 0; cursor: pointer; }
.share-opt i { width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; color: #fff; font-style: normal; font-weight: 800; font-size: 1.2rem; }

/* Mes faire-part */
.fp-tabs { margin-bottom: 16px; }
.fp-qr { display: flex; gap: 14px; align-items: center; background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 14px; margin: 16px auto; max-width: 440px; }
.fp-qr img { width: 110px; height: 110px; flex: none; }
.fp-qr .code { font-size: 1.1rem; }
.fp-qr p { margin: 4px 0; font-size: .85rem; overflow-wrap: anywhere; }
.fp-actions .fp-wide { grid-column: 1 / -1; }
.fp-editor { display: grid; gap: 10px; max-width: 440px; margin: 16px auto; text-align: left; }
.fp-editor label { display: grid; gap: 4px; font-weight: 600; font-size: .9rem; }
.fp-editor textarea { resize: vertical; font: inherit; }
.fp-editor-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fp-editor-actions .btn { flex: 1 1 auto; }
.fp-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-width: 440px; margin: 0 auto 24px; }
@media print {
  .topbar, .tabbar, .fp-tabs, .fp-actions, .site-footer, .cookie-banner, h1.fp-title { display: none !important; }
  body { background: #fff; }
  .invite, .fp-qr { box-shadow: none; break-inside: avoid; }
}

/* Administration */
.admin-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 12px 14px; margin-bottom: 10px; }
.admin-main { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.live-card .viewers-mini { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; margin-top: 2px; }

/* Messages */
.avatar { width: 44px; height: 44px; flex: none; border-radius: 50%; background: linear-gradient(135deg, #fe7320, #fd1a85 55%, #8a1de9) center / cover; color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.friend-row { display: flex; align-items: center; gap: 12px; padding: 12px; background: #fff; border-radius: 16px; box-shadow: var(--shadow); margin-bottom: 10px; color: var(--text); text-decoration: none; }
.friend-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.friend-main .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#blocked-box summary { cursor: pointer; }
#blocked-box .friend-row { box-shadow: none; padding: 10px 0; margin: 0; }
.dm { display: flex; flex-direction: column; height: calc(100dvh - 64px - 84px); padding-bottom: 0; }
.dm.hidden { display: none; }
.dm-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.dm-head .avatar { width: 36px; height: 36px; font-size: .9rem; }
.dm-head .more-btn { color: var(--text); opacity: .8; font-size: 1.4rem; }
.dm-thread { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 14px 2px; }
.bubble { align-self: flex-start; max-width: 80%; background: #fff; box-shadow: var(--shadow); padding: 8px 12px; border-radius: 16px 16px 16px 4px; white-space: pre-line; overflow-wrap: anywhere; }
.bubble.mine { align-self: flex-end; background: var(--primary); color: #fff; border-radius: 16px 16px 4px 16px; }
.bubble span { display: block; font-size: .68rem; opacity: .7; margin-top: 2px; text-align: right; }
.dm-input { display: flex; gap: 8px; padding: 10px 0; }

/* Profil */
.profile-head { text-align: center; margin: 8px 0 16px; }
.avatar-edit { position: relative; display: inline-block; cursor: pointer; margin: 0; }
.avatar-lg { width: 96px; height: 96px; font-size: 2.2rem; box-shadow: var(--shadow); }
.avatar-cam { position: absolute; right: -2px; bottom: -2px; width: 32px; height: 32px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; font-size: .9rem; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.stats > * { background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 12px 6px; text-align: center; }
.stats b { display: block; font-size: 1.4rem; color: var(--primary); }
.stats span { font-size: .75rem; color: var(--muted); }
.p-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.p-grid .pub-card { width: auto; }
.fav-btn.on { background: var(--primary-light); color: var(--primary); }
.footer-lang { display: block; margin-top: 12px; letter-spacing: .05em; }

/* Vidéos courtes */
.story-circle.is-video div { position: relative; }
.story-circle.is-video div::after { content: "▶"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.2rem; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.gb-entry video { width: 100%; max-height: 360px; margin-top: 10px; border-radius: 12px; background: #000; }

/* Formulaire de création / modification : intitulés et champs centrés */
.form-centered h2, .form-centered label { text-align: center; }
.form-centered input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .form-centered select { text-align: center; }
.form-centered input[type="file"] { display: block; margin: 0 auto; max-width: 100%; }

/* Catégories et autres choix : toutes les cases à la même taille */
.choices { grid-auto-rows: 1fr; }
.choice { display: block; height: 100%; margin: 0; }
.choice span { height: 100%; }
#types { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#types .choice span { min-height: 92px; font-size: .8rem; line-height: 1.2; overflow-wrap: normal; word-break: normal; }
@media (max-width: 374px) { #types { grid-template-columns: repeat(2, minmax(0, 1fr)); } #types .choice span { min-height: 80px; } }
.btn-center { display: flex; width: fit-content; margin-left: auto; margin-right: auto; }

/* Styles de faire-part : 4 rectangles identiques sur une seule ligne */
#styles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
#styles .choice span { min-height: 64px !important; padding: 6px 2px; font-size: min(.74rem, 3.1vw); white-space: nowrap; overflow: hidden; text-overflow: clip; letter-spacing: -.01em; }
#styles .choice span b { font-size: 1.15rem; }

/* Outils de texte du faire-part */
.text-tools { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.texts-list { display: grid; gap: 8px; max-height: 60vh; overflow-y: auto; }
.text-option { text-align: left; font: inherit; background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; cursor: pointer; color: var(--text); }
.text-option b { display: block; color: var(--primary); margin-bottom: 2px; }
.text-option span { font-size: .88rem; }
/* Profil : nom et email longs restent dans l'écran */
.profile-head #name, .profile-head #email { max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
.profile-head #name { font-size: clamp(1.3rem, 6vw, 1.8rem); line-height: 1.15; }
/* Administration : 4 onglets sur 2 lignes, tous visibles sur téléphone */
#tabs.segments { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
#tabs.segments button { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 560px) { #tabs.segments { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
[data-theme="dark"] .badge.cam-badge { background: #3a1422; color: #ff8cc8; }
/* Page événement : bouton retour (en haut à gauche de la carte) */
.back-chip { position: absolute; top: 12px; left: 12px; z-index: 2; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.85); color: #2b2530; font-size: 1.6rem; line-height: 1; text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.12); padding-bottom: 3px; }
/* Barre de partage en mode sombre */
[data-theme="dark"] .share-bar { background: rgba(17,16,20,.94); border-top-color: #2a2830; }
/* En-tête avec badge (Caméraman, Admin) : espace garanti entre le logo et le badge */
.topbar .cam-badge { margin-left: auto; font-size: min(.85rem, 3.5vw); padding: 5px 10px; }
.topbar .logo { margin-right: 14px; }
@media (max-width: 400px) { .topbar .logo { font-size: 1.05rem; } .topbar .logo img { width: 28px; height: 28px; } }
/* En-tête toujours sur une seule ligne, quelle que soit la taille d'écran ou de texte */
.topbar { flex-wrap: nowrap; }
.topbar .logo, .topbar .logo span, .topbar .cam-badge { white-space: nowrap; }
.topbar .logo { flex: 0 1 auto; font-size: min(1.2rem, 5.2vw); }
.topbar .logo img { width: min(34px, 8vw); height: min(34px, 8vw); }
.topbar .cam-badge { flex: none; font-size: min(.85rem, 3.4vw); padding: 5px min(10px, 2.4vw); gap: 4px; }
.topbar .cam-badge svg { width: min(16px, 4vw); height: min(16px, 4vw); }
.legal-toc { flex-wrap: wrap; justify-content: center; overflow-x: visible; }
.stories-row .story-circle { width: min(76px, calc((100vw - 68px) / 4)); height: auto; aspect-ratio: 1; }
/* Livre d'or : filtres sur 2 lignes, réponses */
#gb-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.gb-reply { margin: 8px 0 0 46px; padding: 8px 10px; background: var(--primary-light); border-radius: 12px; font-size: .88rem; overflow-wrap: anywhere; }
[data-theme="dark"] .gb-reply { background: #2a1f26; }
.gb-reply-form { display: flex; gap: 6px; margin: 8px 0 0 46px; }
.gb-reply-form input { flex: 1; min-width: 0; padding: 8px 12px; }
.gb-reply-form.hidden { display: none; }
/* Profil : 4 onglets sur 2 lignes, vignettes vidéo */
#p-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.video-tile { position: relative; aspect-ratio: 3 / 4; border: 0; padding: 0; border-radius: 16px; overflow: hidden; background: #1b1820; cursor: pointer; }
.video-tile video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.video-tile .play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; font-size: 1.1rem; }
.video-tile .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px; color: #fff; font-size: .72rem; text-align: left; background: linear-gradient(transparent, rgba(0,0,0,.75)); display: flex; flex-direction: column; }
/* Fil d'actualité */
.feed-post { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden; }
.feed-post header { display: flex; gap: 10px; align-items: center; padding: 12px; }
.feed-post header a { color: var(--text); text-decoration: none; }
.feed-post header div { display: flex; flex-direction: column; min-width: 0; }
.feed-ev { flex: none; width: 40px; height: 40px; border-radius: 50%; background: center / cover; box-shadow: 0 0 0 2px var(--primary); }
.feed-post img, .feed-post video { display: block; width: 100%; max-height: 70vh; object-fit: cover; background: #000; }
.feed-post p { margin: 10px 12px 0; overflow-wrap: anywhere; }
.feed-post audio { width: calc(100% - 24px); margin: 10px 12px 0; }
.feed-post footer { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; align-items: center; }
.feed-post footer [data-like] { background: none; border: 1px solid var(--border); border-radius: 99px; padding: 6px 12px; font: inherit; color: var(--text); cursor: pointer; }
.feed-post footer [data-like].on { border-color: var(--primary); color: var(--primary); }
.topbar > .logo:only-child { margin: 0 auto; }
/* Accessibilité : focus clavier visible, contraste du texte secondaire, animations réduites sur demande */
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
button:focus:not(:focus-visible), a:focus:not(:focus-visible) { outline: none; }
.muted { color: color-mix(in srgb, var(--muted) 85%, var(--text)); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.inv-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .85rem; }
.inv-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-row b { flex: none; font-weight: 600; }
/* Statistiques */
.stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats-grid span { display: block; line-height: 1.2; }
/* Album souvenir (écran et impression A4) */
.album-bar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; gap: 8px; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--border); }
.album { max-width: 820px; margin: 0 auto; padding: 16px; }
.album-cover { position: relative; min-height: 320px; border-radius: 20px; overflow: hidden; background: center / cover; display: flex; align-items: flex-end; color: #fff; margin-bottom: 24px; }
.album-cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 30%, rgba(0,0,0,.75)); }
.album-cover > div { position: relative; padding: 24px; }
.album-cover h1 { font-family: Fraunces, Georgia, serif; font-size: clamp(1.8rem, 7vw, 2.8rem); margin: 4px 0; }
.album-kicker, .album-brand { margin: 0; font-weight: 700; opacity: .9; }
.album-brand { margin-top: 8px; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.album h2 { font-family: Fraunces, Georgia, serif; margin: 28px 0 12px; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.album-grid figure { margin: 0; break-inside: avoid; }
.album-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; display: block; }
.album-grid figcaption { font-size: .75rem; color: var(--muted); margin-top: 4px; }
.album-words { columns: 2 260px; column-gap: 16px; }
.album-words blockquote { break-inside: avoid; margin: 0 0 14px; padding: 14px; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); }
.album-words p { margin: 0; overflow-wrap: anywhere; }
.album-words cite { display: block; margin-top: 6px; font-size: .85rem; color: var(--primary); font-style: normal; font-weight: 700; }
.album-reply { font-size: .85rem; margin-top: 6px !important; color: var(--muted); }
@media print {
  .no-print, .cookie-banner, .tabbar { display: none !important; }
  body { background: #fff !important; }
  .album { max-width: none; padding: 0; }
  .album-cover { min-height: 60vh; -webkit-print-color-adjust: exact; print-color-adjust: exact; break-after: page; }
  .album-words blockquote { box-shadow: none; border: 1px solid #eee; }
  @page { size: A4; margin: 12mm; }
}
.album-bar .btn { white-space: nowrap; font-size: min(.85rem, 3.6vw); }
.site-footer { font-size: min(.95rem, 4vw); } .site-footer a { white-space: nowrap; }
.login-centered label, .login-centered input, .login-centered .small { text-align: center; }
.feed-post footer { justify-content: center; }
.feed-post p { text-align: center; }
#content .card h2, #content .card > p { text-align: center; }
.audit-row { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .85rem; text-align: left; overflow-wrap: anywhere; }
.slogan { text-align: center; margin: 6px auto 18px; max-width: 34ch; color: var(--muted); line-height: 1.45; text-wrap: balance; } .slogan b { display: block; color: var(--primary); font-weight: 700; margin-top: 2px; }
/* Marque MaFeliza : nom en couleur du texte, « i » en dégradé comme sur le logo */
.logo span { color: var(--text); letter-spacing: .01em; }
.logo b { background: linear-gradient(180deg, #ff6a2b 0%, #ff2e7e 45%, #8a2cf0 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo span { font-family: "Quicksand", "Inter", system-ui, sans-serif; font-weight: 700; }
/* Couleurs MaFeliza : boutons principaux au dégradé du logo (rose → magenta) */
.btn:not(.btn-light):not(.btn-ghost):not(.btn-danger) { background: linear-gradient(135deg, #fd1a85, #c60bd2); }
.ev-cover .btn:not(.btn-light):not(.btn-ghost) { background: #fff; color: var(--primary); }
.btn:not(.btn-light):not(.btn-ghost):not(.btn-danger):hover { background: linear-gradient(135deg, #e8137a, #a90ab8); }
.slogan b { background: linear-gradient(90deg, #fe7320, #fd1a85 50%, #8a1de9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.slogan { max-width: none; } .slogan b { white-space: nowrap; font-size: min(1rem, 4.2vw); }
/* Lecteur de stories */
.story-viewer { position: fixed; inset: 0; z-index: 100; background: #000; color: #fff; display: flex; align-items: center; justify-content: center; }
.sv-media { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.sv-media img, .sv-media video { max-width: 100%; max-height: 100%; object-fit: contain; }
.sv-bars { position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 10px; right: 10px; display: flex; gap: 4px; z-index: 3; }
.sv-bars i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.35); overflow: hidden; }
.sv-bars b { display: block; height: 100%; width: 0; background: #fff; }
.sv-head { position: absolute; top: calc(22px + env(safe-area-inset-top)); left: 14px; right: 8px; display: flex; align-items: center; justify-content: space-between; z-index: 3; text-shadow: 0 1px 3px rgba(0,0,0,.6); font-size: .9rem; }
.sv-who span { opacity: .8; font-size: .8rem; }
.sv-close, .sv-del { background: none; border: 0; color: #fff; font-size: 1.5rem; cursor: pointer; padding: 8px; }
.sv-del { position: absolute; right: 8px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 3; font-size: 1.3rem; }
.sv-caption { position: absolute; left: 16px; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 3; margin: 0; text-align: center; font-size: 1.05rem; font-weight: 600; text-shadow: 0 1px 4px rgba(0,0,0,.8); overflow-wrap: anywhere; }
.sv-caption:empty { display: none; }
.sv-prev, .sv-next { position: absolute; top: 80px; bottom: 80px; background: none; border: 0; z-index: 2; cursor: pointer; }
.sv-prev { left: 0; width: 33%; } .sv-next { right: 0; width: 67%; }
/* Rond de story non vue : dégradé du logo */
.story-circle.has-story { background: linear-gradient(135deg, #fe7320, #fd1a85 55%, #8a1de9); }
.story-circle .story-name { position: absolute; }
.story-img.has-story { box-shadow: 0 0 0 3px #fd1a85; }
.stories-row .story-circle { position: relative; margin-bottom: 20px; overflow: visible; }
.story-label { position: absolute; left: 50%; top: calc(100% + 3px); transform: translateX(-50%); max-width: 84px; font-size: .72rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Direct depuis le téléphone (espace caméraman) */
.btn-golive { min-height: 58px; font-size: 1.1rem; }
/* Outils d'un événement : groupes en grille 2 colonnes, boutons de même taille */
.ev-tools { display: flex; flex-direction: column; gap: 8px; padding: 0 14px 14px; }
.ev-tools .tool-main { width: 100%; min-height: 46px; font-size: .95rem; }
.tools-title { margin: 6px 0 0; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: center; }
.tools-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tools-grid .btn { width: 100%; min-height: 44px; padding: 8px 6px; font-size: min(.88rem, 3.6vw); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tools-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.tools-end { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
/* Cartes de live : fonds superposés (image du direct puis couverture), aperçu vidéo en restant appuyé */
.pub-card, .live-card, .ev-cover, .story-img { background-size: cover, cover; background-position: center, center; }
[data-live-preview] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.live-preview { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 0; pointer-events: none; background: transparent; }
/* Pendant l'aperçu : le texte, le badge et le cœur gardent leur place, au-dessus de la vidéo */
.previewing > :not(.live-preview) { z-index: 1; }
.previewing { transform: scale(1.02); transition: transform .2s; }
/* Image du direct YouTube (format 4:3 avec bandes noires) : agrandie pour masquer les bandes */
[data-yt-thumb] { background-size: auto 136%, cover !important; }
.story-img .live-preview { border-radius: inherit; }
/* Page événement : calendrier et réponse à l'invitation */
.cal-row { gap: 8px; margin-top: 12px; justify-content: center; flex-wrap: wrap; }
.rsvp h2 { text-align: center; }
.rsvp-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rsvp-choices button { font: inherit; font-size: min(.85rem, 3.4vw); font-weight: 600; padding: 12px 4px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; }
.rsvp-choices button.active { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.rsvp-count { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; font-size: .88rem; }
.rsvp-count select { width: auto; min-width: 70px; }
/* Programme de la journée */
.step-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 6px; margin-bottom: 8px; align-items: center; }
.step-row input[type=time] { padding-inline: 8px; }
.timeline { list-style: none; margin: 0 0 4px; padding: 0 0 0 4px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 72px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(#fe7320, #fd1a85, #8a1de9); border-radius: 2px; }
.timeline li { display: grid; grid-template-columns: 56px 1fr; gap: 36px; align-items: center; padding: 8px 0; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 62px; width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 3px solid var(--primary); }
.timeline time { font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; text-align: right; }
.timeline span { overflow-wrap: anywhere; }
#practical-box { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
#practical-box h3 { font-size: .95rem; margin: 0 0 6px; }
/* Champ mot de passe avec bouton afficher / masquer */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 48px; }
.pw-wrap button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; font-size: 1.1rem; cursor: pointer; padding: 6px; }

/* Cloche des notifications */
.topbar .bell, .topbar .fav-btn { position: relative; margin-left: auto; flex: none; width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); font-size: 1.15rem; cursor: pointer; }
.topbar .bell + * { margin-left: 8px; }
.bell-count { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--primary); color: #fff; font-size: .72rem; font-weight: 700; line-height: 20px; }
.notif-list { display: grid; gap: 8px; max-height: 60vh; overflow-y: auto; margin-bottom: 12px; }
.notif { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--bg); color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.notif.new { background: var(--primary-light); }
.notif span { font-size: .9rem; }
.topbar .fav-btn { flex: none; width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); font-size: 1.1rem; cursor: pointer; }
.fav-row { grid-template-columns: 52px 1fr; align-items: center; gap: 12px; }
.fav-row span:last-child { display: grid; gap: 2px; min-width: 0; }
.fav-thumb { width: 52px; height: 52px; border-radius: 10px; background: #ddd center / cover; }
.create-big { min-height: 64px; font-size: 1.15rem; }
#create-body { max-height: 60vh; overflow-y: auto; }
details.advanced { margin: 12px 0; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
details.advanced summary { cursor: pointer; font-weight: 600; font-size: .92rem; }
.live-simple { margin-bottom: 8px; }
.ev-tools .btn.tool-main.btn-golive { background: linear-gradient(135deg, #ff2d55, #e8137a); }
.golive { border: 2px solid var(--primary); }
.preview-wrap { position: relative; margin: 12px 0 4px; border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.preview-wrap video { width: 100%; height: 100%; object-fit: cover; display: block; }
.live-dot { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.55); color: #fff; font-size: .75rem; font-weight: 800; padding: 3px 8px; border-radius: 6px; }
.live-dot.on { background: #e11d48; }
.topbar .top-back { flex: none; width: 40px; height: 40px; display: grid; place-items: center; margin-right: 4px; border-radius: 12px; border: 1px solid var(--border); color: var(--text); font-size: 1.8rem; line-height: 1; padding-bottom: 4px; text-decoration: none; }
.topbar .top-back + .logo { margin-left: 0; }
.search-box input { width: 100%; font-size: 1rem; border-radius: 99px; padding: 12px 18px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; border: 1px solid var(--border); background: var(--card); color: var(--text); border-radius: 99px; padding: 7px 14px; font: inherit; font-size: .88rem; cursor: pointer; white-space: nowrap; }
.chips button.active { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); font-weight: 600; }
.code-find { display: flex; gap: 8px; margin: 8px 0 2px; }
.code-find input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .15em; text-align: center; }
.code-remind { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border-radius: 14px; background: var(--primary-light); margin-top: 10px; }
.code-remind span { display: grid; gap: 2px; min-width: 0; }
.code-remind button.code { flex: none; border: 0; background: var(--card); border-radius: 10px; padding: 8px 10px; font-size: 1.05rem; letter-spacing: .12em; cursor: pointer; color: var(--text); }
.bubble.mine { cursor: pointer; }
.pub-card { position: relative; }
.card-fav { position: absolute; top: 8px; right: 8px; z-index: 2; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255,255,255,.9); font-size: 1.15rem; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.15); color: #e8137a; }
.story-vis { display: block; margin-top: 2px; font-size: .68rem; font-weight: 700; color: #1f8a57; white-space: nowrap; }
.story-vis.private { color: #b45309; }
.friends-strip { display: flex; gap: 14px; overflow-x: auto; padding: 12px 2px 2px; scrollbar-width: none; }
.friends-strip::-webkit-scrollbar { display: none; }
.friend-chip { flex: none; width: 64px; display: grid; justify-items: center; gap: 4px; color: inherit; text-decoration: none; font-size: .75rem; text-align: center; }
.friend-chip span:last-child { width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend-chip .avatar { width: 52px; height: 52px; font-size: 1.2rem; }
.friend-row.new { box-shadow: 0 0 0 3px #fd1a85; }
.replay-del { position: absolute; top: 10px; right: 10px; z-index: 3; border: 0; border-radius: 99px; padding: 7px 12px; background: rgba(0,0,0,.6); color: #fff; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.replay-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 960px; margin: 0 auto; padding: 10px 14px; background: #1d1a20; color: #fff; font-size: .85rem; }
.replay-bar .btn { flex: none; }
.badge.unlisted { background: #eef2ff; color: #4338ca; }
.story-vis.unlisted { color: #4338ca; }
.choices .choice small { font-size: .72rem; }
/* Accueil compact : collage réduit pour voir « Créer », « Invitation » et la connexion dès l'ouverture */
.home .hero-collage { height: auto; max-height: none; }
.home .logo-lg { font-size: 1.5rem; }
.home .logo-lg img { width: 52px; height: 52px; }
.home picture + p .logo-lg { margin-top: -26px; }
.home .slogan { margin: 2px auto 12px; font-size: .92rem; line-height: 1.35; }
.home .divider { margin: 12px 0 8px; }
/* Page événement vue par un invité connecté : carte d'accueil + barre de partage au-dessus du menu */
.welcome-card { margin: 14px 0; padding: 16px; background: linear-gradient(135deg, #fff4f1, #f6f0ff); border: 1px solid var(--border); border-radius: 16px; }
.welcome-card h2 { margin: 0 0 6px; font-size: 1.1rem; }
.welcome-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.welcome-actions .btn { flex: 1 1 auto; text-align: center; }
.welcome-actions .btn:first-child { flex-basis: 100%; }
[data-theme="dark"] .welcome-card { background: #1d1a21; }
.has-tabbar .share-bar { bottom: calc(68px + env(safe-area-inset-bottom)); }
/* Page événement : le faire-part fait office de carte d'en-tête */
.invite-top { position: relative; margin-bottom: 18px; }
.invite-top .invite { max-width: none; padding-top: 52px; }
.invite-top .lock-chip, .invite-top .back-chip { z-index: 3; }
.invite-extra { margin-top: 14px; font-family: inherit; }
.invite-extra .countdown-plain { color: inherit; }
.invite-extra .countdown-plain span { color: inherit; opacity: .7; }
.live-note { font-family: system-ui, -apple-system, sans-serif; font-size: .88rem; line-height: 1.45; margin: 14px auto 0; max-width: 320px; padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,.6); color: #3a3236; }
.invite.elegant .live-note { background: rgba(255,255,255,.1); color: inherit; border: 1px solid rgba(232,199,106,.35); }
.invite.moderne .live-note { background: rgba(255,255,255,.12); color: inherit; }
.theme-toggle { position: fixed; top: calc(10px + env(safe-area-inset-top)); right: 10px; z-index: 30; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: rgba(255,255,255,.85); backdrop-filter: blur(8px); font-size: 1.15rem; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
[data-theme="dark"] .theme-toggle { background: rgba(29,26,33,.85); }
.cagnotte-promo { margin: 16px 0 10px; padding: 16px; border-radius: 16px; background: linear-gradient(135deg, #ff2e93, #b23cff); color: #fff; text-align: center; box-shadow: 0 6px 18px rgba(214,40,160,.3); }
.cagnotte-promo b { display: block; font-size: 1.05rem; }
.cagnotte-promo p { margin: 8px 0 12px; font-size: .9rem; line-height: 1.4; opacity: .95; }
.cagnotte-promo small { display: block; margin-top: 10px; font-weight: 600; }
.cagnotte-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.cagnotte-links a { padding: 7px 14px; border-radius: 99px; background: #fff; color: #c2187f; font-weight: 700; font-size: .85rem; text-decoration: none; }
.pot-box { margin: 0 0 10px; padding: 14px 16px; border-radius: 16px; background: var(--card, #fff); box-shadow: var(--shadow); }
.pot-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; }
.pot-head b { font-size: 1.5rem; background: linear-gradient(135deg, #ff2e93, #b23cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pot-bar { height: 10px; border-radius: 99px; background: rgba(214,40,160,.15); margin: 8px 0 6px; overflow: hidden; }
.pot-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ff2e93, #b23cff); }
.pot-sub { font-size: .82rem; color: var(--muted); }
.live-today { margin: 4px 0 14px; }
.live-today-title { margin: 0 0 8px; font-family: system-ui, -apple-system, sans-serif; font-weight: 700; font-size: 1.05rem; }
.live-today-btn { font-size: 1.1rem; padding: 14px; animation: livePulse 1.6s ease-in-out infinite; }
@keyframes livePulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,46,147,.5); } 50% { box-shadow: 0 0 0 10px rgba(255,46,147,0); } }
/* Formulaire simplifié : options secondaires repliées */
.more-options > summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; padding: 4px 0; list-style: none; text-align: center; }
.more-options > summary::-webkit-details-marker { display: none; }
.more-options[open] > summary { margin-bottom: 12px; }
.more-options h3 { margin: 20px 0 8px; font-size: 1rem; }
.btn-big { font-size: 1.15rem; padding: 18px; }
/* Taille du texte « Grande » (Profil) */
html.big-text { font-size: 118%; }
html.big-text .small { font-size: 1rem; }
html.big-text .tabbar a { font-size: .8rem; }
/* Guide de première connexion */
.guide-card h2 { text-align: center; margin-top: 0; }
.guide-steps { padding: 0; margin: 0 0 18px; list-style: none; display: grid; gap: 14px; }
.guide-steps li { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--bg); }
.guide-steps b { font-size: 1.05rem; }
.guide-steps span { color: var(--muted); }
.segments button { white-space: nowrap; }
/* Écran du code (événement privé) : présence de la marque */
.locked-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 auto 18px; color: #fff; text-decoration: none; font-family: "Quicksand", var(--font); font-weight: 700; font-size: 1.6rem; }
.locked-brand img { width: 44px; height: 44px; background: #fff; border-radius: 12px; padding: 4px; }
.locked-brand b { color: #ffd1ea; }
.locked-promo { margin: 18px auto 0; max-width: 440px; color: #fff; text-align: center; font-size: .95rem; line-height: 1.5; opacity: .95; }
.locked-promo a { display: inline-block; margin-top: 8px; color: #fff; font-weight: 700; text-decoration: underline; }
.locked-screen { flex-direction: column; }
.logout-btn { background: var(--card, #fff); color: var(--text); border: 2px solid var(--text); font-weight: 700; font-size: 1.05rem; padding: 14px; box-shadow: none; }
.cam-reminder { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(135deg, #ff2e93, #b23cff); color: #fff; text-decoration: none; box-shadow: var(--shadow); }
.cam-reminder > span { font-size: 1.6rem; }
.cam-reminder div { flex: 1; min-width: 0; display: grid; }
.cam-reminder small { opacity: .9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cam-reminder em { font-style: normal; font-weight: 700; white-space: nowrap; }
/* Application iPhone / Android */
.offline-banner { position: fixed; top: env(safe-area-inset-top); left: 0; right: 0; z-index: 100; background: #1d1a21; color: #fff; text-align: center; padding: 10px; font-weight: 600; }
.native-app .topbar { padding-top: calc(10px + env(safe-area-inset-top)); }
/* Administration : compteurs et boîte Contact */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin: 0 0 14px; }
.admin-stats div { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 10px 6px; text-align: center; }
.admin-stats b { display: block; font-size: 1.4rem; color: var(--primary); }
.admin-stats span { font-size: .78rem; color: var(--muted); }
.contact-msg p { margin: 8px 0; }
/* Cagnotte affichée dans le site */
.pot-frame { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; background: var(--bg); color: var(--text); }
.pot-frame-bar { display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; background: linear-gradient(135deg, #ff2e93, #b23cff); color: #fff; }
.pot-frame-bar b { flex: 1; }
.pot-frame-out { color: #fff; font-size: .85rem; }
.pot-frame-close { border: 0; background: rgba(255,255,255,.2); color: #fff; width: 36px; height: 36px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; }
.pot-frame iframe { flex: 1; width: 100%; border: 0; background: #fff; }
.pot-frame-pick { padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 10px; max-width: 480px; margin: 0 auto; width: 100%; box-sizing: border-box; }
.pot-frame-pick p { margin: 0 0 8px; line-height: 1.5; padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); }
.pot-service { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--card); color: var(--text); font: inherit; font-size: 1.05rem; text-align: left; cursor: pointer; box-shadow: var(--shadow); }
.pot-service span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--primary-light); font-size: 1.3rem; }
.pot-service b { flex: 1; }
.pot-service i { font-style: normal; font-size: 1.5rem; color: var(--muted); }
.pot-service:active { transform: scale(.98); }

/* Barre du bas immobile sur iPhone : sur les pages qui l'affichent, le contenu défile à l'intérieur du corps
   (la fenêtre, elle, ne défile jamais), donc Safari ne replie/déplie plus sa barre d'adresse et le dock ne bouge pas. */
html:has(body.has-tabbar) { height: 100%; overflow: hidden; overscroll-behavior: none; }
body.has-tabbar { position: fixed; inset: 0; overflow-x: clip; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; }
.tabbar { transform: translateZ(0); }

/* ---------- Page événement modernisée ---------- */
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin: 0 0 16px; }
.quick-actions .qa { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 18px; border: 1px solid var(--border); background: var(--card); color: var(--text); font: inherit; font-size: .78rem; font-weight: 600; text-decoration: none; cursor: pointer; box-shadow: var(--shadow); }
.quick-actions .qa span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--primary-light); font-size: 1.3rem; }
.quick-actions .qa:active { transform: scale(.96); }
.quick-actions .qa.hidden { display: none; }
.event-facts { display: grid; gap: 4px; padding: 16px 18px; border-radius: 22px; }
.event-facts .fact { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.event-facts .fact + .fact { border-top: 1px solid var(--border); }
.event-facts .ico { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border-radius: 12px; background: var(--primary-light); font-size: 1.15rem; }
.event-facts small { display: block; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.event-facts b { font-weight: 600; }
.facts-link { color: var(--muted); margin-top: 8px; justify-self: start; }
#page .card { border-radius: 22px; }
#page .rsvp h2, #page .guestbook > h2, #page .stories-preview h2 { font-size: 1.15rem; letter-spacing: -.01em; }
#page .rsvp-choices button { border-radius: 16px; padding: 14px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
#page .rsvp-choices button.active { box-shadow: 0 0 0 2px var(--primary) inset; }
#page #live-link, #page #cagnotte-link { border-radius: 16px; }
#page #cagnotte-link { display: none; } /* remplacé par l'action rapide « Cagnotte » */
/* Barre de partage flottante, façon application */
#page .share-bar { position: sticky; bottom: calc(10px + env(safe-area-inset-bottom)); margin: 0 12px; padding: 8px; border: 1px solid var(--border); border-radius: 22px; background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 10px 30px rgba(0,0,0,.15); }
#page .share-bar .btn { border-radius: 16px; }
.has-tabbar #page .share-bar { bottom: calc(76px + env(safe-area-inset-bottom)); }
.invite-top .lock-chip { background: rgba(255,255,255,.9); color: #3a2a1a; border-radius: 999px; padding: 4px 10px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }

/* ---------- Page de création modernisée ---------- */
.steps-nav { position: sticky; top: 57px; z-index: 9; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 0 0 14px; padding: 6px; border-radius: 18px; border: 1px solid var(--border); background: color-mix(in srgb, var(--card) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow); }
.steps-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; font-size: .7rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.steps-nav i { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--border); color: var(--text); font-style: normal; font-size: .75rem; }
.steps-nav a.active { color: var(--primary); background: var(--primary-light); }
.steps-nav a.active i { background: linear-gradient(135deg, #fd1a85, #c60bd2); color: #fff; }
.form-modern .card { border-radius: 24px; padding: 20px 18px; scroll-margin-top: 130px; }
.form-modern h2, .form-modern label { text-align: center; }
.form-modern h2 { font-size: 1.2rem; letter-spacing: -.01em; margin-top: 0; text-align: center; }
.form-modern label { font-size: .8rem; color: var(--muted); font-weight: 600; margin-top: 16px; }
.form-modern .choice, .form-modern .advanced label.choice { margin: 0; }
.form-modern input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .form-modern select { text-align: center; border-radius: 14px; }
.form-modern textarea { border-radius: 14px; }
.form-modern .choice span { border-radius: 16px; }
.dropzone { display: flex !important; flex-direction: column; align-items: center; gap: 4px; padding: 18px; margin: 6px 0 0 !important; border: 2px dashed var(--border); border-radius: 18px; background: var(--bg); color: var(--text) !important; font-size: .95rem !important; text-align: center !important; cursor: pointer; }
.dropzone span { font-size: 1.6rem; }
.dropzone:active { border-color: var(--primary); }
.form-modern .cagnotte-promo { background: var(--primary-light); color: var(--text); box-shadow: none; border: 1px solid var(--border); }
.form-modern .cagnotte-promo small { color: var(--primary); }
.save-sticky { border-radius: 18px; box-shadow: 0 10px 28px rgba(214,40,160,.35); }
/* Types : pastilles sur deux colonnes, icône à gauche, libellé lisible en entier */
.form-modern #types { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; grid-auto-rows: auto; }
.form-modern #types .choice { min-width: 0; }
.form-modern #types .choice span { min-height: 0 !important; flex-direction: row; justify-content: flex-start; gap: 6px; padding: 10px 6px; font-size: .8rem; text-align: left; overflow-wrap: break-word; overflow: hidden; }
.form-modern #types .choice span b { font-size: 1.15rem; flex: 0 0 auto; }
.form-modern #s-event { position: relative; }
.form-modern #cover.sr-only { left: 0; top: 0; margin: 0; }

/* =====================================================================
   Modernisation globale (2026) : verre dépoli, retours tactiles, focus doux,
   feuilles animées, chargement animé. Respecte « réduire les animations ».
   ===================================================================== */
:root { --radius: 20px; --ease: cubic-bezier(.2, .8, .2, 1); }
html { -webkit-tap-highlight-color: transparent; }
::selection { background: color-mix(in srgb, var(--primary) 30%, transparent); }

/* En-tête en verre dépoli */
.topbar { background: color-mix(in srgb, var(--card) 82%, transparent); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); }

/* Barre du bas : onglet actif dans une pastille */
.tabbar a .ico { padding: 4px 14px; border-radius: 14px; transition: background .2s var(--ease); }
.tabbar a.active .ico { background: var(--primary-light); }
.tabbar .plus { transition: transform .15s var(--ease); }
.tabbar a:active .plus { transform: scale(.92); }

/* Cartes : bord fin et ombre douce */
.card { border: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }

/* Boutons : retour tactile et transitions */
.btn, .choice span, .qa, .pot-service, .segments button, .rsvp-choices button { transition: transform .12s var(--ease), background-color .2s, border-color .2s, box-shadow .2s; }
.btn:active, .choice span:active, .segments button:active, .rsvp-choices button:active { transform: scale(.97); }
.btn { border-radius: 14px; }
.btn:not(.btn-light):not(.btn-ghost):not(.btn-danger) { box-shadow: 0 6px 18px rgba(214, 40, 160, .25); }

/* Champs : halo de focus aux couleurs du site */
input, select, textarea { border-radius: 14px; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Feuilles du bas : fond flouté, poignée et glissement */
.sheet { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: em-fade .2s ease-out; }
.sheet .card { position: relative; padding-top: 26px; animation: em-up .32s var(--ease); }
.sheet .card::before { content: ""; position: absolute; top: 9px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: var(--border); }

/* Notifications éphémères en pilule */
.toast { border-radius: 999px; padding: 12px 20px; box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: em-pop .25s var(--ease); }

/* Apparition douce des pages et chargement animé */
main { animation: em-fade .3s ease-out; }
#loading { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 40vh; }
#loading::before { content: ""; width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--primary); animation: em-spin .8s linear infinite; }

@keyframes em-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes em-up { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes em-pop { from { transform: translateX(-50%) scale(.9); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
@keyframes em-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
/* Barre de partage de l'événement : une seule ligne compacte (Partager · Copier · ♡) */
#page .share-bar .row { display: flex; flex-wrap: nowrap; gap: 6px; }
#page .share-bar .btn { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 8px 10px; font-size: .95rem; white-space: nowrap; box-shadow: none; }
#page .share-bar .fav-btn { flex: 0 0 48px !important; }
/* Barre de partage fixée juste au-dessus du dock (le « collant » d'iOS la faisait monter et descendre) */
#page .share-bar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); margin: 0 auto; z-index: 15; max-width: 696px; }
.has-tabbar #page .share-bar { bottom: calc(74px + env(safe-area-inset-bottom)); }
#page main { padding-bottom: 76px; }

/* Réactions aux stories : barre d'emojis en bas, compteur, envol de l'emoji touché */
.sv-react { position: absolute; left: 12px; right: 60px; max-width: 420px; margin: 0 auto; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 4; display: flex; justify-content: space-around; gap: 4px; padding: 6px; border-radius: 999px; background: rgba(0,0,0,.35); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.sv-react button { border: 0; background: none; font-size: 1.5rem; line-height: 1; padding: 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; transition: transform .12s; }
.sv-react button:active { transform: scale(1.35); }
.sv-react small { font-size: .62rem; color: #fff; font-weight: 700; min-height: .8em; }
.sv-fly { position: absolute; bottom: 80px; z-index: 5; font-size: 2.4rem; pointer-events: none; animation: sv-fly 1.2s ease-out forwards; }
@keyframes sv-fly { from { transform: translateY(0) scale(1); opacity: 1; } to { transform: translateY(-260px) scale(1.6); opacity: 0; } }

/* Commentaires des stories (panneau bas) */
.sv-com-btn { border: 0; background: none; font-size: 1.4rem; display: flex; flex-direction: column; align-items: center; padding: 4px; cursor: pointer; }
.sv-com-btn small { font-size: .62rem; color: #fff; font-weight: 700; min-height: .8em; }
.sv-comments { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; max-height: 60%; display: flex; flex-direction: column; gap: 8px; padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: rgba(20,16,24,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: #fff; animation: em-up .28s var(--ease); }
.sv-comments.hidden { display: none; }
.sv-com-list { overflow-y: auto; flex: 1; }
.sv-com-list p { margin: 0 0 8px; font-size: .95rem; overflow-wrap: anywhere; }
.sv-com-list button { border: 0; background: none; color: #aaa; cursor: pointer; }
.sv-com-form { display: flex; gap: 8px; }
.sv-com-form input { flex: 1; background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.2); }
/* Réactions à l'événement */
.ev-react { display: flex; justify-content: space-between; gap: 4px; margin: -4px 0 16px; padding: 8px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); box-shadow: var(--shadow); }
.ev-react button { position: relative; border: 0; background: none; font-size: 1.45rem; line-height: 1; padding: 4px 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; transition: transform .12s; }
.ev-react button:active { transform: scale(1.3); }
.ev-react small { font-size: .65rem; color: var(--muted); font-weight: 700; min-height: .8em; }
.ev-fly { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); font-size: 2rem; pointer-events: none; animation: ev-fly 1s ease-out forwards; }
@keyframes ev-fly { from { opacity: 1; translate: 0 0; } to { opacity: 0; translate: 0 -120px; scale: 1.5; } }
/* Guide de bienvenue : texte plus grand et plus lisible (défilement si l'écran est petit) */
.guide-card { max-height: 92vh; overflow-y: auto; }
.guide-card h2 { font-size: 1.55rem; }
.guide-steps b { font-size: 1.22rem; }
.guide-steps span { font-size: 1.08rem; line-height: 1.45; color: var(--text); opacity: .8; }

/* Encart cagnotte de la page événement */
.pot-promo { margin: 0 0 16px; padding: 16px; border-radius: 22px; text-align: center; background: var(--primary-light); border: 1px solid var(--border); }
.pot-promo b { font-size: 1.05rem; }
.pot-promo p { margin: 6px 0 12px; color: var(--text); opacity: .85; }
.pot-promo-actions { display: flex; gap: 8px; justify-content: center; }
.pot-promo-actions .btn { flex: 1; }
.pot-promo .btn-light { background: var(--card); border: 1px solid var(--border); }
/* Actions rapides à 5 tuiles : libellés plus compacts pour tenir en entier */
.quick-actions { gap: 6px; }
.quick-actions .qa { min-width: 0; padding: 10px 2px; font-size: .7rem; letter-spacing: -.01em; }
.quick-actions .qa span { width: 40px; height: 40px; font-size: 1.2rem; }
/* Guide : fenêtre centrée qui tient dans l'écran visible (barres Safari comprises), défilement interne si besoin */
#guide { align-items: center; padding: calc(10px + env(safe-area-inset-top)) 12px calc(10px + env(safe-area-inset-bottom)); }
#guide .guide-card { border-radius: 24px; max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); padding: 22px 18px 18px; }
#guide .guide-card h2 { font-size: 1.4rem; margin-bottom: 12px; }
#guide .guide-steps { gap: 10px; margin-bottom: 14px; }
#guide .guide-steps li { padding: 10px 12px; }
#guide .guide-steps b { font-size: 1.12rem; }
#guide .guide-steps span { font-size: 1rem; line-height: 1.4; }
