/* ══════════════════════════════════════════════════════════════
   DRUGZ — Autodiag (preview autonome)
   Questionnaires de repérage validés, sourcés, non-moralisateurs.

   CONSOMMATIONS : AUDIT (OMS) · CAST (OFDT) · CUDIT-R (Adamson 2010)
   · DUDIT (Berman 2005) · Fagerström (Heatherton 1991)
   SANTÉ MENTALE : ASRS v1.1 (OMS) · AQ-10 (ARC Cambridge) · MDQ
   (Hirschfeld 2000) · MSI-BPD (Zanarini 2003) · PQ-16 (Ising 2012)
   · GAD-7 (Spitzer 2006) · PHQ-9 (Kroenke 2001)

   RIGUEUR DU WORDING (système 3 niveaux DRUGZ) :
   ✅ AUDIT, CAST : verbatim des versions françaises officielles.
   ⚠ CUDIT-R, DUDIT, Fagerström, ASRS, MDQ, GAD-7, PHQ-9 :
     adaptation fidèle des versions françaises en circulation —
     à recouper avec les validations FR publiées avant mise en prod.
   ⚠ AQ-10, PQ-16, MSI-BPD : traduction rigoureuse de l'original —
     pas de version FR officielle unique, à recouper avant prod.
   NB MSI-BPD item 2 : exemples de méthodes volontairement retirés
   (prévention) — validité de repérage préservée, choix assumé.

   Seuils : tous issus des publications de référence (voir `source`).
   100 % côté client : aucune donnée envoyée ni stockée.
   Couleur substance/trouble = thème · couleur de risque
   (vert/ambre/rouge) = niveau (deux systèmes distincts).
   ══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
button { appearance: none; -webkit-appearance: none; background: none; border: none; font: inherit; color: inherit; cursor: pointer; }
ul { list-style: none; }

:root {
	--bg: #04040a;
	--text-hi: rgba(255,255,255,0.96);
	--text-mid: rgba(255,255,255,0.82);
	--text-lo: rgba(255,255,255,0.58);
	--border: rgba(255,255,255,0.06);
	--border-hi: rgba(255,255,255,0.10);
	--accent: #00ffff;
	--ok: #4BE38C;
	--moyen: #F5C84B;
	--haut: #FF6B5C;
	color-scheme: dark;
}

html { background: var(--bg); }
body {
	background: var(--bg); color: var(--text-mid);
	font-family: 'Exo 2', sans-serif; min-height: 100vh; overflow-x: clip; -webkit-font-smoothing: antialiased;
}

/* Sticky footer : sur les pages courtes, le footer reste collé en bas de l'écran */
body.tool-autodiag { display: flex; flex-direction: column; }
body.tool-autodiag > .wrap { flex: 1 0 auto; }
body.tool-autodiag > .site-footer { flex-shrink: 0; }

/* Bouton retour-en-haut (fixe, révélé au scroll par scroll-to-top.js) */
.scroll-to-top {
	position: fixed; bottom: 80px; right: 0; width: 54px; height: 54px; z-index: 205;
	display: flex; align-items: center; justify-content: center;
	background: rgba(10,10,18,0.9); border: 1px solid var(--border-hi); border-right: none;
	color: var(--text-lo); outline: none;
	opacity: 0; transform: translateY(12px); pointer-events: none;
	transition: color .2s, border-color .2s, background .2s, opacity .3s, transform .3s;
}
.scroll-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.scroll-to-top:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.scroll-to-top svg { width: 18px; height: 18px; fill: currentColor; }
body::before {
	content: ''; position: fixed; inset: 0;
	background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.06) 2px, rgba(0,0,0,0.06) 3px);
	pointer-events: none; z-index: 9000;
}
body::after {
	content: ''; position: fixed; inset: 0;
	background-image:
		radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px),
		linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
	background-size: 32px 32px, 64px 64px, 64px 64px;
	pointer-events: none; z-index: 0; animation: drift 90s linear infinite; opacity: 0.6;
}
@keyframes drift { 0% { background-position: 0 0,0 0,0 0; } 100% { background-position: 32px 32px,64px 64px,64px 64px; } }

.wrap { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; padding: 54px 22px 100px; }

/* ═══════ EN-TÊTE (aligné pages outils : Orbitron 900, glitch + dégradé, centré) ═══════ */
.eyebrow { font-family: 'Share Tech Mono', monospace; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); opacity: 0.85; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.eyebrow svg { width: 16px; height: 16px; }
.screen > .eyebrow { justify-content: center; }
.title {
	font-family: 'Orbitron', sans-serif; font-size: clamp(22px, 5vw, 34px) !important; font-weight: 900;
	line-height: 1.2; letter-spacing: 0.08em; margin: 0 auto 8px !important; text-align: center;
	color: #fff; -webkit-text-fill-color: #fff;
}
.title span:first-child { text-shadow: 0.02em 0 #ff00e5, -0.02em 0 #00f0ff; }
.title span:last-child {
	background: linear-gradient(135deg, #00f0ff, #ff00e5, #ffaa00);
	-webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.title-rule { height: 1px; width: 160px; margin: 16px auto 18px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0.55; }
.lead { font-size: 15px; line-height: 1.75; color: var(--text-mid); max-width: 66ch; margin: 0 auto; text-align: center; }
.lead b { color: var(--text-hi); font-weight: 600; }

/* ═══════ PRIVACY ═══════ */
.privacy {
	display: flex; align-items: center; gap: 10px; margin: 20px 0 0;
	padding: 11px 14px; border: 1px solid color-mix(in srgb, var(--ok) 28%, transparent); border-radius: 4px;
	background: color-mix(in srgb, var(--ok) 6%, transparent);
	font-family: 'Share Tech Mono', monospace; font-size: 11px; letter-spacing: 0.04em; color: color-mix(in srgb, var(--ok) 80%, #fff); line-height: 1.5;
}
.privacy svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--ok); }

/* ═══════ SECTIONS ACCUEIL ═══════ */
.section-h {
	margin: 36px 0 0; display: flex; align-items: center; gap: 12px;
	font-family: 'Share Tech Mono', monospace; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-lo);
}
.section-h svg { width: 15px; height: 15px; color: var(--accent); opacity: 0.8; flex-shrink: 0; }
.section-h::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border-hi), transparent); }
.section-note { margin-top: 8px; font-size: 12.5px; line-height: 1.6; color: var(--text-lo); }

/* ═══════ CARTES QUESTIONNAIRES ═══════ */
.qcards { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.qcard {
	--q: #888;
	display: flex; align-items: center; gap: 16px; text-align: left;
	padding: 18px 18px; border: 1px solid var(--border); border-left: 3px solid color-mix(in srgb, var(--q) 50%, transparent);
	border-radius: 6px; background: rgba(255,255,255,0.015); transition: transform 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s; width: 100%;
}
.qcard:hover { transform: translateY(-2px); border-left-color: var(--q); background: rgba(255,255,255,0.03); box-shadow: 0 10px 28px rgba(0,0,0,0.35), inset 3px 0 18px -10px var(--q); }
.qcard__icon { width: 42px; height: 42px; border-radius: 9px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--q); background: color-mix(in srgb, var(--q) 10%, transparent); border: 1px solid color-mix(in srgb, var(--q) 25%, transparent); }
.qcard__icon svg { width: 22px; height: 22px; }
.qcard__body { flex: 1; min-width: 0; }
.qcard__name { font-family: 'Orbitron', sans-serif; font-weight: 700; font-size: 15px; letter-spacing: 0.4px; color: var(--text-hi); margin-bottom: 3px; }
.qcard__desc { font-size: 13px; line-height: 1.5; color: var(--text-lo); }
.qcard__meta { margin-top: 7px; font-family: 'Share Tech Mono', monospace; font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; color: color-mix(in srgb, var(--q) 70%, var(--text-lo)); }
.qcard__arrow { color: var(--text-lo); flex-shrink: 0; }
.qcard:hover .qcard__arrow { color: var(--q); }
.qcard__arrow svg { width: 18px; height: 18px; }

.home-note { margin-top: 28px; font-family: 'Share Tech Mono', monospace; font-size: 10px; letter-spacing: 0.04em; color: var(--text-lo); opacity: 0.7; line-height: 1.8; }

/* ═══════ INTRO QUESTIONNAIRE ═══════ */
.intro { --q: #888; }
.intro-crumb { font-size: 11px; letter-spacing: 0.04em; color: rgba(255,255,255,0.4); margin: 0 0 26px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.intro-crumb a { color: rgba(255,255,255,0.55); text-decoration: none; }
.intro-crumb a:hover { color: var(--q); }
.intro-crumb .sep { opacity: 0.3; }
.intro-crumb .here { color: var(--q); }
.intro-head { display: flex; align-items: center; gap: 18px; margin: 4px 0 22px; }
.intro-icon {
	width: 56px; height: 56px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
	color: var(--q); background: color-mix(in srgb, var(--q) 10%, transparent); border: 1px solid color-mix(in srgb, var(--q) 28%, transparent);
	box-shadow: inset 0 0 22px -12px var(--q);
}
.intro-icon svg { width: 30px; height: 30px; }
.intro-name {
	font-family: 'Orbitron', sans-serif !important; font-weight: 900;
	font-size: clamp(26px, 5vw, 42px) !important; line-height: 1.12 !important; letter-spacing: 0.04em !important;
	color: var(--q) !important; margin: 0 0 6px !important; text-align: left !important; width: auto !important; max-width: none !important;
	text-shadow: 0 0 28px color-mix(in srgb, var(--q) 38%, transparent);
}
.intro-name::before, .intro-name::after { content: none !important; display: none !important; }
.intro-sub { font-family: 'Share Tech Mono', monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: color-mix(in srgb, var(--q) 85%, #fff); }
.intro-resume {
	padding: 16px 18px; border: 1px solid var(--border); border-left: 3px solid color-mix(in srgb, var(--q) 60%, transparent);
	border-radius: 5px; background: rgba(255,255,255,0.015); font-size: 14.5px; line-height: 1.75; color: var(--text-mid);
}
.intro-resume b { color: var(--text-hi); font-weight: 600; }
.intro-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip {
	font-family: 'Share Tech Mono', monospace; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
	padding: 5px 11px; border: 1px solid var(--border-hi); border-radius: 30px; color: var(--text-lo); background: rgba(255,255,255,0.02);
}
.intro-actions { margin-top: 24px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ══════════════════════════════════════════════════════════════
   QUIZ
   ══════════════════════════════════════════════════════════════ */
.quiz { --q: #888; }
.quiz__top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.quiz__name { font-family: 'Share Tech Mono', monospace; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--q); }
.quiz__count { margin-left: auto; font-family: 'Share Tech Mono', monospace; font-size: 11px; letter-spacing: 0.06em; color: var(--text-lo); }
.progress { height: 4px; border-radius: 4px; background: rgba(255,255,255,0.07); overflow: hidden; margin-bottom: 30px; }
.progress__bar { height: 100%; background: var(--q); border-radius: 4px; transition: width 0.35s cubic-bezier(0.4,0,0.2,1); box-shadow: 0 0 10px var(--q); }

.qperiode { font-family: 'Share Tech Mono', monospace; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-lo); margin-bottom: 10px; }
.qtext { font-family: 'Exo 2', sans-serif; font-weight: 600; font-size: 20px; line-height: 1.4; color: var(--text-hi); margin-bottom: 22px; }

.options { display: flex; flex-direction: column; gap: 9px; }
.opt {
	display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
	padding: 14px 16px; border: 1px solid var(--border-hi); border-radius: 5px; background: rgba(255,255,255,0.02);
	color: var(--text-mid); font-size: 14.5px; transition: all 0.16s ease;
}
.opt__mark { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--text-lo); flex-shrink: 0; transition: all 0.16s; position: relative; }
.opt:hover { border-color: color-mix(in srgb, var(--q) 55%, transparent); background: rgba(255,255,255,0.04); color: var(--text-hi); }
.opt:hover .opt__mark { border-color: var(--q); }
.opt.sel { border-color: var(--q); background: color-mix(in srgb, var(--q) 12%, transparent); color: var(--text-hi); }
.opt.sel .opt__mark { border-color: var(--q); background: var(--q); box-shadow: 0 0 10px color-mix(in srgb, var(--q) 60%, transparent); }
.opt.sel .opt__mark::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--bg); }
.opt:focus-visible { outline: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--q) 60%, transparent); }

.quiz__nav { margin-top: 24px; display: flex; align-items: center; }
.btn-back {
	display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 1px solid var(--border-hi); border-radius: 4px;
	background: rgba(255,255,255,0.03); color: var(--text-lo); font-family: 'Share Tech Mono', monospace; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; transition: all 0.2s;
}
.btn-back:hover { color: var(--text-hi); border-color: rgba(255,255,255,0.22); }
.btn-back svg { width: 14px; height: 14px; }

/* Étape genre */
.gender-intro { font-family: 'Share Tech Mono', monospace; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-lo); margin-bottom: 10px; }
.gender-note { margin-top: 16px; font-size: 12.5px; line-height: 1.6; color: var(--text-lo); }

/* ══════════════════════════════════════════════════════════════
   RÉSULTAT
   ══════════════════════════════════════════════════════════════ */
.result { --q: #888; --rc: var(--ok); }
.result__head { text-align: center; padding: 8px 0 4px; }
.result__score { font-family: 'Jockey One', sans-serif; font-size: 64px; line-height: 1; color: var(--rc); filter: drop-shadow(0 2px 16px color-mix(in srgb, var(--rc) 30%, transparent)); }
.result__score small { font-size: 22px; color: var(--text-lo); filter: none; }
.result__unit { margin-top: 6px; font-family: 'Share Tech Mono', monospace; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-lo); }
.result__band {
	display: inline-flex; align-items: center; gap: 9px; margin-top: 14px;
	padding: 8px 18px; border: 1px solid var(--rc); border-radius: 40px; background: color-mix(in srgb, var(--rc) 12%, transparent);
	font-family: 'Share Tech Mono', monospace; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rc);
}
.result__band .d { width: 9px; height: 9px; border-radius: 50%; background: var(--rc); box-shadow: 0 0 9px var(--rc); }

.result__msg { margin: 26px 0; padding: 18px 18px; border: 1px solid var(--border); border-left: 3px solid var(--rc); border-radius: 5px; background: rgba(255,255,255,0.015); font-size: 15px; line-height: 1.7; color: var(--text-mid); }

.crisis {
	margin: 0 0 26px; padding: 15px 16px; border: 1px solid color-mix(in srgb, var(--haut) 45%, transparent); border-left: 3px solid var(--haut);
	border-radius: 5px; background: color-mix(in srgb, var(--haut) 7%, transparent); font-size: 13.5px; line-height: 1.7; color: var(--text-mid);
}
.crisis b { color: var(--text-hi); }
.crisis .num { font-family: 'Share Tech Mono', monospace; color: var(--haut); font-size: 15px; letter-spacing: 0.05em; }

.block-h { font-family: 'Share Tech Mono', monospace; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-lo); display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.block-h svg { width: 14px; height: 14px; }

.res-list { display: flex; flex-direction: column; gap: 10px; }
.res-item { display: flex; gap: 12px; padding: 13px 15px; border: 1px solid var(--border); border-radius: 5px; background: rgba(255,255,255,0.012); }
.res-item__icon { width: 30px; height: 30px; border-radius: 7px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--q); background: color-mix(in srgb, var(--q) 10%, transparent); }
.res-item__icon svg { width: 16px; height: 16px; }
.res-item__name { font-weight: 600; font-size: 14px; color: var(--text-hi); }
.res-item__contact { font-family: 'Share Tech Mono', monospace; font-size: 12px; color: var(--q); margin: 2px 0; }
.res-item__desc { font-size: 12px; line-height: 1.5; color: var(--text-lo); }

.disclaimer { margin-top: 22px; padding: 13px 15px; border: 1px dashed var(--border-hi); border-radius: 4px; font-size: 12.5px; line-height: 1.6; color: var(--text-lo); }
.disclaimer b { color: var(--text-mid); }
.source { margin-top: 12px; font-family: 'Share Tech Mono', monospace; font-size: 9.5px; letter-spacing: 0.04em; color: var(--text-lo); opacity: 0.7; line-height: 1.7; }

.result__actions { margin-top: 26px; display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
	display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 4px;
	font-family: 'Share Tech Mono', monospace; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; transition: all 0.2s;
}
.btn--primary { border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); }
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn--start { border: 1px solid color-mix(in srgb, var(--q) 45%, transparent); background: color-mix(in srgb, var(--q) 10%, transparent); color: var(--q); }
.btn--start:hover { background: color-mix(in srgb, var(--q) 18%, transparent); box-shadow: 0 0 16px color-mix(in srgb, var(--q) 30%, transparent); }
.btn--ghost { border: 1px solid var(--border-hi); background: rgba(255,255,255,0.03); color: var(--text-lo); }
.btn--ghost:hover { color: var(--text-hi); border-color: rgba(255,255,255,0.22); }
.btn svg { width: 15px; height: 15px; }

/* anim entrée écran */
.screen { animation: fade 0.3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 560px) { .wrap { padding: 40px 16px 90px; } .qtext { font-size: 18px; } .result__score { font-size: 54px; } }
@media (prefers-reduced-motion: reduce) { body::after { animation: none; } .screen { animation: none; } .progress__bar, .opt, .qcard { transition: none; } }

/* Cartes / boutons en <a> (hub statique + pages filles) */
a.qcard { text-decoration: none; color: inherit; }
a.btn { text-decoration: none; }
