/* =====================================================================
   Outils gratuits (simulateur, réforme, mentions) — ajouté le 13/10/2026
   ---------------------------------------------------------------------
   Feuille séparée de styles.css, chargée uniquement par les pages
   /outils/ : elle ne fait que compléter les composants existants
   (.g-panel, .g-input, .g-kpi, .g-alert, .g-badge, .g-table) avec les
   quelques briques propres aux formulaires interactifs. Mêmes jetons,
   aucune couleur en dur hors des teintes oklch déjà utilisées par le site.
   Mise en cache 7 jours (.htaccess) : bumper ?v= dans les pages à chaque
   modification.
   ===================================================================== */

/* Grille de champs : deux colonnes sur grand écran, une sur mobile. */
.t-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}
.t-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.t-span { grid-column: 1 / -1; }

/* Les <select> reprennent l'apparence des champs texte du compte. */
select.g-input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--g-ink-3) 50%),
    linear-gradient(135deg, var(--g-ink-3) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}
select.g-input option { background: var(--g-surface); color: var(--g-ink); }

/* Montant : chiffres alignés. */
.t-num { font-variant-numeric: tabular-nums; }

/* Choix oui / non et cases à cocher présentés en pastilles cliquables. */
.t-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.t-choice {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--g-radius);
  border: 1px solid var(--g-line);
  background: var(--g-sunken);
  color: var(--g-ink-2);
  font-size: 14.5px;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}
.t-choice:hover { color: var(--g-ink); }
.t-choice input { accent-color: oklch(0.70 0.12 165); margin: 0; }
.t-choice:has(input:checked) {
  border-color: oklch(0.55 0.10 165 / 0.7);
  background: oklch(0.28 0.06 165 / 0.35);
  color: var(--g-ink);
}

/* Bloc de résultat : apparaît sous le formulaire. */
.t-result { margin-top: 22px; }
.t-result h3 { margin: 0 0 12px; }
.t-big {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-size: clamp(30px, 5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--g-accent);
}
.t-small { font-size: 13px; color: var(--g-ink-3); line-height: 1.55; }

/* ----- Compte à rebours de la réforme -------------------------------- */
.t-countdowns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 8px 0 0;
}
.t-count {
  background: var(--g-surface);
  border: 1px solid var(--g-line);
  border-radius: var(--g-radius-lg);
  padding: 20px 22px;
}
.t-count-done { border-color: oklch(0.55 0.10 165 / 0.45); }
.t-count-label { font-size: 13px; color: var(--g-ink-3); margin: 0 0 6px; }
.t-count-value {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-size: clamp(34px, 6vw, 46px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--g-ink);
}
.t-count-done .t-count-value { color: var(--g-accent); font-size: clamp(24px, 4vw, 30px); }
.t-count-unit { font-size: 15px; font-weight: 500; color: var(--g-ink-3); margin-left: 6px; letter-spacing: 0; }
.t-count-text { margin: 10px 0 0; font-size: 14px; color: var(--g-ink-2); line-height: 1.55; }

/* ----- Liste d'obligations (résultat « suis-je concerné ? ») --------- */
.t-oblig { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.t-oblig li {
  padding: 14px 16px;
  border-radius: var(--g-radius);
  border: 1px solid var(--g-line);
  background: var(--g-sunken);
  color: var(--g-ink-2);
  line-height: 1.6;
  margin: 0;
}
.t-oblig li strong { color: var(--g-ink); }
.t-oblig .t-oblig-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }

/* ----- Vérificateur de mentions -------------------------------------- */
.t-checklist { list-style: none; padding: 0; margin: 0; }
.t-checklist li { margin: 0; border-bottom: 1px solid var(--g-line-soft); }
.t-checklist li:last-child { border-bottom: none; }
.t-checklist label {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  padding: 13px 4px;
  cursor: pointer;
}
.t-checklist input { accent-color: oklch(0.70 0.12 165); width: 18px; height: 18px; margin: 3px 0 0; }
.t-checklist .t-mention { color: var(--g-ink); font-weight: 500; }
.t-checklist .t-why { display: block; font-size: 13px; color: var(--g-ink-3); line-height: 1.55; margin-top: 3px; }
.t-checklist .t-new {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--g-pending);
  border: 1px solid oklch(0.50 0.09 75 / 0.40);
  background: oklch(0.24 0.05 75 / 0.35);
  vertical-align: 1px;
}
.t-group-title {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--g-ink-3);
  margin: 22px 0 4px;
}
.t-progress { margin: 6px 0 4px; }

/* Barre d'actions sous un formulaire. */
.t-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

@media (max-width: 640px) {
  .t-grid, .t-grid-3, .t-countdowns { grid-template-columns: 1fr; }
  .t-choice { width: 100%; }
}

/* Impression : on ne garde que l'outil et son résultat. */
@media print {
  .g-header, .g-footer, .t-actions, .g-skip { display: none !important; }
}
