/* ========================================
   SYSTÈME DE DESIGN ORIZON - SIMPLIFIÉ
   ======================================== */
:root {
    /* === COULEURS BRAND ORIZON === */
    --brand-primary: #9776dd;
    --brand-dark: #9776dd;
    --brand-light: #af99df;
    --brand-ultra-light: #e6daff;
    --brand-bg: #f8f6fc;

    /* === COULEURS NEUTRES (GRIS) === */
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;

    /* === COULEURS D'ÉTAT === */
    --success: #22c55e;
    --success-light: #dcfce7;
    --error: #ef4444;
    --error-light: #fee2e2;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --info: #3b82f6;
    --info-light: #dbeafe;

    /* === COULEURS UTILITAIRES === */
    --white: #ffffff;
    --primary: #9776dd;  /* Alias de brand-primary */
    --secondary: #6b7280;

    /* === BACKGROUNDS === */
    --bg-white: #ffffff;
    --bg-light: #fafafa;
    --bg-purple-light: #f8f6fc;
    --bg-primary: #9776dd;
    --bg-overlay: rgba(0, 0, 0, 0.5);

    /* === DÉGRADÉS (LIMITÉS) === */
    --gradient-purple: linear-gradient(135deg, #9776dd 0%, #764ba2 100%);
    --gradient-bg: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
    --gradient-success: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);

    /* === ESPACEMENTS (SCALE 4PX) === */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.5rem;    /* 24px */
    --space-6: 2rem;      /* 32px */
    --space-8: 3rem;      /* 48px */
    --space-10: 4rem;     /* 64px */

    /* === BORDURES === */
    --border-width: 1px;
    --border-width-thick: 2px;
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* === OMBRES (SIMPLIFIÉES) === */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);

    /* === TRANSITIONS === */
    --transition: 0.2s ease;
    --transition-slow: 0.3s ease;

    /* === TYPOGRAPHIE === */
    --font-body: Arial, Helvetica, sans-serif;  /* Texte principal */
    --font-heading: 'Raleway', -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;  /* Titres */
    --font-serif: 'Marcellus', Georgia, serif;

    --text-xs: 0.75rem;      /* 12px */
    --text-sm: 0.875rem;     /* 14px */
    --text-base: 1rem;       /* 16px */
    --text-lg: 1.125rem;     /* 18px */
    --text-xl: 1.25rem;      /* 20px */
    --text-2xl: 1.5rem;      /* 24px */
    --text-3xl: 1.875rem;    /* 30px */

    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.75;

    /* Aliases pour compatibilité */
    --line-height-tight: 1.25;
    --line-height-relaxed: 1.75;

    /* === Z-INDEX === */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal: 1050;
    --z-toast: 1080;
}

/* ========================================
   RESET ET BASE MODERNISÉ
   ======================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

/* Fix spécifique pour iOS/Safari - Supprimer les styles par défaut bleus */
button,
input,
select,
textarea,
a {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

/* Empêcher outline bleu sur iOS */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Couleur héritée pour les liens dans les boutons */
button a {
    color: inherit;
    text-decoration: none;
}

/* Supprimer les bordures par défaut des fieldset */
fieldset {
    border: none;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    line-height: var(--leading-normal);
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    background: var(--gradient-bg);
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: var(--leading-normal);
    color: var(--gray-700);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* Fix des liens bleus sur mobile */
a {
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
}

a:link,
a:visited,
a:hover,
a:active {
    overflow-x: hidden;
}

/* Focus management for accessibility */
:focus {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--brand-dark);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Smooth scrolling for reduced motion users */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --brand-primary: #9776dd;
        --success: #008000;
        --error: #cc0000;
        --gray-700: #000000;
    }
}

/* ========================================
   TYPOGRAPHIE - TITRES
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Raleway', Arial, Helvetica, sans-serif;
    font-weight: var(--font-semibold);
    line-height: var(--leading-tight);
    color: var(--gray-900);
}

p {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
}

/* ========================================
   UTILITAIRES GLOBAUX
   ======================================== */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.hidden {
    display: none !important;
}

.invisible {
    visibility: hidden !important;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.95); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translate3d(0, 0, 0); }
    40%, 43% { transform: translate3d(0, -10px, 0); }
    70% { transform: translate3d(0, -5px, 0); }
    90% { transform: translate3d(0, -2px, 0); }
}

.fade-in { animation: fadeIn 0.5s ease-out; }
.slide-in { animation: slideIn 0.3s ease-out; }
.pulse { animation: pulse 2s infinite; }

/* ========================================
   HEADER MODERNISÉ
   ======================================== */
.demande_head {
    z-index: var(--z-sticky);
    background: #ece4ff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--gray-200);
    padding: var(--space-5) var(--space-6);
    display: flex;
    align-items: start;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.logo_part {
    flex-shrink: 0;
}

.logoDemande {
    height: 40px;
    width: auto;
    transition: var(--transition);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.logoDemande:hover {
    transform: scale(1.05);
}

.safe_form {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    background: var(--success);
    padding: var(--space-3) var(--space-4);
    border-radius: 9999px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.safe_form:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.lock {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.safeForm_text {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   BOUTON DE RÉCUPÉRATION
   ======================================== */
.recovery-trigger {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%) translateX(calc(100% - 4px));
    background: #9776dd;
    color: var(--white);
    border: none;
    padding: var(--space-5) var(--space-4);
    border-radius: var(--radius) 0 0 var(--radius);
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: var(--transition);
    z-index: var(--z-fixed);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.recovery-trigger:hover {
    transform: translateY(-50%) translateX(0);
    box-shadow: var(--shadow-xl);
}

.recovery-trigger:focus-visible {
    outline: 2px solid var(--white);
    outline-offset: 2px;
}

.recovery-trigger-icon {
    font-size: var(--text-lg);
    animation: spin 2s linear infinite;
}

.recovery-trigger:hover .recovery-trigger-icon {
    animation-duration: 0.5s;
}

/* ========================================
   BARRE DE PROGRESSION MODERNISÉE
   ======================================== */
.section_progressBar {
    padding: 0 var(--space-6);
    margin-bottom: var(--space-5);
}

.progress-container {
    position: relative;
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 9999px;
    overflow: hidden;
    box-shadow: var(--shadow-inner);
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: #9776dd;
    border-radius: 9999px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}

.progress-bar.active {
    box-shadow: 0 0 20px rgba(151, 118, 221, 0.4);
}

.progress-indicator {
    position: absolute;
    top: -35px;
    right: 0;
    background: #9776dd;
    color: var(--white);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    transform: translateX(50%);
    transition: var(--transition);
    opacity: 0;
    pointer-events: none;
}

.progress-indicator::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #9776dd;
}

.progress-container:hover .progress-indicator {
    opacity: 1;
}

/* ========================================
   NAVIGATION PAR ÉTAPES
   ======================================== */
.form-step-indicator {
    display: flex;
    justify-content: center;
    align-items: start;
    margin-bottom: var(--space-8);
    gap: var(--space-4);
}

.step-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex: 1;
    max-width: 200px;
    position: relative;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    background: var(--gray-200);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
    transition: var(--transition);
    position: relative;
    z-index: 2;
    box-shadow: var(--shadow-sm);
}

.step-title {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--gray-600);
    transition: var(--transition);
}

.step-connector {
    height: 2px;
    background: var(--gray-200);
    flex: 1;
    margin: 0 var(--space-4);
    transition: var(--transition);
    border-radius: 9999px;
}

/* États des étapes */
.step-item.active .step-number {
    background: #9776dd;
    color: var(--white);
    box-shadow: var(--shadow), 0 0 0 4px rgba(151, 118, 221, 0.1);
    transform: scale(1.1);
}

.step-item.active .step-title {
    color: #9776dd;
    font-weight: var(--font-semibold);
}

.step-item.completed .step-number {
    background: var(--success);
    color: var(--white);
    box-shadow: var(--shadow);
}

.step-item.completed .step-number::after {
    content: '✓';
    position: absolute;
    font-size: var(--text-sm);
}

.step-item.completed + .step-item .step-connector {
    background: var(--gradient-success);
}

/* ========================================
   CONTENEUR PRINCIPAL
   ======================================== */
.main-content {
    min-height: calc(100vh - 200px);
}

.demande_form_title {
    background: var(--brand-dark);
    color: white;
    text-align: center;
    padding: var(--space-6) var(--space-4);
    margin: var(--space-6) var(--space-6) 0;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    box-shadow: var(--shadow-md);
}

.demande_form_title h1 {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    font-family: var(--font-serif);
    margin: 0;
    color: white;  /* Force blanc sur fond brand-dark */
}

.demandeForm_container {
    background: var(--bg-white);
    padding: var(--space-6);
    margin: 0 var(--space-6) var(--space-6);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border-top: 3px solid var(--brand-dark);
}

/* ========================================
   SECTION D'INTRODUCTION
   ======================================== */
.first_step_demande {
    background: var(--brand-bg);
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    border: 2px solid var(--brand-ultra-light);
    border-left: 4px solid var(--brand-dark);
    margin-bottom: var(--space-5);
}

.first_step_title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.first_step_title::before {
    font-size: var(--text-2xl);
}

.first_step_text {
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    margin-bottom: var(--space-4);
    color: var(--gray-600);
    line-height: var(--leading-relaxed);
}

.light_text {
    font-weight: var(--font-normal);
    font-style: italic;
    color: var(--gray-500);
}

/* ========================================
   FORMULAIRES ET CHAMPS
   ======================================== */
.form-field {
    position: relative;
    margin-bottom: var(--space-5);
}

.form-legend {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--gray-800);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-2);
    border-bottom: 2px solid var(--gray-200);
}

/* Inputs et selects unifiés */
.form-input,
.form-select {
    width: 100%;
    max-width: 600px;
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    background-color: var(--bg-white);
    color: var(--gray-700);
    transition: var(--transition);
    outline: none;
    box-shadow: var(--shadow-sm);
}

/* Select avec icône dropdown */
.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%239776dd' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 20px 20px;
    padding-right: 48px;
}

/* États hover */
.form-input:hover,
.form-select:hover {
    border-color: var(--brand-light);
}

/* États focus */
.form-input:focus,
.form-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(151, 118, 221, 0.1);
}

.form-input::placeholder {
    color: var(--gray-400);
    font-weight: var(--font-normal);
}

/* États de validation */
.form-input.error,
.form-select.error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px var(--error-light);
}

.form-input.success,
.form-select.success {
    border-color: var(--success);
    box-shadow: 0 0 0 3px var(--success-light);
}

/* Icônes de validation */
.input-validation-icon {
    position: absolute;
    right: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--text-lg);
    z-index: 1;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.input-validation-icon.success {
    color: var(--success);
}

.input-validation-icon.error {
    color: var(--error);
}

.form-input.success ~ .input-validation-icon.success,
.form-select.success ~ .input-validation-icon.success,
.form-input.error ~ .input-validation-icon.error,
.form-select.error ~ .input-validation-icon.error {
    opacity: 1;
}

/* Hints */
.field-hint {
    font-size: var(--text-sm);
    color: var(--gray-500);
    margin-top: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--brand-primary);
}

/* ========================================
   MESSAGES D'ERREUR
   ======================================== */
.error-message {
    color: var(--error);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    margin-top: var(--space-2);
    display: none;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--error-light);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--error);
}

.error-message.show {
    display: flex;
}

.error-message::before {
    content: '⚠️';
    font-size: var(--text-base);
    flex-shrink: 0;
}

/* ========================================
   BOUTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    border: 2px solid transparent;
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    min-height: 44px;
    user-select: none;
    background: transparent;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Bouton principal */
.btn-primary {
    background: #50358C;
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
    background: var(--brand-dark);
    box-shadow: var(--shadow-md);
}

.btn-primary:active:not(:disabled) {
    background: var(--brand-dark);
    box-shadow: var(--shadow-sm);
}

/* Bouton secondaire */
.btn-secondary {
    background: white;
    color: black;
    border-color: black;
}

.btn-secondary:hover:not(:disabled) {
    background: #9776dd;
    color: white;
    border: none;
}

/* Bouton success */
.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #16a34a;
}

/* Bouton error */
.btn-error {
    background: var(--error);
    color: white;
}

.btn-error:hover:not(:disabled) {
    background: #dc2626;
}

/* État de chargement */
.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Effet ripple */
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 9999px;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active:not(:disabled)::before {
    width: 300px;
    height: 300px;
}

/* Conteneur des actions */
.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-top: var(--space-8);
    max-width: 600px;
}

/* ========================================
   TABLEAUX DE RÉSULTATS
   ======================================== */
.simulation_results {
    margin-top: var(--space-6);
    padding: var(--space-6);
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    border: 2px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.5s ease-out;
}

/* Header avec titre et bouton refaire simulation */
.simulation-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-5);
    gap: var(--space-4);
    flex-wrap: wrap;
}

.type_credit_result {
    font-size: var(--text-xl);
    font-weight: var(--font-medium);
    margin-bottom: 0;
    color: var(--gray-700);
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* Bouton Refaire une simulation */
.btn-refaire-simulation {
    background: linear-gradient(135deg, #9776dd, #7a5dc7);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
}

.btn-refaire-simulation:hover {
    background: linear-gradient(135deg, #3d2a6b, #9776dd);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-refaire-simulation:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-refaire-simulation span {
    font-size: 18px;
}

.type_color {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: #9776dd;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #9776dd, var(--brand-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: inline-block;
    max-width: 100%;
}

.tableau_details,
.tableau_amortissement {
    margin-top: var(--space-5);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.details_table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-base);
}

.tableau_title {
    background: var(--brand-dark);
    color: white;
    padding: var(--space-4) var(--space-5);
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    text-align: center;
}

.tableau_title h2,
.tableau_title h3,
.tableau_title * {
    color: white;  /* Force tout le texte en blanc sur fond brand-dark */
}

.tableau_title_amortissement {
    background: var(--brand-primary);
    color: white;
    padding: var(--space-4) var(--space-5);
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    text-align: center;
}

.tableau_title_amortissement h2,
.tableau_title_amortissement h3,
.tableau_title_amortissement * {
    color: white;  /* Force tout le texte en blanc sur fond brand-primary */
}

.tableau_sub {
    background: var(--brand-ultra-light);
    color: var(--brand-dark);
}

.tableau_sub_amortissement {
    background: var(--brand-bg);
    color: var(--brand-dark);
}

.tableau_sub th {
    padding: var(--space-3) var(--space-4);
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
    border-bottom: 1px solid var(--gray-200);
}

.tableau_data,
.tableau_data_amortissement {
    background: white;
}

.tableau_data td,
.tableau_data_amortissement td {
    padding: var(--space-4);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--gray-800);
    text-align: center;
    border-bottom: 1px solid var(--gray-100);
}

.devise,
.mois {
    font-size: var(--text-sm);
    font-weight: var(--font-normal);
    color: var(--gray-500);
}

/* ========================================
   SYSTÈME DE CARTES POUR RÉSULTATS (MODERNE)
   ======================================== */
.simulation-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-5);
    margin-top: var(--space-5);
}

.simulation-card {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.simulation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--brand-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.simulation-card:hover {
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.simulation-card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--brand-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-2xl);
    margin-bottom: var(--space-3);
    transition: all var(--transition);
}

.simulation-card:hover .card-icon {
    background: var(--brand-primary);
    transform: scale(1.1);
}

.card-label {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-2);
}

.card-value {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--brand-dark);
    font-family: var(--font-heading);
}

.card-unit {
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    color: var(--gray-500);
    margin-left: var(--space-1);
}

/* Section titre pour les cartes */
.cards-section {
    margin-top: var(--space-6);
}

.cards-section-title {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--brand-dark);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 2px solid var(--brand-primary);
    display: inline-block;
}

/* Responsive mobile */
@media (max-width: 768px) {
    .simulation-cards {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .simulation-card {
        padding: var(--space-4);
    }

    .card-icon {
        width: 48px;
        height: 48px;
        font-size: var(--text-xl);
    }

    .card-value {
        font-size: var(--text-xl);
    }
}

@media (max-width: 480px) {
    .card-value {
        font-size: var(--text-lg);
    }

    .card-label {
        font-size: var(--text-xs);
    }
}

/* ========================================
   SYSTÈME DE NOTIFICATIONS TOAST
   ======================================== */
.toast {
    position: fixed;
    top: var(--space-5);
    right: var(--space-5);
    min-width: 300px;
    max-width: 500px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2xl);
    border-left: 4px solid #9776dd;
    z-index: var(--z-toast);
    transform: translateX(calc(100% + var(--space-5)));
    transition: var(--transition);
    opacity: 0;
    backdrop-filter: blur(10px);
}

.toast.toast-show {
    transform: translateX(0);
    opacity: 1;
}

.toast-content {
    display: flex;
    align-items: center;
    padding: var(--space-4) var(--space-5);
    gap: var(--space-4);
}

.toast-icon {
    font-size: var(--text-lg);
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    color: var(--gray-700);
    font-weight: var(--font-medium);
    line-height: var(--line-height-tight);
}

.toast-close {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    background: none;
    border: none;
    font-size: var(--text-lg);
    color: var(--gray-400);
    cursor: pointer;
    padding: var(--space-1);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.toast-close:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

/* Types de toast */
.toast-success {
    border-left-color: var(--success);
}

.toast-success .toast-icon {
    color: var(--success);
}

.toast-error {
    border-left-color: var(--error);
}

.toast-error .toast-icon {
    color: var(--error);
}

.toast-warning {
    border-left-color: var(--warning);
}

.toast-warning .toast-icon {
    color: var(--warning);
}

.toast-info {
    border-left-color: var(--info);
}

.toast-info .toast-icon {
    color: var(--info);
}

/* ========================================
   MODAL DE RÉCUPÉRATION
   ======================================== */
.recovery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.recovery-modal.show {
    opacity: 1;
    visibility: visible;
}

.recovery-modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-2xl);
    transform: scale(0.9);
    transition: var(--transition);
}

.recovery-modal.show .recovery-modal-content {
    transform: scale(1);
}

.recovery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-6) var(--space-6) var(--space-5);
    border-bottom: 2px solid var(--gray-200);
}

.recovery-header h3 {
    margin: 0;
    color: var(--gray-800);
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
}

.recovery-close {
    background: none;
    border: none;
    font-size: var(--text-2xl);
    color: var(--gray-400);
    cursor: pointer;
    padding: var(--space-3);
    border-radius: var(--radius);
    transition: var(--transition);
    line-height: 1;
}

.recovery-close:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

.recovery-body {
    padding: var(--space-6);
}

.recovery-description {
    color: var(--gray-600);
    margin-bottom: var(--space-5);
    line-height: var(--line-height-relaxed);
}

.recovery-actions {
    display: flex;
    gap: var(--space-4);
    margin-top: var(--space-5);
}

.recovery-actions .btn {
    flex: 1;
}

.recovery-results,
.recovery-not-found,
.recovery-exists {
    margin-top: var(--space-5);
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    border: 2px solid var(--gray-200);
}

.recovery-found {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.recovery-icon {
    font-size: var(--text-2xl);
    flex-shrink: 0;
}

.recovery-details h4 {
    margin: 0 0 var(--space-3) 0;
    color: var(--gray-800);
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
}

.recovery-details p {
    margin: 0 0 var(--space-4) 0;
    color: var(--gray-600);
    font-size: var(--text-sm);
}

.recovery-progress {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.recovery-progress-bar {
    flex: 1;
    height: 8px;
    background: var(--gray-200);
    border-radius: 9999px;
    overflow: hidden;
}

.recovery-progress-fill {
    height: 100%;
    background: #9776dd;
    border-radius: 9999px;
    transition: width 0.8s ease;
    width: 0%;
}

.recovery-progress span {
    font-size: var(--text-xs);
    color: var(--gray-500);
    font-weight: var(--font-semibold);
    white-space: nowrap;
}

/* États spéciaux */
.recovery-found {
    background: var(--success-light);
    border-color: rgba(16, 185, 129, 0.2);
}

.recovery-not-found {
    background: var(--error-light);
    border-color: rgba(239, 68, 68, 0.2);
}

.recovery-exists {
    background: var(--info-light);
    border-color: rgba(59, 130, 246, 0.2);
}

/* ========================================
   SPINNER DE CHARGEMENT MODERNISÉ
   ======================================== */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: var(--z-modal);
    gap: var(--space-5);
}

.spinner {
    width: 80px;
    height: 80px;
    border: 6px solid var(--gray-200);
    border-left: 6px solid #9776dd;
    border-radius: 9999px;
    animation: spin 1s linear infinite;
}

.spinner-text {
    font-size: var(--text-lg);
    color: var(--gray-600);
    font-weight: var(--font-medium);
    text-align: center;
}

.spinner-progress {
    width: 200px;
    height: 4px;
    background: var(--gray-200);
    border-radius: 9999px;
    overflow: hidden;
}

.spinner-progress-bar {
    height: 100%;
    background: #9776dd;
    border-radius: 9999px;
    animation: progress 3s ease-in-out;
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* ========================================
   MESSAGE DE SUCCÈS
   ======================================== */
.successMessage {
    margin-top: var(--space-6);
    padding: 10px;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

.success-header {
    margin-bottom: var(--space-6);
}

.success-header h2 {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--success);
    margin-bottom: var(--space-3);
}

.success-header p {
    font-size: var(--text-lg);
    color: var(--gray-600);
}

.formualiresSoumis {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    background: var(--success-light);
    border-radius: var(--radius);
    margin-bottom: var(--space-4);
    border-left: 4px solid var(--success);
}

.formStepOne {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.formValidateText {
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    color: var(--gray-700);
    text-align: left;
}

.logColor {
    color: #9776dd;
    font-weight: var(--font-bold);
}

.logColor a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: #9776dd;
    text-underline-offset: 2px;
    transition: var(--transition);
}

.logColor a:hover {
    text-decoration-thickness: 2px;
}

/* ========================================
   SECTION RÉPONSE IMMÉDIATE
   ======================================== */
.reponse_immediate {
    margin-top: var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    background: var(--secondary);
    border-radius: var(--radius);
    color: var(--white);
    box-shadow: var(--shadow-md);
    animation: pulse 3s infinite;
}

.clock {
    width: 35px;
    height: 35px;
    filter: brightness(0) invert(1);
    flex-shrink: 0;
}

.reponse_text {
    flex: 1;
}

.reponse_text_one {
    font-weight: var(--font-semibold);
    font-size: var(--text-base);
    margin-bottom: var(--space-1);
    line-height: var(--line-height-tight);
}

.reponse_text_one + .reponse_text_one {
    font-size: var(--text-sm);
    font-weight: var(--font-normal);
    opacity: 0.9;
    margin-bottom: 0;
}

/* ========================================
   FOOTER MODERNISÉ
   ======================================== */
.demande_footer {
    margin-top: var(--space-10);
    padding: var(--space-8);
    background: black;
    color: var(--white);
}

.logo_footer {
    margin-bottom: var(--space-6);
}

.footLogo {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
}

.demande_footer_text {
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--text-sm);
    line-height: var(--line-height-relaxed);
}

.demande_footer_text p {
    margin-bottom: var(--space-4);
}

.demande_footer_text p:last-child {
    margin-bottom: 0;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}

/* Fix pour les boutons et liens sur iOS/Safari */
button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* Empêcher la couleur bleue par défaut sur iOS */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Style spécifique pour les liens dans les boutons (couleur héritée) */
button a {
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

/* ========================================
   DESIGN RESPONSIVE MODERNE
   ======================================== */
@media (max-width: 768px) {
    .demande_head {
        padding: var(--space-4) var(--space-5);
        flex-direction: column;
        gap: var(--space-4);
        position: relative;
    }

    .safe_form {
        width: 100%;
        justify-content: center;
    }

    .recovery-trigger {
        position: static;
        transform: none;
        width: 100%;
        writing-mode: initial;
        text-orientation: initial;
        border-radius: var(--radius);
        margin-bottom: var(--space-5);
        padding: var(--space-4);
    }

    .section_progressBar,
    .demande_form_title,
    .demandeForm_container {
        margin-inline: var(--space-4);
    }

    .demandeForm_container {
        padding: var(--space-5);
    }

    .first_step_demande {
        padding: var(--space-5);
        margin-top: var(--space-5);
    }

    .demande_form_title h1 {
        font-size: var(--text-xl);
    }

    .form-input,
    .form-select {
        max-width: 100%;
        font-size: var(--text-base);  /* 16px pour éviter le zoom iOS */
    }

    .form-actions {
        flex-direction: column;
        gap: var(--space-4);
    }

    .btn {
        width: 100%;
        min-height: 52px;
    }

    .form-step-indicator {
        flex-direction: column;
    }

    .step-connector {
        display: none;
    }

    .step-item {
        max-width: none;
        justify-content: center;
    }

    .tableau_data td,
    .tableau_data_amortissement td {
        font-size: var(--text-sm);
        padding: var(--space-3);
    }

    .demande_footer {
        padding: var(--space-6) var(--space-5);
    }

    .simulation_results {
        padding: var(--space-4);
    }

    .simulation-header-actions {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-4);
    }

    .type_credit_result {
        text-align: center;
        font-size: var(--text-base);
        width: 100%;
        flex: none;
    }

    .btn-refaire-simulation {
        width: 100%;
        justify-content: center;
        padding: var(--space-3) var(--space-5);
    }

    /* Conteneur avec overflow horizontal pour les tableaux sur mobile */
    .tableau_details,
    .tableau_amortissement {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-top: var(--space-4);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-md);
        position: relative;
    }

    /* Amélioration visuelle du tableau mobile */
    .details_table {
        min-width: 500px;
        font-size: var(--text-sm);  /* 14px minimum */
    }

    .tableau_title,
    .tableau_title_amortissement {
        padding: var(--space-4);
        font-size: var(--text-base);
        position: sticky;
        left: 0;
        z-index: 1;
    }

    .tableau_sub th,
    .tableau_sub_amortissement th {
        padding: var(--space-3) var(--space-4);
        font-size: var(--text-xs);  /* 12px */
        white-space: nowrap;
    }

    .tableau_data td,
    .tableau_data_amortissement td {
        padding: var(--space-4);
        font-size: var(--text-sm);  /* 14px */
        white-space: nowrap;
    }

    /* Indicateur visuel de scroll */
    .tableau_details::after,
    .tableau_amortissement::after {
        content: '→';
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 20px;
        color: rgba(80, 53, 140, 0.3);
        pointer-events: none;
        animation: slideHint 1.5s ease-in-out infinite;
    }

    @keyframes slideHint {
        0%, 100% { opacity: 0.3; transform: translateY(-50%) translateX(0); }
        50% { opacity: 0.8; transform: translateY(-50%) translateX(5px); }
    }

    .toast {
        left: var(--space-4);
        right: var(--space-4);
        min-width: auto;
        transform: translateY(-100%);
    }

    .toast.toast-show {
        transform: translateY(0);
    }

    .recovery-modal-content {
        width: 95%;
        margin: var(--space-5);
    }

    .recovery-actions {
        flex-direction: column;
    }

    .recovery-progress {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-3);
    }
}

@media (max-width: 480px) {
    .demande_form_title h1 {
        font-size: var(--text-lg);
    }

    .first_step_title {
        font-size: var(--text-lg);
    }

    .form-input,
    .form-select {
        padding: var(--space-3) var(--space-4);
        font-size: var(--text-base);  /* 16px pour éviter le zoom iOS */
    }

    .field-hint {
        font-size: var(--text-xs);  /* 12px minimum pour lisibilité */
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: var(--text-xs);
    }

    .step-title {
        font-size: var(--text-xs);
    }

    /* Tableaux encore plus compacts sur très petits écrans */
    .details_table {
        min-width: 450px;
        font-size: var(--text-xs);  /* 12px */
    }

    .tableau_title,
    .tableau_title_amortissement {
        padding: var(--space-3);
        font-size: var(--text-sm);
    }

    .tableau_sub th,
    .tableau_sub_amortissement th {
        padding: var(--space-2) var(--space-3);
        font-size: 11px;  /* Compromis entre lisibilité et espace */
    }

    .tableau_data td,
    .tableau_data_amortissement td {
        padding: var(--space-3);
        font-size: var(--text-xs);  /* 12px */
    }

    .type_credit_result {
        font-size: var(--text-sm);
    }

    .type_color {
        font-size: var(--text-base);
        letter-spacing: 0.5px;
    }
}

/* ========================================
   OPTIMISATIONS POUR LES PERFORMANCES
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Optimisation GPU */
.btn,
.form-input,
.form-select,
.progress-bar,
.toast,
.recovery-modal-content {
    will-change: transform;
    transform: translateZ(0);
}

/* Print styles */
@media print {
    .recovery-trigger,
    .toast {
        display: none !important;
    }

    .demandeForm_container {
        box-shadow: none;
        border: 2px solid var(--gray-300);
    }
}

/* ========================================
   ADAPTATION POUR LA NAVBAR
   ======================================== */

/* Forcer l'affichage de la navbar desktop sur la page demande */
.header_fixed_sticky {
    position: fixed !important;
    top: 0 !important;
    visibility: visible !important;
}

/* Ajuster le padding du body pour la navbar sticky */
body {
    padding-top: 70px; /* Hauteur de la navbar sticky */
}

/* Style pour le lien actif dans la navbar */
.sticky_nav_item.active a {
    color: white;
    font-weight: var(--font-semibold);
}



/* ===== RESPONSIVE MOBILE ===== */
@media (max-width: 991px) {
    /* Masquer la navbar desktop sur mobile */
    .header_fixed {
        display: none !important;
    }

    /* Afficher le header mobile */
    .mobile_header_display {
        visibility: visible !important;
    }

    /* Réduire le padding du body */
    body {
        padding-top: 70px; /* Hauteur du header mobile */
    }

    /* Réduire le z-index du demande_head pour qu'il passe sous le menu mobile */
    .demande_head {
        z-index: 1 !important;
        position: relative !important;
    }

    /* S'assurer que le menu mobile et son panneau ont le bon z-index */
    .mobile_header {
        z-index: 100 !important;
    }

    .navigation-panel {
        z-index: 99 !important;
    }
}

/* Sur desktop, masquer le header mobile */
@media (min-width: 992px) {
    .mobile_header {
        display: none !important;
    }
}

@import url('modern_styles.css');

/* ========================================
   FIXES COULEURS POUR SAFARI iOS
   Force les couleurs pour empêcher le bleu par défaut sur iOS
   ======================================== */
@supports (-webkit-touch-callout: none) {
    /* Reset général pour les liens et boutons */
    a, button {
        -webkit-text-fill-color: inherit !important;
        color: inherit !important;
    }

    /* ========== BOUTONS VIOLETS (texte blanc) ========== */
    .btn-primary, .btn-primary a, .btn-primary span,
    .btn-success, .btn-success a, .btn-success span,
    .btn-refaire-simulation, .btn-refaire-simulation a, .btn-refaire-simulation span,
    .recovery-trigger, .recovery-trigger a,
    .safe_form, .safe_form a,
    .safeForm_text,
    .demande_form_title, .demande_form_title h1, .demande_form_title *,
    .tableau_title, .tableau_title h2, .tableau_title h3, .tableau_title *,
    .tableau_title_amortissement, .tableau_title_amortissement h2, .tableau_title_amortissement h3, .tableau_title_amortissement *,
    .reponse_immediate, .reponse_immediate a, .reponse_immediate *,
    .reponse_text, .reponse_text *,
    .demande_footer, .demande_footer a, .demande_footer *,
    .demande_footer_text, .demande_footer_text a, .demande_footer_text p {
        -webkit-text-fill-color: #ffffff !important;
        color: #ffffff !important;
    }

    /* ========== BOUTONS SECONDAIRES (texte noir/couleur spécifique) ========== */
    .btn-secondary, .btn-secondary a, .btn-secondary span {
        -webkit-text-fill-color: #000000 !important;
        color: #000000 !important;
    }

    .btn-secondary:hover, .btn-secondary:hover a, .btn-secondary:hover span {
        -webkit-text-fill-color: #ffffff !important;
        color: #ffffff !important;
    }

    /* ========== BOUTON D'ERREUR (texte blanc) ========== */
    .btn-error, .btn-error a, .btn-error span {
        -webkit-text-fill-color: #ffffff !important;
        color: #ffffff !important;
    }

    /* ========== LIENS DE COULEUR VIOLETTE ========== */
    .logColor, .logColor a {
        -webkit-text-fill-color: #9776dd !important;
        color: #9776dd !important;
    }

    /* ========== ÉTAPES ACTIVES (texte violet) ========== */
    .step-item.active .step-number,
    .step-item.active .step-number * {
        -webkit-text-fill-color: #ffffff !important;
        color: #ffffff !important;
    }

    .step-item.active .step-title,
    .step-item.active .step-title * {
        -webkit-text-fill-color: #9776dd !important;
        color: #9776dd !important;
    }

    .step-item.completed .step-number,
    .step-item.completed .step-number * {
        -webkit-text-fill-color: #ffffff !important;
        color: #ffffff !important;
    }

    /* ========== GRADIENT TEXT (violet) ========== */
    .type_color {
        -webkit-text-fill-color: transparent !important;
        background: linear-gradient(135deg, #9776dd, #9776dd) !important;
        -webkit-background-clip: text !important;
        background-clip: text !important;
    }

    /* ========== MESSAGES DE SUCCÈS ========== */
    .success-header h2, .success-header h2 * {
        -webkit-text-fill-color: #22c55e !important;
        color: #22c55e !important;
    }

    /* ========== ICÔNES ET SVG EN BLANC ========== */
    .lock, .lock svg, .lock path,
    .clock, .clock svg, .clock path,
    .footLogo, .footLogo svg, .footLogo path,
    .formStepOne, .formStepOne svg, .formStepOne path,
    .icon-white, .icon-white svg, .icon-white path {
        fill: #ffffff !important;
        stroke: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
        color: #ffffff !important;
    }

    /* ========== PROGRESS BAR ========== */
    .progress-bar {
        background: #9776dd !important;
    }

    .progress-indicator {
        background: #9776dd !important;
        -webkit-text-fill-color: #ffffff !important;
        color: #ffffff !important;
    }

    .progress-indicator::after {
        border-top-color: #9776dd !important;
    }

    .recovery-progress-fill {
        background: #9776dd !important;
    }

    /* ========== SPINNER ========== */
    .spinner {
        border-left-color: #9776dd !important;
    }

    .spinner-progress-bar {
        background: #9776dd !important;
    }

    /* ========== TOAST NOTIFICATIONS ========== */
    .toast {
        border-left-color: #9776dd !important;
    }

    .toast-success {
        border-left-color: #22c55e !important;
    }

    .toast-success .toast-icon {
        -webkit-text-fill-color: #22c55e !important;
        color: #22c55e !important;
    }

    .toast-error {
        border-left-color: #ef4444 !important;
    }

    .toast-error .toast-icon {
        -webkit-text-fill-color: #ef4444 !important;
        color: #ef4444 !important;
    }

    .toast-warning {
        border-left-color: #f59e0b !important;
    }

    .toast-warning .toast-icon {
        -webkit-text-fill-color: #f59e0b !important;
        color: #f59e0b !important;
    }

    .toast-info {
        border-left-color: #3b82f6 !important;
    }

    .toast-info .toast-icon {
        -webkit-text-fill-color: #3b82f6 !important;
        color: #3b82f6 !important;
    }

    /* ========== CARD VALUES (violet) ========== */
    .card-value {
        -webkit-text-fill-color: #9776dd !important;
        color: #9776dd !important;
    }

    /* ========== MESSAGES D'ERREUR ========== */
    .error-message {
        -webkit-text-fill-color: #ef4444 !important;
        color: #ef4444 !important;
    }

    /* ========== VALIDATION ICONS ========== */
    .input-validation-icon.success {
        -webkit-text-fill-color: #22c55e !important;
        color: #22c55e !important;
    }

    .input-validation-icon.error {
        -webkit-text-fill-color: #ef4444 !important;
        color: #ef4444 !important;
    }

    /* ========== RECOVERY MODAL ========== */
    .recovery-icon {
        fill: #9776dd !important;
        stroke: #9776dd !important;
    }

    /* ========== NAVIGATION LINKS (si présents) ========== */
    .nav-link, .nav-link a {
        -webkit-text-fill-color: inherit !important;
        color: inherit !important;
    }

    .nav-link.active, .nav-link.active a {
        -webkit-text-fill-color: #9776dd !important;
        color: #9776dd !important;
    }
}

/* ========================================
   VALIDATION DES FORMULAIRES
   ======================================== */

/* Champ en erreur - bordure rouge animée */
.input-error {
    border: 2px solid var(--error) !important;
    background-color: var(--error-light) !important;
    animation: shake 0.4s ease-in-out;
}

/* Animation de secousse pour attirer l'attention */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Focus sur un champ en erreur - changement de couleur */
.input-error:focus {
    border-color: var(--error) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
    outline: none;
}

/* Toast de notification amélioré */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    padding: 16px 24px;
    border-radius: var(--radius);
    color: white;
    font-weight: var(--font-medium);
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease-out;
    min-width: 300px;
    max-width: 500px;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-success {
    background: var(--success);
}

.toast-error {
    background: var(--error);
}

/* Style pour les labels des champs requis */
label[for] {
    position: relative;
}

/* Indicateur visuel pour les champs obligatoires */
input[required] + label::after,
select[required] + label::after,
textarea[required] + label::after {
    content: " *";
    color: var(--error);
    font-weight: var(--font-bold);
}

/* Message d'erreur sous les champs */
.field-error-message {
    display: block;
    color: var(--error);
    font-size: var(--text-sm);
    margin-top: var(--space-1);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}