/* Diagnostic IA générative — styles limités au conteneur .tgd */
.tgd{
  --tgd-ground:#F6F4EF; --tgd-card:#FFFFFF; --tgd-line:#E2DDD3; --tgd-track:#EDE8DE;
  --tgd-ink:#16202A; --tgd-ink-2:#2B3640; --tgd-muted:#4A5560;
  --tgd-teal:#0F5E63; --tgd-teal-dark:#0A4346; --tgd-teal-soft:#E2EFEF;
  --tgd-accent:#B4541A; --tgd-accent-soft:#FBEDE3;
  --tgd-serif:"Spectral",Georgia,serif;
  --tgd-sans:"Atkinson Hyperlegible Next",system-ui,sans-serif;
  background:var(--tgd-ground); color:var(--tgd-ink); font-family:var(--tgd-sans);
  font-size:17px; line-height:1.55; padding:40px 0 8px; scroll-margin-top:24px;
}
.tgd *,.tgd *::before,.tgd *::after{box-sizing:border-box}
.tgd h1,.tgd h2,.tgd h3,.tgd p,.tgd ul,.tgd fieldset,.tgd legend{margin:0; padding:0; letter-spacing:normal; text-transform:none}
.tgd h1,.tgd h2{font-family:var(--tgd-serif); font-weight:600; color:var(--tgd-ink); line-height:1.15}
.tgd h3{font-family:var(--tgd-sans); font-weight:700; color:var(--tgd-ink); font-size:20px; line-height:1.3}
.tgd a{text-decoration:none}
.tgd [hidden]{display:none !important}
.tgd-wrap{max-width:1120px; margin:0 auto; padding:0 24px}
.tgd-section{margin-bottom:44px}
.tgd-card{background:var(--tgd-card); border:1px solid var(--tgd-line); border-radius:16px; padding:28px}
.tgd-eyebrow{font-size:13px; letter-spacing:.08em; text-transform:uppercase; font-weight:700; color:var(--tgd-teal)}
.tgd-btn{display:inline-flex; align-items:center; justify-content:center; min-height:50px; padding:0 24px; border-radius:12px; font:inherit; font-size:16px; font-weight:700; text-align:center; cursor:pointer; border:0}
.tgd .tgd-btn-primary{background:var(--tgd-ink); color:#fff}
.tgd .tgd-btn-primary:hover{background:#2B3640; color:#fff}
.tgd .tgd-btn-ghost{background:transparent; color:var(--tgd-ink); border:1px solid #B9B2A5}
.tgd .tgd-btn-ghost:hover{background:#EFEBE3; color:var(--tgd-ink)}
.tgd .tgd-btn-light{background:#fff; color:var(--tgd-teal-dark)}
.tgd .tgd-btn-light:hover{background:#E3F1F0; color:var(--tgd-teal-dark)}
.tgd .tgd-btn-outline{background:transparent; border:1px solid #8CC4C2; color:#fff; font-weight:600}
.tgd .tgd-btn-outline:hover{background:rgba(255,255,255,.08); color:#fff}
.tgd a:focus-visible,.tgd button:focus-visible{outline:3px solid #E08A52; outline-offset:2px}
/* ---------- Questionnaire ---------- */
.tgd-start{max-width:760px; display:flex; flex-direction:column; gap:24px; padding-bottom:32px}
.tgd-start h1{font-size:46px}
.tgd-sub{font-size:19px; color:var(--tgd-muted); margin-top:-10px !important}
.tgd-consent{display:flex; flex-direction:column; gap:12px}
.tgd-consent h2{font-size:24px}
.tgd-consent p{color:var(--tgd-ink-2)}
.tgd-consent .tgd-small{font-size:15px; color:var(--tgd-muted)}
.tgd-consent a{color:var(--tgd-teal); text-decoration:underline}
.tgd-badge{align-self:flex-start; font-size:13px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; background:var(--tgd-teal-soft); color:var(--tgd-teal-dark); padding:4px 10px; border-radius:999px}
.tgd-start-btns{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px}
.tgd-start-btns .tgd-btn{min-height:56px}
.tgd-start-btns .tgd-btn:only-child{grid-column:1 / -1; justify-self:start}
.tgd-progress{max-width:760px; margin-bottom:20px}
.tgd-progress-row{display:flex; justify-content:space-between; gap:12px; font-size:14px; color:var(--tgd-muted); margin-bottom:8px}
.tgd-progress-row strong{color:var(--tgd-ink)}
.tgd-bar{height:8px; border-radius:4px; background:var(--tgd-track); overflow:hidden}
.tgd-bar > span{display:block; height:100%; border-radius:4px; background:var(--tgd-teal); transition:width .3s}
.tgd-bar.is-weak > span{background:var(--tgd-accent)}
.tgd-form{max-width:760px}
.tgd-step-head{margin-bottom:24px; display:flex; flex-direction:column; gap:8px}
.tgd-step-head h2{font-size:32px}
.tgd-step-head p{color:var(--tgd-muted)}
.tgd .tgd-q{border:0; margin:0 0 36px}
.tgd-q legend{font-weight:700; font-size:18px; line-height:1.4; margin-bottom:12px; display:flex; gap:10px}
.tgd-qnum{flex-shrink:0; min-width:28px; height:28px; border-radius:14px; background:var(--tgd-ink); color:#fff; font-size:14px; display:inline-flex; align-items:center; justify-content:center; margin-top:-1px}
.tgd-qhint{font-size:15px; color:var(--tgd-muted); margin:-6px 0 12px}
.tgd-opts{display:grid; gap:8px}
.tgd-opt{display:flex; align-items:flex-start; gap:12px; background:var(--tgd-card); border:1px solid var(--tgd-line); border-radius:12px; padding:13px 16px; cursor:pointer; font-size:16px; line-height:1.4; transition:border-color .15s, background .15s}
.tgd-opt:hover{border-color:#B9B2A5}
.tgd-opt input{margin:2px 0 0; width:18px; height:18px; flex-shrink:0; accent-color:var(--tgd-teal)}
.tgd-opt:has(input:checked){border-color:var(--tgd-teal); background:#F1F8F7; box-shadow:0 0 0 1px var(--tgd-teal)}
.tgd-opt.is-nsp{color:var(--tgd-muted)}
.tgd-err{color:#A3361B; font-size:15px; font-weight:600; margin-top:8px}
.tgd-nav{display:flex; justify-content:space-between; gap:12px; margin-top:8px; padding-top:24px; border-top:1px solid var(--tgd-line)}
.tgd-privacy{margin-top:20px; font-size:14px; color:var(--tgd-muted)}
/* ---------- Résultats ---------- */
.tgd-steps{display:flex; align-items:center; gap:12px; flex-wrap:wrap; font-size:14px; color:var(--tgd-muted); margin-bottom:32px}
.tgd-stp{display:flex; align-items:center; gap:8px}
.tgd-dot{width:24px; height:24px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; border:1px solid #9A9388}
.tgd-stp.is-done .tgd-dot{background:var(--tgd-teal); border-color:var(--tgd-teal); color:#fff}
.tgd-stp.is-current{color:var(--tgd-ink); font-weight:700}
.tgd-stp.is-current .tgd-dot{background:var(--tgd-ink); border-color:var(--tgd-ink); color:#fff}
.tgd-sep{width:32px; height:1px; background:#C9C2B5}
.tgd-hero{display:grid; grid-template-columns:minmax(0,1fr) 430px; gap:56px; align-items:start}
.tgd-hero-text{display:flex; flex-direction:column; gap:18px}
.tgd-hero-text .tgd-eyebrow{color:var(--tgd-accent)}
.tgd-hero h1{font-size:56px}
.tgd-lead{font-size:21px; line-height:1.45; color:var(--tgd-ink-2); max-width:600px}
.tgd-border-note{font-size:15px; color:var(--tgd-muted); background:#EFEBE3; border-radius:10px; padding:10px 14px}
.tgd-scores{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:6px}
.tgd-score{padding:20px 22px; display:flex; flex-direction:column; gap:6px}
.tgd-score-label{font-size:14px; font-weight:600; color:var(--tgd-muted)}
.tgd-score-row{display:flex; align-items:baseline; gap:8px}
.tgd-score-num{font-family:var(--tgd-serif); font-size:44px; font-weight:600; line-height:1}
.tgd-score-max{font-size:17px; color:var(--tgd-muted)}
.tgd-pill{margin-left:auto; font-size:13px; font-weight:700; padding:4px 10px; border-radius:999px; background:#EFEBE3; color:var(--tgd-ink-2)}
.tgd-matrix{display:grid; grid-template-columns:18px minmax(0,1fr); gap:10px 12px}
.tgd-axis-y{display:flex; align-items:center; justify-content:center}
.tgd-axis-y span{transform:rotate(-90deg); white-space:nowrap; font-size:13px; font-weight:700; color:var(--tgd-muted)}
.tgd-axis-x{grid-column:2; text-align:center; font-size:13px; font-weight:700; color:var(--tgd-muted)}
.tgd-quads{position:relative; aspect-ratio:1/1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px}
.tgd-quad{border-radius:10px; padding:12px 14px; font-size:14px; font-weight:600; display:flex; border:2px solid transparent}
.tgd-quad.is-bottom{align-items:flex-end}
.tgd-quad.is-me{border-color:var(--tgd-accent); font-weight:700}
.tgd-you{position:absolute; width:22px; height:22px; transform:translate(-50%,-50%)}
.tgd-you i{display:block; width:22px; height:22px; border-radius:50%; background:var(--tgd-ink); border:4px solid #fff; box-shadow:0 0 0 2px var(--tgd-ink)}
.tgd-you b{position:absolute; top:30px; left:50%; transform:translateX(-50%); white-space:nowrap; font-size:13px; background:var(--tgd-ink); color:#fff; padding:2px 8px; border-radius:6px}
.tgd-you.is-left b{left:-4px; transform:none}
.tgd-you.is-right b{left:auto; right:-4px; transform:none}
.tgd-you.is-low b{top:auto; bottom:30px}
.tgd-two{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; align-items:start}
.tgd-two .tgd-card{display:flex; flex-direction:column; gap:12px}
.tgd-two h2{font-size:25px}
.tgd-two h3{font-size:16px; margin-top:6px}
.tgd-list{list-style:none; display:flex; flex-direction:column; gap:8px}
.tgd-list li{position:relative; padding-left:20px; color:var(--tgd-ink-2)}
.tgd-list li::before{content:""; position:absolute; left:2px; top:.62em; width:7px; height:7px; border-radius:50%; background:var(--tgd-accent)}
.tgd-risk{background:var(--tgd-ink); color:#fff; border-radius:16px; padding:28px; display:flex; flex-direction:column; gap:12px}
.tgd-risk .tgd-eyebrow{color:#F2B48C}
.tgd-risk p{font-family:var(--tgd-serif); font-size:23px; line-height:1.4; color:#fff}
.tgd-h2{font-size:30px; margin-bottom:18px}
.tgd-axes{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px 56px}
.tgd-axis{display:flex; flex-direction:column; gap:8px}
.tgd-axis-head{display:flex; justify-content:space-between; gap:12px; font-size:16px}
.tgd-axis-head span:first-child{font-weight:600}
.tgd-axis-head span:last-child{color:var(--tgd-muted); white-space:nowrap}
.tgd-axis .tgd-bar{height:10px}
.tgd-prio-head{display:flex; align-items:baseline; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:18px}
.tgd-prio-head .tgd-h2{margin-bottom:0}
.tgd-prio-head span{font-size:15px; color:var(--tgd-muted)}
.tgd-prios{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px}
.tgd-prio{display:flex; flex-direction:column; gap:12px}
.tgd-prio-top{display:flex; align-items:center; justify-content:space-between; gap:8px}
.tgd-prio-num{font-family:var(--tgd-serif); font-size:40px; font-weight:600; line-height:1; color:var(--tgd-accent)}
.tgd-tag{font-size:13px; font-weight:700; background:#F1EEE7; color:var(--tgd-muted); padding:4px 10px; border-radius:999px; text-align:right}
.tgd-prio p{font-size:16px; color:var(--tgd-ink-2)}
.tgd-prio-why{margin-top:auto; padding-top:12px; border-top:1px solid var(--tgd-track); font-size:14px; color:var(--tgd-muted)}
.tgd-cta{background:var(--tgd-teal); color:#fff; border-radius:20px; padding:44px 48px; display:grid; grid-template-columns:minmax(0,1fr) 290px; gap:48px; align-items:center}
.tgd-cta .tgd-eyebrow{color:#BFE0DF}
.tgd-cta h2{color:#fff; font-size:36px; margin:12px 0}
.tgd-cta p{color:#E3F1F0; font-size:18px; max-width:620px}
.tgd-cta-btns{display:flex; flex-direction:column; gap:12px}
.tgd-actions{display:flex; gap:12px; flex-wrap:wrap; margin-bottom:28px}
.tgd-foot{border-top:1px solid var(--tgd-line); padding:24px 0 28px; margin-top:8px; font-size:14px; color:var(--tgd-muted)}
@media (max-width: 960px){
  .tgd-hero{grid-template-columns:minmax(0,1fr); gap:32px}
  .tgd-matrix{max-width:460px}
  .tgd-prios{grid-template-columns:minmax(0,1fr)}
  .tgd-cta{grid-template-columns:minmax(0,1fr); gap:28px; padding:36px 28px}
}
@media (max-width: 640px){
  .tgd{font-size:16px; padding-top:28px}
  .tgd-wrap{padding:0 16px}
  .tgd-step-head h2{font-size:26px}
  .tgd-hero h1{font-size:40px}
  .tgd-lead{font-size:18px}
  .tgd-scores,.tgd-two,.tgd-axes{grid-template-columns:minmax(0,1fr)}
  .tgd-h2{font-size:26px}
  .tgd-cta h2{font-size:28px}
  .tgd-start h1{font-size:34px}
  .tgd-sub{font-size:17px}
  .tgd-start-btns{grid-template-columns:minmax(0,1fr)}
  .tgd-start-btns .tgd-btn:only-child{justify-self:stretch}
  .tgd-card,.tgd-risk{padding:22px}
  .tgd-nav .tgd-btn{flex:1}
}
@media print{
  body *{visibility:hidden}
  .tgd, .tgd *{visibility:visible; -webkit-print-color-adjust:exact; print-color-adjust:exact}
  .tgd{position:absolute; left:0; top:0; width:100%; background:#fff; padding:0}
  .tgd .tgd-noprint{display:none !important}
  .tgd-card,.tgd-risk,.tgd-prio{break-inside:avoid}
  .tgd-hero,.tgd-prios{grid-template-columns:minmax(0,1fr)}
  .tgd-matrix{max-width:360px}
}
.tgd-nav .tgd-btn-primary{margin-left:auto}
