/* ════════════════════════════════════════════════════════════════════════════════
   🚀 CIVIC OS - AMÉLIORATIONS UX/UI CRITIQUES
   Corrections immédiatespour passer de 1/10 à 8/10
   ════════════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════════
   🎯 CORRECTIONS DE LISIBILITÉ - PRIORITÉ CRITIQUE
   ════════════════════════════════════════════════════════════════════════════════ */

:root {
  /* ═══ CONTRASTES AMÉLIORÉS (WCAG AA Compliant) ═══ */
  --text-primary: rgba(255, 255, 255, 0.95);      /* Texte principal très lisible */
  --text-secondary: rgba(255, 255, 255, 0.8);     /* Texte secondaire lisible */
  --text-muted: rgba(255, 255, 255, 0.65);        /* Texte désemphasizé mais lisible */
  
  /* ═══ BACKGROUNDS LISIBLES ═══ */
  --bg-content: rgba(255, 255, 255, 0.12);        /* Background pour contenu texte */
  --bg-form: rgba(255, 255, 255, 0.15);           /* Background formulaires */
  --bg-card-readable: rgba(255, 255, 255, 0.18);  /* Cards avec texte important */
  
  /* ═══ BORDURES PLUS VISIBLES ═══ */
  --border-strong: rgba(255, 255, 255, 0.3);      /* Bordures visibles */
  --border-focus: color-mix(in srgb, var(--theme-primary) 60%, white);
  
  /* ═══ GLASSMORPHISM RÉDUIT POUR LISIBILITÉ ═══ */
  --blur-text: blur(2px);                         /* Blur réduit pour zones texte */
  --blur-decoration: blur(8px);                   /* Blur normal pour décorations */
}

/* ═══════════════════════════════════════════════════════════════════════════════
   📝 AMÉLIORATION TYPOGRAPHIE
   ════════════════════════════════════════════════════════════════════════════════ */

/* Amélioration hiérarchie visuelle */
h1, .h1 {
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

h2, .h2 {
  font-size: var(--text-3xl);
  font-weight: var(--weight-semibold);
  line-height: 1.3;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

h3, .h3 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  line-height: 1.4;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

/* Corps de texte plus lisible */
p, .body-text {
  font-size: var(--text-lg);
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* Texte sur backgrounds glassmorphism */
.glass-card p, 
.glass-container p,
.hero-description,
.section-description {
  color: var(--text-primary) !important;
  font-weight: var(--weight-medium);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   🎯 AMÉLIORATION BOUTONS - AFFORDANCE CLAIRE
   ════════════════════════════════════════════════════════════════════════════════ */

/* Boutons primaires avec affordance forte */
.btn-primary,
.btn-primary-glass,
.btn-glass-primary {
  background: linear-gradient(135deg, var(--theme-primary), color-mix(in srgb, var(--theme-primary) 80%, white));
  border: 2px solid var(--theme-primary);
  color: white;
  font-weight: var(--weight-semibold);
  padding: 0.875rem 2rem;
  border-radius: 12px;
  transition: all 0.2s ease;
  cursor: pointer;
  min-height: 48px; /* Zone de clic accessible */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: var(--text-base);
  backdrop-filter: var(--blur-decoration);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--theme-primary) 25%, transparent);
}

.btn-primary:hover,
.btn-primary-glass:hover,
.btn-glass-primary:hover {
  background: linear-gradient(135deg, color-mix(in srgb, var(--theme-primary) 90%, white), var(--theme-primary));
  transform: translateY(-2px);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--theme-primary) 35%, transparent);
  color: white;
  text-decoration: none;
}

/* Boutons secondaires plus visibles */
.btn-secondary,
.btn-secondary-glass {
  background: var(--bg-form);
  border: 2px solid var(--border-strong);
  color: var(--text-primary);
  font-weight: var(--weight-medium);
  padding: 0.875rem 2rem;
  border-radius: 12px;
  transition: all 0.2s ease;
  cursor: pointer;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  backdrop-filter: var(--blur-text);
}

.btn-secondary:hover,
.btn-secondary-glass:hover {
  background: var(--bg-card-readable);
  border-color: var(--theme-primary);
  color: var(--text-primary);
  transform: translateY(-1px);
  text-decoration: none;
}

/* État focus pour accessibilité */
.btn-primary:focus,
.btn-secondary:focus {
  outline: 3px solid var(--border-focus);
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   📋 AMÉLIORATION FORMULAIRES - LISIBILITÉ CRITIQUE
   ════════════════════════════════════════════════════════════════════════════════ */

/* Conteneurs de formulaires plus lisibles */
.form-group,
.form-group-glass {
  margin-bottom: 1.5rem;
}

/* Labels plus visibles */
.form-label,
.form-label-glass {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Champs de saisie lisibles */
.form-control,
.form-control-glass {
  width: 100%;
  padding: 1rem;
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-form);
  border: 2px solid var(--border-strong);
  border-radius: 8px;
  backdrop-filter: var(--blur-text);
  transition: all 0.2s ease;
}

.form-control:focus,
.form-control-glass:focus {
  outline: none;
  border-color: var(--theme-primary);
  background: var(--bg-card-readable);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-primary) 25%, transparent);
}

/* Placeholder plus lisible */
.form-control::placeholder,
.form-control-glass::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   🚨 MESSAGES D'ALERTE VISIBLES
   ════════════════════════════════════════════════════════════════════════════════ */

.alert,
.alert-glass {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-weight: var(--weight-medium);
  backdrop-filter: var(--blur-text);
}

.alert-danger {
  background: rgba(239, 68, 68, 0.2);
  border: 2px solid rgba(239, 68, 68, 0.5);
  color: rgba(255, 255, 255, 0.95);
}

.alert-success {
  background: rgba(16, 185, 129, 0.2);
  border: 2px solid rgba(16, 185, 129, 0.5);
  color: rgba(255, 255, 255, 0.95);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.2);
  border: 2px solid rgba(245, 158, 11, 0.5);
  color: rgba(255, 255, 255, 0.95);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   🧭 NAVIGATION AMÉLIORÉE - ORIENTATION CLAIRE
   ════════════════════════════════════════════════════════════════════════════════ */

/* Breadcrumb visible */
.breadcrumb {
  background: var(--bg-content);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  backdrop-filter: var(--blur-text);
  border: 1px solid var(--border-strong);
}

.breadcrumb-item {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.breadcrumb-item.active {
  color: var(--text-primary);
  font-weight: var(--weight-medium);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  color: var(--text-muted);
  margin: 0 0.5rem;
}

/* États actifs plus visibles dans la navigation */
.nav-link.active,
.domain-nav-item.active {
  background: color-mix(in srgb, var(--theme-primary) 20%, transparent);
  border: 1px solid var(--theme-primary);
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   💳 CARDS PLUS LISIBLES
   ════════════════════════════════════════════════════════════════════════════════ */

.card,
.glass-card {
  background: var(--bg-card-readable);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 1.5rem;
  backdrop-filter: var(--blur-text);
  transition: all 0.2s ease;
}

.card:hover,
.glass-card:hover {
  background: color-mix(in srgb, var(--bg-card-readable), rgba(255,255,255,0.05));
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   📱 AMÉLIORATIONS MOBILE
   ════════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Boutons plus larges sur mobile */
  .btn-primary,
  .btn-secondary,
  .btn-primary-glass,
  .btn-secondary-glass {
    width: 100%;
    margin-bottom: 0.75rem;
    min-height: 52px;
  }
  
  /* Texte plus grand sur mobile */
  .hero-title {
    font-size: var(--text-3xl);
  }
  
  .hero-description {
    font-size: var(--text-lg);
  }
  
  /* Formulaires plus accessibles */
  .form-control,
  .form-control-glass {
    min-height: 52px;
    font-size: 16px; /* Évite le zoom sur iOS */
  }
}