/* ==================================================
   1. STYLES GENERAUX & AUTHENTIFICATION (Login/Register)
   ================================================== */

.login-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: url("../images/login-bg.jpg") center center/cover no-repeat;
    position: relative;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

/* Annuler la marge basse sur les pages de connexion/inscription */
body.login-page {
    padding-bottom: 0 !important;
}

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

.login-container {
    position: relative;
    z-index: 2;
}

/* --- Section Gauche (Présentation) --- */
.login-left {
    color: #ffffff;
}

.login-left h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
}

.login-left p {
    margin-top: 15px;
    font-size: 1.05rem;
    max-width: 500px;
    opacity: 0.9;
}

.social-icons {
    margin-top: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.social-icons i {
    font-size: 1.4rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.social-icons i:hover {
    color: #FFC107;
}

/* --- Section Droite (Formulaire) --- */
.login-right {
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 35px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
    margin: 0 auto;
}

.login-right h2 {
    font-size: 2rem;
}

/* Champs et Boutons */
.custom-input {
    height: 48px;
    border: none;
    border-radius: 8px;
}

.custom-input:focus {
    box-shadow: none;
    border: 2px solid #FFC107;
}

.btn-warning {
    height: 48px;
    font-weight: 600;
    border-radius: 8px;
}

/* Liens et couleurs */
.forgot-link {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #FFC107;
}

.signup-link2 {
    color: #FFC107;
    text-decoration: none;
    font-weight: bold;
}

.signup-link2:hover {
    color: #ffffff;
}

.jaune {
    color: #FFC107;
}

/* Animation douce pour les cartes */
#imgCategoriePrincipale {
    transition: transform 0.3s ease, filter 0.3s ease;
    object-fit: cover;
}

#imgCategoriePrincipale:hover {
    transform: scale(1.03);
    filter: brightness(1.05);
}


/* ==================================================
   2. NAVIGATION MOBILE (Bottom Nav & FAB)
   ================================================== */

/* Espace en bas pour éviter d'occulter le contenu sur mobile */
@media (max-width: 991.98px) {
  body:not(.login-page) {
    padding-bottom: 75px !important;
  }
}

/* Barre de navigation fixe en bas */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 65px;
  background-color: #ffffff;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
  border-top: 1px solid #e9ecef;
  z-index: 1030;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #6c757d;
  font-size: 0.72rem;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
  flex: 1;
}

.mobile-nav-item i {
  font-size: 1.35rem;
  margin-bottom: 2px;
}

.mobile-nav-item .mobile-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #6c757d;
  margin-bottom: 2px;
  transition: all 0.2s ease-in-out;
}

/* État Actif Mobile */
.mobile-nav-item.active {
  color: #6f42c1;
  font-weight: 700;
}

.mobile-nav-item.active i {
  color: #6f42c1;
}

.mobile-nav-item.active .mobile-avatar {
  border-color: #6f42c1;
  box-shadow: 0 0 0 2px rgba(111, 66, 193, 0.2);
}

/* Bouton Flottant (FAB) "+" */
.btn-fab-add {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #007bff, #ffc107);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
  z-index: 1040;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-fab-add:hover,
.btn-fab-add:active {
  color: #ffffff;
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.5);
}

.btn-fab-add i {
  font-size: 1.8rem;
  line-height: 1;
}


/* ==================================================
   3. DESIGN PAGE REVENUS & COMPOSANTS
   ================================================== */

.card-revenu {
    border-radius: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-revenu:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06) !important;
}

.icon-box-revenu {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.switch-toggle-custom {
    background-color: #f1f3f5;
    border-radius: 30px;
    padding: 3px;
}

.switch-toggle-custom .btn {
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 2px 12px;
}


/* ==================================================
   4. ADAPTATION RESPONSIVE (Tablettes & Smartphones)
   ================================================== */

/* Tablettes et écrans moyens */
@media (max-width: 991.98px) {
    .login-container {
        padding: 30px 15px;
    }
    .login-left {
        text-align: center;
        margin-bottom: 10px;
    }
    .login-left p {
        margin-left: auto;
        margin-right: auto;
    }
    .login-right {
        max-width: 500px;
        width: 100%;
        padding: 25px;
    }
}

/* Mobiles */
@media (max-width: 575.98px) {
    .login-right {
        padding: 20px 18px;
        border-radius: 14px;
    }

    .login-left h1 {
        font-size: 2.2rem;
    }

    .login-left p {
        font-size: 0.95rem;
    }

    .custom-input,
    .btn-warning {
        height: 44px;
        font-size: 0.95rem;
    }
}


/* ==================================================
   5. EFFETS DYNAMIQUES SUR LES CARTES DE L'ACCUEIL
   ================================================== */

.card-hover-effect {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;
}

.card:hover .card-hover-effect {
    transform: scale(1.06);
    filter: brightness(1.08);
}

.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}