/**
 * FORCE DARK MODE - ECRASE TOUT
 * Ce fichier force le dark mode même quand Windows/navigateur est en light mode
 */

/* Force le color-scheme en dark UNIQUEMENT */
html {
    color-scheme: dark only !important;
}

/* Copie EXACTE du custom.css mais avec !important partout */

/* Background principal - FORCE */
html[data-bs-theme="dark"],
html {
    --bs-body-bg: #0a0e27 !important;
    --bs-body-bg-rgb: 10, 14, 39 !important;
    --bs-body-color: #e4e6eb !important;
    --bs-body-color-rgb: 228, 230, 235 !important;
    --bs-surface-bg: #1a1f3a !important;
    --bs-border-color: #2d3561 !important;
    --bs-link-color: #ff4757 !important;
    --bs-link-hover-color: #ff6b7a !important;
}

body {
    background-color: #0a0e27 !important;
    color: #e4e6eb !important;
}

/* Cards en mode dark avec glassmorphism - FORCE */
.card {
    background: rgba(26, 31, 58, 0.75) !important;
    border: 1px solid rgba(45, 53, 97, 0.5) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-radius: 15px !important;
    color: #e4e6eb !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Container et textes au-dessus du blur - FORCE */
body.bg-primary .container,
body.bg-primary .row,
body.bg-primary .col-xl-4,
body.bg-primary .col-md-5 {
    position: relative !important;
    z-index: 10 !important;
}

/* Inputs en mode dark - FORCE */
.form-control {
    background-color: #0a0e27 !important;
    border-color: #2d3561 !important;
    color: #e4e6eb !important;
}

.form-control:focus {
    background-color: #1a1f3a !important;
    border-color: #ff4757 !important;
    color: #e4e6eb !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 71, 87, 0.25) !important;
}

.form-control::placeholder {
    color: #6c757d !important;
}

/* Labels et textes - FORCE */
.form-label, 
h1, h2, h3, h4, h5, h6, 
p, label, 
span {
    color: #e4e6eb !important;
}

/* Checkbox - FORCE */
.form-check-input {
    background-color: #0a0e27 !important;
    border-color: #2d3561 !important;
}

.form-check-input:checked {
    background-color: #ff4757 !important;
    border-color: #ff4757 !important;
}

/* Liens - FORCE */
a {
    color: #ff4757 !important;
}

a:hover {
    color: #ff6b7a !important;
}

/* Texte blanc-50 - FORCE */
.text-white-50 {
    color: rgba(228, 230, 235, 0.7) !important;
}

.text-white-50 a {
    color: #e4e6eb !important;
}

/* Boutons - FORCE (garde le style custom.css) */
.btn-primary {
    background: linear-gradient(135deg, #ff4757 0%, #fc5c65 100%) !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4) !important;
    color: #ffffff !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #fc5c65 0%, #ff4757 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.6) !important;
    color: #ffffff !important;
}

/* Alerts - FORCE */
.alert-danger {
    background-color: rgba(252, 92, 101, 0.15) !important;
    border-color: rgba(252, 92, 101, 0.3) !important;
    color: #fc5c65 !important;
}

.alert-success {
    background-color: rgba(38, 222, 129, 0.15) !important;
    border-color: rgba(38, 222, 129, 0.3) !important;
    color: #26de81 !important;
}

/* Background auth page - FORCE */
body.bg-primary {
    position: relative !important;
    overflow: hidden !important;
}

/* Image de fond floutée (pseudo-élément pour appliquer filter) - FORCE */
body.bg-primary::before {
    content: '' !important;
    position: fixed !important;
    top: -20px !important;
    left: -20px !important;
    width: calc(100% + 40px) !important;
    height: calc(100% + 40px) !important;
    background-image: url('../images/backgrounder.png') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    filter: blur(15px) !important;
    -webkit-filter: blur(15px) !important;
    z-index: 0 !important;
}

/* Overlay sombre par-dessus l'image floutée - FORCE */
body.bg-primary::after {
    content: '' !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(10, 14, 39, 0.7) !important;
    z-index: 1 !important;
    pointer-events: none !important;
}

/* MEDIA QUERY pour light mode - OVERRIDE BRUTAL */
@media (prefers-color-scheme: light) {
    html, body {
        background-color: #0a0e27 !important;
        color: #e4e6eb !important;
    }
    
    .card {
        background: rgba(26, 31, 58, 0.75) !important;
        color: #e4e6eb !important;
    }
    
    .form-control {
        background-color: #0a0e27 !important;
        color: #e4e6eb !important;
    }
}
