/* Refonte G5 : pages reprises de l'ancien site (mentions légales, générateur de cahier
 * des charges) et pages Contact / FAQ. Les anciennes classes (.page-hero, .section,
 * .container, .btn…) et variables (--accent, --white…) sont rebranchées sur le design G5. */

.g5-legacy{
  --accent:var(--acc-t); --white:var(--ink); --text:var(--ink); --text-light:var(--muted);
  --border:var(--line); --border-subtle:var(--line); --bg-card:var(--card); --radius:var(--r-lg); --radius-sm:var(--r-md);
  --transition:.3s cubic-bezier(.16,1,.3,1); --header-height:64px;
  /* L'ancienne variable --bg servait de fond aux champs : on garde le fond de page G5 */
}
.g5-legacy .container{max-width:1180px;margin:0 auto;padding:0 clamp(18px,4vw,56px)}
.g5-legacy .page-hero{padding:clamp(48px,7vw,110px) 0 clamp(36px,5vw,64px);border-bottom:1px solid var(--line)}
.g5-legacy .page-hero h1{margin:0;max-width:20ch;font-family:'Newsreader','NR Times','NR Noto','NR DejaVu',serif;font-weight:400;font-size:clamp(2.6rem,6vw,5.4rem);line-height:.98;letter-spacing:-.03em;text-wrap:balance}
.g5-legacy .page-hero h1::after{content:".";color:var(--acc)}
.g5-legacy .page-subtitle{margin:22px 0 0;max-width:62ch;font-size:clamp(1.02rem,1.3vw,1.18rem);line-height:1.6;color:var(--muted)}
.g5-legacy .section{padding:clamp(56px,7vw,100px) 0}
.g5-legacy h2{font-family:'Newsreader','NR Times','NR Noto','NR DejaVu',serif;font-weight:400;letter-spacing:-.02em;line-height:1.1}
.g5-legacy p,.g5-legacy li{line-height:1.65}
.g5-legacy a:not(.btn){color:var(--acc-t);text-decoration:underline;text-underline-offset:3px}
.g5-legacy strong{font-weight:600}
.g5-legacy input,.g5-legacy textarea,.g5-legacy select{-webkit-user-select:text;user-select:text}
.g5-legacy main,.g5-legacy .container>*{min-width:0}

/* Boutons de l'ancien site -> pilules G5 */
.g5-legacy .btn{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 24px;border-radius:var(--r-pill);font:inherit;font-weight:500;font-size:.9375rem;cursor:pointer;text-decoration:none;transition:background-color .25s,color .25s,border-color .25s,transform .2s}
.g5-legacy .btn:active{transform:scale(.97)}
.g5-legacy .btn-primary{background:var(--ink);color:var(--bg);border:1px solid var(--ink)}
@media (hover:hover) and (pointer:fine){
.g5-legacy .btn-primary:hover{background:var(--acc);border-color:var(--acc);color:var(--onacc)}
}
.g5-legacy .btn-outline{background:transparent;color:var(--ink);border:1px solid var(--ink)}
@media (hover:hover) and (pointer:fine){
.g5-legacy .btn-outline:hover{background:var(--soft)}
}
.g5-legacy .btn:focus-visible{outline:2px solid var(--acc);outline-offset:3px}

/* Mentions légales : colonne de lecture */
.g5-legacy .section .container[style*="max-width"]{max-width:760px!important}
.g5-legacy .section h2{font-size:clamp(1.5rem,2.4vw,2rem);margin:46px 0 14px}
.g5-legacy .section h2:first-child{margin-top:0}
.g5-legacy .section p{color:color-mix(in srgb,var(--ink) 86%,var(--bg));margin:0 0 14px}

/* Générateur de cahier des charges : réglages G5 par-dessus ses propres styles */
.g5-legacy .cdc-step h2,.g5-legacy .cdc-doc h2,.g5-legacy .cdc-lead h2,.g5-legacy .cdc-intro h2{font-family:'Newsreader','NR Times','NR Noto','NR DejaVu',serif;font-weight:400;font-size:clamp(1.6rem,2.6vw,2.1rem);letter-spacing:-.02em}
.g5-legacy .cdc-q input[type=text],.g5-legacy .cdc-q input[type=email],.g5-legacy .cdc-q input[type=tel],.g5-legacy .cdc-q input[type=number],.g5-legacy .cdc-q input[type=url],.g5-legacy .cdc-q textarea{background:var(--card)!important;color:var(--ink)!important;font-size:1rem!important}
.g5-legacy .cdc-q input:focus,.g5-legacy .cdc-q textarea:focus{box-shadow:0 0 0 4px color-mix(in srgb,var(--acc) 18%,transparent)!important}
.g5-legacy .cdc-choice span{min-height:48px}
.g5-legacy .cdc-choice input:checked+span{background:color-mix(in srgb,var(--acc) 9%,var(--card))!important;color:var(--ink)!important}
.g5-legacy .cdc-seg input:checked+span{color:var(--onacc)!important;background:var(--acc)!important}
.g5-legacy .cdc-seg span{min-height:36px;display:flex!important;align-items:center;justify-content:center}
.g5-legacy .cdc-lead{background:color-mix(in srgb,var(--acc) 5%,var(--card))!important;border-color:color-mix(in srgb,var(--acc) 45%,var(--line))!important}
.g5-legacy .cdc-lead .cdc-alt{min-height:44px}
.g5-legacy .cdc-doc{background:var(--card)!important}
.g5-legacy .cdc-doc h3{color:var(--acc-t)!important}
.g5-legacy .cdc-error{color:var(--danger)!important}
[data-g5][data-theme="dark"] .g5-legacy .cdc-error{color:#ff8a80!important}
.g5-legacy .cdc-warn{color:var(--ink)}

/* ── Contact et FAQ ─────────────────────────────────────────────────── */
.g5-faq{display:flex;flex-wrap:wrap;gap:32px 64px;padding:clamp(80px,10vw,140px) clamp(18px,4vw,56px);border-top:1px solid var(--line)}
.g5-faq h2{flex:1 1 300px;margin:0;align-self:flex-start;font-family:'Newsreader','NR Times','NR Noto','NR DejaVu',serif;font-weight:400;font-size:clamp(2.2rem,4.4vw,4rem);line-height:.98;letter-spacing:-.025em}
.g5-faq-list{flex:2 1 560px;min-width:0;border-top:1px solid var(--ink)}
.g5-faq-list details{border-bottom:1px solid var(--line)}
.g5-faq-list summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;gap:20px;padding:20px 0;min-height:44px;font-size:1.12rem;font-weight:500;transition:color .25s}
.g5-faq-list summary:hover{color:var(--acc-t)}
.g5-faq-list summary::after{content:"+";color:var(--acc-t);font-size:1.3rem;line-height:1;transition:transform .3s cubic-bezier(.16,1,.3,1)}
.g5-faq-list details[open] summary::after{transform:rotate(45deg)}
.g5-faq-list .g5-faq-a{margin:0 0 22px;color:var(--muted);line-height:1.65;max-width:64ch}
.g5-faq-list .g5-faq-a a{color:var(--acc-t);text-decoration:underline;text-underline-offset:3px}
.g5-page-hero{padding:clamp(48px,7vw,110px) clamp(18px,4vw,56px) clamp(40px,5vw,70px);display:flex;flex-direction:column;gap:22px;border-bottom:1px solid var(--line)}
.g5-page-hero .g5-eyebrow{font-size:.8125rem;color:var(--muted)}
.g5-page-hero h1{margin:0;max-width:18ch;font-family:'Newsreader','NR Times','NR Noto','NR DejaVu',serif;font-weight:400;font-size:clamp(3rem,7vw,6.4rem);line-height:.95;letter-spacing:-.03em}
.g5-page-hero p{margin:0;max-width:56ch;font-size:clamp(1.05rem,1.4vw,1.25rem);line-height:1.55;color:var(--muted)}
.g5-page-hero p a{color:var(--acc-t);text-decoration:underline;text-underline-offset:3px}
.g5-cta-band{padding:clamp(80px,10vw,140px) clamp(18px,4vw,56px);background:var(--deep);color:var(--deepInk);display:flex;flex-direction:column;gap:20px;align-items:flex-start}
.g5-cta-band h2{margin:0;font-family:'Newsreader','NR Times','NR Noto','NR DejaVu',serif;font-weight:400;font-size:clamp(2.4rem,5vw,4.6rem);line-height:.98;letter-spacing:-.025em}
.g5-cta-band p{margin:0;color:var(--deepMuted);max-width:46ch;line-height:1.6}
