/* ==========================================================================
   Vidacraft v1.9.0 : feuille de style des outils interactifs
   Chargée en complément de main.css (?v=1.7.0) sur les six pages d'outils
   uniquement (/outils/ et /en/tools/) : tokens, composants et chrome restent
   ceux de la feuille de production ; seules les briques propres aux outils
   (héros d'outil, puces méta, barre de progression, cartes de réponse,
   panneaux de verdict, formulaire pas à pas, tableau comparatif, hypothèses
   repliables) sont définies ici, exclusivement avec les variables du design
   system gelé (vidacraft-tokens.css v1.0) — aucune couleur, taille, ombre
   ou famille hors tokens. Conformité CSP (style-src 'self') : aucun style
   inline dans les pages, tout est dans cette feuille.
   Sommaire : 1. Héros d'outil et puces méta  2. Duo d'outils (page hub)
   3. Barre de progression  4. Carte de question et options
   5. Panneau de verdict  6. Formulaire du calculateur
   7. Tableau comparatif  8. Hypothèses et sources  9. Utilitaires
   10. Points de rupture
   ========================================================================== */

/* --- 1. Héros d'outil et puces méta -------------------------------------- */
.outil-hero { padding-block: var(--sp-8) var(--sp-7); border-bottom: 1px solid var(--c-border); }
.outil-hero h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); margin: var(--sp-3) 0 0; }
.outil-hero .lead { font-size: var(--fs-lead); line-height: 1.6; color: var(--c-ink-soft); margin: var(--sp-4) 0 0; max-width: 40rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-4); }
.meta-chip { font-size: var(--fs-caption); color: var(--c-ink-soft); border: 1px solid var(--c-border-strong); border-radius: var(--radius-s); padding: .25rem .6rem; }

/* --- 2. Duo d'outils (page hub) ------------------------------------------ */
.outils-intro { margin-block: var(--sp-6) 0; }
.btn-plein { width: 100%; }

/* --- 3. Barre de progression (quiz) -------------------------------------- */
.prog { margin-block: var(--sp-6); }
.prog-label { display: flex; justify-content: space-between; font-size: var(--fs-caption); color: var(--c-ink-soft); margin-bottom: var(--sp-2); }
.prog-track { height: 4px; background: var(--c-surface-alt); border-radius: 2px; overflow: hidden; }
.prog-bar { height: 100%; width: 0; background: var(--c-accent); transition: width var(--t-base) var(--ease); }

/* --- 4. Carte de question et options -------------------------------------- */
.q-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-s); padding: var(--sp-6); box-shadow: var(--shadow-card); }
.q-card fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.q-card legend { font-family: var(--font-title); font-weight: 600; font-size: var(--fs-h3); line-height: var(--lh-title); padding: 0; margin-bottom: var(--sp-5); }
.legend-num { color: var(--c-accent-text); font-family: var(--font-body); font-size: var(--fs-caption); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; display: block; margin-bottom: var(--sp-2); }
.q-aide { margin: -1rem 0 var(--sp-5); font-size: var(--fs-small); color: var(--c-ink-soft); line-height: 1.55; }
.options { display: grid; gap: var(--sp-3); }
.opt { position: relative; display: flex; gap: var(--sp-3); align-items: flex-start; background: var(--c-bg); border: 1.5px solid var(--c-border-strong); border-radius: var(--radius-m); padding: .9rem 1rem; cursor: pointer; transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.opt:hover { border-color: var(--c-accent); }
.opt input { position: absolute; opacity: 0; width: 1.15rem; height: 1.15rem; margin: .2rem 0 0; }
.opt .mark { flex: 0 0 auto; width: 1.15rem; height: 1.15rem; margin-top: .2rem; border: 1.5px solid var(--c-border-strong); border-radius: 50%; background: var(--c-surface); display: grid; place-items: center; }
.opt .mark::after { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--c-accent); transform: scale(0); transition: transform var(--t-fast) var(--ease); }
.opt input:checked ~ .mark::after { transform: scale(1); }
.opt input:checked ~ .mark { border-color: var(--c-accent); }
.opt:has(input:checked) { border-color: var(--c-accent); background: var(--c-accent-soft); }
.opt input:focus-visible ~ .mark { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.opt .txt strong { display: block; font-weight: 600; }
.opt .txt span { display: block; font-size: var(--fs-caption); color: var(--c-ink-soft); line-height: var(--lh-caption); margin-top: .15rem; }
.opt.inline { align-items: center; }
.opt.inline .txt strong { font-size: var(--fs-small); }
.nowrap { white-space: nowrap; }
.q-nav { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); margin-top: var(--sp-5); flex-wrap: wrap; }
.q-nav .etape { font-size: var(--fs-caption); color: var(--c-ink-soft); }
.q-nav-centre { margin-top: 0; justify-content: center; }

/* --- 5. Panneau de verdict --------------------------------------------------- */
.verdict { border-radius: var(--radius-s); border: 1px solid var(--c-border); background: var(--c-surface); overflow: hidden; }
.verdict-head { padding: var(--sp-5) var(--sp-6); display: grid; gap: var(--sp-2); justify-items: start; border-top: var(--rule) solid var(--c-accent); }
.verdict[data-niveau="bon"] .verdict-head { background: var(--c-accent-soft); }
.verdict[data-niveau="evaluer"] .verdict-head { background: var(--c-surface-alt); }
.verdict[data-niveau="non"] .verdict-head { background: var(--c-ink); border-top-color: var(--c-ink); }
.verdict[data-niveau="non"] .verdict-head h2,
.verdict[data-niveau="non"] .verdict-head p { color: var(--c-bg); }
.verdict-head h2 { font-size: var(--fs-h3); margin: 0; }
.verdict-head .badge { background: var(--c-surface); border: 1px solid var(--c-border-strong); }
.verdict-head p { margin: 0; font-size: var(--fs-small); color: var(--c-ink-soft); }
.verdict-body { padding: var(--sp-6); display: grid; gap: var(--sp-5); }
.verdict-body h3 { font-size: var(--fs-body); font-family: var(--font-body); font-weight: 600; margin: 0 0 var(--sp-2); }
.pourquoi { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.pourquoi li { display: grid; grid-template-columns: 1.4rem 1fr; gap: var(--sp-2); font-size: var(--fs-small); color: var(--c-ink-soft); line-height: 1.55; }
.pourquoi li::before { content: "—"; color: var(--c-accent-text); font-weight: 600; }
.txt-soft { margin: 0; font-size: var(--fs-small); color: var(--c-ink-soft); line-height: 1.6; }
/* Encart artisan à l'intérieur d'un verdict : largeur validée au wireframe */
.verdict-body .cta-artisan { margin-inline: auto; max-width: 40rem; }

/* --- 6. Formulaire du calculateur ---------------------------------------------- */
.calc-grid { display: grid; gap: var(--sp-5); }
.fieldset-calc { border: 0; margin: 0; padding: 0; min-width: 0; }
.fieldset-calc legend { font-family: var(--font-body); font-weight: 600; font-size: var(--fs-body); padding: 0; margin-bottom: var(--sp-3); }
.fieldset-calc legend .num { color: var(--c-accent-text); font-size: var(--fs-caption); letter-spacing: .12em; text-transform: uppercase; display: block; margin-bottom: .2rem; }

/* --- 7. Tableau comparatif ------------------------------------------------------ */
.compare { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.compare caption { text-align: left; font-size: var(--fs-caption); color: var(--c-ink-soft); padding-bottom: var(--sp-3); }
.compare th, .compare td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--c-border); vertical-align: top; }
.compare thead th { font-size: var(--fs-caption); letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-soft); font-weight: 600; border-bottom: 1.5px solid var(--c-border-strong); }
.compare td:first-child { color: var(--c-ink-soft); width: 9rem; }
.compare .chiffre { font-weight: 600; color: var(--c-ink); white-space: nowrap; }
.compare .sous-libelle { display: block; font-weight: 400; font-size: var(--fs-caption); color: var(--c-ink-soft); white-space: normal; }
.compare tr.dsp td { background: var(--c-accent-soft); }
.compare tr.dsp td:first-child { color: var(--c-accent-deep); font-weight: 600; }
[data-theme="dark"] .compare tr.dsp td:first-child { color: var(--c-accent-text); }

/* --- 8. Hypothèses et sources ---------------------------------------------------- */
details.hypotheses { border: 1px solid var(--c-border); border-radius: var(--radius-s); background: var(--c-surface); }
details.hypotheses summary { cursor: pointer; padding: var(--sp-4) var(--sp-5); font-weight: 600; font-size: var(--fs-small); color: var(--c-ink-soft); list-style: none; display: flex; align-items: center; gap: var(--sp-2); }
details.hypotheses summary::-webkit-details-marker { display: none; }
details.hypotheses summary::before { content: "+"; color: var(--c-accent-text); font-weight: 700; width: 1rem; }
details[open].hypotheses summary::before { content: "–"; }
details.hypotheses .inner { padding: 0 var(--sp-5) var(--sp-5); font-size: var(--fs-small); color: var(--c-ink-soft); line-height: 1.6; display: grid; gap: var(--sp-3); }
details.hypotheses ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; }

/* --- 9. Utilitaires propres aux outils --------------------------------------------- */
.u-mb-6 { margin-bottom: var(--sp-6); }
.centre { text-align: center; }

/* --- 10. Points de rupture (mobile d'abord) ---------------------------------------- */
@media (min-width: 640px) {
  .options { grid-template-columns: 1fr 1fr; }
  .opt.pleine { grid-column: 1 / -1; }
}
@media (min-width: 900px) {
  .options.ligne-3 { grid-template-columns: repeat(3, 1fr); }
  .duo-outils { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); align-items: stretch; }
}
