/* ============================================================================
   STYLE PARTAGÉ — Simulateurs élève (Plateforme 2I2D / HexaPlicker)
   Repris à l'identique du design system de student_dashboard.html
   pour que chaque simulateur, même en page autonome, garde le même look.
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ══════════════════════════════════════════════════════════════════════════
   🔴 PASSAGE EN THÈME CLAIR — 17/08/2026

   Même défaut que du côté professeur : ce fichier portait le thème SOMBRE du
   tableau de bord (--text-primary: #fffffe, un blanc) alors que les
   simulateurs élève s'affichent sur fond CLAIR. Libellés et valeurs de menus
   ressortaient en blanc sur blanc, sur les 8 simulateurs à la fois.

   Un élève qui prépare son orientation ou calcule sa moyenne doit pouvoir
   relire sa saisie sans effort — et un parent qui regarde par-dessus son
   épaule doit y voir un outil sérieux.

   CONTRASTES, mesurés sur le fond réellement affiché :
     · valeurs de champ  #16223a sur #ffffff → 14,8:1
     · libellés          #3f4a63 sur #f4f6fb →  8,1:1
     · texte secondaire  #55617d sur #f4f6fb →  5,6:1
   Minimum exigé par les critères d'accessibilité (WCAG AA) : 4,5:1.
   ══════════════════════════════════════════════════════════════════════════ */
:root {
  --primary: #6d28d9;      /* assombri : sert aussi de couleur de texte */
  --secondary: #0e7490;
  --success: #047857;
  --danger: #b91c1c;
  --warning: #b45309;
  --info: #1d4ed8;

  --bg-main: linear-gradient(135deg, #f4f6fb 0%, #eef2ff 100%);
  --bg-card: #ffffff;
  --bg-card-hover: #f8faff;
  --glass-bg: #ffffff;

  --text-primary: #16223a;
  --text-secondary: #55617d;
  --text-label: #3f4a63;
  --border: #d5dced;
  --border-strong: #b9c2d6;
  --shadow: rgba(109, 40, 217, 0.18);

  --transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  --border-radius: 16px;
}

/* Libellés et textes d'aide : lisibles sans concurrencer les valeurs. */
label { color: var(--text-label); font-weight: 600; }
small, .text-xs, .field-hint { color: var(--text-secondary); }

* { box-sizing: border-box; }

body {
  font-family: 'Inter', Arial, sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  margin: 0;
  padding: 20px;
}

.simu-wrap { max-width: 1100px; margin: 0 auto; }

.simu-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1.5rem;
  text-decoration: none;
}

.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--border-radius);
  padding: 40px;
  margin-bottom: 30px;
  text-align: center;
  box-shadow: 0 10px 30px var(--shadow);
}
.page-title { font-size: 2.5em; font-weight: 900; margin-bottom: 10px; color: white; }
.page-subtitle { font-size: 1.2em; opacity: 0.9; color: white; }
@media (max-width: 600px) { .page-title { font-size: 1.6em; } .page-header { padding: 24px; } }

.card {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 25px;
  border: 2px solid var(--border);
  transition: var(--transition);
  margin-bottom: 1.5rem;
}
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.card-title { font-size: 1.5em; font-weight: 700; display: flex; align-items: center; gap: 10px; color: var(--text-primary); }
.card-body { color: var(--text-secondary); }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.btn {
  padding: 12px 24px;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1rem;
  text-decoration: none;
}
.btn-primary { background: var(--primary); color: white; box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3); }
.btn-primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 12px 30px rgba(124, 58, 237, 0.5); background: #6d28d9; }
.btn-outline { background: transparent; color: var(--text-primary); border: 2px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* Cartes claires (contenu des simulateurs, contraste sur fond sombre) */
.simu-lightcard { background: #f8f9fa; border-radius: 12px; padding: 1.5rem; color: #333; }
.simu-infobox { padding: 1rem 1.5rem; border-radius: 10px; margin-bottom: 1.5rem; line-height: 1.6; }
.simu-infobox.blue { background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%); border-left: 4px solid #2196f3; color: #1565c0; }
.simu-infobox.amber { background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%); border-left: 4px solid #ff9800; color: #a05a00; }

/* Formulaire */
.simu-field { margin-bottom: 1.25rem; }
.simu-field label { display: block; font-weight: 700; margin-bottom: 0.4rem; color: var(--text-primary); }
.simu-field .hint { font-weight: 400; color: var(--text-secondary); font-size: 0.85rem; }
.simu-field select, .simu-field input[type="number"], .simu-field input[type="text"] {
  width: 100%; padding: 12px; border: 2px solid var(--border-strong); border-radius: 8px;
  /* 17/08/2026 : fond BLANC (était #1a1825, un gris presque noir, hérité du
     thème sombre) et bordure franche : sur un simulateur, on doit voir
     immédiatement quels champs on peut remplir. */
  font-size: 1rem; background: #ffffff; color: var(--text-primary);
}
.simu-field select:focus, .simu-field input:focus { outline: none; border-color: var(--primary); }

/* La liste déroulante native est dessinée par le système : ses options
   doivent recevoir des couleurs explicites, sinon texte blanc sur blanc. */
/* 17/08/2026 : « light » — sinon le système dessine les options en
   blanc sur blanc sur ce fond clair. */
.simu-field select { color-scheme: light; }
.simu-field select option { background-color: #fff; color: var(--text-primary); }

.simu-toggle-row { display: flex; gap: 10px; flex-wrap: wrap; }
.simu-toggle {
  padding: 10px 18px; border-radius: 999px; border: 2px solid var(--border);
  background: transparent; color: var(--text-secondary); cursor: pointer; font-weight: 600;
}
.simu-toggle.active { background: var(--primary); border-color: var(--primary); color: white; }

/* Stepper */
.simu-steps { display: flex; gap: 6px; margin-bottom: 2rem; }
.simu-step-dot { flex: 1; height: 6px; border-radius: 999px; background: var(--border); }
.simu-step-dot.done { background: var(--success); }
.simu-step-dot.active { background: var(--primary); }

/* Résultats */
.aide-card { border-radius: 12px; padding: 1.2rem 1.4rem; margin-bottom: 1rem; border-left: 5px solid #ccc; background: white; color: #333; }
.aide-card.eligible { border-left-color: #10b981; background: #f0fdf7; }
.aide-card.non_eligible { border-left-color: #d1d5db; background: #fafafa; opacity: 0.75; }
.aide-card.a_verifier { border-left-color: #f59e0b; background: #fffaf0; }
.aide-card.info { border-left-color: #3b82f6; background: #f0f7ff; }
.aide-card h4 { margin: 0 0 4px 0; font-size: 1.05rem; }
.aide-card .montant { font-weight: 800; font-size: 1.15rem; }
.aide-card .badge { display: inline-block; font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-left: 8px; vertical-align: middle; }
.aide-card .badge.estimation { background: #fef3c7; color: #92400e; }
.aide-card .badge.indicatif { background: #dbeafe; color: #1e40af; }
.aide-card .source { font-size: 0.78rem; color: #888; margin-top: 6px; }

.simu-total-banner {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white; border-radius: 14px; padding: 1.5rem 2rem; text-align: center; margin-bottom: 1.5rem;
}
.simu-total-banner .amount { font-size: 2.4rem; font-weight: 900; }

.simu-disclaimer {
  font-size: 0.82rem; color: var(--text-secondary); border-top: 1px solid var(--border);
  margin-top: 2rem; padding-top: 1rem; line-height: 1.6;
}
