/* Page de retour des e-mails (auth-action.html) : emblème par état, apparition en cascade. */
.auth-card.aa-card { padding: 44px 44px 36px; position: relative; overflow: hidden; }
.aa-card::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 6px;
    background: linear-gradient(90deg, #e2bcbc, #b76e6e 50%, #e2bcbc);
}

.aa-emblem {
    width: 92px; height: 92px; margin: 6px auto 22px; position: relative;
    display: grid; place-items: center; border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, #fff6f3, #f3d9d4);
    color: #b76e6e; font-size: 2rem;
    box-shadow: 0 12px 30px -12px rgba(183, 110, 110, 0.45), inset 0 0 0 1px rgba(183, 110, 110, 0.18);
}
.aa-emblem::after {
    content: ""; position: absolute; inset: -9px; border-radius: 50%;
    border: 1.5px dashed rgba(183, 110, 110, 0.35);
    animation: aa-spin 24s linear infinite;
}
.aa-emblem--ok { background: radial-gradient(circle at 30% 25%, #fff, #e4cfc9); color: #7a3e3e; }
.aa-emblem--ok i { animation: aa-pop 0.7s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.aa-emblem--loading i { animation: aa-write 1.4s ease-in-out infinite; }
.aa-emblem--error { background: radial-gradient(circle at 30% 25%, #fff, #efe3df); color: #9c7a74; }

.aa-kicker {
    display: block; margin: 0 0 6px; font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase;
    color: #b76e6e; font-weight: 600;
}
.auth-card .aa-title { font-size: 2.1rem; line-height: 1.15; margin-bottom: 14px; }
.aa-title em { font-style: italic; color: #7a3e3e; }
.aa-stroke {
    width: 64px; height: 3px; margin: 0 auto 18px; border-radius: 3px;
    background: linear-gradient(90deg, #b76e6e, #e2bcbc); transform-origin: left;
    animation: aa-draw 0.9s 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.auth-card .aa-text { max-width: 34ch; margin: 0 auto 26px; line-height: 1.6; }
.auth-card .aa-text strong { color: #7a3e3e; }
.aa-cta { width: 100%; display: inline-block; text-align: center; }
.aa-cta i { margin-left: 8px; font-size: 0.85em; transition: transform 0.3s ease; }
.aa-cta:hover i { transform: translateX(4px); }
.aa-dots { display: inline-flex; gap: 6px; margin-left: 4px; vertical-align: middle; }
.aa-dots span { width: 6px; height: 6px; border-radius: 50%; background: #b76e6e; animation: aa-blink 1.2s infinite; }
.aa-dots span:nth-child(2) { animation-delay: 0.2s; }
.aa-dots span:nth-child(3) { animation-delay: 0.4s; }

/* Cascade d'apparition : chaque état anime ses enfants quand il devient visible. */
section:not([hidden]) > .aa-in { animation: aa-rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
section:not([hidden]) > .aa-in:nth-child(2) { animation-delay: 0.08s; }
section:not([hidden]) > .aa-in:nth-child(3) { animation-delay: 0.16s; }
section:not([hidden]) > .aa-in:nth-child(4) { animation-delay: 0.24s; }
section:not([hidden]) > .aa-in:nth-child(5) { animation-delay: 0.32s; }
section:not([hidden]) > .aa-in:nth-child(6) { animation-delay: 0.4s; }

@keyframes aa-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes aa-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes aa-pop { from { transform: scale(0.4) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes aa-spin { to { transform: rotate(360deg); } }
@keyframes aa-write { 0%, 100% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(3px, -3px) rotate(-8deg); } }
@keyframes aa-blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

html[data-theme="dark"] .aa-emblem, html[data-theme="dark"] .aa-emblem--ok, html[data-theme="dark"] .aa-emblem--error {
    background: radial-gradient(circle at 30% 25%, #3c2e2e, #2e2323); color: #e2bcbc;
}
html[data-theme="dark"] .aa-kicker, html[data-theme="dark"] .aa-title em, html[data-theme="dark"] .auth-card .aa-text strong { color: #e2bcbc; }

@media (max-width: 480px) { .auth-card.aa-card { padding: 36px 24px 28px; } .auth-card .aa-title { font-size: 1.8rem; } }
@media (prefers-reduced-motion: reduce) {
    .aa-in, .aa-stroke, .aa-emblem::after, .aa-emblem i, .aa-dots span { animation: none !important; }
}

/* Pages login / register : cascade plus douce (la transition « page tournée » fige la page
   à son premier rendu : le texte doit déjà être lisible avant le départ des animations). */
.aa-card > .aa-in { animation: aa-rise-soft 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes aa-rise-soft { from { opacity: 0.55; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.aa-card > .aa-in:nth-of-type(2), .aa-card > h1.aa-in { animation-delay: 0.08s; }
.aa-card > p.aa-in { animation-delay: 0.16s; }
.aa-card > form.aa-in { animation-delay: 0.24s; }

/* Pages légales : en-tête centré au-dessus d'un texte aligné à gauche. */
.legal-card .aa-kicker, .legal-card .aa-title { text-align: center; }
.legal-card .aa-title { font-size: 2rem; }
.legal-card .aa-stroke { margin-bottom: 14px; }
.legal-card > section.aa-in { animation-delay: 0.3s; }

/* Chapitres des pages légales : numéro-badge, icône, trait qui se dessine à l'apparition. */
.legal-card .lc-chapter { position: relative; padding-left: 62px; margin-bottom: 26px; opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.legal-card .lc-chapter.is-seen { opacity: 1; transform: none; }
.legal-card .lc-chapter::before { content: ""; position: absolute; left: 22px; top: 52px; bottom: -22px; width: 1px; background: linear-gradient(180deg, rgba(183, 110, 110, 0.35), rgba(183, 110, 110, 0)); }
.legal-card .lc-chapter:last-of-type::before { display: none; }
.legal-card .lc-chapter h2 { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.lc-num { position: absolute; left: 0; top: -4px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 30% 25%, #fff6f3, #f3d9d4); color: #b76e6e; box-shadow: 0 8px 20px -10px rgba(183, 110, 110, 0.5), inset 0 0 0 1px rgba(183, 110, 110, 0.18); transition: transform 0.4s cubic-bezier(0.2, 1.4, 0.4, 1); }
.lc-num i { font-size: 1rem; }
.lc-num b { position: absolute; right: -6px; bottom: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #7a3e3e; color: #fff; font: 700 0.68rem/20px var(--font-serif, Georgia, serif); text-align: center; }
.lc-chapter:hover .lc-num { transform: rotate(-8deg) scale(1.06); }
.lc-h2 { position: relative; display: inline-block; }
.lc-h2::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, #b76e6e, #e2bcbc); transform: scaleX(0); transform-origin: left; transition: transform 0.7s 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }
.is-seen .lc-h2::after { transform: scaleX(1); }
.legal-card .lc-chapter p { margin-bottom: 10px; }
.legal-card .lc-chapter p::first-letter { color: #7a3e3e; font-weight: 600; }
.legal-card p.lc-updated { margin-bottom: 30px; }
.lc-sign { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 8px 0 22px; font-family: var(--font-serif, Georgia, serif); font-style: italic; color: #7a3e3e; opacity: 0.85; }
.lc-sign i { color: #b76e6e; transform: rotate(-20deg); animation: aa-write 2.2s ease-in-out infinite; }
html[data-theme="dark"] .lc-num { background: radial-gradient(circle at 30% 25%, #3c2e2e, #2e2323); color: #e2bcbc; }
html[data-theme="dark"] .lc-num b { background: #e2bcbc; color: #2e2323; }
html[data-theme="dark"] .lc-sign, html[data-theme="dark"] .legal-card .lc-chapter p::first-letter { color: #e2bcbc; }
@media (max-width: 480px) { .legal-card .lc-chapter { padding-left: 54px; } .lc-num { width: 40px; height: 40px; } .legal-card .lc-chapter::before { left: 19px; } }
@media (prefers-reduced-motion: reduce) { .legal-card .lc-chapter { opacity: 1; transform: none; transition: none; } .lc-h2::after { transform: scaleX(1); transition: none; } .lc-sign i { animation: none; } }
