/* Variables de couleur */
:root {
    --primary: #FF0066;
    --primary-rgb: 255, 0, 102;
    --secondary: #6B46C1;
    --secondary-rgb: 107, 70, 193;
    --success: #4cc9f0;
    --info: #4895ef;
    --warning: #f72585;
    --danger: #e63946;
    --light: #f8f9fa;
    --dark: #212529;
}

/* Styles généraux */
body {
    background-color: #f0f2f5;
    font-family: 'Poppins', sans-serif;
    color: #4a5568 !important;  /* Gris foncé doux */
}

/* Navbar personnalisée - styles legacy maintenus pour compatibilité */
.navbar-custom {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    color: #ffffff !important;
}

/* Header élégant avec dégradé moderne */
.elegant-header {
    background: linear-gradient(135deg, rgba(255, 0, 102, 0.95) 0%, rgba(107, 70, 193, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    padding: 12px 0;
    transition: all 0.3s ease;
}

.navbar-custom .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    transition: all 0.3s ease;
    font-weight: 500;
}

.navbar-custom .nav-link:hover {
    color: #ffffff !important;
    transform: translateY(-2px);
}

.navbar-custom .nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff !important;
}

.navbar-custom .dropdown-menu {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    padding: 10px;
    margin-top: 10px;
}

.navbar-custom .dropdown-item {
    border-radius: 8px;
    padding: 8px 15px;
    margin-bottom: 2px;
    transition: all 0.2s ease;
}

.navbar-custom .dropdown-item:hover {
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
}

.navbar-custom .dropdown-item i {
    width: 20px;
    text-align: center;
}

/* Texte dégradé */
.text-gradient {
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.9) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #ffffff !important;
}

/* Cartes */
.card {
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    color: #2D3748 !important;  /* Gris très foncé */
}

/* Effet de survol pour les cartes */
.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.card-header {
    color: #1A202C !important;  /* Presque noir */
}

.card-body {
    color: #2D3748 !important;
}

/* Graphiques */
.js-plotly-plot {
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

/* Boutons */
.btn {
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Animation de chargement */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.loading-pulse {
    animation: pulse 2s infinite;
}

/* Statistiques */
@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    animation: slideInUp 0.6s ease-out;
    transition: all 0.3s ease;
    height: 180px;  /* Hauteur fixe pour toutes les cartes */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, #ff6b6b 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0.5rem 0;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, #ff6b6b 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Modal personnalisé */
.modal-content {
    border-radius: 15px;
    border: none;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: 15px 15px 0 0;
    color: #2D3748 !important;
}

.modal-body {
    color: #2D3748 !important;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.fade-in-slow {
    animation: fadeIn 0.8s ease-in-out;
}

.fade-in-delayed {
    animation: fadeIn 1.2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Couleurs de texte */
.text-primary {
    color: var(--primary) !important;
}

.text-success {
    color: var(--success) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.text-muted {
    color: #718096 !important;
}

/* Styles pour les titres */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #2D3748;
}

/* Styles pour les textes clairs */
.text-white-50 {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Styles pour les cartes de statistiques */
.stats-card .card-title {
    font-size: 0.9rem;
    color: #718096;
}

.stats-card .stats-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2D3748;
}

/* Styles pour les graphiques */
.dash-graph {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

/* Styles pour les sections arrondies */
.rounded-section {
    border-radius: 20px;
    overflow: hidden;
}

/* Recommandations */
.recommendation-title {
    color: #2D3748 !important;
}

.recommendation-description {
    color: #4A5568 !important;
}

/* Modals */
.modal-body {
    color: #2D3748 !important;
}

/* Dropdowns et filtres */
.Select-value-label {
    color: #2D3748 !important;
}

.Select-placeholder {
    color: #718096 !important;  /* Gris moyen */
}

/* Textes secondaires */
.text-muted {
    color: #718096 !important;  /* Gris moyen */
}

/* Liens */
a {
    color: #4299E1 !important;  /* Bleu */
}

a:hover {
    color: #2B6CB0 !important;  /* Bleu foncé */
}

/* Boutons sur fond foncé */
.btn-light {
    color: #2D3748 !important;
}

.btn-primary {
    color: #ffffff !important;
}

/* Labels et textes d'input */
label {
    color: #4A5568 !important;
}

/* Alertes et messages d'erreur */
.alert-danger {
    color: #ffffff !important;
}

.alert-warning {
    color: #2D3748 !important;
}

.alert-info {
    color: #2D3748 !important;
}

/* Progress bars */
.progress-bar {
    color: #ffffff !important;
}

/* Headers des sections */
h1, h2, h3, h4, h5, h6 {
    color: #1A202C !important;
}

/* Tooltips et info-bulles */
.tooltip {
    color: #ffffff !important;
}

/* Texte des tableaux */
table {
    color: #2D3748 !important;
}

th {
    color: #1A202C !important;
}

/* Légendes des graphiques */
.legend-item {
    color: #2D3748 !important;
}

.scroll-legend .legend {
    max-height: 80px !important; /* ~4 lignes */
    overflow-y: auto !important;
}

/* Styles pour la page de connexion moderne */
.login-page-modern {
    position: relative;
    min-height: 100vh;
    overflow: visible;
    background: transparent !important;
    z-index: 1;
    padding: 0 !important;
    margin: 0 !important;
}

/* Retire le background du body pour la page de connexion */
body:has(.login-page-modern),
html:has(.login-page-modern) {
    background: transparent !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* S'assurer que le container est transparent aussi et au-dessus des formes */
.login-page-modern .container-fluid {
    background: transparent !important;
    position: relative;
    z-index: 10;
    min-height: 100vh;
    padding: 0 15px !important;
}

/* S'assurer que le page-content est transparent sur la page de login */
#page-content:has(.login-page-modern) {
    background-color: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Cache tous les headers et barres de navigation sur la page de connexion */
body:has(.login-page-modern) .elegant-header,
body:has(.login-page-modern) .navbar,
body:has(.login-page-modern) .navbar-custom,
body:has(.login-page-modern) nav {
    display: none !important;
}

/* S'assurer que _dash-app-content n'a pas de padding sur la page de connexion */
body:has(.login-page-modern) #_dash-app-content,
body:has(.login-page-modern) #react-entry-point {
    padding: 0 !important;
    margin: 0 !important;
}

/* Formes géométriques animées pour le fond */
@keyframes float-slow {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(50px, -50px) rotate(120deg);
    }
    66% {
        transform: translate(-30px, 30px) rotate(240deg);
    }
}

@keyframes float-medium {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    50% {
        transform: translate(-60px, 60px) rotate(180deg) scale(1.1);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.35;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.15);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* Effet de brillance animé sur le fond de connexion */
.login-background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-size: 400% 400%;
}

.login-page-modern .form-control-lg:focus {
    border-color: #FF0066 !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 0, 102, 0.25) !important;
}

.login-page-modern input:focus {
    outline: none;
    border-color: #FF0066 !important;
    box-shadow: 0 0 0 3px rgba(255, 0, 102, 0.15), 0 4px 12px rgba(0, 102, 255, 0.2) !important;
}

.login-page-modern .btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(255, 0, 102, 0.6) !important;
}

.login-page-modern #login-button:hover {
    background: linear-gradient(135deg, #FF1493 0%, #6B46C1 50%, #0080FF 100%) !important;
    box-shadow: 0 12px 40px rgba(255, 0, 102, 0.7) !important;
}

/* Effet hover pour le bouton Azure */
.login-page-modern a[href="/login_sso"] button:hover {
    background: rgba(0, 120, 212, 0.2) !important;
    border-color: rgba(0, 120, 212, 0.5) !important;
    box-shadow: 0 8px 20px rgba(0, 120, 212, 0.3) !important;
    transform: translateY(-2px);
}

.login-page-modern .card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animation pour l'apparition des éléments */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.login-page-modern .fade-in-slow {
    animation: fadeInUp 0.8s ease-out;
}

/* Animations pour le logo et les éléments */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.login-page-modern .card {
    animation: fadeInUp 0.6s ease-out;
}

/* Cercles du logo responsive */
.login-logo-stack {
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-logo-ring {
    width: 230px;
    height: 230px;
    border-radius: 50%;
    padding: 12px;
    background: linear-gradient(135deg, #FF0066 0%, #6B46C1 50%, #4CC9F0 100%);
    box-shadow: 0 25px 55px rgba(0, 0, 0, 0.35);
    animation: float 3s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-logo-core {
    position: relative;
    width: 205px;
    height: 205px;
    border-radius: 40px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 35% 30%, rgba(5, 2, 15, 0.95), rgba(32, 11, 61, 0.85), rgba(98, 39, 137, 0.75));
    box-shadow: inset 0 15px 25px rgba(255, 255, 255, 0.08), inset 0 -20px 35px rgba(255, 0, 102, 0.25);
}

.login-logo-core::after {
    content: '';
    position: absolute;
    inset: 12px;
    border-radius: 28px;
    background: radial-gradient(circle at 60% 70%, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.login-logo-emblem {
    width: 130px;
    height: 130px;
    object-fit: contain;
    filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 25px rgba(255, 0, 102, 0.4));
    animation: float 3s ease-in-out infinite;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .login-page-modern h1 {
        font-size: 2.5rem !important;
    }

    .login-page-modern .card {
        margin: 20px !important;
    }

    /* Logo réduit sur mobile mais toujours visible */
    .login-page-modern img[height="130px"] {
        height: 100px !important;
    }

    .login-logo-ring {
        width: 180px !important;
        height: 180px !important;
        padding: 10px !important;
    }

    .login-logo-core {
        width: 160px !important;
        height: 160px !important;
    }

    .login-logo-emblem {
        width: 110px !important;
        height: 110px !important;
    }
}

@media (max-width: 576px) {
    .login-page-modern h1 {
        font-size: 2rem !important;
    }

    .login-page-modern p {
        font-size: 1rem !important;
    }

    /* Logo encore plus réduit sur très petits écrans */
    .login-page-modern img[height="130px"] {
        height: 80px !important;
    }

    .login-logo-ring {
        width: 140px !important;
        height: 140px !important;
        padding: 8px !important;
    }

    .login-logo-core {
        width: 125px !important;
        height: 125px !important;
    }

    .login-logo-emblem {
        width: 95px !important;
        height: 95px !important;
    }

    /* Particules décoratives cachées sur mobile */
    .login-particle {
        display: none !important;
    }
}

/* Styles pour la page d'accueil moderne */
.modern-stat-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.modern-stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15) !important;
}

.modern-feature-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.modern-feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15) !important;
}

/* Badge du logo SOMA sur la page d'accueil */
.hero-logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 150px;
    padding: 18px;
    border-radius: 32px;
    position: relative;
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.95) 0%, rgba(244, 247, 255, 0.4) 60%, rgba(107, 70, 193, 0.25) 100%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35), inset 0 0 35px rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: float 3s ease-in-out infinite;
}

.hero-logo-badge::before {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 24px;
    background: radial-gradient(circle at 40% 30%, rgba(26, 11, 60, 0.88) 0%, rgba(86, 36, 125, 0.75) 45%, rgba(255, 255, 255, 0.08) 90%);
    box-shadow: inset 0 15px 25px rgba(255, 255, 255, 0.08), inset 0 -12px 25px rgba(255, 0, 102, 0.15);
    z-index: 0;
}

.hero-logo-badge::after {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 26px;
    border: 2px solid rgba(76, 201, 240, 0.35);
    box-shadow: 0 0 20px rgba(76, 201, 240, 0.4);
    pointer-events: none;
    z-index: 1;
}

.hero-logo-wrapper {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-logo-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background: radial-gradient(circle at 30% 30%, rgba(5, 2, 15, 0.95) 0%, rgba(22, 10, 45, 0.85) 50%, rgba(68, 30, 120, 0.65) 100%);
    mix-blend-mode: multiply;
    opacity: 0.9;
    pointer-events: none;
}

.hero-logo {
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 12px 25px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 20px rgba(255, 0, 102, 0.35));
    mix-blend-mode: normal;
    opacity: 0.95;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 576px) {
    .hero-logo-badge {
        width: 120px;
        height: 120px;
        padding: 12px;
    }

    .hero-logo-wrapper {
        width: 90px;
        height: 90px;
    }
}

.modern-cta-card {
    transition: all 0.3s ease;
}

.modern-cta-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.2) !important;
}

/* Boutons modernes pour la page d'accueil */
.modern-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2) !important;
    background: rgba(255, 255, 255, 1) !important;
}

.modern-btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 255, 255, 0.3) !important;
    background: rgba(255, 255, 255, 0.25) !important;
}

.modern-btn-accent:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 0, 102, 0.4) !important;
}

.modern-feature-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2) !important;
}

/* Animations d'apparition plus fluides */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Styles améliorés pour les cartes de statistiques de la page d'accueil */
.modern-stat-card-enhanced {
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.modern-stat-card-enhanced::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, rgba(255, 0, 102, 0.3), rgba(107, 70, 193, 0.3), rgba(76, 201, 240, 0.3));
    border-radius: 25px;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.modern-stat-card-enhanced:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25) !important;
}

.modern-stat-card-enhanced:hover::before {
    opacity: 1;
    animation: rotate-gradient 3s linear infinite;
}

/* Animation de rotation du gradient de bordure */
@keyframes rotate-gradient {
    0% {
        filter: hue-rotate(0deg);
    }
    100% {
        filter: hue-rotate(360deg);
    }
}

/* Animation pour les icônes de statistiques */
.stat-icon-animated {
    transition: all 0.3s ease;
    display: inline-block;
}

.modern-stat-card-enhanced:hover .stat-icon-animated {
    transform: scale(1.15) rotateY(10deg);
    filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.2));
}

/* Animation de pulsation pour le logo hero */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(2deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(-5px) rotate(-2deg);
    }
}

/* Animation de pulsation douce */
@keyframes pulse {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Effet de brillance sur les cartes au survol */
.modern-stat-card-enhanced::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.modern-stat-card-enhanced:hover::after {
    left: 100%;
}

/* Effet parallaxe sur les éléments de la page d'accueil */
.parallax-layer {
    transition: transform 0.3s ease-out;
}

/* Amélioration des badges de fonctionnalités */
.hero-feature-badge {
    transition: all 0.3s ease;
    position: relative;
}

.hero-feature-badge::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.hero-feature-badge:hover::before {
    width: 120%;
    height: 200%;
}

.hero-feature-badge:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.3) !important;
}

/* Animation des titres avec effet de brillance */
@keyframes shine {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.hero-title-shine {
    background: linear-gradient(90deg, #ffffff 25%, rgba(255, 255, 255, 0.8) 50%, #ffffff 75%);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3s linear infinite;
}

/* Effet de particules flottantes sur le fond */
@keyframes float-particles {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(10px, -10px) rotate(90deg);
    }
    50% {
        transform: translate(0, -20px) rotate(180deg);
    }
    75% {
        transform: translate(-10px, -10px) rotate(270deg);
    }
}

/* Ombres dynamiques pour les cartes de fonctionnalités */
.modern-feature-card {
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 0, 102, 0.1), rgba(107, 70, 193, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.modern-feature-card:hover::before {
    opacity: 1;
}

.modern-feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2) !important;
}

/* Animation d'apparition en cascade */
@keyframes cascadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cascade-1 { animation: cascadeIn 0.6s ease-out 0.1s both; }
.cascade-2 { animation: cascadeIn 0.6s ease-out 0.2s both; }
.cascade-3 { animation: cascadeIn 0.6s ease-out 0.3s both; }
.cascade-4 { animation: cascadeIn 0.6s ease-out 0.4s both; }

/* Effet de vague sur le fond */
@keyframes wave {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    25% {
        transform: translateX(-5%) translateY(-2%);
    }
    50% {
        transform: translateX(0) translateY(-5%);
    }
    75% {
        transform: translateX(5%) translateY(-2%);
    }
}

/* Animation du gradient de fond */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Effet de lueur pour les éléments interactifs */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 0, 102, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(107, 70, 193, 0.5), 0 0 60px rgba(255, 0, 102, 0.3);
    }
}

/* Animation de pulsation pour les badges */
@keyframes badge-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* Effet de rebond pour les interactions */
@keyframes bounce-in {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Effet de glissement pour les cartes */
@keyframes slide-up {
    0% {
        transform: translateY(100px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive pour la page d'accueil */
@media (max-width: 768px) {
    .modern-stat-card,
    .modern-feature-card,
    .modern-stat-card-enhanced {
        margin-bottom: 20px !important;
    }

    .modern-cta-card h2 {
        font-size: 1.8rem !important;
    }

    .modern-cta-card .btn {
        width: 100% !important;
        margin-bottom: 10px !important;
    }

    .modern-stat-card-enhanced:hover {
        transform: translateY(-8px) scale(1.01);
    }
}

@media (max-width: 576px) {
    .modern-stat-card .fas {
        font-size: 2rem !important;
    }
    
    .modern-feature-card .fas {
        font-size: 3rem !important;
    }
}

/* Styles pour la page d'administration */
.admin-card-enhanced {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.admin-card-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

.admin-card-enhanced .card-header {
    background: linear-gradient(135deg, rgba(255, 0, 102, 0.05) 0%, rgba(107, 70, 193, 0.05) 100%);
    border-bottom: 2px solid rgba(255, 0, 102, 0.1);
}

/* Amélioration des boutons d'onglets admin */
.admin-tab-button {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.admin-tab-button::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.admin-tab-button.active::before {
    transform: scaleX(1);
}

.admin-tab-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Amélioration des inputs admin */
.admin-input-enhanced {
    transition: all 0.3s ease;
    border: 2px solid #e2e8f0;
}

.admin-input-enhanced:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 0, 102, 0.1);
    transform: scale(1.01);
}

/* Styles personnalisés pour les sliders de seuil de coût */
.cost-threshold-slider .rc-slider-mark-text {
    font-size: 12px !important;
    color: #718096 !important;
    white-space: nowrap !important;
    padding: 4px 8px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 4px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    margin-top: 8px !important;
}

/* Espacement amélioré pour les premières marques */
.cost-threshold-slider .rc-slider-mark {
    letter-spacing: 2px !important;
}

/* Style général pour les sliders */
.cost-threshold-slider .rc-slider-rail {
    background-color: #E2E8F0 !important;
    height: 6px !important;
    border-radius: 3px !important;
}

.cost-threshold-slider .rc-slider-track {
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%) !important;
    height: 6px !important;
    border-radius: 3px !important;
}

.cost-threshold-slider .rc-slider-handle {
    width: 20px !important;
    height: 20px !important;
    margin-top: -7px !important;
    border: 3px solid var(--primary) !important;
    background-color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

.cost-threshold-slider .rc-slider-handle:hover {
    border-color: var(--secondary) !important;
    transform: scale(1.1) !important;
    transition: all 0.2s ease !important;
}

.cost-threshold-slider .rc-slider-dot {
    border-color: #CBD5E0 !important;
    background-color: #CBD5E0 !important;
    width: 8px !important;
    height: 8px !important;
    margin-top: -1px !important;
}

.cost-threshold-slider .rc-slider-dot-active {
    border-color: var(--primary) !important;
    background-color: var(--primary) !important;
}

/* Styles élégants pour le nouveau header */

/* Effets de survol sur le header */
.elegant-header:hover {
    background: linear-gradient(135deg, rgba(255, 0, 102, 0.98) 0%, rgba(107, 70, 193, 0.98) 100%);
    box-shadow: 0 6px 40px rgba(0, 0, 0, 0.2);
}

/* Logo et branding élégants */
.elegant-logo {
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2)) brightness(1.1);
    opacity: 1 !important;
}

.elegant-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25)) brightness(1.2);
}

.elegant-brand {
    transition: all 0.3s ease;
}

.elegant-brand:hover .elegant-brand-title {
    background: linear-gradient(135deg, #ffffff 0%, rgba(255,255,255,0.8) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.elegant-brand-title {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95) !important;
    transition: all 0.3s ease;
}

.elegant-brand-subtitle {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.elegant-brand:hover .elegant-brand-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

/* Navigation élégante */
.elegant-nav-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    margin: 0 4px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none !important;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.elegant-nav-link:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: rgba(255, 255, 255, 1) !important;
    text-decoration: none !important;
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Dropdowns élégants */
.elegant-dropdown .dropdown-toggle {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 8px 16px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    margin: 0 4px !important;
    display: inline-flex !important;
    align-items: center !important;
}

.elegant-dropdown .dropdown-toggle:hover,
.elegant-dropdown .dropdown-toggle:focus,
.elegant-dropdown .dropdown-toggle.show {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: rgba(255, 255, 255, 1) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

.elegant-dropdown .dropdown-menu {
    background: rgba(45, 55, 72, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    padding: 8px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
    margin-top: 8px !important;
    min-width: 200px !important;
}

.elegant-dropdown-item {
    border-radius: 8px !important;
    margin-bottom: 2px !important;
    padding: 10px 12px !important;
    transition: all 0.2s ease !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500 !important;
}

.elegant-dropdown-item:hover {
    background: rgba(255, 0, 102, 0.15) !important;
    color: rgba(255, 255, 255, 1) !important;
    transform: translateX(2px);
}

/* Menu utilisateur élégant - CORRECTIF BOUTON PROFIL */
.elegant-user-avatar {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.elegant-user-avatar.dropdown-toggle {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 0 !important;
    transition: all 0.3s ease !important;
}

.elegant-user-avatar.dropdown-toggle:hover,
.elegant-user-avatar.dropdown-toggle:focus,
.elegant-user-avatar.dropdown-toggle.show {
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    color: rgba(255, 255, 255, 1) !important;
    transform: scale(1.05) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

.elegant-user-avatar.dropdown-toggle::after {
    display: none !important;
}

.elegant-user-avatar:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
    color: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.elegant-user-dropdown .dropdown-menu {
    background: rgba(45, 55, 72, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    padding: 8px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
    margin-top: 8px !important;
    min-width: 180px !important;
}

/* Responsive élégant */
@media (max-width: 768px) {
    .elegant-header {
        padding: 10px 0 !important;
    }
    
    .elegant-brand-title {
        font-size: 1.1rem !important;
    }
    
    .elegant-brand-subtitle {
        font-size: 0.7rem !important;
    }
    
    .elegant-nav-link {
        padding: 6px 12px !important;
        margin: 0 2px !important;
    }
    
    .elegant-dropdown .dropdown-menu {
        min-width: 180px !important;
    }
}

@media (max-width: 576px) {
    .elegant-header {
        padding: 8px 0 !important;
    }
    
    .elegant-logo {
        height: 35px !important;
    }
    
    .elegant-brand-title {
        font-size: 1rem !important;
    }
    
    .elegant-brand-subtitle {
        display: none !important;
    }
    
    .elegant-nav-link {
        padding: 6px 10px !important;
        margin: 0 1px !important;
    }
    
    .elegant-user-avatar {
        width: 35px !important;
        height: 35px !important;
    }
}

/* Styles pour les recommandations améliorées */
.hover-shadow {
    transition: all 0.3s ease;
}

.hover-shadow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

.transition-all {
    transition: all 0.3s ease;
}

/* Effets pour les cartes de recommandations */
.recommendation-card {
    border-radius: 12px;
    border: none;
    overflow: hidden;
    position: relative;
}

.recommendation-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    z-index: 1;
}

/* Badges d'impact avec animations */
.impact-badge {
    position: relative;
    overflow: hidden;
}

.impact-badge.critical {
    background: linear-gradient(45deg, #dc3545, #e74c3c);
    animation: pulse-critical 2s infinite;
}

.impact-badge.high {
    background: linear-gradient(45deg, #fd7e14, #f76707);
}

.impact-badge.medium {
    background: linear-gradient(45deg, #0dcaf0, #20c997);
}

.impact-badge.low {
    background: linear-gradient(45deg, #198754, #157347);
}

@keyframes pulse-critical {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* Métriques avec indicateurs visuels */
.metric-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    border-left: 4px solid;
    position: relative;
    overflow: hidden;
}

.metric-card.savings {
    border-left-color: #28a745;
}

.metric-card.priority {
    border-left-color: #ffc107;
}

.metric-card.confidence {
    border-left-color: #17a2b8;
}

.metric-card.risk {
    border-left-color: #dc3545;
}

/* Actions des recommandations */
.recommendation-actions {
    padding: 1rem;
    background: rgba(248, 249, 250, 0.8);
    border-top: 1px solid #dee2e6;
}

.action-button {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.action-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Animation pour les éléments de liste d'actions */
.action-list {
    list-style: none;
    padding: 0;
}

.action-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: #6c757d;
}

.action-list li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

/* Améliorations pour la section de résumé */
.summary-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: none;
}

.summary-card .card-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 1.5rem;
}

/* Loading states */
.recommendation-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
    height: 20px;
    margin-bottom: 10px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive pour les recommandations */
@media (max-width: 768px) {
    .recommendation-card {
        margin-bottom: 1rem;
    }
    
    .metric-card {
        margin-bottom: 1rem;
    }
    
    .action-button {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* ============================================
   STYLES POUR LA PAGE DE CONNEXION MODERNE
   ============================================ */

/* Page de connexion moderne */
.login-page-modern {
    position: relative;
    z-index: 1;
}

/* Carte de connexion moderne */
.login-card-modern {
    animation: slideInUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Logo avec animation de flottement */
.login-logo {
    transition: all 0.3s ease;
}

/* Titre de connexion */
.login-title {
    animation: fadeIn 0.8s ease-out 0.2s both;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Inputs modernes pour la connexion */
.login-input-modern {
    border: 2px solid rgba(0, 0, 0, 0.1) !important;
    padding: 12px 16px !important;
    font-size: 1rem !important;
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
    background: rgba(255, 255, 255, 0.8) !important;
}

.login-input-modern:focus {
    border-color: #FF0066 !important;
    box-shadow: 0 0 0 4px rgba(255, 0, 102, 0.1) !important;
    background: white !important;
    transform: translateY(-2px);
}

.login-input-modern::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

/* Bouton de connexion moderne */
.login-button-modern {
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(255, 0, 102, 0.3) !important;
}

.login-button-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 0, 102, 0.4) !important;
}

.login-button-modern:active {
    transform: translateY(0);
}

/* Bouton Azure moderne */
.azure-button-modern {
    position: relative;
    overflow: hidden;
}

.azure-button-modern:hover {
    background: rgba(0, 120, 212, 0.2) !important;
    border-color: rgba(0, 120, 212, 0.5) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 120, 212, 0.2);
}

.azure-button-modern:active {
    transform: translateY(0);
}

/* Messages d'erreur stylisés */
#login-error,
#azure-sso-error {
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #dc3545;
    font-weight: 500;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

/* Effet de brillance sur la carte de connexion */
.login-card-modern::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    animation: shine-login 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shine-login {
    0% {
        transform: translate(-100%, -100%) rotate(45deg);
    }
    100% {
        transform: translate(100%, 100%) rotate(45deg);
    }
}

/* Effet hover sur le logo */
.login-logo:hover {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 15px 35px rgba(0,0,0,0.4));
}

/* Animation des particules de connexion */
.login-particle {
    opacity: 0.6;
    filter: blur(60px);
}

/* Responsive pour la page de connexion */
@media (max-width: 768px) {
    .login-title {
        font-size: 2rem !important;
    }

    .login-card-modern {
        margin: 20px;
    }

    .login-particle {
        display: none;
    }

    .login-input-modern {
        font-size: 16px !important;
    }
}

@media (max-width: 576px) {
    .login-title {
        font-size: 1.8rem !important;
    }

    .login-card-modern {
        margin: 15px;
        padding: 20px 15px !important;
    }
}
