/* ==========================================================================
   1. VARIABLES & RESET GLOBAL
   ========================================================================== */
:root {
    --primary: #0A2C70;         /* Bleu Nuit SCHOOLEAD */
    --secondary: #FF7A00;       /* Orange SCHOOLEAD */
    --blue-light: #2570FF;      /* Bleu d'accentuation */
    --text-dark: #1E293B;       /* Sombre principal */
    --text-muted: #64748B;      /* Texte secondaire */
    --gray: #6C757D;
    --light-gray: #F8FAFC;
    --border: #E2E8F0;
    --background: #F4F6F9;
    --white: #FFFFFF;
    --success: #28A745;
    --danger: #DC3545;

    --radius: 10px;
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--background);
    color: var(--text-dark);
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    padding-top: 70px; /* Compensation Header Fixe */
}

img {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   2. PRELOADER
   ========================================================================== */
#schoolead-preloader {
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: var(--white);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.spinner-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.spinner-wrapper img {
    width: 45px;
    z-index: 10;
    border-radius: 5px;
}

.circle-orange, .circle-blue {
    position: absolute;
    border-radius: 50%;
    border: 3px solid transparent;
}

.circle-orange {
    width: 100%; 
    height: 100%;
    border-top-color: var(--secondary);
    border-bottom-color: var(--secondary);
    animation: spin 1.2s linear infinite;
}

.circle-blue {
    width: 70%; 
    height: 70%;
    border-left-color: var(--primary);
    border-right-color: var(--primary);
    animation: spin 1.8s linear infinite reverse;
}

.preloader-text {
    font-size: 20px;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 2px;
}

@keyframes spin { 
    100% { transform: rotate(360deg); } 
}

/* ==========================================================================
   3. HEADER & NAVIGATION
   ========================================================================== */
.header {
    position: fixed;
    width: 100%;
    top: 0; 
    left: 0;
    background: var(--white);
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo img { 
    width: 42px; 
    height: auto; 
    border-radius: 6px;
}

.logo-text h2 {
    font-size: 18px;
    color: var(--primary);
    margin-bottom: -2px;
    font-weight: 800;
}

.logo-text span {
    font-size: 11px;
    color: var(--gray);
    display: block;
}

.navbar ul {
    display: flex;
    gap: 22px;
    list-style: none;
}

.navbar a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.navbar a:hover, 
.navbar a.active { 
    color: var(--blue-light); 
    font-weight: 600; 
}

.sidenav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-idemo, .btn-login, .btn-demo {
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    padding: 8px 16px;
    transition: var(--transition);
    text-align: center;
    white-space: nowrap;
}

.btn-idemo {
    border: 1.5px solid var(--secondary);
    color: var(--secondary);
}

.btn-idemo:hover { 
    background: var(--secondary); 
    color: var(--white); 
}

.btn-login { 
    color: var(--primary); 
    border: 1.5px solid transparent; 
}

.btn-login:hover { 
    background: var(--light-gray); 
}

.btn-demo {
    background: var(--primary);
    color: var(--white);
    border: 1.5px solid var(--primary);
}

.btn-demo:hover { 
    background: transparent; 
    color: var(--primary); 
}

/* Menu Burger Mobile */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    z-index: 1002;
}

.menu-toggle span {
    width: 25px; 
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: 0.3s ease-in-out;
}

.menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ==========================================================================
   4. WIDGETS FLOTTANTS (WHATSAPP, CALENDRIER, CHAT)
   ========================================================================== */
.widget-btn {
    width: 50px; 
    height: 50px;
    border-radius: 50%;
    border: none;
    color: var(--white);
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.18);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex; 
    justify-content: center; 
    align-items: center;
}

.widget-btn:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 6px 20px rgba(0,0,0,0.25); 
}

/* Widgets Gauche */
.left-widgets {
    position: fixed;
    bottom: 25px; 
    left: 25px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.calendar-btn { background: var(--primary); }
.wa-trigger { background: #25D366; }
.whatsapp-container { position: relative; }

.wa-info-card {
    position: absolute;
    bottom: 0; 
    left: 65px;
    width: 240px;
    background: var(--white);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
    opacity: 0; 
    visibility: hidden;
    transform: translateX(-10px);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.wa-info-card.active { 
    opacity: 1; 
    visibility: visible; 
    transform: translateX(0); 
    display: block !important;
}

.wa-info-card p {
    font-size: 13px;
    color: var(--text-dark);
    margin-bottom: 12px;
    font-weight: 600;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #25D366; 
    color: var(--white);
    text-decoration: none; 
    padding: 10px 14px;
    border-radius: 8px; 
    font-weight: 600; 
    font-size: 13px;
    transition: background 0.2s;
}

.whatsapp-btn:hover { background: #20ba5a; }

.close-wa {
    position: absolute; 
    top: 8px; 
    right: 12px;
    background: none; 
    border: none; 
    font-size: 18px;
    color: var(--gray); 
    cursor: pointer;
}

#wa-info-card {
    display: none;
}

#wa-info-card.active {
    display: block;
}

/* Widgets Droite */
.right-widgets {
    position: fixed;
    bottom: 25px; 
    right: 25px;
    z-index: 1001;
    display: flex; 
    flex-direction: column; 
    align-items: flex-end;
}

.chat-trigger-btn {
    width: 55px; 
    height: 55px;
    border-radius: 50%;
    background: var(--blue-light);
    color: var(--white); 
    border: none; 
    font-size: 22px;
    cursor: pointer; 
    box-shadow: 0 4px 15px rgba(37,112,255,0.4);
    position: relative;
    transition: 0.3s;
    display: flex; 
    align-items: center; 
    justify-content: center;
}

.chat-badge {
    position: absolute;
    top: -2px; 
    right: -2px;
    background: #e63946; 
    color: var(--white);
    font-size: 11px; 
    font-weight: bold;
    width: 20px; 
    height: 20px;
    border-radius: 50%; 
    display: flex;
    align-items: center; 
    justify-content: center;
    border: 2px solid var(--white);
}

.chat-window {
    position: absolute;
    bottom: 70px; 
    right: 0;
    width: 320px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    opacity: 0; 
    visibility: hidden;
    transform: translateY(15px);
    transition: var(--transition);
    overflow: hidden;
    border: 1px solid var(--border);
}

.chat-window.active { 
    opacity: 1; 
    visibility: visible; 
    transform: translateY(0); 
}

.chat-header {
    padding: 12px 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    font-size: 15px;
    color: var(--primary);
}

.close-chat {
    background: none; 
    border: none;
    font-size: 22px; 
    color: var(--gray); 
    cursor: pointer;
}

.chat-body { padding: 15px 20px 20px; }

.chat-message {
    background: var(--light-gray);
    border: 1px solid var(--border);
    padding: 12px 15px; 
    border-radius: 8px;
    font-size: 13px; 
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.4;
}

.chat-options { display: flex; flex-direction: column; gap: 8px; }

.chat-opt {
    text-decoration: none;
    border: 1.5px solid var(--blue-light);
    color: var(--blue-light);
    padding: 9px 14px;
    border-radius: 20px;
    font-size: 12px; 
    font-weight: 600;
    transition: 0.2s; 
    background: var(--white);
    text-align: center;
}

.chat-opt:hover { 
    background: var(--blue-light); 
    color: var(--white); 
}

/* ==========================================================================
   5. MODALE DÉMO (MULTI-ÉTAPES)
   ========================================================================== */
.demo-overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(3px);
    z-index: 2000;
    display: flex; 
    align-items: center; 
    justify-content: center;
    opacity: 0; 
    visibility: hidden; 
    transition: var(--transition);
    padding: 15px;
}

.demo-overlay.active { 
    opacity: 1; 
    visibility: visible; 
}

.demo-modal-content {
    background: var(--white);
    width: 100%; 
    max-width: 780px;
    border-radius: 16px;
    overflow: hidden;
    display: flex; 
    flex-direction: column;
    max-height: 90vh;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}

.demo-header {
    background: var(--primary); 
    color: var(--white);
    padding: 25px 35px; 
    position: relative;
}

.close-demo {
    position: absolute; 
    top: 15px; 
    right: 20px;
    background: rgba(255,255,255,0.2); 
    border: none;
    color: var(--white); 
    font-size: 20px; 
    width: 32px; 
    height: 32px;
    border-radius: 6px; 
    cursor: pointer; 
    transition: 0.2s;
    display: flex; 
    align-items: center; 
    justify-content: center;
}

.close-demo:hover { background: rgba(255,255,255,0.4); }

.demo-tag { 
    font-size: 11px; 
    font-weight: bold; 
    letter-spacing: 1px; 
    display: block; 
    margin-bottom: 8px; 
    opacity: 0.9; 
}

.demo-header h2 { font-size: 22px; margin-bottom: 6px; }
.demo-header p { font-size: 13px; opacity: 0.9; margin-bottom: 15px; line-height: 1.4; }

.demo-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.demo-badges span {
    background: rgba(255,255,255,0.2); 
    padding: 4px 10px;
    border-radius: 20px; 
    font-size: 11px; 
    font-weight: 500;
}

.demo-body { padding: 25px 35px; overflow-y: auto; flex: 1; }

.demo-choices { display: flex; gap: 15px; margin-bottom: 25px; }

.choice-card {
    flex: 1; 
    border: 1.5px solid var(--border); 
    border-radius: 10px; 
    padding: 15px; 
    cursor: pointer; 
    transition: 0.3s;
}

.choice-card.active { border-color: var(--blue-light); box-shadow: 0 4px 15px rgba(37,112,255,0.12); }
.choice-card.secondary { background: var(--blue-light); color: var(--white); border-color: var(--blue-light); }

.choice-icon { font-size: 20px; margin-bottom: 10px; color: var(--blue-light); }
.choice-card.secondary .choice-icon { color: var(--white); }

.choice-card h4 { font-size: 14px; margin-bottom: 6px; }
.choice-card p { font-size: 12px; color: var(--gray); margin-bottom: 8px; line-height: 1.3; }
.choice-card.secondary p { color: rgba(255,255,255,0.85); }
.choice-card a { color: var(--white); font-size: 12px; font-weight: bold; text-decoration: none; }

/* Stepper */
.demo-stepper { 
    display: flex; 
    justify-content: space-between; 
    border-bottom: 1px solid var(--border); 
    padding-bottom: 15px; 
    margin-bottom: 25px; 
}

.step { display: flex; flex-direction: column; align-items: center; gap: 6px; opacity: 0.5; transition: 0.3s; }
.step.active { opacity: 1; color: var(--blue-light); font-weight: 600; }

.step-circle { 
    width: 28px; 
    height: 28px; 
    background: var(--border); 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 13px; 
    font-weight: bold; 
    color: var(--gray); 
}

.step.active .step-circle { background: var(--blue-light); color: var(--white); }
.step span { font-size: 12px; }

/* Formulaires Modale */
.demo-form-section h3 { font-size: 17px; margin-bottom: 4px; color: var(--text-dark); }
.demo-form-section p { font-size: 12px; color: var(--gray); margin-bottom: 18px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.input-group.full-width { grid-column: 1 / -1; }

.input-group label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; color: var(--text-dark); }
.input-group input, .input-group select, .input-group textarea {
    width: 100%; 
    padding: 10px 12px; 
    border: 1px solid var(--border); 
    border-radius: 8px; 
    font-size: 13px; 
    outline: none; 
    transition: 0.3s;
}

.input-group input:focus, .input-group select:focus, .input-group textarea:focus { 
    border-color: var(--blue-light); 
    box-shadow: 0 0 0 3px rgba(37,112,255,0.15); 
}

.phone-group { display: flex; gap: 8px; }
.phone-group select { width: 38%; }
.phone-group input { width: 62%; }
.input-group small { display: block; margin-top: 4px; font-size: 11px; color: var(--gray); }

.recaptcha-mock {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #d3d3d3;
    background: #f9f9f9;
    border-radius: 6px;
    padding: 10px 15px;
    max-width: 300px;
    margin-top: 5px;
}

.recaptcha-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-dark);
}

.recaptcha-checkbox input[type="checkbox"] {
    width: 18px; 
    height: 18px; 
    cursor: pointer;
}

.recaptcha-mock img {
    height: 30px; 
    width: auto; 
    opacity: 0.8;
}

.security-notice {
    background: #eef3ff;
    color: var(--blue-light);
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.demo-footer {
    padding: 15px 35px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #FCFCFC;
}

.step-indicator { font-size: 12px; color: var(--gray); font-weight: 500; }
.footer-actions-right { display: flex; align-items: center; gap: 12px; }

.btn-back {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dark);
    padding: 9px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: 0.2s;
    display: flex; 
    align-items: center; 
    gap: 6px;
}

.btn-back:hover { background: #f0f0f0; }

.link-skip {
    color: var(--gray);
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
}

.btn-continue {
    background: var(--blue-light);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.btn-continue:hover { background: #1d5ed8; }

.btn-confirm {
    background: var(--success);
    color: var(--white);
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    display: flex; 
    align-items: center; 
    gap: 6px;
}

.btn-confirm:hover { background: #218838; }

/* ==========================================================================
   6. BARRE DE LANGUE / TOP BAR
   ========================================================================== */
.topbar-lang-container {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
}

.language-selector {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.language-selector i {
    color: var(--primary);
    font-size: 14px;
}

.language-selector select {
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    background: var(--white);
    cursor: pointer;
}

/* ==========================================================================
   7. FORMULAIRE DE RÉINITIALISATION & NOUVEAU MOT DE PASSE
   ========================================================================== */
.reset-main-wrapper,
body > .container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px 20px;
    width: 100%;
}

.reset-card,
.card {
    width: 100%;
    max-width: 480px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 35px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* En-tête et Titre (Supporte reset-password & new-password) */
.card-header {
    text-align: center;
    margin-bottom: 25px;
}

.card-header h1,
.card h1 {
    color: var(--primary);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
}

.card-header p,
.card > p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 20px;
}

/* Bloc Logo spécifique à new-password.html */
.logo-area {
    text-align: center;
    margin-bottom: 20px;
}

.logo-area .logo-text h2 {
    font-size: 20px;
    color: var(--primary);
    font-weight: 800;
    margin-top: 6px;
    margin-bottom: 2px;
}

.logo-area .logo-text span {
    font-size: 11px;
    color: var(--gray);
    display: block;
}

.input-box {
    margin-bottom: 18px;
}

.input-box label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
}

.input-box label span {
    color: var(--danger);
}

.input-wrapper,
.password-box {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 14px;
    color: var(--gray);
    font-size: 15px;
    pointer-events: none;
}

/* Icônes de masquage / affichage mot de passe */
.input-wrapper .toggle-password,
.password-box .toggle {
    position: absolute;
    right: 14px;
    color: var(--gray);
    font-size: 15px;
    cursor: pointer;
    z-index: 5;
    transition: color 0.2s ease;
}

.input-wrapper .toggle-password:hover,
.password-box .toggle:hover {
    color: var(--primary);
}

.input-wrapper input {
    width: 100%;
    padding: 12px 42px 12px 42px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    color: var(--text-dark);
    transition: var(--transition);
}

.password-box input {
    width: 100%;
    padding: 12px 42px 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    color: var(--text-dark);
    transition: var(--transition);
}

.input-wrapper input:focus,
.password-box input:focus {
    border-color: var(--blue-light);
    box-shadow: 0 0 0 3px rgba(37, 112, 255, 0.15);
}

/* Jauge de force du mot de passe */
.strength-bar-container,
.strength {
    margin: 8px 0 6px 0;
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.strength-bar-track {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 6px;
}

#strengthBar {
    height: 100%;
    width: 0%;
    background: var(--danger);
    transition: width 0.3s ease, background 0.3s ease;
    border-radius: 10px;
}

.strength-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.strength-info span.label {
    color: var(--text-muted);
}

#strengthText {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 18px;
    margin-top: 4px;
}

.otp-action-row {
    display: flex;
    justify-content: flex-end;
    margin: -8px 0 18px 0;
}

.code-btn {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.code-btn:hover {
    background: var(--primary);
    color: var(--white);
}

/* Zone Captcha */
.captcha {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #FAF9F9;
    margin-bottom: 25px;
}

.captcha-check {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid #94A3B8;
    border-radius: 4px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    transition: var(--transition);
}

.checkbox.checked {
    background: var(--success);
    border-color: var(--success);
}

.checkbox.checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--white);
    font-size: 11px;
}

.captcha span {
    font-size: 13px;
    color: var(--text-dark);
    font-weight: 500;
}

.captcha-logo img {
    width: 60px;
    height: auto;
    opacity: 0.8;
}

/* Boutons et Liens de Réinitialisation */
.confirm {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.confirm:disabled {
    background: #CBD5E1;
    cursor: not-allowed;
}

.confirm:not(:disabled):hover {
    background: var(--secondary);
}

.back-link {
    text-align: center;
    margin-top: 20px;
}

.back-link a {
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.back-link a:hover {
    color: var(--secondary);
}

/* ==========================================================================
   8. POPUP PROMO
   ========================================================================== */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 20px;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: var(--white);
    width: 100%;
    max-width: 850px;
    border-radius: 12px;
    display: flex;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.4s ease;
}

.popup-overlay.active .popup-content {
    transform: translateY(0) scale(1);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--white);
    color: var(--text-dark);
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: 0.3s;
}

.close-btn:hover {
    background: #f1f5f9;
    color: var(--danger);
}

.popup-left {
    flex: 1;
    background: #FEF5F0;
}

.popup-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popup-right {
    flex: 1;
    padding: 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.popup-right h2 {
    color: var(--primary);
    font-size: 22px;
    margin-bottom: 12px;
}

.popup-right p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.popup-features {
    list-style: none;
    padding: 0;
    margin-bottom: 25px;
}

.popup-features li {
    margin-bottom: 10px;
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 500;
}

.popup-features li i {
    color: var(--success);
    margin-right: 10px;
}

.popup-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.popup-actions a {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
    font-size: 14px;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: #082259;
}

.btn-outline {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--light-gray);
}

/* ==========================================================================
   9. FOOTER
   ========================================================================== */
.footer {
    background: #0F172A;
    color: var(--white);
    padding-top: 60px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
}

.footer-about img {
    width: 140px;
    margin-bottom: 15px;
}

.footer-about p {
    color: #CBD5E1;
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer h3 {
    margin-bottom: 20px;
    font-size: 18px;
    color: var(--white);
    position: relative;
    padding-bottom: 8px;
}

.footer h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 35px;
    height: 3px;
    background: var(--secondary);
    border-radius: 2px;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    color: #CBD5E1;
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition);
    display: inline-block;
}

.footer-links ul li a:hover {
    color: var(--secondary);
    transform: translateX(4px);
}

.footer-contact p {
    color: #CBD5E1;
    font-size: 13px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.footer-contact i {
    color: var(--secondary);
    margin-right: 12px;
    font-size: 16px;
    width: 18px;
    text-align: center;
}

.social-icons {
    display: flex;
    gap: 12px;
}

.social-icons a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.social-icons a:hover {
    background: var(--secondary);
    transform: translateY(-3px);
}

.footer-bottom {
    margin-top: 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    padding: 20px 0;
    color: #94A3B8;
    font-size: 13px;
}

/* ==========================================================================
   10. TOAST NOTIFICATION
   ========================================================================== */
#toast {
    position: fixed;
    top: 30px;
    right: 30px;
    color: var(--white);
    padding: 14px 22px;
    border-radius: 8px;
    display: none;
    font-weight: 600;
    font-size: 14px;
    z-index: 9999;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   11. RESPONSIVE BREAKPOINTS (MEDIA QUERIES)
   ========================================================================== */

/* 1. TABLETTE LARGE & LAPTOP (<= 992px) */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* 2. TABLETTE (<= 768px) */
@media (max-width: 768px) {
    .menu-toggle { display: flex; }

    .navbar {
        position: absolute;
        top: 70px; 
        left: 0; 
        width: 100%;
        background: var(--white);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        padding: 20px;
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease-in-out;
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .navbar.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .navbar ul {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .sidenav {
        flex-direction: column;
        width: 100%;
        gap: 10px;
        padding-top: 15px;
        border-top: 1px solid var(--border);
    }

    .btn-idemo, .btn-login, .btn-demo {
        width: 100%;
        padding: 10px;
    }

    .popup-content {
        flex-direction: column;
        max-height: 90vh;
        overflow-y: auto;
    }

    .popup-left { height: 200px; }
    .popup-right { padding: 25px; }

    .demo-header { padding: 20px; }
    .demo-body { padding: 20px; }
    .demo-choices { flex-direction: column; gap: 10px; }
    .step span { display: none; }
}

/* 3. MOBILES (<= 576px) */
@media (max-width: 576px) {
    .reset-main-wrapper,
    body > .container {
        padding: 30px 15px;
    }

    .reset-card,
    .card {
        padding: 25px 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .form-grid { grid-template-columns: 1fr; }
    .phone-group { flex-direction: column; gap: 6px; }
    .phone-group select, .phone-group input { width: 100%; }

    .demo-footer {
        flex-direction: column-reverse;
        gap: 12px;
        align-items: stretch;
    }

    .footer-actions-right { 
        justify-content: space-between; 
        width: 100%; 
    }
}

/* 4. PETITS MOBILES (<= 480px) */
@media (max-width: 480px) {
    .left-widgets { bottom: 15px; left: 15px; gap: 10px; }
    .right-widgets { bottom: 15px; right: 15px; }
    
    .widget-btn { width: 45px; height: 45px; font-size: 18px; }
    .chat-trigger-btn { width: 50px; height: 50px; font-size: 20px; }

    .wa-info-card {
        left: 0;
        bottom: 55px;
        width: calc(100vw - 30px);
    }

    .chat-window {
        right: 0;
        bottom: 60px;
        width: calc(100vw - 30px);
    }

    .captcha {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
        text-align: center;
    }

    .captcha-logo {
        margin-top: 5px;
    }

    #toast {
        left: 15px;
        right: 15px;
        top: 15px;
        text-align: center;
    }
}

/* Prevent CSS from overriding Font Awesome icons */
.fa, .fas, .far, .fab, .fa-solid, .fa-regular, .fa-brands {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
}
