/* Défis anti-arnaque : parcours de niveaux + écran de cas (SMS, mail, appel, message privé) */
.aa { padding-block: 28px 80px; }
.aa-fil { font-size: .95rem; color: var(--texte-2); margin-bottom: 18px; }
.aa-fil a { color: inherit; }
.aa-fil span { margin: 0 .5em; }

/* En-tête du parcours */
.aa-tete { display: grid; gap: 18px; margin-bottom: 34px; }
.aa-tete h1 { font: 800 clamp(2rem, 5vw, 3rem)/1.02 var(--f-titre); font-stretch: 108%; letter-spacing: -.01em; margin: 0; }
.aa-tete p { margin: 0; max-width: 60ch; color: var(--texte-2); font-size: 1.08rem; }
.aa-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.aa-stat { display: inline-flex; align-items: center; gap: .55em; padding: .55em .95em; border: 1px solid var(--trait); border-radius: 999px; background: var(--surface); font-size: .98rem; }
.aa-stat svg { width: 18px; height: 18px; }
.aa-stat b { font-family: var(--f-titre); font-size: 1.1rem; }
.aa-stat.flamme svg { color: #E8743B; }
.aa-stat.jour svg { color: var(--accent); }

/* Parcours façon carte de niveaux */
.aa-section { position: relative; margin: 0 auto 26px; max-width: 520px; }
.aa-section-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 18px; border-radius: var(--r); background: var(--nuit); color: #EAF1FA; }
.aa-section-tete h2 { font: 800 1.15rem/1.2 var(--f-titre); margin: 0; }
.aa-section-tete small { color: var(--ciel); font-size: .92rem; white-space: nowrap; }
.aa-section.bientot .aa-section-tete { background: transparent; color: var(--texte-2); border: 1.5px dashed var(--trait); }
.aa-section.bientot .aa-section-tete small { color: var(--texte-2); }
.aa-chemin { position: relative; margin-top: 46px; height: calc(var(--n) * 156px + 30px); }
.aa-chemin svg.trace { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.aa-chemin .trace path { fill: none; stroke: var(--trait); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 1 14; }
.aa-chemin .trace path.fait { stroke: var(--vert-vif); stroke-dasharray: none; stroke-width: 5; opacity: .55; }

.aa-noeud { position: absolute; transform: translate(-50%, 0); display: flex; flex-direction: column; align-items: center; gap: 8px; width: 180px; text-align: center; }
.aa-noeud button { position: relative; width: 74px; height: 74px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: var(--surface); color: var(--texte-2); box-shadow: 0 0 0 3px var(--trait), 0 6px 0 var(--trait); transition: transform .15s; }
.aa-noeud button svg { width: 32px; height: 32px; }
.aa-noeud button:active { transform: translateY(3px); }
.aa-noeud .lib { position: relative; font-size: .9rem; line-height: 1.25; color: var(--texte-2); background: var(--bg); padding: 2px 8px; border-radius: 6px; }
.aa-noeud .lib b { display: block; color: var(--texte); font-family: var(--f-titre); font-size: .95rem; }
.aa-noeud.fait button { background: var(--vert-vif); color: #06301D; box-shadow: 0 0 0 3px color-mix(in srgb, var(--vert-vif) 45%, transparent), 0 6px 0 #1F8F55; }
.aa-noeud.ouvert button { background: var(--bleu); color: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--bleu) 35%, transparent), 0 6px 0 var(--bleu-2); }
html.dark .aa-noeud.ouvert button { background: var(--ciel); color: var(--nuit); box-shadow: 0 0 0 3px rgb(124 192 245 / .35), 0 6px 0 #4F95CF; }
.aa-noeud.ouvert button::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid var(--accent); animation: aa-pouls 1.8s ease-out infinite; }
.aa-noeud.verrou button { cursor: not-allowed; opacity: .75; }
.aa-noeud .badge-jour { position: absolute; z-index: 1; top: -26px; white-space: nowrap; font-size: .8rem; font-weight: 700; padding: .25em .7em; border-radius: 999px; background: var(--nuit); color: var(--ciel); }
html.dark .aa-noeud .badge-jour { background: var(--ciel); color: var(--nuit); }
.aa-noeud .etoiles { font-size: .8rem; color: var(--vert); font-weight: 700; }
@keyframes aa-pouls { from { transform: scale(.9); opacity: .9; } to { transform: scale(1.25); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .aa-noeud.ouvert button::after { animation: none; } }

.aa-pause { max-width: 520px; margin: 0 auto 26px; padding: 16px 18px; border-radius: var(--r); border: 1px solid var(--trait); background: var(--surface); display: flex; gap: 12px; align-items: center; }
.aa-pause svg { width: 28px; height: 28px; flex-shrink: 0; color: var(--accent); }

/* Écran d'un cas */
.aa-cas { max-width: 680px; margin: 0 auto; }
.aa-cas-tete { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.aa-cas-tete .canal { display: inline-flex; align-items: center; gap: .45em; padding: .3em .8em; border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-weight: 700; font-size: .9rem; }
.aa-cas-tete .canal svg { width: 16px; height: 16px; }
.aa-cas-tete h1 { font: 800 1.5rem/1.15 var(--f-titre); margin: 0; }
.aa-contexte { padding: 14px 16px; border-left: 4px solid var(--accent); background: var(--surface); border-radius: 0 var(--r) var(--r) 0; margin-bottom: 14px; font-size: 1.05rem; }
.aa-consigne { margin: 0 0 14px; color: var(--texte-2); }
.aa-consigne b { color: var(--texte); }

/* Segment sélectionnable */
.seg { display: block; width: 100%; text-align: left; font: inherit; color: inherit; background: transparent; border: 2px solid transparent; border-radius: 8px; padding: 6px 8px; cursor: pointer; transition: border-color .12s, background .12s; }
.seg:hover { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.seg[aria-pressed="true"] { border: 2px dashed var(--alerte); background: color-mix(in srgb, var(--alerte) 9%, transparent); }
.seg:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.seg.corr-arnaque { border: 2px solid var(--alerte); background: color-mix(in srgb, var(--alerte) 10%, transparent); }
.seg.corr-confiance { border: 2px solid var(--vert); background: color-mix(in srgb, var(--vert) 10%, transparent); }
.seg.corr-oubli { border-style: dashed; }
.seg .pourquoi { display: block; margin-top: 6px; font-size: .92rem; font-weight: 700; color: var(--alerte); }
.seg.corr-confiance .pourquoi { color: var(--vert); }
.seg:disabled { cursor: default; }

/* Téléphone (SMS et message privé) */
.tel { max-width: 380px; margin: 0 auto; border-radius: 34px; padding: 14px; background: #0A1424; box-shadow: 0 0 0 2px #1D3150, var(--ombre); }
.tel-ecran { border-radius: 24px; overflow: hidden; background: #F2F4F7; color: #0B1F3A; }
.tel-tete { padding: 14px 14px 10px; text-align: center; background: #fff; border-bottom: 1px solid #E1E6EE; }
.tel-tete .seg { text-align: center; font-weight: 700; }
.tel-tete .seg small { display: block; font-weight: 400; color: #5B6B82; font-size: .8rem; }
.tel-fil { padding: 16px 12px 22px; display: grid; gap: 8px; }
.bulle { max-width: 86%; }
.bulle .seg { background: #E4E8EE; border-radius: 18px 18px 18px 6px; padding: 9px 13px; }
.bulle .seg[aria-pressed="true"] { background: #FBE3E1; }
.bulle .seg.lien { color: #1E63C9; text-decoration: underline; word-break: break-all; }
.tel.insta .tel-tete { background: linear-gradient(90deg, #FDF2F8, #EEF2FF); }

/* Mail */
.mail { border: 1px solid var(--trait); border-radius: var(--r); background: var(--surface); box-shadow: var(--ombre); overflow: hidden; }
.mail-barre { display: flex; gap: 6px; padding: 10px 14px; background: color-mix(in srgb, var(--texte) 5%, transparent); }
.mail-barre i { width: 10px; height: 10px; border-radius: 50%; background: var(--trait); }
.mail-tete { padding: 10px 12px; border-bottom: 1px solid var(--trait); display: grid; gap: 2px; }
.mail-tete .seg span { color: var(--texte-2); display: inline-block; min-width: 4.2em; }
.mail-corps { padding: 14px 12px 18px; display: grid; gap: 4px; }
.mail-corps .seg.bouton { display: inline-block; width: auto; margin: 8px 0; background: #1E63C9; color: #fff; font-weight: 700; border-radius: 8px; padding: 10px 18px; }
.mail-corps .seg.bouton[aria-pressed="true"] { outline: 2px dashed var(--alerte); outline-offset: 3px; }

/* Appel : mise en situation */
.appel { border-radius: 24px; background: linear-gradient(180deg, #0B1F3A, #13304F); color: #EAF1FA; padding: 22px 16px; }
.appel-tete { text-align: center; margin-bottom: 18px; }
.appel-tete .avatar { width: 64px; height: 64px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; background: rgb(124 192 245 / .15); color: var(--ciel); }
.appel-tete .avatar svg { width: 30px; height: 30px; }
.appel-tete .seg { text-align: center; font-weight: 700; color: #EAF1FA; }
.appel-tete small { display: block; color: #A3B3C9; margin-top: 4px; }
.appel-fil { display: grid; gap: 10px; }
.replique { max-width: 88%; }
.replique .qui { font-size: .8rem; color: #A3B3C9; margin: 0 0 3px 10px; }
.replique .seg { background: rgb(255 255 255 / .08); border-radius: 16px 16px 16px 6px; color: #EAF1FA; }
.replique.vous { justify-self: end; }
.replique.vous .qui { text-align: right; margin-right: 10px; }
.replique.vous p { margin: 0; background: #2E7BC8; color: #fff; border-radius: 16px 16px 6px 16px; padding: 8px 12px; }
.appel .seg[aria-pressed="true"] { background: rgb(240 106 95 / .2); border-color: #F06A5F; }
.appel .seg.corr-arnaque { border-color: #F06A5F; background: rgb(240 106 95 / .18); }
.appel .seg.corr-confiance { border-color: #4ADE9A; background: rgb(74 222 154 / .14); }
.appel .seg .pourquoi { color: #FFB4AD; }
.appel .seg.corr-confiance .pourquoi { color: #8FF0BF; }

/* Verdict */
.aa-verdict { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.aa-verdict .sg-btn { min-height: 56px; font-size: 1.05rem; }
.btn-arnaque { background: var(--alerte); color: #fff; border-color: var(--alerte); }
.btn-arnaque:hover { filter: brightness(1.08); }
.btn-fiable { background: var(--vert); color: #fff; border-color: var(--vert); }
html.dark .btn-fiable { color: #06301D; }
.aa-msg { margin-top: 14px; padding: 12px 14px; border-radius: var(--r); font-weight: 700; }
.aa-msg.ko { background: color-mix(in srgb, #E8743B 14%, transparent); }
.aa-msg.ok { background: color-mix(in srgb, var(--vert-vif) 16%, transparent); }

.aa-correction { margin-top: 18px; padding: 18px; border-radius: var(--r); border: 1px solid var(--trait); background: var(--surface); }
.aa-correction h2 { font: 800 1.3rem/1.2 var(--f-titre); margin: 0 0 6px; }
.aa-correction .reflexe { margin-top: 12px; padding: 12px 14px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.aa-correction .reflexe b { display: block; margin-bottom: 2px; }
.aa-suite { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
@media (max-width: 480px) { .aa-verdict { grid-template-columns: 1fr; } }

@media (max-width: 480px) { .aa-noeud { width: 130px; } .aa-noeud .lib { font-size: .82rem; } }
.aa-section, .aa-chemin { overflow-x: clip; }

/* Présentation pour les visiteurs sans compte */
.aa-decouvrir { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.aa-decouvrir li { padding: 14px 16px; border: 1px solid var(--trait); border-radius: 14px; background: var(--surface); line-height: 1.5; }
.aa-decouvrir b { display: block; }
