html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Particules canvas */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.container {
    text-align: center;
    z-index: 1;
    position: relative;
    padding: 60px 80px;
    width: 100%;
    max-width: 1200px;
}

#countdown-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 60px 80px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

h1 {
    color: white;
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    font-weight: 300;
    letter-spacing: 3px;
}

.target-date {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2em;
    margin-bottom: 50px;
    font-weight: 300;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.time-unit {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    padding: 30px 40px;
    min-width: 180px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .time-unit:hover {
        transform: translateY(-10px);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    }

    .time-unit.days {
        min-width: 250px;
        background: rgba(255, 215, 0, 0.2);
        border: 2px solid rgba(255, 215, 0, 0.4);
    }

.number {
    font-size: 5em;
    font-weight: 700;
    color: white;
    text-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    line-height: 1;
    margin-bottom: 10px;
    font-family: 'Arial', sans-serif;
    display: flex;
    gap: 0;
}

.digit {
    position: relative;
    perspective: 1000px;
    flex-shrink: 0;
    width: 1em;
}

.flip-card {
    position: relative;
    width: 100%;
    height: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    font-size: 1em;
}

.flip-card-front {
    transform: rotateX(0deg);
}

.flip-card-back {
    transform: rotateX(180deg);
}

.flip-card.flipping {
    animation: flip-board 0.6s ease-in-out;
}

@keyframes flip-board {
    0% {
        transform: rotateX(0deg);
    }

    100% {
        transform: rotateX(180deg);
    }
}

.time-unit.days .number {
    font-size: 7em;
    color: #FFD700;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.label {
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 300;
}

.time-unit.days .label {
    font-size: 1.5em;
    color: #FFD700;
    font-weight: 400;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 40px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    border-radius: 10px;
    transition: width 1s linear;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.progress-percentage {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1em;
    margin-top: 12px;
    font-weight: 500;
    letter-spacing: 1px;
}

.finished {
    display: none;
    animation: celebration 1s ease-in-out;
}

@keyframes celebration {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.finished h2 {
    font-size: 5em;
    color: #FFD700;
    text-shadow: 0 0 50px rgba(255, 215, 0, 0.8);
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.emoji {
    font-size: 4em;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Animation de confettis */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #FFD700;
    animation: confetti-fall 3s linear infinite;
}

@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(360deg);
    }
}

.visitor-counter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95em;
    letter-spacing: 1px;
    backdrop-filter: blur(5px);
}

.visitor-icon {
    font-size: 1.1em;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 767px) {
    body {
        align-items: flex-start;
        padding: 20px 0;
    }

    .container {
        padding: 15px;
    }

    #countdown-container {
        padding: 30px 20px;
    }

    h1 {
        font-size: 1.8em;
        letter-spacing: 1px;
        margin-bottom: 12px;
    }

    .target-date {
        font-size: 0.95em;
        margin-bottom: 25px;
    }

    .countdown {
        gap: 12px;
        flex-wrap: wrap;
    }

    .time-unit {
        min-width: 110px;
        padding: 18px 12px;
    }

    .time-unit.days {
        min-width: 180px;
    }

    .number {
        font-size: 3.5em;
    }

    .time-unit.days .number {
        font-size: 5em;
    }

    .label {
        font-size: 1em;
        letter-spacing: 2px;
    }

    .time-unit.days .label {
        font-size: 1.2em;
    }
}

@media (max-width: 479px) {
    .container {
        padding: 8px;
    }

    #countdown-container {
        padding: 20px 12px;
        border-radius: 20px;
    }

    h1 {
        font-size: 1.2em;
        letter-spacing: 0;
        margin-bottom: 10px;
    }

    .target-date {
        font-size: 0.78em;
        margin-bottom: 18px;
    }

    .countdown {
        gap: 8px;
    }

    .time-unit {
        min-width: calc(33% - 8px);
        flex: 1;
        padding: 12px 6px;
        border-radius: 14px;
    }

    .time-unit.days {
        min-width: 100%;
        flex: none;
        padding: 15px 12px;
    }

    .number {
        font-size: 2.5em;
    }

    .time-unit.days .number {
        font-size: 4em;
    }

    .label {
        font-size: 0.7em;
        letter-spacing: 1px;
    }

    .time-unit.days .label {
        font-size: 0.95em;
    }

    .time-unit:hover {
        transform: none;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }

    .finished h2 {
        font-size: 3em;
    }

    .emoji {
        font-size: 3em;
    }

    .progress-bar-container {
        margin-top: 20px;
    }

    .visitor-counter {
        font-size: 0.8em;
        padding: 6px 14px;
    }
}
