/* =====================================================
   🌍 GLOBAL
===================================================== */

body {
    margin: 0;
    font-family: sans-serif;
    background: #f7f7fb;
}

h1 {
    text-align: center;
}

/* Animation douce */
.auth-card,
.card {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =====================================================
   🔐 AUTHENTIFICATION (centré uniquement ici)
===================================================== */

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;

    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.auth-card {
    background: white;
    padding: 30px 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);

    max-width: 400px;
    width: 100%;

    text-align: center;
}

/* Input texte */
.auth-card input[type="text"] {
    width: 100%;
    padding: 12px;
    margin: 15px 0;

    border-radius: 10px;
    border: 1px solid #ddd;

    font-size: 16px;
    box-sizing: border-box;
}

/* Radios */
.radio-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

/* Bouton principal */
.auth-card button {
    width: 100%;
    padding: 12px;

    border: none;
    border-radius: 12px;

    background: #ff7aa2;
    color: white;

    font-size: 16px;
    cursor: pointer;

    transition: 0.2s;
}

.auth-card button:hover {
    opacity: 0.9;
}

/* Message erreur */
.erreur {
    color: #ff4d4d;
    margin-top: 10px;
    font-size: 14px;
}


/* =====================================================
   📊 STATS (mobile-first)
===================================================== */

.stats-container {
    width: 100%;
    max-width: 1200px;
    margin: auto;

    padding: 10px;
    box-sizing: border-box;
}

/* 🧱 GRID PRINCIPAL */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr; /* 📱 mobile = 1 colonne */
    gap: 16px;
}

/* 💻 Tablette */
@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 🖥️ Desktop large */
@media (min-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* =====================================================
   💳 CARDS
===================================================== */

.card {
    background: white;
    padding: 20px;
    margin-bottom: 10px;

    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);

    width: 100%;
    box-sizing: border-box;
}

/* Carte pleine largeur (ex: graph large) */
.card.full {
    grid-column: 1 / -1;
}

/* Texte centré (moyennes) */
.big {
    text-align: center;
}

.big-number {
    font-size: 48px;
    font-weight: bold;
    margin-top: 10px;
}


/* =====================================================
   📊 CHARTS
===================================================== */

canvas {
    width: 100% !important;
    height: auto !important;
}


/* =====================================================
   🔙 BOUTON RETOUR
===================================================== */

.back-button {
    position: fixed;
    top: 15px;
    left: 15px;

    width: 35px;
    height: 35px;

    display: flex;
    align-items: center;
    justify-content: center;

    text-decoration: none;
    font-size: 20px;
    color: #d48ca3;

    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);

    transition: all 0.2s;
    z-index: 3000;
}

.back-button:hover {
    transform: scale(1.1);
}