/* ===== RESET & ROOT ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:      #110C14;
    --bg2:     #1C1320;
    --primary: #11B9A6;
    --gold:    #FF8C42;
    --gold2:   #FFD166;
    --purple:  #E35DFF;
    --rose:    #FF4D7A;
    --green:   #10B981;
    --text:    #FDF6F2;
    --muted:   #C9AEDD;
    --sat: env(safe-area-inset-top, 0px);
    --sab: env(safe-area-inset-bottom, 0px);
    --gap: clamp(8px, 2.5vw, 14px);
}

html {
    height: 100%;
    overflow-x: hidden;
}

body {
    height: 100%;
    overflow-x: hidden;
    background:
        radial-gradient(ellipse 60% 40% at 10% 0%,   rgba(255, 77, 122, 0.22)  0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 90% 100%,  rgba(17, 185, 166, 0.18)  0%, transparent 60%),
        radial-gradient(ellipse 70% 50% at 50% 50%,   rgba(227, 93, 255, 0.07)  0%, transparent 70%),
        linear-gradient(170deg, var(--bg) 0%, var(--bg2) 100%);
    color: var(--text);
    font-family: 'Manrope', sans-serif;
    overflow: hidden;
    /* allow scroll only if needed */
    overflow-y: auto;
}

/* ===== AURORA BLOBS ===== */
.aurora {
    position: fixed;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
}
.aurora-1 {
    width: clamp(180px, 55vw, 300px);
    height: clamp(180px, 55vw, 300px);
    left: -80px; top: 20%;
    background: rgba(227, 93, 255, 0.55);
    animation: drift1 15s ease-in-out infinite;
}
.aurora-2 {
    width: clamp(200px, 60vw, 340px);
    height: clamp(200px, 60vw, 340px);
    right: -90px; bottom: 10%;
    background: rgba(17, 185, 166, 0.45);
    animation: drift2 18s ease-in-out infinite;
}

/* ===== CANVAS ===== */
#bgCanvas, #confettiCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
#bgCanvas      { z-index: 0; }
#confettiCanvas { z-index: 50; }

/* ===== MAIN LAYOUT ===== */
.container {
    position: relative;
    z-index: 1;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding:
        calc(var(--sat) + clamp(10px, 3vw, 16px))
        clamp(12px, 4vw, 20px)
        calc(var(--sab) + clamp(10px, 3vw, 16px));
    gap: clamp(10px, 2.5vw, 16px);
}

/* ===== HEADER ===== */
.header {
    width: 100%;
    max-width: 440px;
    text-align: center;
    animation: fadeDown 0.6s ease both;
    flex-shrink: 0;
    margin-top: 60px;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(90deg, rgba(255,77,122,0.2), rgba(255,209,102,0.18));
    border: 1px solid rgba(255, 209, 102, 0.55);
    color: #FFE8B5;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 100px;
    margin-bottom: clamp(6px, 1.5vw, 10px);
}

.title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(34px, 9.5vw, 54px);
    line-height: 0.92;
    letter-spacing: 1px;
    color: var(--text);
    margin-bottom: clamp(6px, 1.5vw, 10px);
    /* subtle text gradient */
    background: linear-gradient(135deg, #FDF6F2 40%, #E35DFF 120%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: clamp(11px, 2.8vw, 13px);
    font-weight: 600;
    color: rgba(253, 246, 242, 0.55);
    margin-bottom: clamp(6px, 1.5vw, 10px);
    letter-spacing: 0.3px;
}

.tickets-remaining {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(17, 185, 166, 0.13);
    border: 1px solid rgba(23, 216, 167, 0.4);
    color: #7FF5DE;
    font-size: clamp(10px, 2.5vw, 12px);
    font-weight: 700;
    padding: 5px 13px;
    border-radius: 100px;
    letter-spacing: 0.3px;
}

.pulse-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--green);
    flex-shrink: 0;
    animation: pulseDot 2s ease-in-out infinite;
}

/* ===== CARD GRID ===== */
.main-content {
    width: 100%;
    max-width: 440px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
    flex: 1;
    align-content: center;
}

/* ===== CARD CONTAINER ===== */
.card-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0; /* empêche l'overflow dans la grille */
    animation: fadeUp 0.55s ease both;
}
.card-container:nth-child(1) { animation-delay: 0.00s; }
.card-container:nth-child(2) { animation-delay: 0.08s; }
.card-container:nth-child(3) { animation-delay: 0.14s; }
.card-container:nth-child(4) { animation-delay: 0.20s; }

/* CARD HEADER */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2px;
}

.card-num-badge {
    background: linear-gradient(135deg, rgba(255,77,122,0.25), rgba(227,93,255,0.25));
    border: 1px solid rgba(255,77,122,0.5);
    color: #FFD6E5;
    font-size: clamp(8px, 2vw, 10px);
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 100px;
    letter-spacing: 1px;
}

.card-status {
    font-size: clamp(8px, 2vw, 10px);
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 100px;
    letter-spacing: 0.4px;
    transition: all 0.3s ease;
}
.card-status.active {
    background: rgba(17,185,166,0.15);
    border: 1px solid rgba(23,216,167,0.4);
    color: #7FF5DE;
    animation: statusGlow 2.5s ease-in-out infinite;
}
.card-status.done-status {
    background: rgba(16,185,129,0.12);
    border: 1px solid rgba(16,185,129,0.3);
    color: #6EE7B7;
}
.card-status.win-status {
    background: linear-gradient(135deg, rgba(255,140,66,0.2), rgba(255,209,102,0.2));
    border: 1px solid rgba(255,209,102,0.5);
    color: var(--gold2);
    animation: goldGlow 1.5s ease-in-out infinite;
}

/* ===== SCRATCH CARD ===== */
.scratch-card {
    position: relative;
    width: 100%;
    border-radius: clamp(12px, 3vw, 18px);
    overflow: hidden;
    cursor: crosshair;
    /* layered border effect */
    border: 1px solid rgba(255,77,122,0.3);
    box-shadow:
        0 0 0 1px rgba(255,209,102,0.07),
        0 8px 28px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.07);
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

/* winning card gets gold border on reveal */
.scratch-card.is-winner {
    border-color: rgba(255, 209, 102, 0.6);
    box-shadow:
        0 0 0 1px rgba(255,209,102,0.2),
        0 0 24px rgba(255,140,66,0.3),
        0 8px 28px rgba(0,0,0,0.5);
}

/* unscratched shimmer on border */
.scratch-card .scratch-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    touch-action: none;
    user-select: none;
    cursor: crosshair;
    transition: opacity 0.55s ease;
}

/* ===== CARD BACK ===== */
.card-back {
    width: 100%;
    height: clamp(90px, 26vw, 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card-back.loss-back {
    background: linear-gradient(145deg, #2A1020, #1E0E18);
}
.card-back.win-back {
    background: linear-gradient(145deg, #0E2820, #12352A, #1A3A16);
}

/* decorative corner stars on win card */
.card-back.win-back::before,
.card-back.win-back::after {
    content: '✦';
    position: absolute;
    font-size: 10px;
    color: rgba(255, 209, 102, 0.4);
}
.card-back.win-back::before { top: 6px; left: 8px; }
.card-back.win-back::after  { bottom: 6px; right: 8px; }

/* ===== RESULT CONTENT ===== */
.result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 10px 8px;
    width: 100%;
}

.result-icon {
    font-size: clamp(22px, 5.5vw, 30px);
    line-height: 1;
}

.loss-result .result-icon {
    font-size: clamp(18px, 5vw, 24px);
    font-family: 'Bebas Neue', sans-serif;
    color: #FF5270;
    text-shadow: 0 0 14px rgba(255,82,112,0.5);
}

.result-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(14px, 4vw, 19px);
    letter-spacing: 2.5px;
}
.loss-result .result-text {
    color: #EF4444;
    text-shadow: 0 0 12px rgba(239,68,68,0.4);
}
.win-result .result-text {
    color: #FFE39A;
    text-shadow: 0 0 16px rgba(255,209,102,0.6);
}

.win-result .result-prize {
    font-size: clamp(9px, 2.2vw, 11px);
    font-weight: 800;
    color: #34D399;
    background: rgba(16,185,129,0.12);
    border: 1px solid rgba(52,211,153,0.3);
    padding: 3px 10px;
    border-radius: 100px;
    margin-top: 2px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* ===== PRIZES STRIP ===== */
.prizes-section {
    width: 100%;
    max-width: 440px;
    flex-shrink: 0;
    animation: fadeUp 0.6s 0.25s ease both;
}

.prizes-title {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(201,174,221,0.6);
    text-align: center;
    margin-bottom: 8px;
}

.prizes-marquee {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.prizes-track {
    display: flex;
    gap: 10px;
    width: max-content;
    animation: marquee 12s linear infinite;
}

.prizes-marquee:hover .prizes-track {
    animation-play-state: paused;
}

.prize-chip {
    flex-shrink: 0;
    white-space: nowrap;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 100px;
    padding: 7px 13px;
    font-size: clamp(10px, 2.5vw, 12px);
    font-weight: 700;
    backdrop-filter: blur(8px);
}
.chip-purple { border-color: rgba(227,93,255,0.35); color: #E4B4FF; }
.chip-cyan   { border-color: rgba(17,185,166,0.35);  color: #67EFD8; }
.chip-gold   { border-color: rgba(255,209,102,0.35); color: var(--gold2); }
.chip-red    { border-color: rgba(239,68,68,0.35);   color: #FCA5A5; }

/* ===== MODALS ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 6, 14, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.modal-overlay.hidden { display: none; }

.modal {
    width: 100%;
    max-width: 460px;
    max-height: 90dvh;
    overflow-y: auto;
    background: linear-gradient(180deg, #2E1D38 0%, #1C1226 100%);
    border: 1px solid rgba(255,255,255,0.12);
    border-bottom: none;
    border-radius: 22px 22px 0 0;
    padding: 8px 22px calc(var(--sab) + 26px);
    text-align: center;
    animation: slideUp 0.38s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

/* drag handle */
.modal::before {
    content: '';
    display: block;
    width: 38px;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    margin: 0 auto 18px;
}

.modal-icon {
    font-size: clamp(42px, 11vw, 56px);
    line-height: 1;
    margin-bottom: 8px;
}
.win-icon { animation: bounceIn 0.6s 0.25s cubic-bezier(0.34,1.56,0.64,1) both; }

.win-badge-label {
    display: inline-block;
    background: linear-gradient(135deg, var(--gold), var(--gold2));
    color: #2A1100;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 11px;
    letter-spacing: 3px;
    padding: 4px 16px;
    border-radius: 100px;
    margin-bottom: 8px;
}

.modal-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(20px, 5.5vw, 26px);
    letter-spacing: 1px;
    color: var(--text);
    margin-bottom: 8px;
}

.modal-prize-name {
    display: inline-block;
    font-size: clamp(14px, 3.8vw, 17px);
    font-weight: 800;
    color: #FFE6A6;
    background: rgba(255,140,66,0.14);
    border: 1px solid rgba(255,209,102,0.35);
    padding: 7px 18px;
    border-radius: 100px;
    margin-bottom: 10px;
}

.modal-desc {
    font-size: clamp(12px, 3vw, 14px);
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 18px;
}

.modal-btn {
    width: 100%;
    padding: clamp(13px, 3.5vw, 16px);
    border: none;
    border-radius: 14px;
    font-family: 'Manrope', sans-serif;
    font-size: clamp(14px, 3.8vw, 16px);
    font-weight: 800;
    cursor: pointer;
    letter-spacing: 0.4px;
    transition: transform 0.12s ease, opacity 0.12s ease;
}
.modal-btn:active { transform: scale(0.975); opacity: 0.9; }

.primary-btn {
    background: linear-gradient(135deg, #18D8A9, #0EA88A);
    color: #081210;
    box-shadow: 0 4px 20px rgba(17,185,166,0.4);
}

/* REGISTER MODAL */
.register-modal { text-align: left; }

.register-prize-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, rgba(255,140,66,0.1), rgba(17,185,166,0.1));
    border: 1px solid rgba(255,209,102,0.3);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 16px;
}
.register-prize-icon { font-size: 32px; }
.register-unlocked-label {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #7FF5DE;
    text-transform: uppercase;
    margin-bottom: 2px;
}
.register-prize-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 15px;
    letter-spacing: 0.8px;
    color: var(--text);
}

.price-row {
    text-align: center;
    margin-bottom: 14px;
}
.price-amount {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(28px, 8vw, 36px);
    color: var(--gold2);
}
.price-period {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
    margin-left: 3px;
}

.perks-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.perks-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(12px, 3vw, 14px);
    font-weight: 700;
    color: var(--text);
}
.perk-check {
    width: 19px; height: 19px;
    background: rgba(16,185,129,0.18);
    border: 1px solid rgba(16,185,129,0.45);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #34D399;
    font-weight: 900;
    flex-shrink: 0;
}

#offer-box {
    width: 100%;
    min-height: 180px;
    margin-bottom: 12px;
    overflow: visible;
    position: relative;
}


.legal-text {
    font-size: 10px;
    color: rgba(201,174,221,0.5);
    line-height: 1.5;
    text-align: center;
}
.legal-text a { color: var(--primary); text-decoration: none; }

/* ptprelinker — repris à l'identique du bot roue */
.ptprelinker-checkbox {
  display: flex !important; align-items: flex-start !important;
  gap: 10px !important;
  margin-top: 12px !important; margin-bottom: 0 !important;
  width: 100% !important;
  padding: 10px 12px !important;
  background: rgba(255,255,255,.03) !important;
  border: 1px solid rgba(255,255,255,.07) !important;
  border-radius: 10px !important;
  cursor: pointer !important;
}
.ptprelinker-checkbox::before, .ptprelinker-checkbox::after,
.ptprelinker-checkbox label::before, .ptprelinker-checkbox label::after,
.ptprelinker-label-checkbox::before, .ptprelinker-label-checkbox::after { display: none !important; content: none !important; }

.ptprelinker-input-checkbox, input[type="checkbox"].ptprelinker-input-checkbox, input#cgu {
  -webkit-appearance: checkbox !important; appearance: checkbox !important;
  width: 20px !important; height: 20px !important;
  min-width: 20px !important; min-height: 20px !important;
  max-width: 20px !important; max-height: 20px !important;
  margin: 0 !important; flex-shrink: 0 !important;
  cursor: pointer !important;
  accent-color: #11B9A6 !important;
  border: none !important;
  box-shadow: none !important; outline: none !important;
  opacity: 1 !important; visibility: visible !important;
}
.ptprelinker-label-checkbox {
  color: rgba(255,255,255,.45) !important; font-size: 11px !important;
  line-height: 1.5 !important; cursor: pointer !important; flex: 1 !important;
}
.ptprelinker-cgu-link, #offer-box a.ptprelinker-cgu-link {
  color: #11B9A6 !important; text-decoration: underline !important;
  text-underline-offset: 2px !important; font-weight: 600 !important;
}
.ptprelinker-buttons { width: 100% !important; margin-top: 0 !important; }
.ptprelinker-label:empty { display: none !important; }
#offer-box .cgu-couple,
#offer-box [data-gender-select="COUPLE"] {
  display: none !important;
}
.error-register { color: #11B9A6 !important; font-size: 13px !important; margin: 8px 0 !important; text-align: center !important; background: rgba(17,185,166,.08) !important; border-radius: 8px !important; padding: 8px !important; }
.ptprelinker-forgotten-link, a.ptprelinker-forgotten-link { color: rgba(255,255,255,.25) !important; font-size: 11px !important; text-decoration: none !important; display: block !important; text-align: center !important; margin-top: 10px !important; }

#offer-box input[type="text"],
#offer-box input[type="email"],
#offer-box input[type="tel"] {
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.14) !important;
    color: var(--text) !important;
    border-radius: 10px !important;
    padding: 12px 14px !important;
}
#offer-box button[type="submit"],
#offer-box input[type="submit"] {
    background: linear-gradient(135deg, #18D8A9, #0EA88A) !important;
    border: none !important;
    border-radius: 12px !important;
    color: #081210 !important;
    font-family: 'Manrope', sans-serif !important;
    font-weight: 800 !important;
    font-size: 15px !important;
    padding: 14px !important;
    width: 100% !important;
    cursor: pointer !important;
}

/* ===== KEYFRAMES ===== */
@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-14px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
    from { transform: translateY(110%); }
    to   { transform: translateY(0); }
}
@keyframes pulseDot {
    0%,100% { box-shadow: 0 0 0 0   rgba(16,185,129,0.55); }
    50%      { box-shadow: 0 0 0 5px rgba(16,185,129,0); }
}
@keyframes statusGlow {
    0%,100% { box-shadow: none; }
    50%      { box-shadow: 0 0 8px rgba(17,185,166,0.35); }
}
@keyframes goldGlow {
    0%,100% { box-shadow: 0 0 6px  rgba(255,209,102,0.3); }
    50%      { box-shadow: 0 0 14px rgba(255,209,102,0.6); }
}
@keyframes bounceIn {
    from { transform: scale(0.35); opacity: 0; }
    60%  { transform: scale(1.18); }
    to   { transform: scale(1);    opacity: 1; }
}
@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

@keyframes drift1 {
    0%,100% { transform: translate(0, 0); }
    50%      { transform: translate(14px, -18px); }
}
@keyframes drift2 {
    0%,100% { transform: translate(0, 0); }
    50%      { transform: translate(-16px, 14px); }
}

/* ===== VERY SMALL SCREENS ===== */
@media (max-height: 680px) {
    .subtitle        { display: none; }
    .prizes-section  { display: none; }
    .container       { gap: 8px; }
    .main-content    { gap: 8px; }
}

@media (max-width: 360px) {
    .hero-pill { letter-spacing: 1.5px; padding: 4px 10px; }
}
