@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=DM+Sans:wght@300;400;500&display=swap');

body {
    font-family: 'DM Sans', Arial, sans-serif;
    text-align: center;
    /* Fond plus foncé à gauche, plus clair à droite (dégradé horizontal bleu) */
    background: linear-gradient(90deg, #020b1a 0%, #0a1f3d 22%, #1d3f6e 45%, #3f72ab 70%, #7fb2dd 90%, #b7d9f2 100%);
    margin: 0;
    padding: 20px;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    position: relative;
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 15% 25%, rgba(255,255,255,0.12) 0%, transparent 25%),
        radial-gradient(circle at 85% 75%, rgba(255,255,255,0.08) 0%, transparent 30%),
        radial-gradient(circle at 40% 60%, rgba(255,215,0,0.06) 0%, transparent 20%),
        radial-gradient(circle at 70% 20%, rgba(255,255,255,0.05) 0%, transparent 25%);
    z-index: 0;
}

.container {
    background: linear-gradient(145deg, #fdf6f6 0%, #fff 100%);
    border-radius: 20px;
    padding: 35px 50px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    max-width: 480px;
    width: 90%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

h1 {
    color: #8b2e3f;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2.4em;
    font-weight: 600;
    margin-bottom: 25px;
    letter-spacing: -0.5px;
}

.countdown {
    font-size: 1.3em;
    margin: 20px 0;
    line-height: 1.8;
    color: #6b7c8a;
}

.jours {
    color: #6b7c8a;
    font-size: 1.1em;
    font-weight: 300;
    margin: 10px 0 0;
}

.jours #jours {
    color: #8b2e3f;
    font-weight: 600;
    font-size: 2.6em;
    letter-spacing: -3px;
    line-height: 1;
    display: inline-block;
    vertical-align: -0.12em;
    margin: 0 4px;
}

.weeks {
    color: #a0aec0;
    font-size: 1.2em;
    font-weight: 300;
    margin-top: 8px;
}

.weeks #semaines {
    color: #8b2e3f;
    font-weight: 500;
}

.christmas-icon {
    font-size: 3em;
    margin: 15px 0;
    display: block;
}

/* ============================================================
   Flocons de neige (ajout pour la version statique)
   ============================================================ */
.snowflake {
    position: fixed;
    top: -20px;
    animation: fall linear infinite;
    animation-duration: var(--duration);
    animation-delay: var(--delay);
    /* flocon blanc pur et lumineux */
    color: #ffffff;
    opacity: 1;
    filter: brightness(0) invert(1) drop-shadow(0 0 4px rgba(255,255,255,0.8));
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.9),
                 0 0 12px rgba(200, 230, 255, 0.6);
    z-index: 1;
    pointer-events: none;
}

@keyframes fall {
    to {
        transform: translateY(105vh) rotate(360deg);
    }
}

/* ============================================================
   Guirlandes en front : festons de sapin (SVG)
   ============================================================ */
.guirlandes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    overflow: visible;
}

.guirlande-svg {
    position: absolute;
    overflow: visible;
}

/* Lumières : clignotement doux */
@keyframes clignote-lumiere {
    0%, 100% { opacity: 0.4; }
    50%      { opacity: 1; }
}

/* Halo : lueur qui pulse derrière chaque lumière */
@keyframes aura-pulse {
    0%, 100% { opacity: 0; }
    50%      { opacity: 0.55; }
}

/* Les boules de Noël se balancent doucement */
.guirlande-svg .boule {
    transform-box: fill-box;
    transform-origin: 50% 0%;
    animation: balance 3.4s ease-in-out infinite alternate;
}

.guirlande-svg .boule:nth-of-type(even) {
    animation-duration: 4.2s;
    animation-delay: 0.5s;
}

@keyframes balance {
    from { transform: rotate(-5deg); }
    to   { transform: rotate(5deg); }
}

/* ============================================================
   Étoiles scintillantes (en fond de page)
   ============================================================ */
.etoiles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.etoile {
    position: absolute;
    color: #fff;
    text-shadow: 0 0 6px rgba(255, 255, 200, 0.9);
    animation: scintille var(--duree) ease-in-out infinite alternate;
    animation-delay: var(--attente);
}

@keyframes scintille {
    0% {
        opacity: 0.15;
        transform: scale(0.6);
    }
    100% {
        opacity: 1;
        transform: scale(1.15);
    }
}

/* ============================================================
   Format mobile (natel / petits écrans) : cartouche plus compact
   ============================================================ */
@media (max-width: 520px) {
    body {
        padding: 8px;
    }

    .container {
        box-sizing: border-box;
        padding: 22px 18px;
        border-radius: 14px;
        max-width: 100%;
        width: 92%;
    }

    h1 {
        font-size: 1.55em;
        margin-bottom: 12px;
    }

    .christmas-icon {
        font-size: 2.2em;
        margin: 8px 0;
    }

    .countdown {
        font-size: 1em;
        margin: 12px 0;
    }

    .jours {
        font-size: 0.95em;
        margin: 6px 0 0;
    }

    .jours #jours {
        font-size: 1.9em;
    }

    .weeks {
        font-size: 1em;
        margin-top: 4px;
    }
}
