/* ==========================================================================
   CONFIGURATIONS GLOBALES & VARIABLES (ROOT)
   ========================================================================== */

:root {
    --ks-primary: #b84215ff;       /* Votre Orange principal */
    --ks-primary-soft: #df651aff;  /* Votre Orange V */
    --ks-primary-dark: rgba(184, 66, 21, 0.08);
    --ks-dark: #4d4246ff;          /* Votre Marron d'origine */
    --ks-light: #f2f2f2ff;         /* Votre Gris d'origine */
    --ks-white: #fafafaff; 

    /* Variables spécifiques au module User/Auth */
    --ks-success: #10b981;
    --auth-primary-blue: #3b82f6;
    --ks-card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Khand', 'Ubuntu', sans-serif;
    color: var(--ks-dark);
    background-color: var(--ks-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

.ks-link {
    color : #df651aff !important;
}

.ks-link:hover {
    color : var(--ks-primary);
}

.ks-primary {
    color : #b84215ff !important;
}

/* ==========================================================================
   GESTION DE show_profil.html
   ========================================================================== */

.hover-primary:hover {
    color: var(--ks-primary) !important;
}

.profile-info-grid .bi {
    font-size: 1.1rem;
}

/* Hiérarchie des Z-index (Modales vs Navigation) */
.modal {
    z-index: 9999 !important;
}

.modal-backdrop {
    z-index: 9999 !important;
}

.sub-nav-container {
    z-index: 1000 !important;
}

/* Correction mobile modale */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 0.5rem;
    }
}

/* ==========================================================================
   GESTION DE login.html
   ========================================================================== */

.login-card {
    border: none;
    border-radius: 1.25rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    max-width: 450px;
    width: 100%;
}

.form-control {
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
}

.form-control:focus {
    border-color: var(--ks-primary) !important;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.1);
}

.ks-btn-primary {
    background-color: var(--ks-primary);
    border-color: var(--ks-primary-dark);
    color: var(--ks-white);
    font-weight: 600;
    padding: 0.75rem;
    border-radius: 0.75rem;
    transition: all 0.2s;
}

.ks-btn-primary:hover {
    background-color: var(--ks-white);
    color: var(--ks-primary);
    border-color: var(--ks-dark);
    transform: translateY(-1px);
}

.footer-socials a {
    color: #64748b;
    font-size: 1.25rem;
    transition: color 0.2s;
}

.footer-socials a:hover {
    color: var(--ks-primary);
}

/* ==========================================================================
   GESTION DE password_change_form.html
   ========================================================================== */


/* Nettoyage help text Django */
.form-text ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

/* ==========================================================================
   GESTION DE password_reset_complete.html
   ========================================================================== */

.auth-page-wrapper {
    min-height: 80vh;
    background-color: var(--ks-light);
    font-family: 'Inter', sans-serif;
}

.auth-card-success {
    max-width: 500px;
    width: 100%;
    box-shadow: var(--ks-card-shadow);
    animation: authFadeInUp 0.5s ease-out;
}

.auth-icon-circle-success {
    width: 80px;
    height: 80px;
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--ks-success);
    font-size: 2.5rem;
}

.auth-title-success {
    font-size: 1.5rem;
    letter-spacing: -0.025em;
}

.auth-text-muted {
    color: #64748b;
    line-height: 1.6;
}

.auth-link-secondary {
    color: #94a3b8;
    font-size: 0.875rem;
}

.auth-link-secondary:hover {
    color: #64748b;
}





/* ==========================================================================
   GESTION DE password_reset_confirm.html & password_reset_form.html
   ========================================================================== */

.auth-card {
    max-width: 480px;
    width: 100%;
    background: white;
}

.ks-icon-circle-primary {
    width: 70px;
    height: 70px;
    background-color: var(--ks-primary-dark);
    color: var(--ks-primary);
    font-size: 2rem;
    transform: translateY(-1px);
}

.auth-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

.auth-input-group-text {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-right: none;
    color: #94a3b8;
    border-radius: 0.75rem 0 0 0.75rem;
}

.auth-input-field {
    border: 1px solid #e2e8f0 !important;
    border-radius: 0 0.75rem 0.75rem 0 !;
}


.auth-error-msg {
    color: #ef4444;
    font-size: 0.75rem;
    font-weight: 500;
}

.auth-form-email .input-group {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

/* ==========================================================================
   GESTION DE password_reset_done.html
   ========================================================================== */

.auth-icon-circle-info {
    width: 80px;
    height: 80px;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--auth-primary-blue);
    font-size: 2.5rem;
    position: relative;
}

.auth-instruction-box {
    background-color: #f1f5f9;
    border-left: 4px solid var(--ks-accent);
}

.auth-text-muted strong {
    color: #1e293b;
}

.hover-opacity-100:hover {
    opacity: 1 !important;
}

/* ==========================================================================
   GESTION DE delete_account.html
   ========================================================================== */

#deleteAccountModal .modal-content {
    animation: authModalShake 0.4s ease-in-out;
}

#deleteAccountModal .form-control:focus {
    border-color: #ef4444; /* Rouge focus suppression */
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

#deleteAccountModal .btn-danger {
    background-color: #ef4444;
    border: none;
    transition: all 0.2s ease;
}

#deleteAccountModal .btn-danger:hover {
    background-color: #dc2626;
    transform: scale(1.02);
}

/* ==========================================================================
   ANIMATIONS & MEDIA QUERIES FINALES
   ========================================================================== */

.ks-rep-section {
    animation: authFadeIn 0.3s ease-in-out;
    display: none; 
    background-color: rgb(252, 237, 227); 
    border: 1px dashed var(--ks-primary-soft);
}

.ks-switch .form-check-input {
    cursor: pointer;
    width: 2.5em;
    height: 1.25em;
}

.ks-switch .form-check-input:checked {
    background-color: var(--ks-primary) !important;
    border-color: var(--ks-primary)!important;
}

.ks-switch .form-check-input:active {
    filter: brightness(90%); /* Assombrit légèrement au lieu de devenir bleu */
    background-color: #f97316 !important;
    border-color: #f97316 !important;
}

.ks-switch .form-check-input:hover {
    cursor: pointer;
    border-color: #fb923c; /* Une bordure orange léger (optionnel) */
    box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.25)!important; /* L'ombre orange */
}

.ks-switch .form-check-input:focus {
    border-color: #fb923c !important;
    color : #f97316 !important;
    box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.25) !important;
}


.ks-switch .form-check-input:checked:focus {
    border-color: #f97316 !important;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.25) !important;
}

#modify-user-form .form-control:focus {
    border-color: #ff8c00;
    box-shadow: 0 0 0 0.25rem rgba(255, 140, 0, 0.25);
}


@media (max-width: 768px) {
    .auth-card {
        border-radius: 0;
    }
}

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

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

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