/* Découvrir / SEO */
/* ============================================================== SEO / découvrir */

.discover-side-nav {
    display: flex; flex-direction: column; gap: .2rem;
    padding: .15rem .35rem .8rem;
}
.discover-side-nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: .84rem;
    padding: .4rem .6rem;
    border-radius: 10px;
    transition: background .15s ease, color .15s ease;
}
.discover-side-nav a:hover { background: var(--surface); color: var(--text); }
.discover-side-nav a.is-on {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

/* Même coquille flex que .chat — la page remplit toute la zone principale. */
body.discover-page .app { overflow: hidden; }
.chat.discover {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    position: relative;
    overflow: hidden;
}
.discover-pill {
    text-decoration: none;
    color: var(--accent-3);
    border-color: color-mix(in srgb, var(--accent-3) 35%, var(--border));
}
.discover-pill:hover { color: var(--text); }

.discover-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: auto; /* le JS gère le smooth dans ce conteneur */
}
.discover-article {
    width: min(720px, 100%);
    margin: 0 auto;
    padding: 1.25rem 1.4rem 3.5rem;
}

.discover-hero {
    text-align: center;
    padding: clamp(1.5rem, 5vh, 3.2rem) 0 clamp(2rem, 4vh, 2.8rem);
}
.discover-orb {
    margin: 0 auto 1.35rem;
}
/* Pas d'animation float ici : le transform cassait le scroll / le focus des ancres. */
.discover-orb.orb { animation: none; }
.discover-orb .mark {
    width: 42px;
    height: 42px;
    fill: var(--ink);
}
.discover-kicker {
    margin: 0 0 .7rem;
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--faint);
}
.discover-hero h1 {
    margin: 0 0 .85rem;
    font-size: clamp(1.7rem, 4.2vw, 2.45rem);
    letter-spacing: -.03em;
    line-height: 1.12;
    font-weight: 700;
}
.discover-em {
    color: var(--accent);
}
.discover-lead {
    margin: 0 auto 1.4rem;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.55;
    max-width: 38ch;
}
.discover-lead em { color: var(--text); font-style: normal; font-weight: 600; }
.discover-cta {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    justify-content: center;
}
.discover-trust {
    margin: 1rem 0 0;
    font-size: .76rem;
    color: var(--faint);
    letter-spacing: .02em;
}

.discover-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-height: 42px;
    padding: .55rem 1.15rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 600;
    transition: border-color .15s ease, background .15s ease;
}
.discover-btn:hover {
    border-color: var(--border-strong);
    background: var(--surface-2);
}
.discover-btn.primary {
    border-color: transparent;
    background: var(--accent);
    color: #fff;
    box-shadow: 0 12px 28px -14px rgba(255, 77, 109, .85);
}
.discover-btn.primary:hover {
    background: var(--hover);
    color: #fff;
}

.discover-section {
    margin: 0 0 1.1rem;
    padding: 1.35rem 1.25rem 1.4rem;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: 0 18px 40px -28px var(--shadow);
    scroll-margin-top: 16px;
}

.discover-tag {
    margin: 0 0 .4rem;
    font-size: .68rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent-3);
    font-weight: 650;
}
.discover-section h2 {
    margin: 0 0 .55rem;
    font-size: 1.2rem;
    letter-spacing: -.015em;
    line-height: 1.25;
}
.discover-section > p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
    max-width: 52ch;
}

.discover-modes {
    list-style: none;
    margin: 1.1rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .55rem;
}
.discover-modes li {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    padding: .7rem .75rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 55%, var(--surface));
}
.discover-modes strong {
    font-size: .84rem;
    color: var(--text);
}
.discover-modes span {
    font-size: .74rem;
    color: var(--faint);
    line-height: 1.35;
}

.discover-grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
}
.discover-card {
    padding: .9rem .95rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 45%, var(--surface));
    transition: border-color .15s ease, transform .15s ease;
}
.discover-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-1px);
}
.discover-card-ico {
    display: block;
    margin-bottom: .45rem;
    font-size: 1rem;
    color: var(--accent);
    opacity: .9;
}
.discover-card h3 {
    margin: 0 0 .3rem;
    font-size: .92rem;
}
.discover-card p {
    margin: 0;
    font-size: .8rem;
    line-height: 1.45;
    color: var(--muted);
}

.discover-day .discover-btn { margin-top: 1rem; }

.discover-faq {
    margin: .85rem 0 0;
    display: grid;
    gap: .55rem;
}
.discover-faq-item {
    padding: .75rem .85rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 40%, transparent);
}
.discover-faq dt {
    font-weight: 650;
    margin: 0 0 .25rem;
    font-size: .9rem;
}
.discover-faq dd {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
    font-size: .84rem;
}

.discover-foot {
    margin-top: 1.4rem;
    padding-bottom: .5rem;
}
.discover-foot-panel {
    text-align: center;
    padding: 1.6rem 1.25rem 1.7rem;
    border-radius: var(--radius-lg);
    border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
    background:
        radial-gradient(80% 80% at 20% 0%, rgba(255, 77, 109, .12), transparent 60%),
        radial-gradient(70% 70% at 90% 30%, rgba(139, 92, 246, .12), transparent 55%),
        var(--surface);
}
.discover-foot-panel h2 {
    margin: 0 0 .4rem;
    font-size: 1.25rem;
}
.discover-foot-panel p {
    margin: 0 auto 1.1rem;
    color: var(--muted);
    max-width: 34ch;
}
.discover-foot-panel .discover-btn { margin: 0 auto; }

.archive-options .option {
    pointer-events: none;
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    align-items: baseline;
}
.archive-options .option-meta {
    color: var(--faint);
    font-size: .78rem;
    white-space: nowrap;
}
.archive-article .quiz-foot a { color: var(--accent-3); }

/* Le panneau latéral devient un tiroir à 820 px : l'article récupère alors toute la largeur,
   et les trois colonnes de modes y tiennent encore. Elles ne tombent à deux qu'à 700 px, à
   une seule à 480 — juste avant que les intitulés ne se coupent. */
@media (max-width: 820px) {
    .discover-article { padding: 1rem 1rem 2.8rem; }
}

@media (max-width: 700px) {
    .discover-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .discover-article { padding: .85rem .75rem calc(2.5rem + env(safe-area-inset-bottom)); }
    .discover-hero { padding-top: 1.1rem; }
    .discover-lead { font-size: .95rem; }
    .discover-grid { grid-template-columns: 1fr; }
    .discover-section { padding: 1.1rem 1rem 1.15rem; }
    .discover-cta { flex-direction: column; align-items: stretch; }
    .discover-cta .discover-btn { width: 100%; }
    .discover-foot-panel .discover-btn { width: min(100%, 20rem); }
    /* La date de la question passe sous l'intitulé plutôt que de le comprimer. */
    .archive-options .option { flex-wrap: wrap; }
    .archive-options .option-meta { white-space: normal; }
}

@media (max-width: 480px) {
    .discover-modes { grid-template-columns: 1fr; }
    .discover-foot-panel { padding: 1.3rem 1rem 1.4rem; }
    .discover-faq-item { padding: .7rem .75rem; }
}

/* Téléphone couché : la bannière d'accueil prend la moitié de l'écran pour trois lignes. */
@media (max-width: 940px) and (orientation: landscape) and (max-height: 500px) {
    .discover-hero { padding: .9rem 0 1.2rem; }
    .discover-orb .mark { width: 32px; height: 32px; }
    .discover-cta { flex-direction: row; }
    .discover-cta .discover-btn { width: auto; }
}
