/* =========================================================
   RÉINITIALISATION
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

html {
    background: #000000;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    font-family: Arial, Helvetica, sans-serif;
    color: #ffffff;
    background: #000000;
}


/* =========================================================
   VIDÉO D'ARRIÈRE-PLAN
   ========================================================= */

.background-video {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 0;

    width: 100%;
    height: 100%;

    min-width: 100%;
    min-height: 100%;

    object-fit: cover;

    transform: translate(-50%, -50%);
    pointer-events: none;
}


/* =========================================================
   VOILE SOMBRE
   ========================================================= */

.background-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;

    background:
        radial-gradient(
            circle at center,
            rgba(0, 0, 0, 0.15) 0%,
            rgba(0, 0, 0, 0.55) 65%,
            rgba(0, 0, 0, 0.85) 100%
        );

    pointer-events: none;
}


/* =========================================================
   CONTENU PRINCIPAL
   ========================================================= */

.page-content {
    position: relative;
    z-index: 2;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 100vh;

    padding: 30px 20px;

    text-align: center;
}


/* =========================================================
   LOGO
   ========================================================= */

.logo {
    display: block;

    width: min(520px, 86vw);
    height: auto;

    margin: 0 auto 20px;

    filter:
        drop-shadow(0 0 8px rgba(255, 255, 255, 0.25))
        drop-shadow(0 0 22px rgba(255, 0, 0, 0.35));
}


/* =========================================================
   TITRES ET TEXTES
   ========================================================= */

.main-title {
    margin: 0 0 12px;

    font-size: clamp(1.7rem, 5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.05;

    text-transform: uppercase;
    letter-spacing: 0.08em;

    text-shadow:
        0 2px 5px rgba(0, 0, 0, 0.9),
        0 0 12px rgba(255, 255, 255, 0.25);
}

.subtitle {
    max-width: 750px;

    margin: 0 auto 28px;

    font-size: clamp(0.95rem, 2.3vw, 1.25rem);
    line-height: 1.5;

    color: rgba(255, 255, 255, 0.88);

    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.95);
}


/* =========================================================
   BLOC DU COMPTEUR
   ========================================================= */
.counter-section {    
position: relative;
    z-index: 10;
    overflow: visible;
}

.counter-label {
width: 100%;
    display: block !important;
text-align: center;
    position: relative !important;
    z-index: 20 !important;

    margin: 0 auto 15px auto;

    font-family: "Arial Black", Impact, Arial, sans-serif;
    font-size: clamp(1rem, 2.3vw, 1.45rem);
    font-weight: 900;

    text-transform: uppercase;
    letter-spacing: 0.18em;

    color: #d71920 !important;

    background: none !important;
    background-image: none !important;

    -webkit-background-clip: initial !important;
    background-clip: initial !important;

    -webkit-text-fill-color: #d71920 !important;

    opacity: 1 !important;
    visibility: visible !important;

    text-shadow:
        0 0 3px #000000,
        0 0 6px #d71920,
        0 0 14px rgba(215, 25, 32, 0.8),
        0 0 25px rgba(150, 0, 0, 0.7);
}

/* =========================================================
   ODOMÈTRE
   ========================================================= */

.odometer {
    display: flex;
    align-items: center;
    justify-content: center;

    max-width: 100%;

    gap: clamp(3px, 0.7vw, 9px);

    font-family:
        "Arial Black",
        Impact,
        Arial,
        sans-serif;

    font-size: clamp(2.7rem, 9vw, 7rem);
    font-weight: 900;
    line-height: 1;

    perspective: 1000px;

    user-select: none;
}


/* =========================================================
   COLONNE D'UN CHIFFRE
   ========================================================= */

.odometer-digit {
    position: relative;

    flex: 0 0 auto;

    width: 0.72em;
    height: 1.15em;

    overflow: hidden;

    color: #ffffff;

    background:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.98) 0%,
            rgba(35, 35, 35, 0.98) 42%,
            rgba(15, 15, 15, 0.98) 50%,
            rgba(35, 35, 35, 0.98) 58%,
            rgba(0, 0, 0, 0.98) 100%
        );

    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.12em;

    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, 0.8),
        inset 0 0 15px rgba(0, 0, 0, 0.95),
        0 4px 12px rgba(0, 0, 0, 0.85),
        0 0 10px rgba(255, 255, 255, 0.12),
        0 0 20px rgba(255, 0, 0, 0.15);

    transform: translateZ(0);
}


/* Ligne centrale de séparation mécanique */

.odometer-digit::before {
    content: "";

    position: absolute;
    top: 50%;
    left: 0;
    z-index: 3;

    width: 100%;
    height: 1px;

    background: rgba(0, 0, 0, 0.85);

    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.08);

    transform: translateY(-50%);

    pointer-events: none;
}


/* Assombrissement haut et bas */

.odometer-digit::after {
    content: "";

    position: absolute;
    inset: 0;
    z-index: 2;

    background:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.72) 0%,
            rgba(0, 0, 0, 0.08) 27%,
            rgba(0, 0, 0, 0) 45%,
            rgba(0, 0, 0, 0) 55%,
            rgba(0, 0, 0, 0.08) 73%,
            rgba(0, 0, 0, 0.72) 100%
        );

    pointer-events: none;
}


/* =========================================================
   BANDE DÉFILANTE
   ========================================================= */

.odometer-strip {
    position: relative;
    z-index: 1;

    display: flex;
    flex-direction: column;

    width: 100%;

    transform: translateY(0);

    transition-property: transform;
    transition-timing-function: cubic-bezier(0.12, 0.8, 0.18, 1);

    will-change: transform;
}

.odometer-strip span {
    display: flex;
    flex: 0 0 1.15em;

    align-items: center;
    justify-content: center;

    width: 100%;
    height: 1.15em;

    line-height: 1.15em;

    color: #ffffff;

    text-shadow:
        0 2px 2px rgba(0, 0, 0, 0.95),
        0 0 6px rgba(255, 255, 255, 0.7),
        0 0 14px rgba(255, 0, 0, 0.35);
}


/* =========================================================
   SÉPARATEUR DES MILLIERS
   ========================================================= */

.odometer-separator {
    display: flex;
    align-items: flex-end;
    justify-content: center;

    flex: 0 0 auto;

    height: 1.15em;

    padding: 0 0.03em 0.08em;

    font-size: 0.5em;
    font-weight: 900;
    line-height: 1;

    color: rgba(255, 255, 255, 0.95);

    text-shadow:
        0 2px 3px rgba(0, 0, 0, 1),
        0 0 8px rgba(255, 255, 255, 0.7);
}


/* =========================================================
   MESSAGE D'ERREUR DU COMPTEUR
   ========================================================= */

.counter-error {
    margin-top: 14px;

    font-size: 0.85rem;
    font-weight: 600;

    color: #ffb0b0;

    text-shadow:
        0 1px 3px rgba(0, 0, 0, 1);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

.counter-error.is-visible {
    opacity: 1;
    visibility: visible;
}


/* =========================================================
   PIED DE PAGE
   ========================================================= */

.footer {
    position: relative;
    z-index: 2;

    width: 100%;

    padding: 15px 20px;

    text-align: center;

    font-size: 0.8rem;

    color: rgba(255, 255, 255, 0.55);

    background: rgba(0, 0, 0, 0.35);
}


/* =========================================================
   TABLETTES ET PETITS ÉCRANS
   ========================================================= */

@media screen and (max-width: 768px) {
    .page-content {
        padding: 25px 14px;
    }

    .logo {
        width: min(430px, 90vw);
        margin-bottom: 18px;
    }

    .main-title {
        letter-spacing: 0.05em;
    }

    .counter-label {
        letter-spacing: 0.12em;
    }

    .odometer {
        gap: 3px;
    }
}


/* =========================================================
   TÉLÉPHONES
   ========================================================= */

@media screen and (max-width: 480px) {
    .page-content {
        justify-content: center;
        padding: 20px 9px;
    }

    .logo {
        width: min(350px, 92vw);
    }

    .subtitle {
        margin-bottom: 22px;
    }

    .odometer {
        font-size: clamp(2.35rem, 13vw, 4rem);
        gap: 2px;
    }

    .counter-label {
        margin-bottom: 10px;
        font-size: 0.82rem;
    }

    .odometer-digit {
        border-radius: 0.1em;
    }
}


/* =========================================================
   TRÈS PETITS ÉCRANS
   ========================================================= */

@media screen and (max-width: 340px) {
    .odometer {
        font-size: 2.15rem;
    }

    .odometer-separator {
        padding-left: 0;
        padding-right: 0;
    }
}


/* =========================================================
   ORIENTATION PAYSAGE SUR MOBILE
   ========================================================= */

@media screen and (max-height: 550px) and (orientation: landscape) {
    .page-content {
        min-height: 100vh;
        padding-top: 15px;
        padding-bottom: 15px;
    }

    .logo {
        width: min(300px, 48vw);
        margin-bottom: 8px;
    }

    .main-title {
        margin-bottom: 6px;
        font-size: clamp(1.3rem, 4vw, 2rem);
    }

    .subtitle {
        margin-bottom: 12px;
        font-size: 0.85rem;
    }

    .counter-label {
        margin-bottom: 7px;
        font-size: 0.75rem;
    }

    .odometer {
        font-size: clamp(2rem, 9vh, 4rem);
    }
}


/* =========================================================
   ACCESSIBILITÉ : RÉDUIRE LES ANIMATIONS
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
    }

    .odometer-strip {
        transition-duration: 0.01ms !important;
    }
}
