@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

* {
    box-sizing: border-box;
}

/* Body */
body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #c3ecf9, #f8d7fa);
    animation: fadeIn 1s ease;
}

/* Container */
.container {
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    padding: 30px;
    text-align: center;
    width: 350px;
    animation: slideUp 0.6s ease;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* Titre */
h1 {
    font-size: 22px;
    color: #222;
    margin-bottom: 25px;
    font-weight: 700;
    letter-spacing: 1px;
    animation: fadeInText 1.2s ease-out;
}

/* Inputs */
input, select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background-color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}
input:focus, select:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
    background-color: white;
}

/* Label en darkmode */
body.bg-darkmode label {
    color: white;
}

/* Boutons */
button, .custom-btn, .custom-btn-dashboard {
    width: auto;
    padding: 10px 20px;
    background: linear-gradient(to right, #4CAF50, #66bb6a);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    margin-top: 10px;
}
button:hover, .custom-btn:hover, .custom-btn-dashboard:hover {
    background: linear-gradient(to right, #45a049, #5cb85c);
    animation: pulse 0.8s ease-in-out infinite;
}
button:active, .custom-btn:active, .custom-btn-dashboard:active {
    transform: scale(0.98);
}

/* Bouton admin bleu */
.custom-btn-dashboard {
    background: #007bff !important;
    color: white !important;
}
.custom-btn-dashboard:hover {
    background: #0056b3 !important;
}

/* Déconnexion */
.logout-container {
    text-align: center;
    margin-bottom: 20px;
}
.logout-button {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.logout-button:hover {
    background-color: #c0392b;
}

/* Status */
#status {
    margin-top: 20px;
    font-size: 14px;
    color: #333;
    min-height: 24px;
    transition: all 0.3s ease;
}

/* Badge Progression */
.badge-status {
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 12px;
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background-color: #f39c12;
    color: white;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Bouton progression adaptatif */
#progress-btn {
    min-width: 270px;
    text-align: left;
    position: relative;
    padding-left: 20px;
    padding-right: 60px;
    transition: all 0.4s ease;
}
#progress-btn.compact {
    min-width: 190px;
    padding-right: 20px;
}

/* Sélecteur de thème */

.theme-selector select {
    padding: 6px 10px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background: white;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes fadeInText {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}





/* ?? Fond de page par thème (par défaut : bleu clair) */
body {
    margin: 0;
    font-family: Arial, sans-serif;
}

body.bg-gradient {
    background: linear-gradient(135deg, #c3ecf9, #f8d7fa);
    color: #000;
}

body.bg-sunset {
    background: linear-gradient(to right, #ff9966, #ff5e62, #d43f8d);
    color: #000;
}

body.bg-sea {
    background: linear-gradient(to right, #00c6ff, #0072ff);
    color: #fff;
}

body.bg-violet {
    background: linear-gradient(to right, #a18cd1, #fbc2eb);
    color: #000;
}

body.bg-pinkblue {
    background: linear-gradient(to right, #fcb1b1, #b5d3ff);
    color: #000;
}

/* ?? Conteneur principal (bloc blanc) */
.container {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    max-width: 700px;
    margin: 3rem auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}

/* ?? Sélecteur de thème (haut droit) */
.theme-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.theme-selector select {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background-color: #fff;
    font-weight: bold;
    cursor: pointer;
}

/* ?? Boutons personnalisés */
.custom-btn, .custom-btn-dashboard {
    width: auto;
    padding: 10px 20px;
    background: linear-gradient(to right, #4CAF50, #66bb6a);
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    transition: background 0.3s ease;
}

.custom-btn:hover, .custom-btn-dashboard:hover {
    background: linear-gradient(to right, #45a049, #5aa859);
}

/* ?? Champ input */
.custom-input {
    border-radius: 6px;
    padding: 0.5rem;
    border: 1px solid #ccc;
}

/* ?? Toast de notification */
#toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #4CAF50;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.2);
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    z-index: 1000;
    min-width: 200px;
    max-width: 90vw;
    text-align: center;
    transform: translateY(-10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ?? Badge de progression */
.badge-status {
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 12px;
}

body.bg-sea label {
    color: #222; /* ou black si tu veux forcer */
}

