/* ===== CHARTE GRAPHIQUE PREMIUM ODYS'INVEST ===== */
:root {
  /* Couleurs institutionnelles premium */
  --primary-color: #1e3a8a; /* Bleu institutionnel profond */
  --primary-light: #3b82f6; /* Bleu clair pour les accents */
  --primary-dark: #1e40af; /* Bleu foncé pour les hover */
  --primary-ultra-dark: #1e293b; /* Bleu très foncé pour les headers */
  
  /* Couleurs d'accent premium */
  --accent-gold: #d97706; /* Or discret pour les éléments importants */
  --accent-gold-light: #f59e0b; /* Or clair pour les hover */
  --accent-gold-dark: #b45309; /* Or foncé pour les actifs */
  
  /* Couleurs de succès et d'alerte */
  --success-color: #16a34a; /* Vert premium */
  --success-light: #22c55e; 
  --warning-color: #ea580c; /* Orange premium */
  --danger-color: #dc2626; /* Rouge premium */
  
  /* Couleurs neutres raffinées */
  --text-primary: #1e293b; /* Charbon premium */
  --text-secondary: #475569; /* Gris ardoise */
  --text-light: #64748b; /* Gris clair */
  --text-muted: #94a3b8; /* Gris très clair */
  
  /* Backgrounds premium */
  --bg-primary: #ffffff; /* Blanc pur */
  --bg-secondary: #f8fafc; /* Gris ultra-clair */
  --bg-accent: #f1f5f9; /* Gris neutre */
  --bg-dark: #0f172a; /* Charbon foncé */
  
  /* Bordures et séparateurs */
  --border-color: #e2e8f0; /* Gris clair premium */
  --border-light: #f1f5f9; /* Bordure ultra-claire */
  --divider: #cbd5e1; /* Séparateur discret */
  
  /* Ombres premium stratifiées */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* Coins arrondis premium */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Transitions fluides */
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Espacements premium */
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  --spacing-3xl: 6rem;
}

/* ===== RESET & BASE PREMIUM ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-secondary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ===== HIÉRARCHIE TYPOGRAPHIQUE PREMIUM ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
  letter-spacing: -0.025em;
}

h1 {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

h2 {
  font-size: 2.25rem;
  font-weight: 700;
}

h3 {
  font-size: 1.875rem;
  font-weight: 600;
}

h4 {
  font-size: 1.5rem;
  font-weight: 600;
}

h5 {
  font-size: 1.25rem;
  font-weight: 600;
}

h6 {
  font-size: 1.125rem;
  font-weight: 600;
}

p {
  margin-bottom: var(--spacing-md);
  line-height: 1.7;
  color: var(--text-secondary);
}

.lead {
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--text-light);
  line-height: 1.8;
}

.small-text {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.large-text {
  font-size: 1.25rem;
  font-weight: 500;
}

/* ===== CONTENEUR PRINCIPAL PREMIUM ===== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.container-narrow {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.container-wide {
  max-width: 1536px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

/* ===== HEADER PREMIUM ===== */
.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md) 0;
  min-height: 80px;
}

.logo {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary-color);
  text-decoration: none;
  letter-spacing: -0.025em;
  transition: var(--transition-fast);
}

.logo:hover {
  color: var(--primary-light);
  transform: scale(1.02);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--spacing-xl);
  align-items: center;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gold);
  transition: var(--transition-fast);
}

.nav-link:hover {
  color: var(--primary-color);
  background: rgba(30, 58, 138, 0.05);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--primary-color);
  font-weight: 600;
}

.nav-link.active::after {
  width: 100%;
}

/* ===== HERO SECTION PREMIUM ===== */
.hero {
  background: linear-gradient(135deg, var(--primary-ultra-dark) 0%, var(--primary-color) 50%, var(--primary-light) 100%);
  color: white;
  text-align: center;
  padding: var(--spacing-3xl) 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.03)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.02)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grain)"/></svg>');
  opacity: 0.4;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: var(--spacing-lg);
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.98);
  text-shadow: 
    0 0 20px rgba(255, 255, 255, 0.6),
    0 0 40px rgba(255, 255, 255, 0.4),
    0 0 60px rgba(255, 255, 255, 0.2),
    0 2px 4px rgba(0, 0, 0, 0.3);
  animation: titleShine 3s ease-in-out infinite alternate;
  position: relative;
}

@keyframes titleShine {
  0% {
    text-shadow: 
      0 0 20px rgba(255, 255, 255, 0.6),
      0 0 40px rgba(255, 255, 255, 0.4),
      0 0 60px rgba(255, 255, 255, 0.2),
      0 2px 4px rgba(0, 0, 0, 0.3);
  }
  50% {
    text-shadow: 
      0 0 30px rgba(255, 255, 255, 0.8),
      0 0 50px rgba(255, 255, 255, 0.6),
      0 0 80px rgba(255, 255, 255, 0.4),
      0 0 100px rgba(59, 130, 246, 0.3),
      0 2px 4px rgba(0, 0, 0, 0.3);
  }
  100% {
    text-shadow: 
      0 0 40px rgba(255, 255, 255, 0.9),
      0 0 60px rgba(255, 255, 255, 0.7),
      0 0 100px rgba(255, 255, 255, 0.5),
      0 0 120px rgba(59, 130, 246, 0.4),
      0 2px 4px rgba(0, 0, 0, 0.3);
  }
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.95;
  max-width: 680px;
  margin: 0 auto var(--spacing-xl);
  color: rgba(255, 255, 255, 0.95);
  font-weight: 400;
  line-height: 1.7;
}

.hero-badge {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-xl);
  display: inline-block;
  margin-bottom: var(--spacing-lg);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== MODULES GRID PREMIUM ===== */
.modules-section {
  padding: var(--spacing-3xl) 0;
  background: var(--bg-primary);
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-3xl);
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--spacing-xl);
  margin-top: var(--spacing-3xl);
}

.module-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-align: center;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.module-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-gold));
  transform: scaleX(0);
  transition: var(--transition);
}

.module-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.module-card:hover::before {
  transform: scaleX(1);
}

.module-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--spacing-lg);
  font-size: 2rem;
  color: white;
  box-shadow: var(--shadow-md);
  position: relative;
}

.module-icon::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
  border-radius: calc(var(--radius-lg) - 2px);
  pointer-events: none;
}

.module-card h3 {
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: var(--spacing);
  color: var(--text-primary);
}

.module-card p {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
  line-height: 1.6;
}

/* ===== BOUTONS PREMIUM ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-md);
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
  min-height: 44px;
  white-space: nowrap;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: var(--transition);
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background: var(--bg-accent);
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-accent:hover {
  background: linear-gradient(135deg, var(--accent-gold-dark), var(--accent-gold));
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-success {
  background: linear-gradient(135deg, var(--success-color), var(--success-light));
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-success:hover {
  background: linear-gradient(135deg, #15803d, var(--success-color));
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning-color), #f97316);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-warning:hover {
  background: linear-gradient(135deg, #c2410c, var(--warning-color));
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-large {
  padding: var(--spacing) var(--spacing-lg);
  font-size: 1.125rem;
  min-height: 56px;
}

.btn-small {
  padding: var(--spacing-xs) var(--spacing-sm);
  font-size: 0.875rem;
  min-height: 36px;
}

.btn-full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn:disabled::before {
  display: none;
}

/* ===== PROGRESS BAR PREMIUM ===== */
.progress-container {
  background: var(--bg-primary);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xs);
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
  position: relative;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
  z-index: 2;
}

.progress-step::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 60%;
  width: 80%;
  height: 3px;
  background: var(--border-color);
  border-radius: var(--radius-sm);
  z-index: 1;
  transition: var(--transition);
}

.progress-step:last-child::after {
  display: none;
}

.progress-step.active::after {
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
}

.progress-step.completed::after {
  background: linear-gradient(90deg, var(--success-color), var(--success-light));
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-accent);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: var(--spacing-sm);
  position: relative;
  z-index: 3;
  border: 3px solid var(--border-color);
  transition: var(--transition);
}

.progress-step.active .step-number {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
  border-color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.progress-step.completed .step-number {
  background: linear-gradient(135deg, var(--success-color), var(--success-light));
  color: white;
  border-color: var(--success-color);
}

.step-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-align: center;
  font-weight: 500;
  max-width: 120px;
}

.progress-step.active .step-label {
  color: var(--primary-color);
  font-weight: 600;
}

.progress-step.completed .step-label {
  color: var(--success-color);
  font-weight: 600;
}

.progress-bar {
  height: 12px;
  background: var(--bg-accent);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light), var(--accent-gold));
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ===== FORMS PREMIUM ===== */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 600;
  color: #ffffff;
  font-size: 0.95rem;
  background: #334155;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing);
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition-fast);
  background: var(--bg-primary);
  color: var(--text-primary);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.1);
  background: white;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  border-color: var(--primary-light);
}

/* Amélioration de la lisibilité des options dans tous les select */
.form-select {
  background: white !important;
  color: #1e293b !important;
  font-weight: 500;
}

.form-select option {
  background: white !important;
  color: #1e293b !important;
  padding: 10px 12px;
  font-size: 1rem;
  font-weight: 500;
  border: none;
}

.form-select option:hover,
.form-select option:focus {
  background: #f1f5f9 !important;
  color: #1e293b !important;
}

.form-select option:checked,
.form-select option:selected {
  background: var(--primary-color) !important;
  color: white !important;
  font-weight: 600;
}

/* ===== STYLES ÉTAPE 4 - FORÇAGE COMPLET APERÇU ===== */

/* Labels des 5 champs - FORCE TITRES BLANCS */
#step-4 .form-group label.form-label,
#step-4 label[for="prix_projet"],
#step-4 label[for="apport_souhaite"],
#step-4 label[for="duree_credit"],
#step-4 label[for="taux_estime"],
#step-4 label[for="loyer_prevu"] {
  color: #ffffff !important;
  background-color: #334155 !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  margin-bottom: 8px !important;
  display: block !important;
  padding: 8px 12px !important;
  border-radius: 6px !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  border: none !important;
}

/* Inputs des 5 champs - FORCE STYLE APERÇU */
#step-4 input#prix_projet,
#step-4 input#apport_souhaite,
#step-4 select#duree_credit,
#step-4 input#taux_estime,
#step-4 input#loyer_prevu,
#step-4 .form-input,
#step-4 .form-select {
  background: #ffffff !important;
  color: #1e293b !important;
  font-weight: 500 !important;
  font-size: 1rem !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 8px !important;
  padding: 12px 16px !important;
  width: 100% !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* États Focus des 5 champs */
#step-4 input#prix_projet:focus,
#step-4 input#apport_souhaite:focus,
#step-4 select#duree_credit:focus,
#step-4 input#taux_estime:focus,
#step-4 input#loyer_prevu:focus,
#step-4 .form-input:focus,
#step-4 .form-select:focus {
  background: #ffffff !important;
  color: #1e293b !important;
  border-color: #1e3a8a !important;
  box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.1) !important;
  outline: none !important;
}

/* États Hover des 5 champs */
#step-4 input#prix_projet:hover,
#step-4 input#apport_souhaite:hover,
#step-4 select#duree_credit:hover,
#step-4 input#taux_estime:hover,
#step-4 input#loyer_prevu:hover,
#step-4 .form-input:hover,
#step-4 .form-select:hover {
  border-color: #3b82f6 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Placeholders des inputs */
#step-4 input#prix_projet::placeholder,
#step-4 input#apport_souhaite::placeholder,
#step-4 input#taux_estime::placeholder,
#step-4 input#loyer_prevu::placeholder,
#step-4 .form-input::placeholder {
  color: #64748b !important;
  opacity: 1 !important;
  font-weight: 400 !important;
  font-style: italic;
}

/* Select spécifique - Durée de crédit */
#step-4 select#duree_credit {
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  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='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
  background-position: right 12px center !important;
  background-repeat: no-repeat !important;
  background-size: 16px !important;
  padding-right: 40px !important;
}

/* Options du select */
#step-4 select#duree_credit option {
  background: #ffffff !important;
  color: #1e293b !important;
  padding: 10px 12px !important;
  font-weight: 500 !important;
}

#step-4 select#duree_credit option:hover,
#step-4 select#duree_credit option:focus {
  background: #f1f5f9 !important;
}

#step-4 select#duree_credit option:checked,
#step-4 select#duree_credit option:selected {
  background: #1e3a8a !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}

/* Textes d'aide (small) - 2 champs concernés */
#step-4 small,
#step-4 .form-group small {
  color: #475569 !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  margin-top: 8px !important;
  display: block !important;
  padding: 8px 12px !important;
  background: rgba(71, 85, 105, 0.08) !important;
  border-radius: 6px !important;
  border-left: 3px solid #1e3a8a !important;
}

/* Icône FontAwesome dans les textes d'aide */
#step-4 small i.fas {
  color: #1e3a8a !important;
  margin-right: 6px !important;
}

/* Groupes de formulaires - Espacement */
#step-4 .form-group {
  margin-bottom: 24px !important;
}

/* Conteneur step-4 - FOND BLANC */
#step-4.step-container {
  display: block !important;
  background-color: #ffffff !important;
  padding: 2rem !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

#step-4.step-container.hidden {
  display: none !important;
}

/* Section du projet avec fond blanc renforcé */
#step-4 .rapport-section {
  background: #ffffff !important;
  padding: 1.5rem !important;
  border-radius: 8px !important;
}

#step-4 .form-select {
  cursor: pointer;
}

/* Assurer que le texte des options est toujours lisible */
#step-4 .form-select option {
  background: white !important;
  color: #1e293b !important;
  padding: 10px;
  font-weight: 500;
}

/* Support pour les navigateurs WebKit (Chrome, Safari) */
#step-4 .form-select option:hover {
  background: #f1f5f9 !important;
}

#step-4 .form-select option:checked,
#step-4 .form-select option:selected {
  background: var(--primary-color) !important;
  color: white !important;
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.form-error {
  border-color: var(--danger-color);
  background: rgba(220, 38, 38, 0.05);
}

.form-error:focus {
  border-color: var(--danger-color);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.error-message {
  color: var(--danger-color);
  font-size: 0.875rem;
  margin-top: var(--spacing-xs);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

/* ===== QUESTION STYLES PREMIUM ===== */
.question-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.question-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.question-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--spacing-lg);
  color: var(--text-primary);
  line-height: 1.4;
}

.options-grid {
  display: grid;
  gap: var(--spacing);
}

.option-item {
  display: flex;
  align-items: center;
  gap: var(--spacing);
  padding: var(--spacing-md);
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition-fast);
  background: var(--bg-primary);
  position: relative;
}

.option-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.05), transparent);
  border-radius: calc(var(--radius) - 2px);
  opacity: 0;
  transition: var(--transition-fast);
}

.option-item:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.option-item:hover::before {
  opacity: 1;
}

.option-item.selected {
  border-color: var(--primary-color);
  background: rgba(30, 58, 138, 0.05);
  box-shadow: var(--shadow-sm);
}

.option-item.selected::before {
  opacity: 1;
}

.option-radio {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.option-item.selected .option-radio {
  border-color: var(--primary-color);
  background: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.2);
}

.option-item.selected .option-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

.option-text {
  flex: 1;
  font-weight: 500;
  color: var(--text-primary);
  position: relative;
  z-index: 2;
}

/* ===== RESULTS & SCORING PREMIUM ===== */
.result-card {
  background: linear-gradient(135deg, var(--success-color) 0%, var(--success-light) 100%);
  color: white;
  padding: var(--spacing-xl);
  border-radius: var(--radius-xl);
  text-align: center;
  margin: var(--spacing-xl) 0;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.result-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.result-content {
  position: relative;
  z-index: 2;
}

.result-score {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: var(--spacing);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  line-height: 1;
}

.result-label {
  font-size: 1.375rem;
  opacity: 0.95;
  margin-bottom: var(--spacing-md);
  font-weight: 600;
}

.result-description {
  opacity: 0.9;
  line-height: 1.7;
  font-size: 1.125rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ===== CHARTS PREMIUM ===== */
.chart-container {
  background: var(--bg-primary);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin: var(--spacing-xl) 0;
  border: 1px solid var(--border-color);
  position: relative;
}

.chart-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-gold));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.chart-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--spacing-lg);
  color: var(--text-primary);
  text-align: center;
}

.chart-wrapper {
  position: relative;
  height: 400px;
}

/* ===== RADAR CHART PREMIUM ===== */
.radar-controls {
  display: grid;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
  background: var(--bg-secondary);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.slider-group {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  background: var(--bg-primary);
  padding: var(--spacing);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

.slider-label {
  min-width: 180px;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  background: var(--bg-accent);
  border-radius: var(--radius-sm);
  outline: none;
  position: relative;
}

.slider::-webkit-slider-track {
  height: 8px;
  background: var(--bg-accent);
  border-radius: var(--radius-sm);
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
}

.slider::-moz-range-track {
  height: 8px;
  background: var(--bg-accent);
  border-radius: var(--radius-sm);
  border: none;
}

.slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-sm);
}

.slider-value {
  min-width: 40px;
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.125rem;
  text-align: center;
  background: rgba(30, 58, 138, 0.1);
  padding: var(--spacing-xs);
  border-radius: var(--radius-sm);
}

/* ===== GAUGES PREMIUM ===== */
.gauge-container {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
  margin: var(--spacing-xl) 0;
}

.gauge-item {
  display: flex;
  align-items: center;
  background: var(--bg-primary);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  gap: var(--spacing-xl);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.gauge-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.gauge-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}

.gauge-info {
  flex: 1;
  text-align: left;
}

.gauge-title {
  font-weight: 600;
  font-size: 1.375rem;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

.gauge-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: var(--spacing);
}

.gauge-value {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: var(--spacing-xs);
}

.gauge-unit {
  font-size: 1.125rem;
  color: var(--text-light);
  font-weight: 500;
}

/* ===== CARDS & PANELS PREMIUM ===== */
.info-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin: var(--spacing-md) 0;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-color);
  transition: var(--transition);
}

.info-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}

.info-card.warning {
  border-color: var(--warning-color);
  background: rgba(234, 88, 12, 0.05);
}

.info-card.warning::before {
  background: var(--warning-color);
}

.info-card.success {
  border-color: var(--success-color);
  background: rgba(22, 163, 74, 0.05);
}

.info-card.success::before {
  background: var(--success-color);
}

.info-card.danger {
  border-color: var(--danger-color);
  background: rgba(220, 38, 38, 0.05);
}

.info-card.danger::before {
  background: var(--danger-color);
}

.card-title {
  font-weight: 600;
  font-size: 1.125rem;
  margin-bottom: var(--spacing);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  color: var(--text-primary);
}

.card-content {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== RAPPORT STYLES PREMIUM ===== */
.rapport-section {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  position: relative;
}

.rapport-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-gold));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.rapport-header {
  text-align: center;
  margin-bottom: var(--spacing-3xl);
  padding-bottom: var(--spacing-xl);
  border-bottom: 2px solid var(--border-color);
  position: relative;
}

.rapport-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background: var(--accent-gold);
}

.rapport-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: var(--spacing);
  letter-spacing: -0.025em;
}

.rapport-subtitle {
  color: var(--text-secondary);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.6;
}

.rapport-date {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-top: var(--spacing);
  font-weight: 500;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: var(--spacing-lg);
  color: var(--text-primary);
  border-left: 6px solid var(--primary-color);
  padding-left: var(--spacing-md);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: linear-gradient(180deg, var(--primary-color), var(--accent-gold));
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--spacing-lg);
  margin: var(--spacing-xl) 0;
}

.metric-item {
  background: var(--bg-secondary);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid var(--border-light);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.metric-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
}

.metric-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.metric-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: var(--spacing-xs);
  line-height: 1;
}

.metric-label {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

/* ===== ACTIONS LIST PREMIUM ===== */
.actions-list {
  list-style: none;
  display: grid;
  gap: var(--spacing-md);
}

.action-item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  transition: var(--transition);
  position: relative;
}

.action-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  background: var(--bg-primary);
}

.action-priority {
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-xl);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}

.action-priority.high {
  background: linear-gradient(135deg, var(--danger-color), #ef4444);
  color: white;
}

.action-priority.medium {
  background: linear-gradient(135deg, var(--warning-color), var(--accent-gold-light));
  color: white;
}

.action-priority.low {
  background: linear-gradient(135deg, var(--success-color), var(--success-light));
  color: white;
}

.action-content {
  flex: 1;
}

.action-title {
  font-weight: 600;
  font-size: 1.125rem;
  margin-bottom: var(--spacing-xs);
  color: var(--text-primary);
}

.action-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===== FOOTER PREMIUM ===== */
.footer {
  background: linear-gradient(135deg, var(--primary-ultra-dark) 0%, var(--primary-color) 100%);
  color: white;
  text-align: center;
  padding: var(--spacing-3xl) 0 var(--spacing-xl);
  margin-top: var(--spacing-3xl);
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="dots" width="50" height="50" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23dots)"/></svg>');
  opacity: 0.3;
}

.footer-content {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.footer-logo {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: var(--spacing-md);
  letter-spacing: -0.025em;
}

.footer-text {
  opacity: 0.9;
  margin-bottom: var(--spacing-lg);
  font-size: 1.125rem;
  line-height: 1.7;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
}

.footer-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-fast);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
}

.footer-link:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.footer-copyright {
  opacity: 0.7;
  font-size: 0.875rem;
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== RESPONSIVE PREMIUM ===== */
@media (max-width: 1024px) {
  .container {
    padding: 0 var(--spacing-md);
  }
  
  .hero h1 {
    font-size: 2.75rem;
  }
  
  .modules-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  
  .hero {
    padding: var(--spacing-2xl) 0;
  }
  
  .hero h1 {
    font-size: 2.25rem;
  }
  
  .hero p {
    font-size: 1.125rem;
  }
  
  .modules-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .nav {
    flex-direction: column;
    gap: var(--spacing);
    padding: var(--spacing) 0;
  }
  
  .nav-links {
    gap: var(--spacing);
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .progress-steps {
    flex-direction: column;
    gap: var(--spacing-md);
  }
  
  .progress-step::after {
    display: none;
  }
  
  .slider-group {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-sm);
  }
  
  .slider-label {
    min-width: auto;
  }
  
  .gauge-item {
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
  }
  
  .gauge-wrapper {
    width: 120px;
    height: 120px;
  }
  
  .gauge-info {
    text-align: center;
  }
  
  .gauge-value {
    font-size: 2.5rem;
  }
  
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing);
  }
  
  .footer-links {
    flex-direction: column;
    gap: var(--spacing);
  }
  
  .btn-large {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .rapport-title {
    font-size: 2rem;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 var(--spacing);
  }
  
  .hero {
    padding: var(--spacing-xl) 0;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .module-card {
    padding: var(--spacing-lg);
  }
  
  .question-card {
    padding: var(--spacing-md);
  }
  
  .rapport-section {
    padding: var(--spacing-md);
  }
  
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .result-score {
    font-size: 3rem;
  }
  
  .nav-links {
    gap: var(--spacing-xs);
  }
  
  .nav-link {
    padding: var(--spacing-xs);
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .module-card {
    padding: var(--spacing);
  }
  
  .question-card {
    padding: var(--spacing);
  }
  
  .rapport-section {
    padding: var(--spacing);
  }
  
  .btn {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.875rem;
  }
  
  .gauge-value {
    font-size: 2rem;
    color: var(--primary-contrast);
  }
  
  .metric-value {
    font-size: 2rem;
    color: var(--primary-contrast);
  }
}

/* ===== ANIMATIONS PREMIUM ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-left {
  animation: fadeInLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-scale {
  animation: fadeInScale 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pulse {
  animation: pulse 2s infinite;
}

.float {
  animation: float 3s ease-in-out infinite;
}

/* ===== AMÉLIORATIONS LISIBILITÉ ===== */
.score-display,
.metric-display,
.gauge-display,
.important-number {
  color: var(--primary-contrast) !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.radar-label,
.chart-text,
.axis-label {
  color: var(--primary-contrast) !important;
  font-weight: 600 !important;
}

/* Amélioration spécifique pour Chart.js */
.chartjs-render-monitor {
  font-weight: 600;
}

/* Force le contraste sur tous les éléments de données */
[class*="score"],
[class*="value"],
[class*="metric"],
[class*="gauge"] {
  color: var(--primary-contrast);
  font-weight: 600;
}

/* Amélioration du contraste sur les fonds colorés */
.card-success,
.card-warning,
.card-info,
.bg-success,
.bg-warning,
.bg-info,
[style*="background"] {
  color: var(--primary-contrast) !important;
}

.card-success .fa-arrow-right,
.card-warning .fa-arrow-right,
.card-info .fa-arrow-right,
.bg-success .fa-arrow-right,
.bg-warning .fa-arrow-right,
.bg-info .fa-arrow-right,
[style*="background"] .fa-arrow-right {
  color: var(--primary-contrast) !important;
}

/* Force la lisibilité des listes et textes sur fonds colorés */
[style*="background"] li,
[style*="background"] p,
[style*="background"] span:not([style*="background"]) {
  color: var(--primary-contrast) !important;
  font-weight: 500;
}

/* Flèches toujours visibles */
.fas.fa-arrow-right {
  color: var(--primary-contrast) !important;
}

/* Sections spécifiques du radar */
#analyse-axes .card,
#plan-action .card {
  color: var(--primary-contrast);
}

#analyse-axes .fa-arrow-right,
#plan-action .fa-arrow-right {
  color: var(--primary-contrast) !important;
}

/* Assurer la lisibilité des priorités d'actions */
.action-priority {
  color: white !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Styles spécifiques pour les cartes d'axes du radar */
[style*="background: #10b981"] *:not([style*="background"]),
[style*="background: #ef4444"] *:not([style*="background"]),
[style*="background: #f59e0b"] *:not([style*="background"]),
[style*="background: #8b5cf6"] *:not([style*="background"]),
[style*="background: #06b6d4"] *:not([style*="background"]),
[style*="background: #84cc16"] *:not([style*="background"]) {
  color: #000000 !important;
  font-weight: 600;
}

/* Force spécifiquement le noir sur tous les fonds colorés */
[style*="background: rgba(16, 185, 129"] *:not([style*="background"]),
[style*="background: rgba(239, 68, 68"] *:not([style*="background"]),
[style*="background: rgba(245, 158, 11"] *:not([style*="background"]),
[style*="background: rgba(139, 92, 246"] *:not([style*="background"]),
[style*="background: rgba(6, 182, 212"] *:not([style*="background"]) {
  color: #000000 !important;
  font-weight: 600;
}

/* Sections du radar - tout en noir */
#analyse-axes div[style*="background"] h4,
#analyse-axes div[style*="background"] h5,
#analyse-axes div[style*="background"] p,
#analyse-axes div[style*="background"] li,
#analyse-axes div[style*="background"] span:not([style*="background"]) {
  color: #000000 !important;
  font-weight: 600;
}

/* Icônes en noir aussi */
#analyse-axes div[style*="background"] i:not(.fa-arrow-right) {
  color: #000000 !important;
}

/* Force encore plus le contraste sur les listes */
li:not([style*="color"]) {
  color: var(--primary-contrast);
}

/* Règle globale pour tout texte sur fond coloré */
div[style*="background: rgba"] h1,
div[style*="background: rgba"] h2,
div[style*="background: rgba"] h3,
div[style*="background: rgba"] h4,
div[style*="background: rgba"] h5,
div[style*="background: rgba"] h6,
div[style*="background: rgba"] p,
div[style*="background: rgba"] li,
div[style*="background: rgba"] span:not([style*="background"]),
div[style*="background: rgba"] i:not([style*="color"]) {
  color: #000000 !important;
  text-shadow: none;
}

/* Règle ultime pour forcer le noir partout dans les cartes radar */
.radar-card,
[id*="analyse"] > div,
[style*="border-left"][style*="background"] {
  color: #000000 !important;
}

.radar-card *,
[id*="analyse"] > div *,
[style*="border-left"][style*="background"] * {
  color: #000000 !important;
}

/* Exception pour les badges/scores qui restent blancs sur fond coloré */
[style*="border-left"][style*="background"] span[style*="background"] {
  color: white !important;
}

/* Fonds spécifiques du radar - texte noir */
[style*="background: #f0fdf4"],
[style*="background: #eff6ff"], 
[style*="background: #fffbeb"],
[style*="background: #fef2f2"] {
  color: #000000 !important;
}

[style*="background: #f0fdf4"] *:not([style*="background"]),
[style*="background: #eff6ff"] *:not([style*="background"]),
[style*="background: #fffbeb"] *:not([style*="background"]),
[style*="background: #fef2f2"] *:not([style*="background"]) {
  color: #000000 !important;
  font-weight: 600;
}

/* Styles pour les titres des sections radar */
#analyse-axes h4 {
  color: #000000 !important;
  font-weight: 700 !important;
}

#analyse-axes i {
  color: #000000 !important;
}

/* ===== RAPPORT - CASES COLORÉES ===== */

/* Fonds clairs colorés - texte NOIR */
[style*="background: #f3f4f6"],
[style*="background: #f9fafb"], 
[style*="background: #fef3c7"],
[style*="background: #f8fafc"],
[style*="background: #f0fdf4"],
[style*="background: #e0f2fe"],
[style*="background: #fef2f2"],
[style*="background: #f0f9ff"],
[style*="background: #ecfdf5"] {
  color: #000000 !important;
}

[style*="background: #f3f4f6"] *:not([style*="background"]),
[style*="background: #f9fafb"] *:not([style*="background"]),
[style*="background: #fef3c7"] *:not([style*="background"]),
[style*="background: #f8fafc"] *:not([style*="background"]),
[style*="background: #f0fdf4"] *:not([style*="background"]),
[style*="background: #e0f2fe"] *:not([style*="background"]),
[style*="background: #fef2f2"] *:not([style*="background"]),
[style*="background: #f0f9ff"] *:not([style*="background"]),
[style*="background: #ecfdf5"] *:not([style*="background"]) {
  color: #000000 !important;
  font-weight: 500;
}

/* Fonds foncés - texte BLANC/CRÈME */
[style*="background: #1e293b"],
[style*="background: #374151"],
[style*="background: #0f172a"],
[style*="background: #1f2937"],
[style*="background: #111827"],
[style*="background: linear-gradient"][style*="#0"],
[style*="background: linear-gradient"][style*="#1"],
[style*="background: linear-gradient"][style*="#2"] {
  color: #fef7ed !important; /* Crème clair */
}

[style*="background: #1e293b"] *:not([style*="background"]),
[style*="background: #374151"] *:not([style*="background"]),
[style*="background: #0f172a"] *:not([style*="background"]),
[style*="background: #1f2937"] *:not([style*="background"]),
[style*="background: #111827"] *:not([style*="background"]),
[style*="background: linear-gradient"][style*="#0"] *:not([style*="background"]),
[style*="background: linear-gradient"][style*="#1"] *:not([style*="background"]),
[style*="background: linear-gradient"][style*="#2"] *:not([style*="background"]) {
  color: #fef7ed !important; /* Crème clair */
  font-weight: 500;
}

/* Cas spéciaux pour les dégradés sombres */
[style*="linear-gradient(135deg, #667eea"],
[style*="linear-gradient(135deg, #1e3c72"],
[style*="linear-gradient(135deg, #0A0F23"] {
  color: #fef7ed !important;
}

[style*="linear-gradient(135deg, #667eea"] *,
[style*="linear-gradient(135deg, #1e3c72"] *,
[style*="linear-gradient(135deg, #0A0F23"] * {
  color: #fef7ed !important;
}

/* ===== RÈGLES GLOBALES POUR CASES COLORÉES ===== */

/* Détection automatique des fonds clairs (commence par f) */
[style*="background: #f"] {
  color: #000000 !important;
}

[style*="background: #f"] *:not([style*="background"]):not([style*="color"]) {
  color: #000000 !important;
}

/* Détection automatique des fonds sombres (commence par 0, 1, 2, 3) */
[style*="background: #0"],
[style*="background: #1"],
[style*="background: #2"],
[style*="background: #3"] {
  color: #fef7ed !important;
}

[style*="background: #0"] *:not([style*="background"]):not([style*="color"]),
[style*="background: #1"] *:not([style*="background"]):not([style*="color"]),
[style*="background: #2"] *:not([style*="background"]):not([style*="color"]),
[style*="background: #3"] *:not([style*="background"]):not([style*="color"]) {
  color: #fef7ed !important;
}

/* Couleurs moyennes (4-9) - texte noir pour lisibilité */
[style*="background: #4"],
[style*="background: #5"],
[style*="background: #6"],
[style*="background: #7"],
[style*="background: #8"],
[style*="background: #9"] {
  color: #000000 !important;
}

[style*="background: #4"] *:not([style*="background"]):not([style*="color"]),
[style*="background: #5"] *:not([style*="background"]):not([style*="color"]),
[style*="background: #6"] *:not([style*="background"]):not([style*="color"]),
[style*="background: #7"] *:not([style*="background"]):not([style*="color"]),
[style*="background: #8"] *:not([style*="background"]):not([style*="color"]),
[style*="background: #9"] *:not([style*="background"]):not([style*="color"]) {
  color: #000000 !important;
}

/* Couleurs moyennes hautes (a-f) - dépend du contexte, par défaut noir */
[style*="background: #a"],
[style*="background: #b"],
[style*="background: #c"],
[style*="background: #d"],
[style*="background: #e"] {
  color: #000000 !important;
}

[style*="background: #a"] *:not([style*="background"]):not([style*="color"]),
[style*="background: #b"] *:not([style*="background"]):not([style*="color"]),
[style*="background: #c"] *:not([style*="background"]):not([style*="color"]),
[style*="background: #d"] *:not([style*="background"]):not([style*="color"]),
[style*="background: #e"] *:not([style*="background"]):not([style*="color"]) {
  color: #000000 !important;
}

/* Couleurs RGBA - détection par transparence */
[style*="background: rgba"] {
  color: #000000 !important; /* Par défaut noir pour les fonds transparents */
}

[style*="background: rgba"] *:not([style*="background"]):not([style*="color"]) {
  color: #000000 !important;
}

/* RGBA spécifiques sombres */
[style*="background: rgba(0,"],
[style*="background: rgba(30,"],
[style*="background: rgba(31,"],
[style*="background: rgba(55,"] {
  color: #fef7ed !important;
}

[style*="background: rgba(0,"] *:not([style*="background"]):not([style*="color"]),
[style*="background: rgba(30,"] *:not([style*="background"]):not([style*="color"]),
[style*="background: rgba(31,"] *:not([style*="background"]):not([style*="color"]),
[style*="background: rgba(55,"] *:not([style*="background"]):not([style*="color"]) {
  color: #fef7ed !important;
}

/* ===== SECTION DIAGNOSTIC SPÉCIFIQUE ===== */

/* Section diagnostic - Forcer la couleur noire pour la lisibilité */
#analyse-globale,
#analyse-globale *,
[id*="analyse-globale"] {
  color: #000000 !important;
}

#analyse-globale strong,
#analyse-globale span:not([style*="color"]),
#analyse-globale li,
#analyse-globale div {
  color: #000000 !important;
}

/* Titre de la section diagnostic */
.card-title:has(+ #analyse-globale),
.card-title:contains("Diagnostic Odys'invest") {
  color: #000000 !important;
}

/* Si la section a un fond foncé détecté - Changer pour fond clair */
.rapport-section:has(#analyse-globale) {
  background: #f8fafc !important;
  color: #000000 !important;
}

.rapport-section:has(#analyse-globale) * {
  color: #000000 !important;
}

.rapport-section:has(#analyse-globale) .card-title {
  color: #000000 !important;
}

.rapport-section:has(#analyse-globale) .card-title i {
  color: var(--primary-color) !important;
}

/* Alternative sans :has() pour compatibilité */
.diagnostic-section {
  background: #f8fafc !important;
  color: #000000 !important;
}

.diagnostic-section,
.diagnostic-section *,
.diagnostic-section .card-title,
.diagnostic-section .card-title i,
.diagnostic-section #analyse-globale,
.diagnostic-section #analyse-globale * {
  color: #000000 !important;
}

/* Force ultime pour le diagnostic */
div:contains("Diagnostic Odys'invest") {
  color: #000000 !important;
}

/* Classe spécifique pour diagnostic lisible */
.dark-diagnostic {
  background: #f8fafc !important;
  color: #000000 !important;
}

.dark-diagnostic * {
  color: #000000 !important;
}

/* ===== NOUVEAU TABLEAU DE BORD STYLE PDF ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.dashboard-item {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  background: white;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
  min-height: 100px;
}

.dashboard-item:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.dashboard-icon {
  font-size: 2.5rem;
  margin-right: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: var(--radius);
  background: var(--bg-accent);
  flex-shrink: 0;
}

.profil-item .dashboard-icon {
  background: #fef3c7;
  color: #d97706;
}

.score-item .dashboard-icon {
  background: #dbeafe;
  color: var(--primary-color);
}

.preparation-item .dashboard-icon {
  background: #f0f9ff;
  color: var(--primary-light);
}

.recommandation-item .dashboard-icon {
  background: #f3f4f6;
  color: var(--text-secondary);
}

.dashboard-content {
  flex-grow: 1;
}

.dashboard-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.dashboard-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.3;
}

/* Couleurs spécifiques pour chaque type de dashboard */
.profil-item .dashboard-value {
  color: #d97706;
}

.score-item .dashboard-value {
  color: var(--primary-color);
}

.preparation-item .dashboard-value {
  color: var(--primary-light);
}

.recommandation-item .dashboard-value {
  color: var(--text-primary);
}

/* Style pour les valeurs qui ne sont pas encore chargées */
.dashboard-value:contains("-") {
  color: var(--text-muted);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===== BOÎTE DE RECOMMANDATION AMÉLIORÉE ===== */
.recommendation-box {
  background: #f8fafc;
  border: 2px solid var(--primary-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
}

.recommendation-header {
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.1rem;
}

.recommendation-content {
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 500;
}

/* Variante avec bordure gauche comme dans le PDF */
.recommendation-box-simple {
  background: #f9fafb;
  border-left: 4px solid var(--primary-color);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1rem 0;
}

.recommendation-box-simple .recommendation-header {
  margin-bottom: 0.5rem;
  padding-left: 0;
}

.recommendation-box-simple .recommendation-content {
  padding-left: 0;
  color: var(--text-secondary);
}

/* ===== UTILITIES PREMIUM ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }

.leading-none { line-height: 1; }
.leading-tight { line-height: 1.25; }
.leading-normal { line-height: 1.5; }
.leading-relaxed { line-height: 1.625; }
.leading-loose { line-height: 2; }

.tracking-tighter { letter-spacing: -0.05em; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-normal { letter-spacing: 0; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }

.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }

.m-0 { margin: 0; }
.mt-0 { margin-top: 0; }
.mr-0 { margin-right: 0; }
.mb-0 { margin-bottom: 0; }
.ml-0 { margin-left: 0; }

.m-1 { margin: var(--spacing-xs); }
.mt-1 { margin-top: var(--spacing-xs); }
.mr-1 { margin-right: var(--spacing-xs); }
.mb-1 { margin-bottom: var(--spacing-xs); }
.ml-1 { margin-left: var(--spacing-xs); }

.m-2 { margin: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-sm); }
.mr-2 { margin-right: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.ml-2 { margin-left: var(--spacing-sm); }

.m-3 { margin: var(--spacing); }
.mt-3 { margin-top: var(--spacing); }
.mr-3 { margin-right: var(--spacing); }
.mb-3 { margin-bottom: var(--spacing); }
.ml-3 { margin-left: var(--spacing); }

.m-4 { margin: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-md); }
.mr-4 { margin-right: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-md); }
.ml-4 { margin-left: var(--spacing-md); }

.m-5 { margin: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-lg); }
.mr-5 { margin-right: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-lg); }
.ml-5 { margin-left: var(--spacing-lg); }

.m-6 { margin: var(--spacing-xl); }
.mt-6 { margin-top: var(--spacing-xl); }
.mr-6 { margin-right: var(--spacing-xl); }
.mb-6 { margin-bottom: var(--spacing-xl); }
.ml-6 { margin-left: var(--spacing-xl); }

.p-0 { padding: 0; }
.pt-0 { padding-top: 0; }
.pr-0 { padding-right: 0; }
.pb-0 { padding-bottom: 0; }
.pl-0 { padding-left: 0; }

.p-1 { padding: var(--spacing-xs); }
.pt-1 { padding-top: var(--spacing-xs); }
.pr-1 { padding-right: var(--spacing-xs); }
.pb-1 { padding-bottom: var(--spacing-xs); }
.pl-1 { padding-left: var(--spacing-xs); }

.p-2 { padding: var(--spacing-sm); }
.pt-2 { padding-top: var(--spacing-sm); }
.pr-2 { padding-right: var(--spacing-sm); }
.pb-2 { padding-bottom: var(--spacing-sm); }
.pl-2 { padding-left: var(--spacing-sm); }

.p-3 { padding: var(--spacing); }
.pt-3 { padding-top: var(--spacing); }
.pr-3 { padding-right: var(--spacing); }
.pb-3 { padding-bottom: var(--spacing); }
.pl-3 { padding-left: var(--spacing); }

.p-4 { padding: var(--spacing-md); }
.pt-4 { padding-top: var(--spacing-md); }
.pr-4 { padding-right: var(--spacing-md); }
.pb-4 { padding-bottom: var(--spacing-md); }
.pl-4 { padding-left: var(--spacing-md); }

.p-5 { padding: var(--spacing-lg); }
.pt-5 { padding-top: var(--spacing-lg); }
.pr-5 { padding-right: var(--spacing-lg); }
.pb-5 { padding-bottom: var(--spacing-lg); }
.pl-5 { padding-left: var(--spacing-lg); }

.p-6 { padding: var(--spacing-xl); }
.pt-6 { padding-top: var(--spacing-xl); }
.pr-6 { padding-right: var(--spacing-xl); }
.pb-6 { padding-bottom: var(--spacing-xl); }
.pl-6 { padding-left: var(--spacing-xl); }

.hidden { display: none; }
.visible { display: block; }
.invisible { visibility: hidden; }

.opacity-0 { opacity: 0; }
.opacity-25 { opacity: 0.25; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

.text-primary-color { color: var(--primary-color); }
.text-accent-gold { color: var(--accent-gold); }
.text-success { color: var(--success-color); }
.text-warning { color: var(--warning-color); }
.text-danger { color: var(--danger-color); }
.text-muted { color: var(--text-muted); }

.bg-primary { background-color: var(--bg-primary); }
.bg-secondary { background-color: var(--bg-secondary); }
.bg-accent { background-color: var(--bg-accent); }

.border { border: 1px solid var(--border-color); }
.border-light { border: 1px solid var(--border-light); }
.border-primary { border: 1px solid var(--primary-color); }

.rounded { border-radius: var(--radius); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: 9999px; }

.shadow { box-shadow: var(--shadow); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-none { box-shadow: none; }

.transition { transition: var(--transition); }
.transition-fast { transition: var(--transition-fast); }
.transition-slow { transition: var(--transition-slow); }

.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

.select-none { user-select: none; }
.select-text { user-select: text; }
.select-all { user-select: all; }

.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }

/* ===== PRINT STYLES ===== */
@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  
  body {
    background: white !important;
    color: black !important;
    font-size: 12pt;
    line-height: 1.4;
  }
  
  .header,
  .footer,
  .nav,
  .btn,
  button,
  input,
  .no-print {
    display: none !important;
  }
  
  .container {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .rapport-section {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 20pt;
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
  
  .section-title {
    break-after: avoid;
    page-break-after: avoid;
  }
  
  .chart-container {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  
  .modules-grid {
    display: block !important;
  }
  
  .module-card {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 15pt;
  }
  
  h1, h2, h3, h4, h5, h6 {
    break-after: avoid;
    page-break-after: avoid;
  }
}

/* ===== DARK MODE (pour usage futur) ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #1e293b;
    --bg-secondary: #334155;
    --bg-accent: #475569;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-light: #94a3b8;
    --border-color: #475569;
    --border-light: #64748b;
  }
}