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;
}

/* ============================================
   COULEURS PERSONNALISÉES
   #E2B000 (Or/Jaune)
   #828772 (Gris/Vert)
   ============================================ */

:root {
    --primary-color: #E2B000;
    --primary-dark: #C49A00;
    --primary-light: #F5D633;
    --secondary-color: #828772;
    --secondary-dark: #6A6F5E;
    --secondary-light: #A0A58E;
    --white: #FFFFFF;
    --light-gray: #F8F9FA;
    --dark-gray: #343A40;
}

/* ============================================
   BODY ET FOND
   ============================================ */

body {
    background-color: var(--light-gray);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ============================================
   NAVBAR
   ============================================ */

.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    box-shadow: 0 4px 15px rgba(226, 176, 0, 0.3);
    padding: 0.8rem 0;
}

.navbar .navbar-brand {
    color: var(--white) !important;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 1px;
}

.navbar .navbar-brand:hover {
    color: var(--white) !important;
    opacity: 0.9;
}

.navbar .nav-link {
    color: var(--white) !important;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.navbar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.navbar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ============================================
   BOUTONS
   ============================================ */

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    color: var(--white);
    font-weight: 600;
    padding: 0.6rem 1.8rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(226, 176, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(226, 176, 0, 0.4);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    color: var(--white);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    border: none;
    color: var(--white);
    font-weight: 600;
    padding: 0.6rem 1.8rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(130, 135, 114, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(130, 135, 114, 0.4);
    background: linear-gradient(135deg, var(--secondary-light) 0%, var(--secondary-color) 100%);
    color: var(--white);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    color: var(--white);
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-warning:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(226, 176, 0, 0.4);
    color: var(--white);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #117a8b 100%);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: var(--white);
}

.btn-info:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
    color: var(--white);
}

/* ============================================
   CARTES
   ============================================ */

.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.card-header {
    border-radius: 16px 16px 0 0 !important;
    padding: 1rem 1.5rem;
}

.card-header.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
}

.card-header.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%) !important;
}

.card-header.bg-info {
    background: linear-gradient(135deg, #17a2b8 0%, #117a8b 100%) !important;
}

.card-header.bg-warning {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
}

.card-header.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
}

.card-header.bg-secondary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%) !important;
}

/* ============================================
   PAGE DE CONNEXION
   ============================================ */

.login-container {
    max-width: 420px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--white);
    border-radius: 24px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    background-size: 200% 100%;
    animation: gradientMove 3s ease infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.login-container .logo-container {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-container .logo-container img {
    max-height: 80px;
    width: auto;
}

.login-container .logo-container h2 {
    color: var(--primary-dark);
    font-weight: 700;
    margin-top: 0.5rem;
}

.login-container .form-control {
    border-radius: 12px;
    padding: 0.8rem 1rem;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.login-container .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(226, 176, 0, 0.2);
}

.login-container .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ============================================
   TABLEAU DE BORD ADMIN
   ============================================ */

.stat-card {
    border-radius: 16px;
    padding: 1.5rem;
    color: var(--white);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 100%;
    height: 200%;
    background: rgba(255, 255, 255, 0.05);
    transform: rotate(25deg);
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: 0.5;
}

.stat-card.bg-primary-custom {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.stat-card.bg-secondary-custom {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
}

.stat-card.bg-success-custom {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}

.stat-card.bg-info-custom {
    background: linear-gradient(135deg, #17a2b8, #117a8b);
}

/* ============================================
   LISTES DE TOURNÉES
   ============================================ */

.tournee-item {
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tournee-item:hover {
    border-left-color: var(--secondary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.tournee-item .badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: linear-gradient(135deg, var(--dark-gray) 0%, #212529 100%);
    color: rgba(255, 255, 255, 0.7);
    padding: 1.5rem 0;
    margin-top: 3rem;
    border-top: 4px solid var(--primary-color);
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* ============================================
   ALERTES
   ============================================ */

.alert-success {
    border-left: 6px solid #28a745;
    background: #f0fdf4;
    border-radius: 12px;
}

.alert-danger {
    border-left: 6px solid #dc3545;
    background: #fdf0f0;
    border-radius: 12px;
}

.alert-warning {
    border-left: 6px solid var(--primary-color);
    background: #fefdf0;
    border-radius: 12px;
}

.alert-info {
    border-left: 6px solid #17a2b8;
    background: #f0f9fc;
    border-radius: 12px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .navbar .navbar-brand {
        font-size: 1.1rem;
    }
    
    .stat-card .stat-number {
        font-size: 1.8rem;
    }
    
    .login-container {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .btn-primary, .btn-secondary {
        padding: 0.5rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s ease infinite;
}
/* ============================================
   CACHER DES ÉLÉMENTS SUR LA PAGE DE CONNEXION
   ============================================ */

/* 1️⃣ Cacher le titre "Log in" */
#account h1 {
    display: none !important;
}

/* 2️⃣ Cacher le sous-titre "Use a local account..." */
#account .login-title {
    display: none !important;
}

/* 3️⃣ Cacher la section "Use another service..." */
#account .external-login {
    display: none !important;
}

/* 4️⃣ Cacher le lien "Resend email confirmation" */
#account a[href*="ResendEmailConfirmation"] {
    display: none !important;
}

/* 5️⃣ Cacher le séparateur "|" entre Forgot et Register */
#account .separator {
    display: none !important;
}

/* ============================================
   MODIFIER DES TEXTES
   ============================================ */

/* 6️⃣ Modifier le texte "Email" */
#account label[for="Input_Email"] {
    font-size: 0 !important;
}
#account label[for="Input_Email"]::after {
    content: "📧 Adresse email" !important;
    font-size: 0.9rem !important;
    font-weight: 600;
    color: #495057;
}

/* 7️⃣ Modifier le texte "Password" */
#account label[for="Input_Password"] {
    font-size: 0 !important;
}
#account label[for="Input_Password"]::after {
    content: "🔑 Mot de passe" !important;
    font-size: 0.9rem !important;
    font-weight: 600;
    color: #495057;
}

/* 8️⃣ Modifier le texte "Remember me?" */
#account label[for="Input_RememberMe"] {
    font-size: 0 !important;
}
#account label[for="Input_RememberMe"]::after {
    content: "Se souvenir de moi sur cet appareil" !important;
    font-size: 0.9rem !important;
    color: #495057;
}

/* 9️⃣ Modifier le texte "Forgot your password?" */
#account a[href*="ForgotPassword"] {
    font-size: 0 !important;
}
#account a[href*="ForgotPassword"]::after {
    content: "🔑 Mot de passe oublié ?" !important;
    font-size: 0.85rem !important;
    color: #E2B000 !important;
}

/* 🔟 Modifier le texte "Register as a new user" */
#account a[href*="Register"] {
    font-size: 0 !important;
}
#account a[href*="Register"]::after {
    content: "📝 Créer un compte" !important;
    font-size: 0.85rem !important;
    color: #E2B000 !important;
}

/* 1️⃣1️⃣ Modifier le texte du bouton "Log in" */
#account .btn-primary {
    font-size: 0 !important;
}
#account .btn-primary::after {
    content: "🔐 Se connecter" !important;
    font-size: 1rem !important;
}

/* 1️⃣2️⃣ Ajouter un message d'information sous les liens */
#account .text-center {
    position: relative;
}
#account .text-center::after {
    content: "⚠️ L'inscription est réservée à l'administration. Contactez votre responsable pour obtenir vos identifiants.";
    display: block;
    margin-top: 15px;
    padding-top: 12px;
    color: #adb5bd;
    font-size: 0.75rem;
    border-top: 1px dashed #e9ecef;
}

/* Pour cacher un élément spécifique si nécessaire */
#account .nom-de-la-classe {
    display: none !important;
}