/* ========================================== */
/* VARIABLES GLOBALES & RESET GENERAL         */
/* ========================================== */
:root {
    --primary-blue: #0B192C;
    --secondary-blue: #1E3E62;
    --accent-cyan: #0066da;
    --accent-gold: #F39C12;
    --accent-green: #2ECC71;
    --accent-orange: #E67E22;
    --danger-red: #DC2626;
    --purple: #9333EA;
    --purple-dark: #6B21A8;
    --text-dark: #212c3b;
    --text-muted: #475569;
    --bg-light: #F8FAFC;
    --white: #FFFFFF;
    --black: #000000;
    --border-color: #3e434b;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.363);
    --shadow-md: 0 6px 18px rgba(11, 25, 44, 0.315);
    --shadow-lg: 0 12px 32px rgba(11, 25, 44, 0.12);
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --container-width: 1200px;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Poppins', system-ui, -apple-system, sans-serif;
}

i.fas, i.fa-solid {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
}
i.fab, i.fa-brands {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================== */
/* BOUTONS ET CLASSES UTILITAIRES             */
/* ========================================== */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-lg { padding: 12px 22px; font-size: 1rem; }
.btn-xl { padding: 16px 34px; font-size: 1.1rem; }
.btn-block { width: 100%; }

.btn-primary { 
    background: var(--accent-orange); 
    color: var(--white); 
    border-radius: 8px; 
    font-weight: 700; 
}
.btn-primary:hover { 
    background: var(--accent-gold); 
    color: var(--primary-blue); 
    transform: translateY(-2px); 
    box-shadow: var(--shadow-md); 
}

.btn-secondary { 
    background: rgba(11, 25, 44, 0.08); 
    color: var(--primary-blue); 
    border: 1px solid var(--border-color); 
    border-radius: 8px; 
    font-weight: 700; 
}
.btn-secondary:hover { 
    background: var(--primary-blue); 
    color: var(--white); 
}

.btn-gold { 
    background: var(--accent-gold); 
    color: var(--primary-blue); 
}
.btn-gold:hover { 
    background: var(--accent-orange); 
    color: var(--white); 
    transform: translateY(-2px); 
}

.text-gradient {
    background-image: linear-gradient(90deg, #E67E22 0%, #F39C12 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.text-gold { color: var(--accent-gold); }
.text-success { color: var(--accent-green); }
.text-blue { color: var(--accent-cyan); }
.text-center { text-align: center; }

/* Micro Badges & Couleurs */
.badge-mini {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
    margin-left: 6px;
    display: inline-block;
}
.badge-tag {
    background: var(--accent-gold);
    color: var(--primary-blue);
    font-weight: 800;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    align-self: flex-start;
}
.bg-primary { background: #DC2626; color: white; }
.bg-success { background: #16A34A; color: white; }
.bg-blue { background: #0066da; }
.bg-indigo { background: #4F46E5; }
.bg-cyan { background: #047dce; }
.bg-orange { background: #EA580C; }
.bg-purple { background: #9333EA; }
.bg-purple-dark { background: #6B21A8; }
.bg-green { background: #16A34A; }
.bg-teal { background: #0D9488; }
.bg-dark { background: #000000; }
.bg-red { background: #DC2626; }
.bg-red-dark { background: #991B1B; }
.bg-gold { background: var(--accent-gold); }

/* ========================================== */
/* PRELOADER KIESBIPAY                        */
/* ========================================== */
#kiesbipay-preloader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--primary-blue);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
#kiesbipay-preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}
.preloader-content {
    text-align: center;
    color: var(--white);
    padding: 0 20px;
}
.preloader-logo {
    width: 140px;
    height: auto;
    margin: 0 auto 20px;
    animation: pulse 1.5s infinite alternate;
}
.preloader-spinner {
    width: 42px; height: 42px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: spin 0.8s linear infinite;
}
.preloader-text {
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: #94A3B8;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { from { transform: scale(0.95); } to { transform: scale(1.05); } }

/* ========================================== */
/* EN-TÊTE PRINCIPAL (HEADER & NAVBAR)        */
/* ========================================== */
.kiesbi-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}
.navbar {
    padding: 12px 0;
    position: relative;
}
.navbar-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand-logo {
    height: 48px;
    width: auto;
    display: block;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 22px;
    margin: 0; padding: 0;
}
.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.92rem;
    padding: 8px 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}
.nav-link:hover, .nav-link.active {
    color: var(--accent-cyan);
}
.caret-icon { font-size: 0.75rem; transition: var(--transition); }
.nav-item:hover .caret-icon { transform: rotate(180deg); }

/* Commutateur de Langue */
.nav-lang-switcher {
    display: flex;
    align-items: center;
}
.lang-switcher {
    display: flex;
    align-items: center;
    background: var(--bg-light);
    padding: 3px 8px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}
.lang-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    padding: 2px 6px;
    transition: var(--transition);
}
.lang-btn.active, .lang-btn:hover { color: var(--accent-cyan); }
.lang-divider { color: var(--border-color); font-size: 0.75rem; }

/* Mega Menu (12 Solutions) */
.mega-dropdown-item { position: static; }
.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-top: 3px solid var(--accent-cyan);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: var(--transition);
    padding: 30px 0;
    z-index: 990;
}
.mega-dropdown-item:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.mega-menu-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr) 280px;
    gap: 25px;
}
.mega-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.mega-links { list-style: none; padding: 0; margin: 0; }
.mega-links li { margin-bottom: 8px; }
.mega-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-decoration: none;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
}
.mega-item:hover { background: var(--bg-light); }
.mega-icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--white);
    font-size: 0.95rem;
    flex-shrink: 0;
}
.mega-text strong {
    display: block;
    color: var(--text-dark);
    font-size: 0.88rem;
}
.mega-text span {
    font-size: 0.76rem;
    color: var(--text-muted);
    line-height: 1.2;
    display: block;
}

.mega-banner-card {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--white);
    padding: 20px;
    border-radius: 12px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.mega-banner-card h3 { font-size: 1.05rem; margin: 10px 0; line-height: 1.3; }
.mega-banner-card p { font-size: 0.8rem; color: #CBD5E1; margin-bottom: 15px; }

/* Dropdown Standard */
.dropdown-item { position: relative; }
.dropdown-menu {
    position: absolute;
    top: 100%; left: 0;
    width: 230px;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    padding: 10px 0;
    list-style: none;
    opacity: 0; visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 990;
}
.dropdown-item:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 18px;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition);
}
.dropdown-menu a:hover { background: var(--bg-light); color: var(--accent-cyan); }

/* Header Actions & Mobile Toggle */
.navbar-actions { display: flex; align-items: center; gap: 12px; }
.signup-dropdown { position: relative; }
.dropdown-toggle-signup { padding: 8px 16px; }

.signup-menu {
    position: absolute; right: 0; top: 100%;
    width: 280px;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: 10px;
    padding: 5px;
    display: none;
    z-index: 1000;
    border: 1px solid var(--border-color);
}
.signup-dropdown:hover .signup-menu { display: block; }
.signup-option {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-dark);
    transition: var(--transition);
}
.signup-option:hover { background: var(--bg-light); }
.signup-option.active-option { background: rgba(0, 102, 218, 0.08); }
.signup-option i { font-size: 1.25rem; }
.signup-option strong { display: block; font-size: 0.85rem; }
.signup-option small { color: var(--text-muted); font-size: 0.7rem; margin-top: -2px; display: block; }

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    padding: 0;
}
.mobile-toggle span {
    width: 100%;
    height: 3px;
    background: var(--primary-blue);
    border-radius: 2px;
    transition: var(--transition);
}
.mobile-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.mobile-toggle.open span:nth-child(2) { opacity: 0; }
.mobile-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ========================================== */
/* STYLES SPÉCIFIQUES : CRÉER UN COMPTE TEST  */
/* ========================================== */
.sandbox-onboarding-main {
    background-color: var(--bg-light);
    min-height: 80vh;
    padding-bottom: 70px;
}

/* Hero Header Test */
.test-hero-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: var(--white);
    padding: 50px 0 60px;
    margin-bottom: 40px;
}

.sandbox-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 102, 218, 0.2);
    border: 1px solid rgba(0, 102, 218, 0.4);
    color: #60A5FA;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.test-page-title {
    font-size: 2.3rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.test-page-desc {
    font-size: 1rem;
    color: #CBD5E1;
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Layout Grid : Formulaire (Gauche) & Publicité / Infos (Droite) */
.test-layout-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 35px;
    align-items: flex-start;
    margin-top: -30px;
}

/* Carte Formulaire */
.test-form-card {
    background: var(--white);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.form-card-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.form-card-header h2 {
    font-size: 1.35rem;
    color: var(--primary-blue);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-card-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Éléments du Formulaire */
.kbp-test-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-section-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--secondary-blue);
    background: var(--bg-light);
    padding: 8px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

.form-section-title span {
    background: var(--secondary-blue);
    color: var(--white);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group label i {
    color: var(--accent-cyan);
    font-size: 0.85rem;
}

.required {
    color: var(--danger-red);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: var(--font-main);
    color: var(--text-dark);
    background: var(--white);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0, 102, 218, 0.12);
}

.form-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.phone-input-group {
    display: flex;
    gap: 8px;
}

.phone-prefix-select {
    width: 115px;
    flex-shrink: 0;
    background: var(--bg-light);
    font-weight: 600;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.toggle-password-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px;
}

.toggle-password-btn:hover {
    color: var(--primary-blue);
}

/* Validateur de force du mot de passe */
.password-strength-container {
    margin-top: 6px;
}

.strength-bars {
    display: flex;
    gap: 4px;
    height: 4px;
    background: #E2E8F0;
    border-radius: 2px;
    overflow: hidden;
}

.bar-segment {
    flex: 1;
    background: transparent;
    transition: background 0.3s ease;
}

.strength-feedback {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: block;
    margin-top: 3px;
}

.checkbox-group {
    margin-top: 5px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    accent-color: var(--accent-cyan);
    cursor: pointer;
}

.checkbox-label a {
    color: var(--accent-cyan);
    text-decoration: underline;
}

.form-error-msg {
    font-size: 0.75rem;
    color: var(--danger-red);
    display: none;
}

.form-group.error .form-control {
    border-color: var(--danger-red);
}

.form-group.error .form-error-msg {
    display: block;
}

.form-footer-login-link {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 10px;
}

.form-footer-login-link a {
    color: var(--accent-cyan);
    font-weight: 600;
}

/* Zone Clés API Générées */
.api-keys-result-card {
    background: #F0FDF4;
    border: 2px solid #16A34A;
    border-radius: 12px;
    padding: 24px;
    margin-top: 15px;
}

.keys-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
}

.keys-header h3 {
    font-size: 1.15rem;
    color: #166534;
    margin-bottom: 3px;
}

.keys-header p {
    font-size: 0.82rem;
    color: #15803D;
}

.key-field-box {
    margin-bottom: 15px;
}

.key-field-box label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #166534;
    margin-bottom: 5px;
}

.key-input-copy {
    display: flex;
    gap: 8px;
}

.key-input-copy input {
    width: 100%;
    background: var(--white);
    border: 1px solid #86EFAC;
    border-radius: 6px;
    padding: 8px 12px;
    font-family: monospace;
    font-size: 0.82rem;
    color: #14532D;
    outline: none;
}

.btn-copy-key {
    background: #16A34A;
    color: var(--white);
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-copy-key:hover {
    background: #15803D;
}

.keys-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Panneau Publicitaire / Droite */
.test-publicity-board {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pub-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.pub-card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(0, 102, 218, 0.25);
}

.pub-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 12px;
    text-transform: uppercase;
}

.pub-title {
    font-size: 1.15rem;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.pub-text {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 15px;
}

.pub-media-box {
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
}

.rounded-img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Liste des fonctionnalités sandbox */
.feature-list-card h4 {
    font-size: 1.05rem;
    color: var(--primary-blue);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sandbox-features-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sandbox-features-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.feat-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.feat-info strong {
    display: block;
    font-size: 0.88rem;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.feat-info span {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
    display: block;
}

/* Carte Promotionnelle Bénin */
.pricing-promotional-card {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border: 1.5px solid var(--accent-gold);
}

.promo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.promo-flag {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary-blue);
}

.promo-flag img {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
}

.promo-rate {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent-gold);
    font-family: var(--font-heading);
}

.pricing-promotional-card h4 {
    font-size: 1.05rem;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.pricing-promotional-card p {
    font-size: 0.85rem;
    color: #451A03;
    margin-bottom: 15px;
    line-height: 1.5;
}

/* Support direct carte */
.support-direct-card h4 {
    font-size: 1.05rem;
    color: var(--primary-blue);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.support-direct-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.support-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.support-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
}

.support-link.whatsapp-btn {
    background: #F0FDF4;
    color: #16A34A;
    border: 1px solid #BBF7D0;
}
.support-link.whatsapp-btn:hover {
    background: #DCFCE7;
}

.support-link.email-btn {
    background: #EFF6FF;
    color: #2563EB;
    border: 1px solid #BFDBFE;
}
.support-link.email-btn:hover {
    background: #DBEAFE;
}


/* ========================================== */
/* MODALE UNIVERSELLE KIESBIPAY               */
/* ========================================== */
.kiesbi-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(11, 25, 44, 0.75);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

.kiesbi-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.kiesbi-modal-card {
    background: var(--white);
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    padding: 28px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    text-align: left;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.kiesbi-modal-overlay.active .kiesbi-modal-card {
    transform: translateY(0) scale(1);
}

.kiesbi-modal-close {
    position: absolute;
    top: 15px;
    right: 18px;
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

.kiesbi-modal-close:hover {
    color: var(--danger-red);
}

.kiesbi-modal-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 102, 218, 0.12);
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.kiesbi-modal-title {
    font-size: 1.25rem;
    color: var(--primary-blue);
    margin-bottom: 10px;
}

.kiesbi-modal-body {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}

.kiesbi-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

/* ========================================== */
/* PIED DE PAGE INSTITUTIONNEL (FOOTER)      */
/* ========================================== */
.kiesbi-footer {
    background: var(--primary-blue);
    color: var(--white);
    padding-top: 60px;
    font-size: 0.88rem;
}

.footer-top {
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-top-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: flex-start;
}

.footer-logo {
    height: 48px;
    width: auto;
    margin-bottom: 15px;
}

.footer-tagline {
    color: #CBD5E1;
    font-size: 0.88rem;
    margin-bottom: 20px;
    max-width: 480px;
}

.footer-contact-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-contact-link {
    color: #E2E8F0;
    font-size: 0.84rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.footer-contact-link:hover {
    color: var(--accent-cyan);
}

.footer-contact-link.whatsapp-color {
    color: #25D366;
    font-weight: 600;
}

.footer-payments-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
}

.payments-title {
    font-size: 0.8rem;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 15px;
    font-weight: 600;
}

.payments-grid {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.payments-grid img {
    height: 28px;
    width: auto;
    object-fit: contain;
}

.footer-main {
    padding: 50px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer-col-title {
    font-size: 0.95rem;
    color: var(--white);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 8px;
}

.footer-col-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent-gold);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #94A3B8;
    text-decoration: none;
    font-size: 0.84rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    transform: translateX(3px);
}

.footer-links a i {
    font-size: 0.7rem;
    color: var(--accent-cyan);
}

.flags-desc {
    font-size: 0.8rem;
    color: #94A3B8;
    margin-bottom: 10px;
}

.flags-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.flags-grid span {
    font-size: 0.72rem;
    color: #CBD5E1;
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 6px;
    border-radius: 4px;
}

.flags-grid img {
    width: 16px;
    height: 11px;
    object-fit: cover;
    border-radius: 1px;
}

.footer-security-badges {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.sec-badge {
    height: 38px;
    width: auto;
}

.pci-compliance-text {
    font-size: 0.72rem;
    color: #94A3B8;
    line-height: 1.4;
}

.footer-bottom {
    padding: 20px 0;
    background: #07101C;
}

.footer-bottom-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.copyright-text {
    font-size: 0.8rem;
    color: #94A3B8;
}

.footer-legal-links {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: #94A3B8;
}

.footer-legal-links a {
    color: #94A3B8;
}

.footer-legal-links a:hover {
    color: var(--white);
}

.back-to-top-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.back-to-top-btn:hover {
    background: var(--accent-cyan);
    transform: translateY(-3px);
}


/* ========================================== */
/* RESPONSIVE DESIGN POUR TOUTES LES RÉSOLUTIONS */
/* ========================================== */

/* 1. MEDIA QUERY : <= 1200PX (Laptops & Tablettes horizontales) */
@media (max-width: 1200px) {
    :root {
        --container-width: 960px;
    }
    .mega-menu-container {
        grid-template-columns: repeat(3, 1fr);
    }
    .mega-banner { display: none; }
}

/* 2. MEDIA QUERY : <= 992PX (Tablettes en mode portrait) */
@media (max-width: 992px) {
    :root {
        --container-width: 720px;
    }

    /* Activation Menu Mobile */
    .mobile-toggle { display: flex; }
    .nav-menu {
        position: fixed;
        top: 72px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 72px);
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 25px;
        overflow-y: auto;
        transition: left 0.3s ease;
        gap: 15px;
        box-shadow: var(--shadow-lg);
    }
    .nav-menu.active { left: 0; }
    .nav-item { width: 100%; }
    .nav-link { width: 100%; justify-content: space-between; font-size: 1rem; }
    
    /* Mega Menu Accordion Mobile */
    .mega-dropdown-item { position: relative; }
    .mega-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-top: none;
        padding: 10px 0;
        display: none;
    }
    .mega-dropdown-item.active .mega-menu { display: block; }
    .mega-menu-container {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        width: 100%;
        display: none;
        padding-left: 15px;
    }
    .dropdown-item.active .dropdown-menu { display: block; }

    /* Layout Grids Adaptation */
    .test-layout-grid {
        grid-template-columns: 1fr;
    }

    .footer-top-wrapper { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 3. MEDIA QUERY : <= 720PX (Smartphones larges / Phablettes) */
@media (max-width: 720px) {
    :root {
        --container-width: 500px;
    }

    .test-page-title { font-size: 1.85rem; }
    .test-form-card { padding: 22px; }
    .form-row-2 { grid-template-columns: 1fr; }

    .footer-grid { grid-template-columns: 1fr; }
}

/* 4. MEDIA QUERY : <= 520PX (Smartphones Standards) */
@media (max-width: 520px) {
    .test-hero-header { padding: 40px 0 50px; }
    .test-page-title { font-size: 1.6rem; }
    .test-page-desc { font-size: 0.9rem; }

    .test-form-card { padding: 18px 14px; }
    .key-input-copy { flex-direction: column; }
    .keys-actions { flex-direction: column; width: 100%; }
    .keys-actions .btn { width: 100%; }

    .footer-bottom-wrapper {
        flex-direction: column;
        text-align: center;
    }
}

/* 5. MEDIA QUERY : <= 480PX (Petits Smartphones) */
@media (max-width: 480px) {
    .container { padding: 0 15px; }
    .brand-logo { height: 40px; }
    .navbar-actions .btn-outline { display: none; }

    .phone-input-group {
        flex-direction: column;
    }
    .phone-prefix-select {
        width: 100%;
    }
}

/* 6. MEDIA QUERY : <= 360PX (Smartphones très étroits: iPhone SE, Galaxy Fold plié) */
@media (max-width: 360px) {
    html { font-size: 14px; }
    .container { padding: 0 10px; }

    .brand-logo { height: 35px; }
    .test-page-title { font-size: 1.4rem; }
    .test-page-desc { font-size: 0.82rem; }

    .btn { padding: 8px 14px; font-size: 0.85rem; }
    .test-form-card { padding: 15px 10px; }

    .footer-contact-link { font-size: 0.78rem; word-break: break-all; }
}
