/* disc.weclain.com : mise en page et composants propres au site.
   La charte (couleurs, blocs, boutons, en-tête, pied de page) vient de weclain.css. */

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; line-height: 1.65; font-size: 1.0625rem; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 2000; background: var(--color-blue-dark); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-btn); text-decoration: none; }
.skip-link:focus { top: .75rem; }

/* ---------- Structure ---------- */
main { flex: 1 0 auto; width: 100%; }
.wrap { width: 100%; max-width: 64rem; margin: 0 auto; padding: 0 1rem; }
.wrap--read { max-width: 64rem; }   /* même largeur que l'en-tête et le fil d'Ariane : la lisibilité est tenue par .prose (68ch) */
.section { padding: 2.25rem 0; }
.section--tight { padding: 1.25rem 0; }
.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 1.75rem; }
.grid { display: grid; gap: 1.5rem; }
@media (min-width: 700px) {
    .grid--2 { grid-template-columns: repeat(2, 1fr); }
    .grid--3 { grid-template-columns: repeat(3, 1fr); }
    .grid--4 { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 900px) { .grid--hero { grid-template-columns: 1.35fr 1fr; align-items: center; gap: 3rem; } }
.pad { padding: 1.25rem; }
@media (min-width: 640px) { .pad { padding: 1.75rem; } }
.center { text-align: center; }
.muted { color: #475569; }
.small { font-size: .9rem; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }

/* ---------- Texte ---------- */
h1 { font-size: clamp(1.9rem, 5vw, 3rem); font-weight: 800; margin: 0 0 1rem; }
h2 { font-size: clamp(1.45rem, 3.4vw, 2rem); font-weight: 800; margin: 0 0 .9rem; }
h3 { font-size: 1.2rem; font-weight: 700; margin: 0 0 .5rem; }
p { margin: 0 0 1rem; }
.lead { font-size: 1.2rem; line-height: 1.6; color: #334155; }
.prose p, .prose li { max-width: 68ch; }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 1rem; }
.prose li { margin-bottom: .45rem; }
.prose h2 { margin-top: 2.25rem; }
.prose h3 { margin-top: 1.5rem; }
.tick { list-style: none; padding-left: 0 !important; }
.tick li { position: relative; padding-left: 1.6rem; }
.tick li::before { content: ""; position: absolute; left: 0; top: .55em; width: .9rem; height: .5rem; border-left: 3px solid var(--page-accent, var(--color-orange-accent)); border-bottom: 3px solid var(--page-accent, var(--color-orange-accent)); transform: rotate(-45deg) translateY(-45%); }
.cross { list-style: none; padding-left: 0 !important; }
.cross li { position: relative; padding-left: 1.6rem; }
.cross li::before { content: "×"; position: absolute; left: .1rem; top: -.1em; font-weight: 800; font-size: 1.3rem; color: #C0261B; }

/* Fil d'Ariane */
.crumbs { font-size: .875rem; color: #475569; padding-top: .5rem; }
.crumbs + .section, .crumbs + main { padding-top: 1rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem .5rem; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: .5rem; color: #94A3B8; }
.crumbs a { color: inherit; }

/* ---------- Accueil ---------- */
.hero { padding: 0 0 3rem; }
html, body { overflow-x: clip; }
/* Vague en pointillés bleus derrière le haut de l'accueil (comme sur le test RIASEC) */
.trace-pointilles { position: absolute; top: 0; height: 100%; left: 50%; width: 100vw; transform: translateX(-50%); pointer-events: none; z-index: -1; color: #3498DB; max-width: none; }
.badge--live { background: linear-gradient(rgba(21, 128, 61, .1), rgba(21, 128, 61, .1)), #fff; }
.trace-flou { width: fit-content; max-width: 100%; padding: .1em .55em; border-radius: .75rem; background: rgba(255,255,255,.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.letters { font-family: var(--font-heading); font-weight: 800; }
.hero-art { position: relative; }
.quad { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.quad__cell { display: block; text-decoration: none; color: var(--color-blue-dark); padding: 1rem; border-radius: var(--radius-bento); background: #fff; border: 2px solid color-mix(in srgb, var(--page-accent) 55%, #fff); transition: transform .2s ease, box-shadow .2s ease; }
.quad__cell:hover { transform: translateY(-3px) rotate(-.6deg); box-shadow: var(--shadow-hover); }
.quad__letter { display: block; font-family: var(--font-heading); font-weight: 800; font-size: 2.4rem; line-height: 1; color: var(--page-accent-ink); }
.quad__name { display: block; font-weight: 700; margin-top: .25rem; }
.quad__tag { display: block; font-size: .85rem; color: #475569; margin-top: .15rem; line-height: 1.35; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; position: relative; padding-top: .25rem; }
.steps li::before { content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--color-orange-accent); color: #fff; font-family: var(--font-heading); font-weight: 800; margin-bottom: .6rem; }

/* ---------- Pages de profil et de résultat ---------- */
.badge-letter { display: inline-flex; align-items: center; justify-content: center; width: 4rem; height: 4rem; border-radius: var(--radius-bento); background: var(--page-accent); color: #fff; font-family: var(--font-heading); font-weight: 800; font-size: 2.2rem; }
.acc-i .badge-letter { color: var(--color-blue-dark); }
.kw { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0 0 1rem; padding: 0; }
.kw li { padding: .25rem .8rem; border-radius: 99px; font-size: .9rem; font-weight: 600; }
.cols-2 { display: grid; gap: 1.5rem; }
@media (min-width: 700px) { .cols-2 { grid-template-columns: 1fr 1fr; } }
.ink { color: var(--ink, var(--color-blue-dark)); }

/* Barres de score */
.bars { display: grid; gap: 1rem; }
.bar { display: grid; grid-template-columns: 7.5rem 1fr 3rem; align-items: center; gap: .75rem; }
.bar__label { font-weight: 700; color: var(--color-blue-dark); }
.bar__label small { display: block; font-weight: 500; color: #475569; font-size: .8rem; }
.bar__track { height: 1.1rem; background: #E2E8F0; border-radius: 99px; overflow: hidden; }
.bar__fill { height: 100%; border-radius: 99px; background: var(--page-accent); width: 0; animation: grow .9s ease-out forwards; }
.bar__val { font-weight: 800; text-align: right; color: var(--color-blue-dark); }
@keyframes grow { to { width: var(--w); } }
@media (max-width: 480px) { .bar { grid-template-columns: 5.5rem 1fr 2.6rem; gap: .5rem; } }
@media (prefers-reduced-motion: reduce) { .bar__fill { animation: none; width: var(--w); } }

/* ---------- Test ---------- */
.test-shell { margin: 0 auto; }
.q-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .6rem; font-weight: 600; color: var(--color-blue-dark); }
.q-title { font-family: var(--font-heading); font-weight: 800; font-size: clamp(1.25rem, 3.4vw, 1.6rem); color: var(--color-blue-dark); margin: 1rem 0 1rem; }
.q-help { color: #475569; margin: 0 0 1rem; font-size: .95rem; }
.q-steps { display: flex; gap: .5rem; list-style: none; margin: 0; padding: 0; font-size: .85rem; font-weight: 700; color: #475569; }
.q-steps li { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .7rem .25rem .3rem; border-radius: 99px; background: #F1F5F9; border: 2px solid transparent; }
.q-steps span { display: inline-flex; align-items: center; justify-content: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: #CBD5E1; color: #fff; font-size: .75rem; }
.q-steps .is-current { background: #fff; border-color: var(--color-blue-dark); color: var(--color-blue-dark); }
.q-steps .is-current span { background: var(--color-blue-dark); }
.q-steps [data-step="least"].is-current { border-color: var(--color-orange-hover); color: #7A3A00; }
.q-steps [data-step="least"].is-current span { background: var(--color-orange-accent); }
.q-steps .is-done span { background: #16794A; }
.opts { display: grid; gap: .75rem; margin: 0; padding: 0; list-style: none; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: .75rem; width: 100%; min-height: 3.6rem; padding: .8rem 1rem; text-align: left; font: inherit; background: #fff; border: 2px solid #E2E8F0; border-radius: var(--radius-bento); cursor: pointer; transition: border-color .15s ease, background-color .15s ease, transform .1s ease; }
.opt:hover { border-color: var(--color-blue-dark); }
.opt:active { transform: scale(.99); }
.opt__text { font-size: 1.05rem; color: var(--color-blue-dark); line-height: 1.4; }
.opt__tag { flex: none; padding: .2rem .65rem; border-radius: 99px; font-size: .8rem; font-weight: 800; color: #fff; }
.opt.is-most { border-color: var(--color-blue-dark); background: #F1F4F9; }
.opt.is-most .opt__tag { background: var(--color-blue-dark); }
.opt.is-least { border-color: var(--color-orange-accent); background: #FFF3E8; }
.opt.is-least .opt__tag { background: #B45309; }
.opt:focus-visible, .linkish:focus-visible { outline: 3px solid var(--color-orange-accent); outline-offset: 2px; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--color-orange-text); text-decoration: underline; cursor: pointer; }
.q-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-top: 1.25rem; }
.q-hint { margin: 0 0 0 auto; text-align: right; font-size: .85rem; color: #475569; max-width: 22rem; }
.hidden { display: none !important; }

/* ---------- Tableaux et encadrés ---------- */
.table-wrap { overflow-x: auto; margin: 0 0 1.25rem; }
table { border-collapse: collapse; width: 100%; font-size: .98rem; background: #fff; }
th, td { text-align: left; vertical-align: top; padding: .65rem .8rem; border: 1px solid #E2E8F0; }
th { background: #EAEFF6; color: var(--color-blue-dark); font-family: var(--font-heading); }
.callout { background: #FFF3E8; border-left: 5px solid var(--color-orange-accent); border-radius: var(--radius-bento); padding: 1rem 1.25rem; margin: 1.25rem 0; }
.callout p:last-child { margin-bottom: 0; }
.sources { font-size: .92rem; color: #334155; }
.sources li { margin-bottom: .4rem; }

/* FAQ */
.faq details { background: #fff; border: 1px solid #E2E8F0; border-radius: var(--radius-bento); padding: .2rem 1rem; margin-bottom: .75rem; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--color-blue-dark); padding: .8rem 0; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--color-orange-text); }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 0 .9rem; }

/* Cartes de liens vers les pages */
.cardlink { display: block; text-decoration: none; color: inherit; height: 100%; }
.cardlink h3 { color: var(--color-blue-dark); }
.cardlink .more { color: var(--color-orange-text); font-weight: 700; }

/* Pied de page : liens */
.footer__inner { max-width: 64rem; }
.footer__inner + .footer__inner { margin-top: 1rem; }

/* ---------- Passerelle vers orientation.weclain.com ---------- */
.orient__card { display: grid; gap: 1.25rem; align-items: center; }
.orient__body h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); margin-top: .75rem; }
.orient__img { width: 9rem; height: auto; justify-self: center; transform: rotate(5deg); }
@media (min-width: 640px) { .orient__card { grid-template-columns: 1fr 10rem; } }
@media print { .orient, .q-steps { display: none; } }

/* Dessins au trait bleu (famille d'orientation.weclain.com) */
.doodle-float { float: right; width: 8.5rem; height: auto; margin: 0 0 1rem 1.5rem; transform: rotate(5deg); }
@media (max-width: 640px) { .doodle-float { width: 5.5rem; margin: .25rem 0 .5rem 1rem; } }
@media print { .doodle-float { display: none; } }
.prose > :first-child { margin-top: 0; }
.prose h2 { clear: both; }

/* Trois boutons d'action du résultat : même taille, centrés */
.actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem 1rem; max-width: 56rem; margin: 1.5rem auto; }
.actions .btn { width: 100%; min-height: 3.25rem; justify-content: center; text-align: center; font: inherit; font-weight: 600; line-height: 1.25; }
@media (max-width: 820px) { .actions { grid-template-columns: 1fr; max-width: 24rem; } }
@media print { .actions { display: none; } }
