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

:root {
    --cream:        #fdf8f2;
    --red:          #e30613;
    --red-dark:     #b00000;
    --blue:         #003087;
    --gold:         #ffd700;
    --gold-dark:    #c8a000;
    --text:         #1e1e1e;
    --text-mid:     #4a4a4a;
    --text-light:   #888;
    --white:        #ffffff;
    --glass-bg:     rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.85);
    --shadow:       0 8px 32px rgba(0, 0, 0, 0.10);
    --shadow-lg:    0 20px 60px rgba(0, 0, 0, 0.15);
    --shadow-xl:    0 30px 80px rgba(0, 0, 0, 0.22);
    --radius:       20px;
    --font-serif:   'Playfair Display', Georgia, serif;
    --font-script:  'Dancing Script', cursive;
    --font-sans:    'Poppins', system-ui, -apple-system, sans-serif;
}

html {
    scroll-behavior: smooth;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    background-color: var(--cream);
    color: var(--text);
    width: 100%;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 2rem 1rem;
    background: radial-gradient(ellipse at 20% 80%, rgba(255, 180, 180, 0.20) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 20%, rgba(180, 200, 255, 0.20) 0%, transparent 60%),
                linear-gradient(160deg, #fff8f5 0%, #fdf8f2 50%, #f5f0ff 100%);
}

.bubbles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    animation: floatUp linear infinite;
    opacity: 0;
}

.b1 { width: 90px;  height: 90px;  background: rgba(255, 150, 150, 0.18); left: 8%;  animation-duration: 14s; animation-delay: -2s;  }
.b2 { width: 50px;  height: 50px;  background: rgba(180, 210, 255, 0.22); left: 22%; animation-duration: 11s; animation-delay: -6s;  }
.b3 { width: 120px; height: 120px; background: rgba(255, 220, 100, 0.12); left: 40%; animation-duration: 18s; animation-delay: -4s;  }
.b4 { width: 60px;  height: 60px;  background: rgba(200, 180, 255, 0.20); left: 60%; animation-duration: 13s; animation-delay: -9s;  }
.b5 { width: 80px;  height: 80px;  background: rgba(255, 180, 220, 0.18); left: 75%; animation-duration: 16s; animation-delay: -1s;  }
.b6 { width: 40px;  height: 40px;  background: rgba(150, 220, 200, 0.22); left: 88%; animation-duration: 10s; animation-delay: -7s;  }
.b7 { width: 70px;  height: 70px;  background: rgba(255, 150, 100, 0.14); left: 30%; animation-duration: 15s; animation-delay: -11s; }
.b8 { width: 55px;  height: 55px;  background: rgba(100, 180, 255, 0.18); left: 55%; animation-duration: 12s; animation-delay: -5s;  }

@keyframes floatUp {
    0%   { transform: translateY(110vh) scale(0.8) rotate(0deg);   opacity: 0;   }
    5%   { opacity: 1; }
    95%  { opacity: 0.8; }
    100% { transform: translateY(-15vh) scale(1.1) rotate(20deg);  opacity: 0;   }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 1.5rem;
    max-width: 620px;
    width: 100%;
}

.hero-eyebrow {
    font-size: 0.82rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 1.2rem;
    animation: fadeSlideDown 1s ease 0.2s both;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2.8rem, 11vw, 5.5rem);
    font-weight: 900;
    line-height: 1.05;
    color: var(--text);
    animation: fadeSlideDown 1s ease 0.4s both;
}

.hero-title .accent {
    font-style: italic;
    color: var(--red);
    position: relative;
    display: inline-block;
}

.hero-subtitle {
    margin-top: 1.5rem;
    font-size: clamp(0.95rem, 4vw, 1.2rem);
    font-weight: 300;
    color: var(--text-mid);
    line-height: 1.7;
    animation: fadeSlideDown 1s ease 0.6s both;
}

.scroll-indicator {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    animation: fadeSlideDown 1s ease 0.9s both;
}

.scroll-text {
    font-size: 0.72rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-light);
}

.scroll-mouse {
    width: 22px;
    height: 36px;
    border: 2px solid #ccc;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.scroll-dot {
    width: 5px;
    height: 5px;
    background: var(--text-light);
    border-radius: 50%;
    animation: scrollBounce 1.8s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%   { transform: translateY(0);    opacity: 1; }
    80%  { transform: translateY(18px); opacity: 0; }
    100% { transform: translateY(0);    opacity: 0; }
}

/* ============================================================
   MEMORIES GRID — Grille uniforme de polaroids
   📱 1 colonne mobile → 2 colonnes desktop
   ============================================================ */
.memories-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4rem;
    padding: 4rem 1.5rem;
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 680px) {
    .memories-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 320px));
        justify-content: center;
        gap: 5rem 5rem;
        padding: 5rem 2rem;
    }
}

.memory {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    justify-content: center;
    width: 100%;
}

.memory.visible {
    opacity: 1;
    transform: translateY(0);
}

.memory:nth-child(even) {
    transition-delay: 0.12s;
}

/* ============================================================
   POLAROID — Photo en haut, légende dans l'espace blanc en bas
   ============================================================ */
.polaroid {
    position: relative;
    background: var(--white);
    padding: 0.9rem 0.9rem 0;
    box-shadow: var(--shadow-xl);
    border-radius: 3px;
    transform: rotate(var(--rot, -2deg));
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease;
    will-change: transform;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(290px, calc(100vw - 3rem));
    max-width: 100%;
}

.polaroid:hover {
    transform: scale(1.03) rotate(0deg) !important;
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.22);
}

.polaroid-img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center center;
    border-radius: 2px;
}

.polaroid-caption {
    font-family: var(--font-script);
    font-size: clamp(1.15rem, 4.2vw, 1.45rem);
    color: var(--text-mid);
    text-align: center;
    padding: 0.9rem 0.5rem 1.1rem;
    line-height: 1.45;
    min-height: 3.6rem;
    width: 100%;
    word-break: break-word;
}

.polaroid-caption::after {
    content: '|';
    color: var(--red);
    animation: cursorBlink 0.8s step-end infinite;
}

.polaroid-caption.typed::after {
    content: '';
    animation: none;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

.polaroid-tape {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%) rotate(1.5deg);
    width: 60px;
    height: 22px;
    background: rgba(255, 240, 150, 0.75);
    border-radius: 2px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    pointer-events: none;
    z-index: 2;
}

/* ============================================================
   TRANSITION SECTION
   ============================================================ */
.transition-section {
    display: flex;
    justify-content: center;
    padding: 4rem 1.5rem 5rem;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    width: 100%;
}

.transition-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.transition-card {
    text-align: center;
    width: min(520px, calc(100vw - 2.5rem));
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 2.2rem 1.8rem;
    box-shadow: var(--shadow);
}

.transition-text {
    font-size: 1.2rem;
    color: var(--text-mid);
    font-weight: 300;
}

.transition-big {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 7vw, 3.4rem);
    font-weight: 700;
    color: var(--text);
    margin-top: 0.4rem;
    line-height: 1.2;
}

/* ============================================================
   REVEAL SECTION — Plein écran dramatique
   ============================================================ */
.reveal-section {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 35%,
        #1a0530 0%,
        #0c001e 50%,
        #000 100%
    );
}

.reveal-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    color: #ffd700;
    opacity: 0;
    font-size: 1rem;
    animation: particleFloat var(--dur, 6s) ease-in-out var(--delay, 0s) infinite;
    user-select: none;
}

@keyframes particleFloat {
    0%   { opacity: 0;    transform: translateY(0)   scale(0.5) rotate(0deg); }
    20%  { opacity: 0.8; }
    80%  { opacity: 0.6; }
    100% { opacity: 0;    transform: translateY(-120px) scale(1.2) rotate(360deg); }
}

/* Phase 1 : avant le reveal */
.reveal-pre {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.8rem;
    padding: 3rem 1.5rem;
    width: 100%;
    max-width: 600px;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-pre.hidden {
    display: none !important;
}

.reveal-eyebrow {
    font-family: var(--font-script);
    font-size: clamp(1.3rem, 4.5vw, 1.8rem);
    color: #ffd700;
    letter-spacing: 2px;
    animation: glowPulse 2.5s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { text-shadow: 0 0 10px rgba(255,215,0,0.5); }
    50%       { text-shadow: 0 0 30px rgba(255,215,0,0.9), 0 0 60px rgba(255,215,0,0.4); }
}

.reveal-title {
    font-family: var(--font-serif);
    font-size: clamp(2.6rem, 9.5vw, 5.5rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.1;
}

.reveal-accent {
    background: linear-gradient(135deg, #ffd700, #ff9800, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-style: italic;
}

.reveal-mega-btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #e30613 0%, #c00010 30%, #ffd700 70%, #e8a800 100%);
    background-size: 200% 200%;
    animation: btnGradient 3s ease infinite, megaPulse 2s ease-in-out infinite;
    color: #fff;
    font-family: var(--font-sans);
    font-size: clamp(1rem, 3.8vw, 1.4rem);
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    border: none;
    border-radius: 100px;
    padding: clamp(1.1rem, 3.5vw, 1.5rem) clamp(2rem, 6vw, 4rem);
    cursor: pointer;
    width: min(420px, calc(100vw - 3rem));
    box-shadow:
        0 0 0 0 rgba(255,215,0, 0.5),
        0 10px 40px rgba(227, 6, 19, 0.6),
        0 25px 70px rgba(227, 6, 19, 0.25),
        inset 0 1px 0 rgba(255,255,255,0.25);
    transition: transform 0.15s ease;
}

.reveal-mega-btn:hover {
    transform: scale(1.03) !important;
}

.reveal-mega-btn:active {
    transform: scale(0.97) !important;
}

.btn-shine {
    position: absolute;
    top: 0; left: -120%;
    width: 80%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 20%,
        rgba(255,255,255,0.45) 50%,
        transparent 80%
    );
    animation: shinePass 2.8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shinePass {
    0%   { left: -120%; }
    60%  { left: 130%; }
    100% { left: 130%; }
}

@keyframes btnGradient {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes megaPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 25px rgba(255,215,0,0.4), 0 10px 40px rgba(227,6,19,0.5);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 50px rgba(255,215,0,0.7), 0 10px 50px rgba(227,6,19,0.6);
    }
}

.reveal-hint-sub {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.45);
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: hintFade 2.5s ease-in-out infinite;
}

@keyframes hintFade {
    0%, 100% { opacity: 0.4; }
    50%       { opacity: 0.9; }
}

/* ============================================================
   COUNTDOWN OVERLAY
   ============================================================ */
.countdown-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.countdown-overlay.flash {
    background: #fff;
    transition: background 0.12s ease;
}

.countdown-num {
    font-family: var(--font-serif);
    font-size: clamp(28vw, 36vw, 240px);
    font-weight: 900;
    font-style: italic;
    color: #fff;
    line-height: 1;
    display: block;
    opacity: 0;
    transform: scale(0.3);
}

.countdown-num.pop {
    animation: countPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes countPop {
    0%   { opacity: 0; transform: scale(0.3); }
    40%  { opacity: 1; transform: scale(1.1); }
    65%  { transform: scale(0.95); }
    80%  { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(2); }
}

/* ============================================================
   REVEAL RESULT — Plein écran centré
   ============================================================ */
.reveal-result {
    display: none;
    position: relative;
    z-index: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100svh;
    width: 100%;
    padding: 2.5rem 1rem 4rem;
    box-sizing: border-box;
    text-align: center;
    background:
        linear-gradient(
            to bottom,
            rgba(0,0,0,0.7) 0%,
            rgba(0,0,0,0.35) 45%,
            rgba(0,0,0,0.75) 100%
        ),
        url('photos/europa-park.jpg') center center / cover no-repeat;
}

.reveal-result.active {
    display: flex !important;
    animation: resultIn 0.8s ease forwards;
}

@keyframes resultIn {
    from { opacity: 0; transform: scale(0.98); }
    to   { opacity: 1; transform: scale(1); }
}

.result-tada {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 8vw, 3.8rem);
    color: #fff;
    font-style: italic;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 25px rgba(0,0,0,0.7);
}

.result-subtitle {
    margin-top: 1.6rem;
    font-family: var(--font-script);
    font-size: clamp(1.3rem, 4.5vw, 1.9rem);
    color: rgba(255,255,255,0.95);
    text-shadow: 0 2px 15px rgba(0,0,0,0.7);
}

/* ============================================================
   TICKET DESIGN
   ============================================================ */
.ticket {
    background: var(--white);
    border-radius: 18px;
    box-shadow:
        0 0 0 3px rgba(255,215,0,0.5),
        0 0 35px rgba(255,215,0,0.3),
        0 25px 70px rgba(0,0,0,0.45);
    overflow: hidden;
    position: relative;
    isolation: isolate;
    width: min(380px, calc(100vw - 2.5rem));
    max-width: 100%;
    margin: 0 auto;
    animation: ticketBounceIn 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}

@keyframes ticketBounceIn {
    from { opacity: 0; transform: scale(0.6) translateY(50px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.ticket-header {
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    padding: 1.2rem 1.5rem;
    text-align: center;
}

.ticket-logo {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.72rem;
    letter-spacing: 3px;
    font-weight: 600;
    text-transform: uppercase;
}

.ticket-body {
    padding: 1.6rem 1.4rem 1.2rem;
    text-align: center;
}

.ticket-subtitle {
    font-size: 0.74rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 2.2px;
    font-weight: 500;
}

.ticket-park {
    font-family: var(--font-serif);
    font-size: clamp(2.4rem, 8.5vw, 3.8rem);
    font-weight: 900;
    color: var(--blue);
    line-height: 1.05;
    margin: 0.4rem 0 0.8rem;
    letter-spacing: -0.5px;
}

.ticket-illustration {
    display: block;
    width: 100%;
    max-height: 160px;
    object-fit: cover;
    object-position: center 30%;
    border-radius: 8px;
    margin: 0.6rem 0 1.2rem;
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

.ticket-details {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px dashed #e4e4e4;
}

.ticket-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.detail-label {
    font-size: 0.62rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-light);
    font-weight: 600;
}

.detail-value {
    font-size: clamp(0.85rem, 3.4vw, 0.98rem);
    font-weight: 600;
    color: var(--text);
}

.ticket-divider {
    display: flex;
    align-items: center;
    position: relative;
    margin: 0 -1px;
}

.ticket-hole {
    width: 24px;
    height: 24px;
    background: #110522;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.ticket-hole.left  { margin-left: -12px; }
.ticket-hole.right { margin-right: -12px; }

.ticket-dashes {
    flex: 1;
    height: 2px;
    background: repeating-linear-gradient(
        to right,
        #e0e0e0 0px, #e0e0e0 7px,
        transparent 7px, transparent 15px
    );
}

.ticket-footer {
    padding: 1rem 1.5rem 1.4rem;
    text-align: center;
}

.ticket-footer-text {
    font-size: 0.78rem;
    color: var(--text-light);
    font-style: italic;
}

.ticket-number {
    font-size: 0.68rem;
    color: #bbb;
    margin-top: 0.4rem;
    letter-spacing: 2px;
    font-family: monospace;
}

/* ============================================================
   BOUTON SON
   ============================================================ */
.sound-btn {
    position: fixed;
    bottom: 1.2rem;
    right: 1.2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    z-index: 2000;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 680px) {
    .sound-btn { bottom: 1.8rem; right: 1.8rem; }
}

.sound-btn:hover { transform: scale(1.12); }
.sound-btn:active { transform: scale(0.95); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeSlideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}
