/* Questionnaire OMA : un écran = une question. Sobre, aux couleurs du logo (bleu marine, orange). */
:root { --marine: #0d2b5e; --marine-2: #14397a; --orange: #f39200; --orange-txt: #a85d00; --texte: #25303f; --muet: #5f6b7a; --trait: #d6dce6; --fond: #f6f7fa; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--texte); font: 400 18px/1.6 'Source Sans 3', 'Segoe UI', system-ui, sans-serif; min-height: 100vh; min-height: 100svh; }
a { color: var(--marine); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
h1, h2 { font-family: inherit; color: var(--marine); margin: 0; letter-spacing: -.01em; }
[hidden] { display: none !important; }

.quiz { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.q-haut { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; }
.q-haut img { height: 44px; width: auto; display: block; }
.q-etape { font-size: .92rem; font-weight: 600; color: var(--muet); }
.q-progress { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; padding: 0 24px; max-width: 820px; width: 100%; margin: 0 auto; }
.q-seg { height: 5px; border-radius: 3px; background: var(--trait); transition: background-color .3s; }
.q-seg.fait { background: var(--marine); }
.q-seg.actuel { background: var(--orange); }

.scene { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 24px 120px; overflow: hidden; }
.ecran { width: 100%; max-width: 760px; }
.ecran.in-d { animation: entre-d .42s cubic-bezier(.2, .7, .2, 1) both; }
.ecran.in-g { animation: entre-g .42s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes entre-d { from { opacity: 0; transform: translateX(36px); } to { opacity: 1; transform: none; } }
@keyframes entre-g { from { opacity: 0; transform: translateX(-36px); } to { opacity: 1; transform: none; } }

/* Accueil */
.bienvenue { text-align: center; }
.bienvenue .logo-grand { width: min(300px, 70%); height: auto; margin: 0 auto 28px; display: block; }
.surtitre { font-size: .82rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--orange-txt); margin: 0 0 12px; }
.bienvenue h1 { font-size: clamp(2rem, 6vw, 3rem); line-height: 1.12; font-weight: 700; }
.promesse { font-size: 1.25rem; color: var(--texte); margin: 18px auto 8px; max-width: 560px; }
.duree { display: inline-flex; align-items: center; gap: 8px; color: var(--marine); font-weight: 700; margin-bottom: 28px; }
.duree svg { width: 20px; height: 20px; }
.btn-grand { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--marine); color: #fff; border: 0; border-radius: 8px; padding: 18px 40px; font-weight: 700; font-size: 1.15rem; line-height: 1.2; font-family: inherit; cursor: pointer; text-decoration: none; transition: background-color .15s, transform .15s; }
.btn-grand:hover { background: var(--marine-2); color: #fff; }
.btn-grand:active { transform: scale(.98); }
.btn-grand svg { width: 20px; height: 20px; color: var(--orange); }
.astuce { margin: 14px 0 0; font-size: .9rem; color: var(--muet); }
.contexte { max-width: 600px; margin: 30px auto 0; text-align: left; }
.contexte summary { cursor: pointer; text-align: center; color: var(--marine); font-weight: 600; list-style: none; }
.contexte summary::-webkit-details-marker { display: none; }
.contexte summary::after { content: ' \25BE'; }
.contexte[open] summary::after { content: ' \25B4'; }
.contexte p, .contexte ul { font-size: 1rem; color: var(--muet); }
.contexte li { margin-bottom: .6em; }

/* Question */
.q-icone { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--marine); color: var(--marine); display: grid; place-items: center; margin-bottom: 22px; }
.q-icone svg { width: 28px; height: 28px; }
fieldset { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
legend { padding: 0; width: 100%; }
.q-num { display: block; font-size: .82rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--orange-txt); margin-bottom: 10px; }
.q-titre { display: block; font-size: clamp(1.4rem, 3.6vw, 2rem); line-height: 1.25; font-weight: 700; color: var(--marine); margin-bottom: 28px; outline: none; }
.reponses { display: grid; gap: 12px; }
.reponse { position: relative; display: flex; align-items: center; gap: 16px; padding: 18px 20px; min-height: 68px; background: #fff; border: 2px solid var(--trait); border-radius: 10px; cursor: pointer; font-size: 1.15rem; font-weight: 600; line-height: 1.3; color: var(--texte); transition: border-color .15s, background-color .2s, color .2s, transform .12s; -webkit-tap-highlight-color: transparent; }
.reponse:hover { border-color: var(--marine); }
.reponse:active { transform: scale(.985); }
.reponse input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pastille { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #b6bfcc; display: grid; place-items: center; background: #fff; transition: all .2s; }
.pastille svg { width: 16px; height: 16px; stroke-dasharray: 22; stroke-dashoffset: 22; color: var(--marine); transition: stroke-dashoffset .3s .05s; }
.touche { margin-left: auto; flex: none; font-size: .8rem; font-weight: 700; color: var(--muet); border: 1px solid var(--trait); border-radius: 4px; padding: 1px 7px; }
.reponse:has(input:checked) { background: var(--marine); border-color: var(--marine); color: #fff; animation: pop .28s ease; }
.reponse:has(input:checked) .pastille { background: var(--orange); border-color: var(--orange); }
.reponse:has(input:checked) .pastille svg { stroke-dashoffset: 0; }
.reponse:has(input:checked) .touche { color: #c9d6ee; border-color: rgba(255, 255, 255, .35); }
.reponse:has(input:focus-visible) { outline: 3px solid var(--orange); outline-offset: 2px; }
@keyframes pop { 0% { transform: scale(.98); } 60% { transform: scale(1.012); } 100% { transform: scale(1); } }

.retour { min-height: 1.8em; margin: 18px 0 0; color: var(--marine); font-weight: 600; opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s; }
.retour.visible { opacity: 1; transform: none; }
.facultatif { color: var(--muet); font-weight: 400; font-size: 1rem; }
.erreur { color: #a3361a; font-weight: 600; margin: 14px 0 0; }
.champ-email { width: 100%; font: inherit; font-size: 1.2rem; padding: 18px 20px; border: 2px solid var(--trait); border-radius: 10px; color: var(--texte); background: #fff; }
.champ-email:focus { border-color: var(--marine); outline: none; }
.aide { color: var(--muet); font-size: .98rem; margin: 14px 0 0; }
.secouer { animation: secoue .35s; }
@keyframes secoue { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* Barre du bas */
.q-nav { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(246, 247, 250, .96); border-top: 1px solid var(--trait); padding: 12px 24px calc(12px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 16px; backdrop-filter: blur(4px); z-index: 10; }
.q-nav .inner { max-width: 760px; width: 100%; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lien-retour { background: none; border: 0; color: var(--muet); font-weight: 600; font-size: 1rem; font-family: inherit; cursor: pointer; padding: 10px 6px; }
.lien-retour:hover { color: var(--marine); }
.q-nav .btn-grand { padding: 14px 32px; font-size: 1.05rem; }
.q-nav .btn-grand.passer { background: transparent; color: var(--marine); border: 2px solid var(--marine); }
.q-nav .btn-grand.passer svg { color: var(--marine); }

/* Fin */
.fin { text-align: center; }
.coche-fin { width: 84px; height: 84px; border-radius: 50%; background: var(--marine); color: var(--orange); display: grid; place-items: center; margin: 0 auto 24px; animation: pop .5s ease; }
.coche-fin svg { width: 42px; height: 42px; stroke-dasharray: 30; stroke-dashoffset: 30; animation: trace .6s .2s ease forwards; }
@keyframes trace { to { stroke-dashoffset: 0; } }
.fin h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1.15; margin-bottom: 12px; }
.fin .promesse { margin-top: 0; }
.resume { text-align: left; background: #fff; border: 1px solid var(--trait); border-radius: 10px; padding: 8px 22px; margin: 30px 0; }
.resume h2 { font-size: .85rem; letter-spacing: .16em; text-transform: uppercase; color: var(--orange-txt); margin: 18px 0 4px; }
.resume dl { margin: 0; }
.resume .ligne { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid #e7ebf1; font-size: 1rem; }
.resume .ligne:first-of-type { border-top: 0; }
.resume dt { color: var(--muet); }
.resume dd { margin: 0; font-weight: 600; color: var(--marine); }
.partage { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 8px 0 26px; }
.btn-sec { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--marine); border: 2px solid var(--marine); border-radius: 8px; padding: 13px 24px; font-weight: 700; font-size: 1rem; font-family: inherit; cursor: pointer; text-decoration: none; }
.btn-sec:hover { background: #eef2f9; }
.btn-sec svg { width: 18px; height: 18px; }
.copie-ok { min-height: 1.5em; color: var(--marine); font-weight: 600; margin: 0 0 12px; }
.pied-quiz { text-align: center; color: var(--muet); font-size: .88rem; padding: 0 16px 24px; }
.pied-quiz a { color: var(--muet); }

/* Sans JavaScript : toutes les questions s'affichent à la suite */
html:not(.js) .ecran { margin-bottom: 64px; }
html:not(.js) .scene { display: block; max-width: 760px; margin: 0 auto; padding-bottom: 40px; }
html:not(.js) .q-nav, html:not(.js) .q-progress { display: none; }
.noscript-envoi { display: none; }
html:not(.js) .noscript-envoi { display: block; }

@media (hover: none) { .touche { display: none; } }
@media (max-width: 600px) {
    body { font-size: 17px; }
    .q-haut { padding: 10px 16px; }
    .q-haut img { height: 38px; }
    .q-progress { padding: 0 16px; gap: 3px; }
    .scene { align-items: flex-start; padding: 28px 16px 120px; }
    .q-icone { width: 48px; height: 48px; margin-bottom: 16px; }
    .reponse { padding: 16px 16px; min-height: 62px; font-size: 1.08rem; }
    .q-nav { padding-left: 16px; padding-right: 16px; }
    .q-nav .btn-grand { padding: 14px 22px; flex: 1; }
    .resume .ligne { grid-template-columns: 1fr; gap: 2px; }
    .btn-grand { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

[tabindex="-1"]:focus { outline: none; }
