/* ==========================================================
   Secret Santa Crévits — feuille de style
   ========================================================== */
:root {
    --night: #0b1a33;
    --night-2: #142a52;
    --red: #c8102e;
    --red-dark: #9e0c24;
    --green: #0f5132;
    --green-2: #1f7a4d;
    --gold: #f2c14e;
    --gold-dark: #d4a017;
    --cream: #fffaf0;
    --ink: #2d2a26;
    --muted: #7a726a;
    --line: #eadfcf;
    --radius: 20px;
    --shadow: 0 14px 40px rgba(3, 10, 25, .35);
    --font-title: 'Mountains of Christmas', Georgia, serif;
    --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: var(--font);
    color: var(--ink);
    background: var(--night);
    background-image:
        radial-gradient(1px 1px at 12% 18%, #fff8 50%, transparent 51%),
        radial-gradient(1px 1px at 72% 8%, #fff9 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 40% 30%, #fff6 50%, transparent 51%),
        radial-gradient(1px 1px at 88% 40%, #fff7 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 25% 60%, #fff5 50%, transparent 51%),
        radial-gradient(ellipse at 50% -10%, #1f3f78 0%, var(--night) 65%);
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
    overflow-x: hidden;
}

#snow {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

/* ---------- Guirlande lumineuse ---------- */
.lights {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    margin: 0;
    padding: 0 8px;
    list-style: none;
    height: 34px;
    overflow: hidden;
}
.lights::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: -14px;
    height: 26px;
    border-bottom: 2px solid #2b3b55;
    border-radius: 50%;
}
.lights li {
    position: relative;
    width: 10px;
    height: 16px;
    margin-top: 10px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 2px 14px 2px var(--gold);
    animation: flash-1 2s infinite;
}
.lights li::before {
    content: '';
    position: absolute;
    top: -4px; left: 2px;
    width: 6px; height: 5px;
    border-radius: 2px;
    background: #3a4a63;
}
.lights li:nth-child(4n+2) { background: var(--red); box-shadow: 0 2px 14px 2px var(--red); animation-name: flash-2; animation-duration: 1.6s; }
.lights li:nth-child(4n+3) { background: #3ccf7a; box-shadow: 0 2px 14px 2px #3ccf7a; animation-name: flash-3; animation-duration: 2.3s; }
.lights li:nth-child(4n+4) { background: #4aa8ff; box-shadow: 0 2px 14px 2px #4aa8ff; animation-name: flash-1; animation-duration: 1.8s; }
.lights li:nth-child(n+13) { display: none; }
@media (min-width: 640px) { .lights li:nth-child(n+13) { display: block; } }

@keyframes flash-1 { 0%, 100% { opacity: 1; } 50% { opacity: .35; box-shadow: none; } }
@keyframes flash-2 { 0%, 100% { opacity: .4; box-shadow: none; } 50% { opacity: 1; } }
@keyframes flash-3 { 0%, 60%, 100% { opacity: 1; } 30% { opacity: .3; box-shadow: none; } }

/* ---------- En-tête ---------- */
.site-header {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 4px 16px 6px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
}
.brand-hat {
    font-size: 34px;
    display: inline-block;
    transform-origin: 50% 90%;
    animation: hat 3.2s ease-in-out infinite;
}
@keyframes hat { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
.brand-title {
    font-family: var(--font-title);
    font-size: clamp(28px, 7vw, 40px);
    line-height: 1.05;
    text-shadow: 0 3px 0 rgba(0, 0, 0, .25), 0 0 24px rgba(242, 193, 78, .25);
}
.brand-title span { color: var(--gold); }
.site-header { flex-wrap: wrap; }
.logout { flex-basis: 100%; text-align: center; margin-top: -4px; }
.logout .link-btn { color: #c9d6ea; font-size: 13px; padding: 2px 8px; }
@media (min-width: 760px) {
    .logout { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); flex-basis: auto; margin: 0; }
}

/* ---------- Mise en page ---------- */
.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 12px 16px 40px;
    flex: 1;
}

.site-footer {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #6f86a8;
    font-size: 13px;
    padding: 10px 16px 110px;
}
.heart { color: var(--red); display: inline-block; animation: beat 1.4s infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.25); } 30% { transform: scale(1); } }

.hills {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: 90px;
    z-index: 0;
    pointer-events: none;
}
.hills svg { width: 100%; height: 100%; display: block; }

/* ---------- Typo ---------- */
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; }
h1 { font-family: var(--font-title); font-size: clamp(32px, 8vw, 44px); color: var(--red); }
h2 { font-size: 20px; font-weight: 800; color: var(--green); }
h3 { font-size: 17px; font-weight: 800; }
p { margin: 0 0 .8em; }
.lead { font-size: 18px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hint { font-size: 13px; color: var(--muted); margin: .6em 0 0; }
.optional { font-weight: 400; color: var(--muted); font-size: .85em; }
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 12px;
    font-weight: 800;
    color: var(--gold);
    margin: 0 0 4px;
}
.mt { margin-top: 18px; }

/* ---------- Cartes ---------- */
.card {
    position: relative;
    background: var(--cream);
    border-radius: var(--radius);
    padding: 24px 20px;
    margin-bottom: 18px;
    box-shadow: var(--shadow);
    animation: rise .5s cubic-bezier(.2, .8, .2, 1) both;
}
.card::before {
    /* petit ruban sucre d'orge */
    content: '';
    position: absolute;
    left: 24px; right: 24px; top: 0;
    height: 5px;
    border-radius: 0 0 6px 6px;
    background: repeating-linear-gradient(45deg, var(--red) 0 10px, #fff 10px 20px);
    opacity: .85;
}
.card + .card { animation-delay: .08s; }
@media (min-width: 600px) { .card { padding: 30px 32px; } }
.card-center { text-align: center; }
.card-narrow { max-width: 420px; margin-left: auto; margin-right: auto; }
.card-highlight { background: linear-gradient(135deg, #fff6dc, #fffaf0); border: 2px solid var(--gold); }
.card-danger { background: #fff5f5; }
.card-danger h2 { color: var(--red-dark); }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.big-emoji { font-size: 64px; line-height: 1; margin-bottom: 10px; display: inline-block; }
.wobble { animation: wobble 2.6s ease-in-out infinite; }
@keyframes wobble { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg) scale(1.05); } }
.phone-buzz { animation: buzz 2.4s infinite; }
@keyframes buzz {
    0%, 70%, 100% { transform: none; }
    74%, 82%, 90% { transform: rotate(-12deg); }
    78%, 86%, 94% { transform: rotate(12deg); }
}
.envelope-float { animation: float 3s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Héros (accueil) ---------- */
.hero { text-align: center; color: #fff; padding: 18px 0 26px; }
.hero-title { color: #fff; font-size: clamp(44px, 12vw, 64px); text-shadow: 0 4px 0 var(--red-dark); margin-top: 10px; }
.hero .lead { color: #d6e2f5; }
.countdown {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 18px;
    padding: 12px 28px;
    backdrop-filter: blur(4px);
}
.countdown strong { font-family: var(--font-title); font-size: 48px; line-height: 1; color: var(--gold); }
.countdown span { font-size: 14px; color: #d6e2f5; }

.gift-stack { display: flex; justify-content: center; align-items: flex-end; gap: 10px; height: 110px; }
.gift {
    position: relative;
    border-radius: 8px;
    animation: bounce 2.4s ease-in-out infinite;
}
.gift::before, .gift::after { content: ''; position: absolute; background: var(--gold); }
.gift::before { left: 50%; top: 0; bottom: 0; width: 14%; transform: translateX(-50%); }
.gift::after { top: 38%; left: 0; right: 0; height: 14%; }
.gift span {
    position: absolute;
    top: -16px; left: 50%;
    width: 30px; height: 18px;
    transform: translateX(-50%);
}
.gift span::before, .gift span::after {
    content: '';
    position: absolute;
    top: 0;
    width: 15px; height: 15px;
    border: 4px solid var(--gold);
    border-radius: 50% 50% 0 50%;
}
.gift span::before { left: 0; }
.gift span::after { right: 0; transform: scaleX(-1); }
.gift-1 { width: 70px; height: 62px; background: var(--red); }
.gift-2 { width: 88px; height: 82px; background: var(--green-2); animation-delay: .3s; }
.gift-3 { width: 60px; height: 50px; background: #2b6cb0; animation-delay: .6s; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px) rotate(-3deg); } }

.steps { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 12px; }
.steps li { display: flex; gap: 14px; align-items: center; }
.step-icon {
    flex: none;
    width: 46px; height: 46px;
    display: grid; place-items: center;
    font-size: 22px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .08);
}

/* ---------- En-tête de partie ---------- */
.party-header { text-align: center; color: #fff; margin: 6px 0 18px; }
.party-header h1 { color: #fff; text-shadow: 0 3px 0 var(--red-dark); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.card .chips { justify-content: flex-start; }
.chip {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}
.card .chip { background: #f1e8d8; border-color: var(--line); color: var(--ink); }

.progress-steps {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 0;
    margin: 16px 0 0;
    font-size: 13px;
    color: #9fb2cf;
}
.progress-steps li { display: flex; align-items: center; gap: 6px; }
.progress-steps li + li::before { content: ''; width: 18px; height: 2px; background: #3a5078; margin-right: 2px; }
.progress-steps span {
    width: 24px; height: 24px;
    display: grid; place-items: center;
    border-radius: 50%;
    border: 2px solid #3a5078;
    font-weight: 800;
    font-size: 12px;
}
.progress-steps .current { color: #fff; font-weight: 700; }
.progress-steps .current span { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 0 0 4px rgba(200, 16, 46, .25); }
.progress-steps .done span { background: var(--green-2); border-color: var(--green-2); color: #fff; }

/* ---------- Jauge ---------- */
.meter {
    height: 12px;
    border-radius: 999px;
    background: #efe5d3;
    overflow: hidden;
    margin-top: 14px;
}
.meter-bar {
    height: 100%;
    width: var(--p, 0%);
    min-width: 12px;
    border-radius: inherit;
    background: repeating-linear-gradient(45deg, var(--red) 0 10px, #e2415a 10px 20px);
    background-size: 28px 28px;
    animation: stripes 1s linear infinite, grow 1.2s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes stripes { to { background-position: 28px 0; } }
@keyframes grow { from { width: 0; } }
.meter-label { font-size: 13px; color: var(--muted); margin: 6px 0 0; }

/* ---------- Grille des membres ---------- */
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 20px;
}
@media (max-width: 380px) { .members-grid { grid-template-columns: 1fr 1fr; gap: 10px; } }
.member-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 10px 14px;
    border: 2px solid var(--line);
    border-radius: 18px;
    background: #fff;
    font: inherit;
    color: var(--ink);
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s;
    animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) both;
    animation-delay: var(--d, 0ms);
    -webkit-tap-highlight-color: transparent;
}
.member-btn:hover, .member-btn:focus-visible {
    transform: translateY(-3px);
    border-color: var(--c);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .12);
    outline: none;
}
.member-btn:active { transform: scale(.96); }
.member-btn.is-done { background: #f3faf5; border-color: #cde7d6; }
@keyframes pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }

.avatar {
    width: 56px; height: 56px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--c, var(--red));
    color: #fff;
    font-weight: 800;
    font-size: 24px;
    position: relative;
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .15);
}
.member-btn .avatar::after {
    /* bonnet de Noël */
    content: '';
    position: absolute;
    top: -10px; right: -6px;
    width: 26px; height: 20px;
    background: var(--red);
    border-radius: 60% 80% 10% 10%;
    border-bottom: 5px solid #fff;
    transform: rotate(18deg);
    box-shadow: 10px -6px 0 -6px #fff;
}
.avatar-sm { width: 38px; height: 38px; font-size: 16px; flex: none; background: var(--green-2); }
.member-name { font-weight: 800; font-size: 16px; text-align: center; word-break: break-word; }
.member-btn .badge { position: absolute; top: 8px; left: 8px; }

/* ---------- Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: #eee5d6;
    color: #6b5f50;
    white-space: nowrap;
}
.badge-ok { background: #d7f0df; color: var(--green); }
.badge-mid { background: #fff0c2; color: #8a6d1a; }

/* ---------- Boutons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 22px;
    border: 0;
    border-radius: 14px;
    font: inherit;
    font-weight: 800;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, background .2s;
    -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(2px); }
.btn-primary {
    color: #fff;
    background: linear-gradient(180deg, #e0213f, var(--red));
    box-shadow: 0 4px 0 var(--red-dark), 0 10px 20px rgba(200, 16, 46, .3);
}
.btn-primary:hover { background: linear-gradient(180deg, #ea2b49, #d3132f); }
.btn-primary:active { box-shadow: 0 2px 0 var(--red-dark); }
.btn-secondary { color: #fff; background: var(--green-2); box-shadow: 0 4px 0 var(--green); }
.btn-ghost { background: #fff; color: var(--ink); border: 2px solid var(--line); }
.btn-ghost:hover { border-color: var(--gold-dark); }
.btn-danger { background: #fff; color: var(--red); border: 2px solid #f3c2ca; }
.btn-danger:hover { background: #fdecef; }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: 14px; border-radius: 12px; }
.btn-lg { min-height: 56px; font-size: 18px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: wait; }
.link-btn {
    background: none;
    border: 0;
    padding: 8px;
    font: inherit;
    font-weight: 700;
    color: var(--red);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.link-btn[disabled] { color: var(--muted); text-decoration: none; cursor: default; }
.link-btn.muted { color: var(--muted); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; align-items: center; }
.card-center .actions { justify-content: center; }
.actions-stack { flex-direction: column; align-items: stretch; }
.actions form { margin: 0; }

/* ---------- Formulaires ---------- */
input, select, textarea {
    width: 100%;
    font: inherit;
    font-size: 16px; /* évite le zoom iOS */
    color: var(--ink);
    padding: 12px 14px;
    border: 2px solid var(--line);
    border-radius: 12px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--green-2);
    box-shadow: 0 0 0 4px rgba(31, 122, 77, .15);
}
textarea { resize: vertical; }
.field-label { display: block; font-weight: 800; font-size: 14px; margin-bottom: 6px; text-align: left; }
.stack { display: grid; gap: 12px; text-align: left; margin-top: 18px; }
.stack .btn { margin-top: 6px; }
.stack-lg { display: block; }
.grid-2 { display: grid; gap: 14px; }
@media (min-width: 600px) { .grid-2 { grid-template-columns: 1fr 1fr; } .field-full { grid-column: 1 / -1; } }

.rows { display: grid; gap: 10px; margin: 14px 0; }
.row { display: flex; gap: 8px; align-items: center; }
.row > input, .row > select { min-width: 0; flex: 1; }
.member-row > input:first-child { flex: 1.1; }
.row-sep { color: var(--muted); font-weight: 800; }
.icon-btn {
    flex: none;
    width: 40px; height: 40px;
    border: 0;
    border-radius: 10px;
    background: #f3e9da;
    color: var(--muted);
    font-size: 16px;
    cursor: pointer;
}
.icon-btn:hover { background: #fde2e6; color: var(--red); }
@media (max-width: 480px) {
    .member-row { flex-wrap: wrap; background: #fff; padding: 10px; border-radius: 14px; border: 1px solid var(--line); }
    .member-row > input { flex: 1 1 100%; }
    .member-row > input:first-child { flex: 1 1 calc(100% - 48px); }
    .member-row .remove-row { order: 0; }
    .member-row > input[type=tel] { order: 1; }
    .exclusion-row { flex-wrap: wrap; }
    .exclusion-row select { flex: 1 1 40%; }
}

.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; cursor: pointer; }
.check input { width: 22px; height: 22px; flex: none; accent-color: var(--green-2); margin-top: 1px; }

/* Code SMS */
.code-form { max-width: 320px; margin: 22px auto 6px; display: grid; gap: 14px; }
.code-input {
    text-align: center;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: .45em;
    padding: 14px 0 14px .45em;
    border-width: 3px;
    border-radius: 16px;
    font-variant-numeric: tabular-nums;
}
.code-input::placeholder { color: #d9cdb9; }
.code-input.shake { animation: shake .4s; border-color: var(--red); }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.resend { margin-top: 8px; }

/* Lien à copier */
.copy-field { display: flex; gap: 8px; }
.copy-field input { font-size: 14px; background: #f8f3ea; }

/* ---------- Messages flash ---------- */
.flash {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 14px;
    font-weight: 700;
    box-shadow: var(--shadow);
    animation: slide-in .4s cubic-bezier(.2, 1.2, .4, 1) both;
}
.flash-success { background: #e2f6e9; color: var(--green); border-left: 6px solid var(--green-2); }
.flash-error { background: #fde8eb; color: var(--red-dark); border-left: 6px solid var(--red); }
.flash-info { background: #fff6d8; color: #6e5512; border-left: 6px solid var(--gold-dark); }
.flash-close { background: none; border: 0; font-size: 22px; line-height: 1; color: inherit; cursor: pointer; opacity: .6; padding: 0 2px; }
@keyframes slide-in { from { opacity: 0; transform: translateY(-14px) scale(.97); } }

/* ---------- Boîte de dialogue ---------- */
.sheet {
    border: 0;
    padding: 28px 22px 22px;
    border-radius: 24px;
    width: min(92vw, 420px);
    background: var(--cream);
    text-align: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.sheet::backdrop { background: rgba(5, 12, 28, .65); backdrop-filter: blur(3px); }
.sheet[open] { animation: sheet-in .35s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(40px) scale(.95); } }
@media (max-width: 520px) {
    .sheet { margin: auto auto 0; width: 100%; max-width: 100%; border-radius: 24px 24px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
}

/* ---------- Page "merci" ---------- */
.done-card { overflow: hidden; }
.sleigh {
    position: absolute;
    top: 18px;
    left: -60px;
    font-size: 34px;
    animation: sleigh 6s linear infinite;
}
@keyframes sleigh {
    0% { transform: translate(0, 10px) scaleX(-1); }
    50% { transform: translate(calc(50vw), -6px) scaleX(-1); }
    100% { transform: translate(calc(100vw + 120px), 10px) scaleX(-1); }
}
.mail-scene { height: 140px; display: grid; place-items: center; margin: 18px 0 6px; }
.envelope { position: relative; width: 150px; height: 96px; animation: fly 2.6s 1.4s cubic-bezier(.5, 0, .5, 1) both; }
.envelope-body {
    position: absolute; inset: 0;
    background: linear-gradient(160deg, #e3283f, var(--red-dark));
    border-radius: 0 0 12px 12px;
    clip-path: polygon(0 0, 50% 52%, 100% 0, 100% 100%, 0 100%);
    z-index: 3;
}
.envelope::before {
    content: '';
    position: absolute; inset: 0;
    background: var(--red-dark);
    border-radius: 12px;
    z-index: 0;
}
.envelope-flap {
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 58px;
    background: #b10f2a;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform-origin: top;
    z-index: 4;
    animation: flap .6s .9s ease-in both;
}
.envelope-letter {
    position: absolute;
    left: 14px; right: 14px; top: 10px;
    height: 76px;
    background: #fff;
    border-radius: 8px;
    font-size: 36px;
    display: grid; place-items: center;
    z-index: 2;
    animation: letter .7s .2s ease-out both;
}
@keyframes letter { from { transform: translateY(-60px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes flap { from { transform: rotateX(180deg); } to { transform: rotateX(0); } }
@keyframes fly {
    0% { transform: none; }
    30% { transform: translateY(6px) rotate(-3deg); }
    100% { transform: translate(260px, -180px) rotate(18deg) scale(.4); opacity: 0; }
}
.eyebrow-dark { color: var(--gold-dark); }

/* Révélation du tirage */
.reveal { margin: 14px 0 8px; }
.reveal-gift {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 10px auto 0;
    display: block;
    border: 0;
    background: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    animation: gift-wiggle 2.2s ease-in-out infinite;
}
.reveal-box {
    position: absolute;
    left: 15px; right: 15px; bottom: 0;
    height: 95px;
    border-radius: 0 0 12px 12px;
    background:
        linear-gradient(90deg, transparent 43%, var(--gold) 43% 57%, transparent 57%),
        linear-gradient(180deg, #e0213f, var(--red-dark));
    box-shadow: 0 10px 24px rgba(158, 12, 36, .35);
}
.reveal-lid {
    position: absolute;
    left: 5px; right: 5px; top: 30px;
    height: 32px;
    border-radius: 8px;
    background:
        linear-gradient(90deg, transparent 43%, var(--gold) 43% 57%, transparent 57%),
        linear-gradient(180deg, #ea2b49, #c8102e);
    box-shadow: 0 4px 0 rgba(0, 0, 0, .12);
    z-index: 2;
    transition: transform .6s cubic-bezier(.3, 1.6, .5, 1), opacity .6s;
}
.reveal-lid::before, .reveal-lid::after {
    /* nœud */
    content: '';
    position: absolute;
    top: -24px;
    width: 30px; height: 26px;
    border: 6px solid var(--gold);
    border-radius: 50% 50% 0 50%;
}
.reveal-lid::before { left: calc(50% - 32px); }
.reveal-lid::after { right: calc(50% - 32px); transform: scaleX(-1); }
.reveal-gift[hidden], .reveal-result[hidden] { display: none; }
.reveal-hint { font-weight: 700; color: var(--green); margin-top: 12px; }
.reveal.is-open .reveal-gift { animation: none; cursor: default; }
.reveal.is-open .reveal-lid { transform: translate(40px, -70px) rotate(35deg); opacity: 0; }
.reveal.is-open .reveal-box { animation: box-out .5s .35s ease-in forwards; }
@keyframes box-out { to { transform: scale(.4); opacity: 0; } }
@keyframes gift-wiggle {
    0%, 70%, 100% { transform: none; }
    75% { transform: rotate(-7deg) scale(1.04); }
    80% { transform: rotate(7deg) scale(1.04); }
    85% { transform: rotate(-5deg); }
    90% { transform: rotate(4deg); }
}
.reveal-result {
    margin-top: 6px;
    padding: 22px 16px 18px;
    background: #fff3cf;
    border: 3px dashed var(--gold-dark);
    border-radius: 18px;
}
.reveal-result p { margin: 0; }
.reveal.is-open .reveal-result { animation: reveal-pop .6s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes reveal-pop { from { opacity: 0; transform: scale(.5) translateY(-30px); } }
.reveal-name {
    display: block;
    font-family: var(--font-title);
    font-size: clamp(40px, 12vw, 56px);
    line-height: 1.1;
    color: var(--red);
    margin: 6px 0;
    word-break: break-word;
}
.sent-note {
    display: flex;
    gap: 12px;
    align-items: center;
    text-align: left;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px 16px;
    margin-top: 18px;
}
.sent-note span[aria-hidden] { font-size: 28px; }
.sent-note p { margin: 0; }

.secret-box {
    display: flex;
    gap: 12px;
    align-items: center;
    text-align: left;
    background: #eef6f0;
    border-radius: 16px;
    padding: 14px 16px;
    margin: 18px 0 6px;
}
.secret-box span { font-size: 30px; }
.secret-box p { margin: 0; }

/* ---------- Admin ---------- */
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 6px 0 18px;
    color: #fff;
}
.page-head h1 { color: #fff; margin: 0; text-shadow: 0 3px 0 var(--red-dark); }
.page-head .muted { color: #9fb2cf; margin: 4px 0 0; }
.back-link { color: #b9c9e2; text-decoration: none; font-weight: 700; font-size: 14px; }
.back-link:hover { color: #fff; }

.party-list { display: grid; gap: 14px; }
.party-card { display: block; text-decoration: none; color: inherit; transition: transform .15s; }
.party-card:hover { transform: translateY(-3px); }
.party-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.party-card h2 { margin: 0; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.stat {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 16px;
    padding: 12px 8px;
    text-align: center;
    color: #d6e2f5;
}
.stat strong { display: block; font-family: var(--font-title); font-size: 36px; line-height: 1; color: var(--gold); }
.stat span { font-size: 12px; }

.member-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; }
.member-item { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.member-main { display: flex; align-items: center; gap: 12px; }
.member-main > div { flex: 1; min-width: 0; }
.member-main .small { overflow: hidden; text-overflow: ellipsis; }
.member-tools summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 8px; }
.member-tools[open] summary { margin-bottom: 10px; }
.member-tools .row { flex-wrap: wrap; }
.member-tools .row input { flex: 1 1 140px; }
.add-member { flex-wrap: wrap; }
.add-member input { flex: 1 1 140px; }

/* ---------- Accessibilité : moins d'animations ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
