:root {
    --primary-color: #fff;
    --bg-gradient-start: #0f0c29;
    --bg-gradient-mid: #302b63;
    --bg-gradient-end: #24243e;
    --accent-color: #ff6b9d;
    --accent-dark: #e94560;
    --accent-light: #ffafcc;
    --gold-color: #ffd700;
    --gold-light: #ffed4e;
    --purple-glow: #a855f7;
    --blue-glow: #3b82f6;
    --envelope-bg: #f5edd1;
    --envelope-tab: #ecdeb8;
    --envelope-cover: #e6cfa7;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --txt-color: #444;
    --heart-color: #e94560;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-mid) 50%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Particules de fond animées */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 107, 157, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    animation: particleMove 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

/* Étoiles scintillantes */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent),
        radial-gradient(1px 1px at 33% 80%, white, transparent),
        radial-gradient(2px 2px at 75% 25%, white, transparent);
    background-size: 200% 200%;
    animation: sparkleMove 30s linear infinite;
    pointer-events: none;
    opacity: 0.4;
    z-index: 1;
}

@keyframes particleMove {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(30px, -30px) scale(1.1);
        opacity: 0.8;
    }
}

@keyframes sparkleMove {
    0% {
        background-position: 0% 0%;
        opacity: 0.3;
    }
    50% {
        background-position: 100% 100%;
        opacity: 0.5;
    }
    100% {
        background-position: 0% 0%;
        opacity: 0.3;
    }
}

/* Page System */
.page {
    display: none;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 100;
}

.page.active {
    display: flex;
    animation: pageSlideIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pageSlideIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* ===== PAGE 1: DISCLAIMER ===== */
.disclaimer-box {
    background: rgba(255, 255, 255, 0.98);
    padding: 60px 50px;
    border-radius: 30px;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(255, 107, 157, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    max-width: 650px;
    text-align: center;
    position: relative;
    animation: disclaimerAppear 1s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.disclaimer-box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    /*background: linear-gradient(135deg, var(--accent-color), var(--purple-glow), var(--blue-glow));*/
    border-radius: 30px;
    z-index: -1;
    opacity: 0;
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes disclaimerAppear {
    from {
        opacity: 0;
        transform: scale(0.8) rotateX(10deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotateX(0deg);
    }
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.disclaimer-box h1 {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent-color), var(--purple-glow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.8rem;
    margin-bottom: 35px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.disclaimer-text {
    color: var(--txt-color);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 40px;
}

.disclaimer-text p {
    margin-bottom: 15px;
}

.accept-btn {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
    color: white;
    border: none;
    padding: 20px 60px;
    font-size: 1.3rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow:
        0 15px 40px rgba(233, 69, 96, 0.5),
        0 5px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.accept-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.accept-btn:hover::before {
    left: 100%;
}

.accept-btn:hover {
    background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent-color) 100%);
    transform: translateY(-5px) scale(1.05);
    box-shadow:
        0 20px 50px rgba(233, 69, 96, 0.7),
        0 0 30px rgba(255, 107, 157, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.accept-btn:active {
    transform: translateY(-2px) scale(1.02);
}

/* ===== PAGE 2: GIFT BOX ===== */
.gift-container {
    text-align: center;
    position: relative;
    min-height: 400px;
}

/* Animation du chien qui arrive */
.chien-animation-wrapper {
    position: absolute;
    left: -400px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 30px;
    pointer-events: none;
}

.chien-animation-wrapper.animate {
    animation: wrapper-move 10s ease-in-out forwards;
}

.chien-animation-wrapper.animate .chien-delivery {
    animation: chien-part 10s ease-in-out forwards;
}

.chien-animation-wrapper.animate .gift-box-delivery {
    animation: cadeau-reste 10s ease-in-out forwards;
}

.chien-delivery {
    width: 200px;
    height: auto;
    position: relative;
    left: 0;
}

.gift-box-delivery {
    position: relative;
    width: 150px;
    height: 150px;
}

.gift-box-delivery .gift-body {
    width: 150px;
    height: 120px;
}

.gift-box-delivery .gift-lid {
    width: 156px;
    height: 30px;
    left: -3px;
}

.gift-box-delivery .gift-bow {
    width: 48px;
    height: 48px;
    top: -24px;
}

.gift-box-delivery .gift-bow::before,
.gift-box-delivery .gift-bow::after {
    width: 24px;
    height: 36px;
}

.gift-box-delivery .gift-lid,
.gift-box-delivery .gift-body,
.gift-box-delivery .gift-bow {
    pointer-events: none;
}

/* Boîte finale qui apparaît */
.gift-box-final {
    position: relative;
    width: 250px;
    height: 250px;
    margin: 0 auto;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
}

.gift-box-final.show {
    animation: gift-appear 1s ease-out 7.5s forwards, float 3s ease-in-out 8.5s infinite, glow 2s ease-in-out 8.5s infinite;
}

.gift-box {
    position: relative;
    width: 250px;
    height: 250px;
    margin: 0 auto;
    cursor: pointer;
    animation: float 3s ease-in-out infinite, glow 2s ease-in-out infinite;
}

/* Le wrapper bouge avec le chien et le cadeau ensemble */
@keyframes wrapper-move {
    /* Étape 1: Venir de très loin à gauche */
    0% {
        left: -600px;
        opacity: 0;
    }
    2% {
        opacity: 1;
    }
    /* Étape 2: Aller complètement à droite */
    20% {
        left: calc(100% + 200px);
    }
    /* Étape 3: Retourner complètement à gauche */
    40% {
        left: -400px;
    }
    /* Étape 4: Venir au milieu */
    60% {
        left: calc(50% - 115px);
    }
    /* Étape 5: Rester au milieu pendant que le chien part */
    100% {
        left: calc(50% - 115px);
    }
}

/* Le chien continue à bouger après avoir déposé le cadeau */
@keyframes chien-part {
    /* Étape 1: Va vers la droite (regarde droite) */
    0%, 19% {
        left: 0;
        opacity: 1;
        transform: scaleX(-1);
    }
    /* Étape 2: Arrivé à droite, flip pour regarder à gauche */
    20%, 21% {
        left: 0;
        opacity: 1;
        transform: scaleX(1);
    }
    /* Étape 3: Va vers la gauche */
    22%, 39% {
        left: 0;
        opacity: 1;
        transform: scaleX(1);
    }
    /* Étape 4: Arrivé à gauche, flip pour regarder à droite */
    40%, 41% {
        left: 0;
        opacity: 1;
        transform: scaleX(-1);
    }
    /* Étape 5: Va au milieu */
    42%, 60% {
        left: 0;
        opacity: 1;
        transform: scaleX(-1);
    }
    /* Pause au milieu */
    65% {
        left: 0;
        opacity: 1;
        transform: scaleX(-1);
    }
    /* Part vers la droite */
    90% {
        left: 1000px;
        opacity: 1;
        transform: scaleX(-1);
    }
    100% {
        left: 1000px;
        opacity: 0;
        transform: scaleX(-1);
    }
}

/* Le cadeau reste en place et disparaît */
@keyframes cadeau-reste {
    0%, 60% {
        opacity: 1;
    }
    /* Reste visible pendant que le chien part */
    70% {
        opacity: 1;
    }
    /* Disparaît */
    75% {
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}

@keyframes gift-appear {
    0% {
        opacity: 0;
        transform: scale(0.6);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes glow {
    0%, 100% {
        filter:
            drop-shadow(0 0 20px rgba(255, 215, 0, 0.6))
            drop-shadow(0 0 40px rgba(255, 107, 157, 0.4))
            drop-shadow(0 0 60px rgba(168, 85, 247, 0.3));
    }
    50% {
        filter:
            drop-shadow(0 0 30px rgba(255, 215, 0, 0.9))
            drop-shadow(0 0 60px rgba(255, 107, 157, 0.6))
            drop-shadow(0 0 80px rgba(168, 85, 247, 0.5));
    }
}

.gift-body {
    width: 250px;
    height: 200px;
    background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent-color) 50%, var(--accent-light) 100%);
    border-radius: 15px;
    position: relative;
    box-shadow:
        0 15px 50px rgba(233, 69, 96, 0.5),
        0 5px 20px rgba(0, 0, 0, 0.3),
        inset 0 -2px 10px rgba(0, 0, 0, 0.2),
        inset 0 2px 10px rgba(255, 255, 255, 0.3);
}

.gift-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
}

.gift-lid {
    width: 260px;
    height: 50px;
    background: linear-gradient(135deg, #ff4757 0%, #ff6b9d 100%);
    border-radius: 10px;
    position: absolute;
    top: -10px;
    left: -5px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.gift-bow {
    width: 80px;
    height: 80px;
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
}

.gift-bow::before,
.gift-bow::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 60px;
    background: linear-gradient(135deg, var(--gold-color) 0%, var(--gold-light) 100%);
    border-radius: 50px 50px 0 0;
    box-shadow:
        0 5px 15px rgba(255, 215, 0, 0.5),
        inset 0 -2px 5px rgba(0, 0, 0, 0.2),
        inset 0 2px 5px rgba(255, 255, 255, 0.5);
    animation: bowShine 2s ease-in-out infinite;
}

@keyframes bowShine {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
}

.gift-bow::before {
    left: 0;
    transform: rotate(-30deg);
}

.gift-bow::after {
    right: 0;
    transform: rotate(30deg);
}

.gift-hint {
    color: white;
    font-size: 1.4rem;
    margin-top: 60px;
    opacity: 0;
    font-weight: 600;
    text-shadow:
        0 2px 10px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(255, 107, 157, 0.5);
    letter-spacing: 0.5px;
}

.gift-hint.show {
    animation: fade-in-pulse 1s ease-in-out 7.8s forwards, hintPulse 2s ease-in-out 8.8s infinite;
}

@keyframes hintPulse {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

@keyframes fade-in-pulse {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}


@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* ===== PAGE 3: ENVELOPE ===== */
#page-envelope {
    position: relative;
}

.envelope-hint {
    color: white;
    font-size: 1.3rem;
    animation: pulse 2s ease-in-out infinite;
    text-align: center;
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    z-index: 10;
}

.container-envelope {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: grid;
    place-items: center;
}

.container-envelope > .envelope-wrapper {
    background: var(--envelope-bg);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(255, 215, 0, 0.2);
    border-radius: 3px;
    animation: envelopFloat 3s ease-in-out infinite;
}

/* Stopper l'animation quand l'enveloppe est ouverte */
.container-envelope > .envelope-wrapper.flap {
    animation: none;
}

@keyframes envelopFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(1deg);
    }
}

.envelope-wrapper > .envelope {
    position: relative;
    width: 400px;
    height: 300px;
    overflow: hidden;
}

.envelope-wrapper > .envelope::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    border-top: 150px solid var(--envelope-tab);
    border-right: 200px solid transparent;
    border-left: 200px solid transparent;
    transform-origin: top;
    transition: all 0.5s ease-in-out 0.7s;
}

.envelope-wrapper > .envelope::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    width: 0px;
    height: 0px;
    border-top: 150px solid transparent;
    border-right: 200px solid var(--envelope-cover);
    border-bottom: 150px solid var(--envelope-cover);
    border-left: 200px solid var(--envelope-cover);
}

.envelope > .letter {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 35%;
    width: 240px;
    height: 240px;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
    transition: all 1.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    padding: 20px;
    overflow: hidden;
    z-index: 1;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.envelope > .letter > .text {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--txt-color);
    font-family: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
    padding: 10px;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.flap > .envelope > .letter > .text {
    opacity: 1;
    transition-delay: 1.5s;
}

.envelope > .letter > .text h2 {
    color: var(--accent-color);
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.envelope > .letter > .text p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.envelope > .letter > .text .signature {
    margin-top: 20px;
    font-style: italic;
    font-size: 1rem;
    color: var(--accent-color);
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

.heart {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent-color) 100%);
    border-radius: 50%;
    z-index: 4;
    transform: translate(-50%, -20%);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1) 1s;
    box-shadow:
        0 5px 20px rgba(233, 69, 96, 0.6),
        0 0 30px rgba(255, 107, 157, 0.4);
    cursor: pointer;
    animation: heartBeat 1.5s ease-in-out infinite;
}

.heart:hover {
    transform: translate(-50%, -20%) scale(1.2);
    box-shadow:
        0 8px 30px rgba(233, 69, 96, 0.8),
        0 0 40px rgba(255, 107, 157, 0.6);
}

@keyframes heartBeat {
    0%, 100% {
        transform: translate(-50%, -20%) scale(1);
    }
    50% {
        transform: translate(-50%, -20%) scale(1.1);
    }
}

.flap > .envelope:before {
    transform: rotateX(180deg);
    z-index: 0;
}

.flap > .envelope {
    overflow: visible;
}

.flap > .envelope > .letter {
    position: fixed;
    top: 45%;
    left: 50%;
    width: 600px;
    height: 700px;
    max-width: 90vw;
    max-height: 85vh;
    transform: translate(-50%, -50%) scale(1);
    transition: all 1.5s ease-in-out 0.5s;
    z-index: 1000;
    padding: 40px;
}

.flap > .heart {
    transform: translate(-50%, -50%) scale(0.8);
    transition-delay: 0.4s;
    z-index: 2;
}

#page-envelope .continue-btn {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
    color: white;
    border: none;
    padding: 18px 50px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow:
        0 15px 40px rgba(233, 69, 96, 0.5),
        0 5px 15px rgba(0, 0, 0, 0.3);
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    opacity: 0;
    pointer-events: none;
}

#page-envelope .continue-btn:hover {
    background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent-color) 100%);
    transform: translateX(-50%) translateY(-5px) scale(1.05);
    box-shadow:
        0 20px 50px rgba(233, 69, 96, 0.7),
        0 0 30px rgba(255, 107, 157, 0.5);
}

#page-envelope.letter-opened .continue-btn {
    opacity: 1;
    pointer-events: all;
    transition: opacity 0.5s ease 2s;
}

/* ===== PAGE 4: FINAL GIFTS ===== */
.final-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.final-title {
    background: linear-gradient(135deg, #ffffff 0%, var(--accent-light) 50%, var(--gold-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    font-size: 3.5rem;
    text-align: center;
    margin-bottom: 25px;
    font-weight: 800;
    letter-spacing: -1px;
    text-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    animation: titleGradient 5s ease-in-out infinite;
}

@keyframes titleGradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.final-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    text-align: center;
    margin: 0 0 30px;
    max-width: 720px;
    line-height: 1.6;
    display: none;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.final-subtitle.show {
    display: block;
    opacity: 1;
}

/* Bouton Fin */
.finale-btn {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
    color: white;
    border: none;
    padding: 20px 70px;
    font-size: 1.4rem;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow:
        0 15px 40px rgba(233, 69, 96, 0.5),
        0 5px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    margin-top: 40px;
    display: none;
    opacity: 0;
}

.finale-btn.show {
    display: inline-block;
    animation: btnFadeIn 0.8s ease-out forwards;
}

@keyframes btnFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.finale-btn:hover {
    background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent-color) 100%);
    transform: translateY(-5px) scale(1.1);
    box-shadow:
        0 20px 50px rgba(233, 69, 96, 0.7),
        0 0 40px rgba(255, 107, 157, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.finale-btn:active {
    transform: translateY(-2px) scale(1.05);
}

.final-gifts-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px 20px;
    align-items: flex-start;
    justify-content: center;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

.final-gift-wrapper {
    position: relative;
    width: 240px;
    height: 400px;
    flex-shrink: 0;
}

.final-gift-box {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    animation: giftFloat 3s ease-in-out infinite;
}

.final-gift-box:hover {
    transform: translateY(-10px) scale(1.05);
    filter:
        drop-shadow(0 20px 40px rgba(255, 107, 157, 0.5))
        drop-shadow(0 0 30px rgba(168, 85, 247, 0.3));
}

@keyframes giftFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

.gift-body-final {
    width: 170px;
    height: 150px;
    background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent-color) 50%, var(--accent-light) 100%);
    border-radius: 15px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow:
        0 15px 50px rgba(233, 69, 96, 0.5),
        0 5px 20px rgba(0, 0, 0, 0.3),
        inset 0 -2px 10px rgba(0, 0, 0, 0.2),
        inset 0 2px 10px rgba(255, 255, 255, 0.3);
}

.gift-lid-final {
    width: 180px;
    height: 32px;
    background: linear-gradient(135deg, #ff4757 0%, #ff6b9d 100%);
    border-radius: 10px;
    position: absolute;
    top: calc(50% - 85px);
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.gift-bow-final {
    width: 60px;
    height: 60px;
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
}

.gift-bow-final::before,
.gift-bow-final::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 45px;
    background: linear-gradient(135deg, var(--gold-color) 0%, var(--gold-light) 100%);
    border-radius: 50px 50px 0 0;
    box-shadow:
        0 5px 15px rgba(255, 215, 0, 0.5),
        inset 0 -2px 5px rgba(0, 0, 0, 0.2),
        inset 0 2px 5px rgba(255, 255, 255, 0.5);
    animation: bowShine 2s ease-in-out infinite;
}

.gift-bow-final::before {
    left: 0;
    transform: rotate(-30deg);
}

.gift-bow-final::after {
    right: 0;
    transform: rotate(30deg);
}

.revealed-gift {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 15px;
    text-align: center;
    color: white;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    transform: scale(0.8);
}

.revealed-gift img {
    width: 200px;
    height: 180px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(255, 107, 157, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    background: white;
    padding: 15px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    animation: revealPop 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

@keyframes revealPop {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    70% {
        transform: scale(1.1) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.gift-caption {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: white;
    text-shadow:
        0 4px 20px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(255, 107, 157, 0.5);
    animation: captionGlow 2s ease-in-out infinite;
}

@keyframes captionGlow {
    0%, 100% {
        text-shadow:
            0 4px 20px rgba(0, 0, 0, 0.6),
            0 0 30px rgba(255, 107, 157, 0.5);
    }
    50% {
        text-shadow:
            0 4px 20px rgba(0, 0, 0, 0.6),
            0 0 40px rgba(255, 215, 0, 0.7);
    }
}

.final-gift-wrapper.revealed .final-gift-box {
    opacity: 0;
    transform: scale(0.5);
}

.final-gift-wrapper.revealed .revealed-gift {
    opacity: 1;
    pointer-events: all;
    transform: scale(1);
}

.final-message {
    color: white;
    font-size: 2rem;
    font-style: italic;
    text-align: center;
    margin-top: 70px;
    text-shadow:
        0 5px 20px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(255, 107, 157, 0.3);
    font-weight: 400;
    letter-spacing: 1.5px;
    animation: messageFloat 3s ease-in-out infinite;
}

@keyframes messageFloat {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.9;
    }
    50% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

/* ===== BOUTON EN SAVOIR PLUS ===== */
.gift-info-btn {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 0.95rem;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow:
        0 10px 30px rgba(233, 69, 96, 0.4),
        0 5px 15px rgba(0, 0, 0, 0.2);
    animation: btnAppear 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.6s backwards;
}

.gift-info-btn:hover {
    background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent-color) 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow:
        0 15px 40px rgba(233, 69, 96, 0.6),
        0 0 30px rgba(255, 107, 157, 0.4);
}

.gift-info-btn:active {
    transform: translateY(-1px) scale(1.02);
}

@keyframes btnAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== POPUP CADEAU ===== */
.gift-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.gift-popup.active {
    display: flex;
    animation: popupFadeIn 0.3s ease-out;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.gift-popup-content {
    background: #ffffff;
    padding: 50px 40px;
    border-radius: 30px;
    max-width: 600px;
    width: 90%;
    position: relative;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(200, 200, 200, 0.3);
    animation: popupSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(40px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.gift-popup-content h2 {
    color: var(--accent-dark);
    font-size: 2.2rem;
    margin-bottom: 25px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.gift-popup-content p {
    color: var(--txt-color);
    font-size: 1.15rem;
    line-height: 1.8;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 0;
}

.gift-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 2.5rem;
    color: var(--accent-color);
    cursor: pointer;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    line-height: 1;
    font-weight: 300;
}

.gift-popup-close:hover {
    background: rgba(233, 69, 96, 0.1);
    transform: rotate(90deg) scale(1.1);
    color: var(--accent-dark);
}

/* ===== PAGE 5: FINALE ===== */
.finale-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
    position: relative;
    z-index: 10;
}

.finale-title {
    background: linear-gradient(135deg, #ffffff 0%, var(--gold-color) 50%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 5rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.2;
    animation: finaleTitle 2s ease-out;
    text-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

@keyframes finaleTitle {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(-50px);
    }
    60% {
        transform: scale(1.1) translateY(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Animation de pétales de roses */
.petals-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.petal {
    position: absolute;
    width: 15px;
    height: 15px;
    background: radial-gradient(circle, #ffb6c1 0%, #ff69b4 50%, #ff1493 100%);
    border-radius: 50% 0 50% 0;
    opacity: 0.8;
    animation: petalFall linear forwards;
    box-shadow: 0 2px 5px rgba(255, 105, 180, 0.3);
}

@keyframes petalFall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 0.8;
    }
    100% {
        transform: translateY(calc(100vh + 100px)) rotate(720deg);
        opacity: 0;
    }
}

/* Responsive pour page finale */
@media (max-width: 768px) {
    .finale-title {
        font-size: 2.8rem;
    }

    .finale-btn {
        padding: 16px 50px;
        font-size: 1.2rem;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .disclaimer-box {
        padding: 30px 20px;
        margin: 20px;
    }

    .disclaimer-box h1 {
        font-size: 1.8rem;
    }

    .disclaimer-text {
        font-size: 1rem;
    }

    /* Animation du chien sur mobile */
    .chien-delivery {
        width: 120px;
    }

    .gift-box-delivery {
        width: 100px;
        height: 100px;
    }

    .gift-box-delivery .gift-body {
        width: 100px;
        height: 80px;
    }

    .gift-box-delivery .gift-lid {
        width: 104px;
        height: 20px;
        left: -2px;
    }

    .gift-box-delivery .gift-bow {
        width: 32px;
        height: 32px;
        top: -16px;
    }

    .gift-box-delivery .gift-bow::before,
    .gift-box-delivery .gift-bow::after {
        width: 16px;
        height: 24px;
    }

    .gift-box-final {
        width: 180px;
        height: 180px;
    }

    .gift-box-final .gift-body {
        width: 180px;
        height: 150px;
    }

    .gift-box-final .gift-lid {
        width: 190px;
        height: 40px;
    }

    .gift-box,
    .gift-body {
        width: 180px;
        height: 150px;
    }

    .gift-lid {
        width: 190px;
        height: 40px;
    }

    .envelope-wrapper > .envelope {
        width: 300px;
        height: 230px;
    }

    .envelope-wrapper > .envelope::before {
        border-top: 115px solid var(--envelope-tab);
        border-right: 150px solid transparent;
        border-left: 150px solid transparent;
    }

    .envelope-wrapper > .envelope::after {
        border-top: 115px solid transparent;
        border-right: 150px solid var(--envelope-cover);
        border-bottom: 115px solid var(--envelope-cover);
        border-left: 150px solid var(--envelope-cover);
    }

    .envelope-wrapper > .envelope {
        width: 300px;
        height: 230px;
    }

    .envelope > .letter {
        width: 180px;
        height: 180px;
        padding: 15px;
        top: 50%;
    }

    .flap > .envelope > .letter {
        position: fixed;
        top: 45%;
        left: 50%;
        transform: translate(-50%, -50%) scale(1);
        z-index: 1000;
        width: 350px;
        height: 100px;
        max-width: 90vw;
        max-height: 85vh;
        padding: 30px;
    }

    .final-title {
        font-size: 2rem;
        margin-bottom: 16px;
    }

    .final-subtitle {
        font-size: 1rem;
        margin: 0 0 35px;
        padding: 0 10px;
    }

    .final-gifts-container {
        flex-direction: column;
        gap: 40px;
        padding: 0 20px;
        align-items: center;
    }

    .final-gift-wrapper {
        width: 100%;
        max-width: 300px;
        height: 420px;
    }

    .gift-body-final {
        width: 160px;
        height: 140px;
    }

    .revealed-gift img {
        width: 180px;
        height: 160px;
        padding: 12px;
    }

    .gift-lid-final {
        width: 170px;
    }

    .final-message {
        font-size: 1.3rem;
        margin-top: 40px;
        padding: 0 20px;
    }

    .finale-btn {
        padding: 14px 40px;
        font-size: 1.1rem;
        margin-top: 30px;
    }

    .envelope > .letter > .text h2 {
        font-size: 1.1rem;
    }

    .envelope > .letter > .text p {
        font-size: 0.85rem;
    }

    .envelope-hint {
        font-size: 1.1rem;
        padding: 0 20px;
        top: 10%;
    }

    .continue-btn {
        bottom: 20px;
        padding: 12px 30px;
        font-size: 1rem;
    }

    .gift-popup-content {
        padding: 40px 25px;
        width: 95%;
    }

    .gift-popup-content h2 {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }

    .gift-popup-content p {
        font-size: 1rem;
        line-height: 1.6;
    }

    .gift-popup-close {
        top: 15px;
        right: 15px;
        font-size: 2rem;
        width: 40px;
        height: 40px;
    }

    .gift-info-btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
}

/* Responsive tablet et desktop */
@media (min-width: 769px) and (max-width: 1024px) {
    .final-gifts-container {
        gap: 35px 30px;
        max-width: 900px;
    }

    .final-gift-wrapper {
        width: 260px;
    }

    .final-title {
        font-size: 2.8rem;
    }
}

@media (min-width: 1025px) {
    .final-gifts-container {
        gap: 35px 25px;
        max-width: 1600px;
    }

    .final-gift-wrapper {
        width: 260px;
        height: 420px;
    }

    .gift-body-final {
        width: 185px;
        height: 160px;
    }

    .gift-lid-final {
        width: 195px;
        height: 35px;
        top: calc(50% - 90px);
    }

    .revealed-gift img {
        width: 200px;
        height: 180px;
        padding: 15px;
    }
}

/* Pour les très grands écrans - 4 cadeaux sur une ligne */
@media (min-width: 1200px) {
    .final-gifts-container {
        gap: 40px 30px;
        flex-wrap: nowrap;
    }

    .final-gift-wrapper {
        width: 270px;
        height: 430px;
    }

    .gift-body-final {
        width: 190px;
        height: 165px;
    }

    .gift-lid-final {
        width: 200px;
        height: 36px;
        top: calc(50% - 92px);
    }

    .revealed-gift img {
        width: 210px;
        height: 190px;
        padding: 15px;
    }
}

/* ========================================
   BALLONS ANIMÉS
   ======================================== */

.balloons {
    position: fixed;
    bottom: -200px;
    opacity: 0;
    z-index: 50;
    width: 100px;
    height: 183px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100px 183px;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

.balloons h2 {
    text-transform: uppercase;
    font-family: 'Segoe UI', sans-serif;
    font-size: 50px;
    font-weight: bold;
    text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    margin: 0;
    padding-bottom: 50px;
    text-align: center;
    line-height: 1;
}

#b1 { background-image: url('../images/b1.png'); left: 5%; }
#b2 { background-image: url('../images/b2.png'); left: 15%; }
#b3 { background-image: url('../images/b3.png'); left: 25%; }
#b4 { background-image: url('../images/b4.png'); left: 35%; }
#b5 { background-image: url('../images/b5.png'); left: 45%; }
#b6 { background-image: url('../images/b6.png'); left: 55%; }
#b7 { background-image: url('../images/b7.png'); left: 65%; }
#b8 { background-image: url('../images/b1.png'); left: 75%; }
#b9 { background-image: url('../images/b2.png'); left: 85%; }

/* Animation de montée des ballons */
.balloons.fly {
    bottom: 75%;
    opacity: 0.85;
    animation: balloonFloat 3s ease-in-out infinite, balloonSway 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes balloonFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-25px) rotate(5deg);
    }
}

@keyframes balloonSway {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(15px);
    }
}

/* Bordure de ballons en bas de page */
.balloon-border {
    position: fixed;
    bottom: 0;
    left: 0;
    opacity: 0.6;
    z-index: 49;
    pointer-events: none;
    filter: drop-shadow(0 -5px 15px rgba(0, 0, 0, 0.2));
}

/* Sur mobile, réduire la taille des ballons */
@media (max-width: 768px) {
    .balloons {
        width: 60px;
        height: 110px;
        background-size: 60px 110px;
    }

    .balloons h2 {
        font-size: 30px;
        padding-bottom: 30px;
    }

    .balloons.fly {
        bottom: 65%;
    }
}
