/* Boule de Cristal Oui/Non : direction « Nuit dorée ».
   Polices chargées dans le <head> de chaque page (Cormorant Garamond + DM Sans, display=swap). */

:root {
    --bg: #0e0c14;
    --surface: #15121d;
    --text: #f3eee4;
    --muted: #b9b2c4;
    --dim: #8d8698;
    --soft: #d8d1e2;
    --body: #cfc8da;
    --gold: #e2c77e;
    --gold-hi: #f3e2b0;
    --ink: #1a1422;
    --violet: #7c4dff;
    --non: #c3b6ff;
    --line: rgba(243, 238, 228, 0.07);
    --line-chip: rgba(243, 238, 228, 0.16);
    --line-gold: rgba(226, 199, 126, 0.14);
    --line-gold-2: rgba(226, 199, 126, 0.16);
    --line-gold-3: rgba(226, 199, 126, 0.3);
    --serif: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
    --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --gutter: 16px;
    --wrap: min(1248px, calc(100% - 2 * var(--gutter)));

    /* Compatibilité avec les anciens noms (blog.css et contenus existants) */
    --gold-light: var(--gold-hi);
    --gold-dark: #b99a52;
    --text-primary: var(--text);
    --text-secondary: var(--muted);
    --bg-primary: var(--bg);
    --bg-secondary: var(--surface);
    --border-subtle: var(--line);
    --border-gold: rgba(226, 199, 126, 0.45);
}

@media (min-width: 640px) { :root { --gutter: 32px; } }
@media (min-width: 1024px) { :root { --gutter: 48px; } }

/* ================================================================ base */

*, *::before, *::after { box-sizing: border-box; }

html {
    background: var(--bg);
    -webkit-text-size-adjust: 100%;
    overflow-x: clip;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    position: relative;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; position: relative; z-index: 1; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hi); }

button, input { font-family: inherit; }
button { cursor: pointer; }
input::placeholder { color: var(--dim); opacity: 1; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 { font-weight: 500; }

.wrap { width: var(--wrap); margin-inline: auto; }

.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

.show-sm { display: none; }
@media (max-width: 639px) {
    .hide-sm { display: none; }
    .show-sm { display: inline; }
}

.eyebrow {
    margin: 0;
    font-size: 13px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gold);
}

/* Halo violet derrière la boule */
.page-halo {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1200px;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.page-halo::before {
    content: '';
    position: absolute;
    top: -220px;
    left: calc(50% + 60px);
    width: 820px;
    height: 820px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 77, 255, 0.22) 0%, rgba(124, 77, 255, 0) 65%);
}

/* ================================================================ header */

#header-placeholder {
    position: relative;
    z-index: 9998;
    border-bottom: 1px solid var(--line-gold);
}

.header-content {
    width: var(--wrap);
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 0;
}

.site-brand {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    color: var(--text);
    font-family: var(--serif);
    font-size: 25px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1;
}
.site-brand:hover { color: var(--text); }
.site-brand-logo { width: 30px; height: 30px; flex-shrink: 0; }

#main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 40px;
}

#main-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 15px;
    color: var(--muted);
    transition: color 0.2s ease;
}
#main-nav a:hover { color: var(--gold-hi); }
#main-nav a[aria-current="page"], #main-nav a.active { color: var(--text); }

#main-nav a.nav-cta {
    padding: 0 22px;
    border: 1px solid rgba(226, 199, 126, 0.45);
    border-radius: 999px;
    color: var(--gold);
    transition: background-color 0.2s ease, color 0.2s ease;
}
#main-nav a.nav-cta:hover { background: rgba(226, 199, 126, 0.1); color: var(--gold-hi); }
#main-nav a.nav-cta[aria-current="page"] { background: rgba(226, 199, 126, 0.12); }

.burger-menu {
    display: none;
    position: relative;
    z-index: 2;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: 1px solid var(--line-gold-3);
    border-radius: 12px;
}
.burger-menu .ico-close { display: none; }
.burger-menu.active .ico-open { display: none; }
.burger-menu.active .ico-close { display: block; }

@media (max-width: 899px) {
    .header-content { padding: 16px 0; }
    .site-brand { gap: 10px; font-size: 21px; }
    .site-brand-logo { width: 26px; height: 26px; }
    .burger-menu { display: inline-flex; }

    /* Tiroir plein écran : le header n'a ni transform ni backdrop-filter,
       le position: fixed se rapporte donc bien à la fenêtre. */
    #main-nav {
        position: fixed;
        inset: 0;
        z-index: 1;
        padding: 96px var(--gutter) 40px;
        background: var(--bg);
        overflow-y: auto;
        visibility: hidden;
        opacity: 0;
        transform: translateY(-12px);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
    }
    #main-nav.nav-active {
        visibility: visible;
        opacity: 1;
        transform: none;
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s;
    }
    #main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
    #main-nav li { border-bottom: 1px solid var(--line); }
    #main-nav li:last-child { border-bottom: 0; padding-top: 28px; }
    #main-nav a {
        display: flex;
        min-height: 60px;
        font-family: var(--serif);
        font-size: 30px;
        color: var(--text);
    }
    #main-nav a[aria-current="page"] { color: var(--gold); }
    #main-nav a.nav-cta {
        justify-content: center;
        min-height: 52px;
        font-family: var(--sans);
        font-size: 16px;
        font-weight: 600;
        background: var(--gold);
        color: var(--ink);
        border-color: var(--gold);
    }
    #main-nav a.nav-cta:hover { color: var(--ink); background: var(--gold-hi); }
    body.nav-open { overflow: hidden; }
}

/* ================================================================ hero */

.hero {
    --ball: 460px;
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 64px;
    align-items: center;
    padding: 96px 0 72px;
}

.hero-copy { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.hero-intro { display: flex; flex-direction: column; gap: 28px; }

.hero-title {
    margin: 0;
    font-family: var(--serif);
    font-weight: 500;
    font-size: 84px;
    line-height: 0.98;
    letter-spacing: -0.01em;
    color: var(--text);
}
.hero-title span { display: block; font-style: italic; color: var(--gold); }

.hero-lead {
    margin: 0;
    max-width: 500px;
    font-size: 18px;
    line-height: 1.6;
    color: var(--muted);
}

/* Formulaire */
.ask-form { display: flex; flex-direction: column; gap: 14px; max-width: 540px; }
.q-label { font-size: 14px; color: var(--muted); }

.ask-field {
    display: flex;
    gap: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line-gold-3);
    border-radius: 18px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.ask-field:focus-within { border-color: rgba(226, 199, 126, 0.7); box-shadow: 0 0 0 3px rgba(226, 199, 126, 0.12); }

#question-input, .kit-input {
    flex-grow: 1;
    min-width: 0;
    min-height: 48px;
    padding: 0 14px;
    background: transparent;
    border: 0;
    outline: none;
    color: var(--text);
    font-size: 16px;
}
#question-input:disabled, .kit-input:disabled { opacity: 0.6; }

#ask-button, .kit-button {
    min-height: 48px;
    padding: 0 26px;
    border: 0;
    border-radius: 12px;
    background: var(--gold);
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color 0.2s ease, transform 0.1s ease;
}
#ask-button:hover, .kit-button:hover { background: var(--gold-hi); }
#ask-button:active, .kit-button:active { transform: translateY(1px); }
#ask-button:disabled, .kit-button:disabled { opacity: 0.55; cursor: progress; }

.privacy-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin-top: -6px;
    font-size: 14px;
    color: var(--dim);
    cursor: pointer;
    align-self: flex-start;
}
.privacy-option input {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--gold);
    cursor: pointer;
}

.input-message {
    min-height: 1.3em;
    margin-top: -10px;
    font-size: 14px;
    color: var(--gold);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.input-message.visible { opacity: 1; }

/* Suggestions */
.suggestions-wrapper { display: flex; flex-wrap: wrap; gap: 10px; max-width: 640px; }
.suggestion-btn {
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid var(--line-chip);
    color: var(--soft);
    font-size: 14px;
    white-space: nowrap;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.suggestion-btn:hover { border-color: rgba(226, 199, 126, 0.5); color: var(--gold-hi); background: rgba(226, 199, 126, 0.05); }

/* Historique personnel */
.history-section { max-width: 540px; }
.history-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0;
    background: none;
    border: 0;
    color: var(--dim);
    font-size: 14px;
}
.history-toggle:hover { color: var(--gold-hi); }
.history-arrow { transition: transform 0.25s ease; }
.history-arrow.open { transform: rotate(180deg); }

.history-panel {
    max-height: 0;
    overflow: hidden;
    border-radius: 18px;
    background: var(--surface);
    border: 0;
    transition: max-height 0.35s ease;
}
.history-panel.open { max-height: 520px; box-shadow: inset 0 0 0 1px var(--line); }
.history-list { list-style: none; margin: 0; padding: 8px 20px; max-height: 400px; overflow-y: auto; text-align: left; }
.history-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
    color: var(--soft);
}
.history-list li:last-child { border-bottom: 0; }
.history-question { word-break: break-word; }
.history-date { display: block; margin-top: 2px; font-size: 12px; color: var(--dim); }
.history-answer {
    flex-shrink: 0;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.history-answer.oui { background: rgba(226, 199, 126, 0.14); color: var(--gold); }
.history-answer.non { background: rgba(160, 140, 255, 0.16); color: var(--non); }
.history-empty { justify-content: center !important; color: var(--dim) !important; font-style: italic; }
.history-clear {
    display: block;
    min-height: 44px;
    margin: 0 20px 12px auto;
    padding: 0 16px;
    background: transparent;
    border: 1px solid var(--line-chip);
    border-radius: 999px;
    color: var(--dim);
    font-size: 13px;
}
.history-clear:hover { color: #ff9b9b; border-color: rgba(255, 155, 155, 0.4); }

/* ================================================================ la boule */

.hero-ball {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.crystal-ball {
    position: relative;
    z-index: 1;
    width: var(--ball);
    height: var(--ball);
    flex-shrink: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(var(--ball) * 0.06);
    color: #fbf3dc;
    background:
        radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.06) 18%, rgba(0, 0, 0, 0) 32%),
        radial-gradient(circle at 50% 55%, var(--violet) 0%, #3b1f73 38%, #150d24 70%, #0b0812 100%);
    box-shadow:
        0 0 120px rgba(124, 77, 255, 0.35),
        inset 0 -30px 60px rgba(0, 0, 0, 0.55),
        inset 0 0 0 1px rgba(226, 199, 126, 0.25);
    transition: box-shadow 0.8s ease;
    -webkit-tap-highlight-color: transparent;
}
.crystal-ball:focus-visible { outline: 2px solid var(--gold); outline-offset: 8px; border-radius: 50%; }

.inner-glow {
    position: absolute;
    inset: 12.5%;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 55%, rgba(170, 130, 255, 0.18) 0%, rgba(124, 77, 255, 0) 60%);
    opacity: 0.9;
    pointer-events: none;
}

.answer {
    position: absolute;
    z-index: 3;
    width: 88%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: var(--serif);
    font-size: 3.5em;
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: 0.04em;
    color: #fbf3dc;
    text-shadow: 0 0 34px rgba(251, 243, 220, 0.7);
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.4s ease, font-size 0.2s ease-out;
    overflow-wrap: anywhere;
}
.answer.is-final { text-transform: uppercase; }

.reveal-ripple {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 4;
    opacity: 0;
}

/* Socle (maquette validée, SVG repris tel quel) */
.socle { position: relative; z-index: 2; display: block; pointer-events: none; aspect-ratio: 400 / 190; height: auto; }
.socle-d { width: calc(var(--ball) * 400 / 460); margin-top: calc(var(--ball) * -70 / 460); }
.socle-m { display: none; width: calc(var(--ball) * 235 / 270); margin-top: calc(var(--ball) * -61 / 270); }

/* Ondes pendant la réflexion, centrées sur la boule */
.crystal-ball-container::before,
.crystal-ball-container::after {
    content: '';
    position: absolute;
    top: calc(var(--ball) / 2);
    left: 50%;
    width: var(--ball);
    height: var(--ball);
    border: 1px solid rgba(226, 199, 126, 0.35);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
    z-index: 0;
}
.crystal-ball-container.thinking::before { animation: wavePulse 3s ease-out infinite; }
.crystal-ball-container.thinking::after { animation: wavePulse 3s 1.5s ease-out infinite; }
@keyframes wavePulse {
    0% { transform: translate(-50%, -50%) scale(0.95); opacity: 0.6; }
    70% { transform: translate(-50%, -50%) scale(1.35); opacity: 0; border-color: rgba(124, 77, 255, 0.25); }
    100% { opacity: 0; }
}

/* Réflexion */
.crystal-ball.thinking { animation: ballThink 2s ease-in-out infinite; cursor: progress; }
.crystal-ball.thinking .answer { opacity: 0.55; }
.crystal-ball.thinking .inner-glow { animation: innerPulse 2s ease-in-out infinite; }
@keyframes ballThink {
    0%, 100% { box-shadow: 0 0 120px rgba(124, 77, 255, 0.35), inset 0 -30px 60px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(226, 199, 126, 0.25); }
    50% { box-shadow: 0 0 170px rgba(124, 77, 255, 0.6), inset 0 -30px 60px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(226, 199, 126, 0.45), inset 0 0 70px rgba(155, 123, 255, 0.35); }
}
@keyframes innerPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.18); opacity: 1; }
}

/* Particules */
.particle-container { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: 50%; z-index: 2; }
.particle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--start-size);
    height: var(--start-size);
    border-radius: 50%;
    opacity: 0;
    animation: particleFlow var(--duration) var(--delay) ease-out forwards;
}
@keyframes particleFlow {
    0% { transform: translate(-50%, -50%) rotate(var(--angle)) translateY(0) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) rotate(calc(var(--angle) + 45deg)) translateY(calc(var(--ball) * 0.42)) scale(0.5); opacity: 0; }
}

/* Révélation */
.crystal-ball.revealing .inner-glow { opacity: 1; }
.answer.answer-reveal-pop { animation: answerPop 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
@keyframes answerPop {
    0% { transform: scale(0.3); opacity: 0; text-shadow: 0 0 60px rgba(251, 243, 220, 1); }
    60% { transform: scale(1.12); opacity: 1; }
    100% { transform: scale(1); opacity: 1; text-shadow: 0 0 34px rgba(251, 243, 220, 0.7); }
}
.reveal-ripple.active { animation: revealRipple 0.8s ease-out forwards; }
@keyframes revealRipple {
    0% { box-shadow: inset 0 0 0 0 rgba(251, 243, 220, 0.6); opacity: 1; }
    100% { box-shadow: inset 0 0 0 calc(var(--ball) * 0.5) rgba(251, 243, 220, 0); opacity: 0; }
}
.inner-glow.glow-flash { animation: glowFlash 0.7s ease-out forwards; }
@keyframes glowFlash {
    0% { background: radial-gradient(circle at 50% 50%, rgba(251, 243, 220, 0.55) 0%, rgba(226, 199, 126, 0.25) 35%, rgba(226, 199, 126, 0) 65%); opacity: 1; }
    100% { opacity: 0.9; }
}

/* Réponse : lueur dorée pour oui, violette pour non */
.crystal-ball.answer-oui {
    box-shadow:
        0 0 150px rgba(226, 199, 126, 0.45),
        inset 0 -30px 60px rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(226, 199, 126, 0.6),
        inset 0 0 90px rgba(226, 199, 126, 0.28);
}
.crystal-ball.answer-non {
    box-shadow:
        0 0 150px rgba(155, 123, 255, 0.6),
        inset 0 -30px 60px rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(195, 182, 255, 0.5),
        inset 0 0 90px rgba(155, 123, 255, 0.35);
}

/* ================================================================ bandeau chiffres */

.stats {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--line-gold-2);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.02);
}
.stat { display: flex; flex-direction: column; gap: 6px; padding: 28px 36px; border-right: 1px solid var(--line-gold-2); min-width: 0; }
.stat:last-child { border-right: 0; }
.stat-value { font-family: var(--serif); font-size: 40px; line-height: 1.15; color: var(--gold); font-variant-numeric: tabular-nums; }
.stat-label { font-size: 14px; color: var(--muted); }

/* ================================================================ cartes questions / tendances */

.home-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
    padding-top: 120px;
    align-items: start;
}

.card {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    column-gap: 16px;
    row-gap: 20px;
    padding: 40px;
    border-radius: 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    min-width: 0;
}
.card-title { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 38px; line-height: 1.1; }
.card-link { font-size: 14px; display: inline-flex; align-items: center; min-height: 44px; }
.card > :not(.card-title):not(.card-link) { grid-column: 1 / -1; }
.trending-section { row-gap: 24px; }

.q-list, #all-questions-list { list-style: none; margin: 0; padding: 0; }
.q-list { min-height: 300px; }
.q-list li, #all-questions-list li {
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    font-size: 16px;
    color: var(--soft);
    overflow-wrap: anywhere;
}
.q-list li:last-child, #all-questions-list li:last-child { border-bottom: 0; }

.trending-bars { display: flex; flex-direction: column; gap: 22px; min-height: 300px; }
.trending-bar-row {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "label pct" "bar bar";
    row-gap: 8px;
    font-size: 15px;
}
.trending-label { grid-area: label; color: var(--text); }
.trending-percentage { grid-area: pct; color: var(--dim); }
.trending-bar-container { grid-area: bar; height: 8px; border-radius: 99px; background: rgba(243, 238, 228, 0.07); overflow: hidden; }
.trending-bar-fill { height: 8px; border-radius: 99px; background: var(--gold); width: 0; transition: width 0.9s ease-out; }

/* ================================================================ blog (rendu par le Worker) */

.home-blog { display: flex; flex-direction: column; gap: 36px; padding-top: 120px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.section-head > div { display: flex; flex-direction: column; gap: 10px; }
.section-title { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 52px; line-height: 1.05; }
.section-link { font-size: 15px; display: inline-flex; align-items: center; min-height: 44px; }

.home-blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.home-post { position: relative; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.home-post-img {
    height: 240px;
    border-radius: 18px;
    border: 1px solid rgba(243, 238, 228, 0.08);
    overflow: hidden;
    background: radial-gradient(circle at 70% 30%, #6a3fc4 0%, #24163d 55%, #120d1c 100%);
}
.home-post:nth-child(3n+2) .home-post-img { background: radial-gradient(circle at 30% 40%, #8a6a2c 0%, #2c2016 55%, #120d1c 100%); }
.home-post:nth-child(3n+3) .home-post-img { background: radial-gradient(circle at 55% 60%, #3d5fa8 0%, #1a1a38 55%, #120d1c 100%); }
.home-post-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.home-post:hover .home-post-img img { transform: scale(1.03); }
.home-post-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.home-post-cat { font-size: 13px; color: var(--gold); }
.home-post-title { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 27px; line-height: 1.2; }
.home-post-title a { color: var(--text); }
.home-post-title a::after { content: ''; position: absolute; inset: 0; border-radius: 18px; }
.home-post:hover .home-post-title a { color: var(--gold-hi); }

/* ================================================================ texte de la home */

.seo-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 80px;
    padding-top: 120px;
    align-items: start;
}
.seo-toc {
    position: sticky;
    top: 32px;
    display: flex;
    flex-direction: column;
    gap: 0;
    font-size: 14px;
}
.seo-toc .eyebrow { margin-bottom: 8px; }
.seo-toc a { display: flex; align-items: center; min-height: 44px; color: var(--dim); transition: color 0.2s ease; }
.seo-toc a:hover, .seo-toc a.is-active { color: var(--text); }

.seo-content { max-width: 720px; min-width: 0; }
.seo-content h2 {
    margin: 64px 0 22px;
    font-family: var(--serif);
    font-weight: 500;
    font-size: 44px;
    line-height: 1.1;
    color: var(--text);
    scroll-margin-top: 24px;
}
.seo-content h2:first-of-type { margin-top: 0; }
.seo-content .seo-lead + h2 { margin-top: 48px; }
.seo-content h3 { margin: 40px 0 16px; font-family: var(--serif); font-weight: 500; font-size: 30px; line-height: 1.15; color: var(--gold-hi); }
.seo-content p, .seo-content ul, .seo-content ol { margin: 0 0 22px; font-size: 18px; line-height: 1.75; color: var(--body); }
.seo-content .seo-lead { font-size: 20px; color: var(--soft); }
.seo-content ul, .seo-content ol { padding-left: 1.3em; }
.seo-content li { margin-bottom: 8px; }
.seo-content li::marker { color: var(--gold); }
.seo-content strong { color: var(--text); font-weight: 600; }
.seo-content em { color: var(--soft); }

.note-box {
    display: flex;
    gap: 16px;
    margin-top: 40px;
    padding: 24px 28px;
    border-radius: 18px;
    background: rgba(226, 199, 126, 0.07);
    border: 1px solid rgba(226, 199, 126, 0.2);
}
.note-box svg { flex-shrink: 0; margin-top: 2px; }
.seo-content .note-box p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--soft); }

/* ================================================================ pages de contenu */

.content-page {
    width: min(820px, calc(100% - 2 * var(--gutter)));
    margin: 64px auto 0;
    padding: 48px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 22px;
}
.content-page .page-kicker {
    margin: 0 0 14px;
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gold);
}
.content-page .page-title {
    margin: 0 0 28px;
    font-family: var(--serif);
    font-weight: 500;
    font-size: 48px;
    line-height: 1.08;
    color: var(--text);
}
.content-page h2 { margin: 44px 0 16px; font-family: var(--serif); font-weight: 500; font-size: 32px; line-height: 1.15; color: var(--text); }
.content-page h3 { margin: 34px 0 12px; font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1.2; color: var(--gold-hi); }
.content-page h4 { margin: 24px 0 8px; font-size: 16px; font-weight: 600; color: var(--gold); }
.content-page p, .content-page ul, .content-page ol { margin: 0 0 18px; font-size: 17px; line-height: 1.75; color: var(--body); }
.content-page ul, .content-page ol { padding-left: 1.3em; }
.content-page li { margin-bottom: 6px; }
.content-page li::marker { color: var(--gold); }
.content-page strong { color: var(--text); font-weight: 600; }
.content-page a { color: var(--gold); text-decoration: underline; text-decoration-color: rgba(226, 199, 126, 0.35); text-underline-offset: 3px; }
.content-page a:hover { color: var(--gold-hi); text-decoration-color: currentColor; }

/* Auteur (à propos) */
.author-section { margin-top: 44px; padding-top: 32px; border-top: 1px solid var(--line); }
.content-page .author-section h3 { margin-top: 0; }
.author-content { display: flex; align-items: center; gap: 24px; }
.author-photo { width: 110px; height: 110px; flex-shrink: 0; border-radius: 50%; object-fit: cover; object-position: top; border: 1px solid rgba(226, 199, 126, 0.45); }
.author-info h4 { margin: 0 0 8px; font-family: var(--serif); font-size: 26px; font-weight: 500; color: var(--text); }
.author-info p { margin-bottom: 14px; }
.content-page a.author-linkedin {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid rgba(226, 199, 126, 0.45);
    border-radius: 999px;
    text-decoration: none;
    font-size: 14px;
}
.content-page a.author-linkedin:hover { background: rgba(226, 199, 126, 0.1); }

/* Vos questions */
#all-questions-container { margin-bottom: 24px; }
#all-questions-list li { font-size: 16px; }
.pagination-controls { display: flex; justify-content: center; align-items: center; gap: 16px; flex-wrap: wrap; }
.pagination-controls button {
    min-height: 44px;
    padding: 0 20px;
    background: transparent;
    color: var(--gold);
    border: 1px solid rgba(226, 199, 126, 0.45);
    border-radius: 999px;
    font-size: 14px;
}
.pagination-controls button:hover:not(:disabled) { background: rgba(226, 199, 126, 0.1); }
.pagination-controls button:disabled { opacity: 0.55; cursor: not-allowed; }
#page-info { font-size: 14px; color: var(--muted); }

/* ================================================================ footer */

#footer-placeholder {
    position: relative;
    z-index: 1;
    margin-top: 120px;
    border-top: 1px solid var(--line-gold);
}
.footer-content {
    width: var(--wrap);
    margin-inline: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 48px 0;
    font-size: 14px;
    color: var(--dim);
}
.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-name { font-family: var(--serif); font-size: 20px; color: var(--text); }
.footer-copy { margin: 0; font-size: 13px; color: var(--dim); }
.footer-links { margin: 0; display: flex; flex-wrap: wrap; gap: 0 28px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--dim); }
.footer-links a:hover { color: var(--gold-hi); }

/* ================================================================ AdSense (annonces automatiques) */

.google-auto-placed { clear: both; margin-inline: auto !important; max-width: var(--wrap); }
main .google-auto-placed { margin-block: 32px !important; }

/* ================================================================ tablette et mobile */

@media (max-width: 1199px) {
    .hero { --ball: min(460px, 40vw); gap: 48px; }
    .hero-title { font-size: 72px; }
    .seo-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 56px; }
}

@media (max-width: 899px) {
    .page-halo::before { top: 90px; left: calc(50% - 255px); width: 510px; height: 510px; background: radial-gradient(circle, rgba(124, 77, 255, 0.24) 0%, rgba(124, 77, 255, 0) 65%); }

    .hero {
        --ball: min(270px, 72vw);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 32px 0 0;
        text-align: center;
    }
    .hero-copy { display: contents; }
    .hero-intro { order: 1; gap: 20px; align-items: center; }
    .hero-ball { order: 2; margin-top: 8px; }
    .ask-form { order: 3; width: 100%; max-width: 560px; text-align: left; gap: 10px; }
    .suggestions-wrapper { order: 4; }
    .history-section { order: 5; width: 100%; max-width: 560px; text-align: left; }

    .eyebrow { font-size: 11px; letter-spacing: 0.22em; }
    .hero-title { font-size: 50px; line-height: 1; letter-spacing: 0; }
    .hero-title span { display: inline; }
    .hero-lead { display: none; }

    .crystal-ball { box-shadow: 0 0 80px rgba(124, 77, 255, 0.35), inset 0 -20px 40px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(226, 199, 126, 0.25); font-size: calc(var(--ball) * 0.068); }
    .answer { text-shadow: 0 0 26px rgba(251, 243, 220, 0.7); letter-spacing: 0.02em; }
    .socle-d { display: none; }
    .socle-m { display: block; }

    .ask-field { flex-direction: column; padding: 0; gap: 10px; background: none; border: 0; border-radius: 0; box-shadow: none !important; }
    #question-input, .kit-input {
        min-height: 52px;
        padding: 0 16px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid var(--line-gold-3);
        border-radius: 14px;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }
    #question-input:focus, .kit-input:focus { border-color: rgba(226, 199, 126, 0.7); box-shadow: 0 0 0 3px rgba(226, 199, 126, 0.12); }
    #ask-button, .kit-button { min-height: 52px; border-radius: 14px; font-size: 16px; }
    .privacy-option { margin-top: 0; }
    .input-message { margin-top: -6px; }

    .suggestions-wrapper {
        width: 100%;
        max-width: 560px;
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        scrollbar-width: none;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }
    .suggestions-wrapper::-webkit-scrollbar { display: none; }
    .suggestion-btn { flex-shrink: 0; padding: 0 16px; scroll-snap-align: start; }

    .stats { margin-top: 36px; border-radius: 18px; text-align: center; }
    .stat { padding: 16px 6px; gap: 4px; }
    .stat-value { font-size: 20px; }
    .stat-label { font-size: 12px; }

    .home-cards { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 48px; }
    .card { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 24px 20px; border-radius: 18px; }
    .card-link { align-self: flex-start; }
    .card-title { font-size: 30px; margin-bottom: 6px; }
    .latest-questions .card-link { order: 3; margin-top: 6px; }
    .q-list { min-height: 0; }
    .q-list li, #all-questions-list li { padding: 12px 0; font-size: 15px; }
    .trending-bars { min-height: 0; gap: 18px; margin-top: 8px; }

    .home-blog { gap: 20px; padding-top: 48px; }
    .section-head { flex-direction: column; align-items: flex-start; gap: 0; }
    .section-head > div { gap: 6px; }
    .section-title { font-size: 34px; }
    .home-blog .section-link { order: 3; }
    .home-blog { display: flex; }
    .home-blog-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .home-post { flex-direction: row; align-items: center; gap: 14px; }
    .home-post-img { width: 96px; height: 96px; flex-shrink: 0; border-radius: 14px; border: 0; }
    .home-post-body { gap: 6px; }
    .home-post-cat { font-size: 12px; }
    .home-post-title { font-size: 20px; }
    .home-post-title a::after { border-radius: 14px; }

    .seo-layout { display: block; padding-top: 48px; }
    .seo-toc { display: none; }
    .seo-content h2 { font-size: 30px; line-height: 1.15; margin: 44px 0 16px; }
    .seo-content h2:first-of-type { margin-top: 0; }
    .seo-content h3 { font-size: 24px; }
    .seo-content p, .seo-content ul, .seo-content ol { font-size: 16px; line-height: 1.7; margin-bottom: 16px; }
    .seo-content .seo-lead { font-size: 17px; }
    .note-box { padding: 18px 18px; gap: 12px; }

    .content-page { margin-top: 32px; padding: 28px 20px; border-radius: 18px; }
    .content-page .page-title { font-size: 36px; }
    .content-page h2 { font-size: 27px; }
    .content-page h3 { font-size: 23px; }
    .content-page p, .content-page ul, .content-page ol { font-size: 16px; }
    .author-content { flex-direction: column; text-align: center; }

    #footer-placeholder { margin-top: 48px; }
    .footer-content { flex-direction: column; align-items: flex-start; gap: 14px; padding: 32px 0; }
    .footer-links { gap: 0 18px; }
}

@media (max-width: 380px) {
    .hero-title { font-size: 44px; }
    .stat-value { font-size: 18px; }
}

/* ================================================================ mouvement réduit */

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .particle-container, .crystal-ball-container::before, .crystal-ball-container::after { display: none !important; }
}

/* Passages masqués par la modération (noms de famille, numéros, emails) : le texte réel
   n'est jamais envoyé, la page reçoit des lettres bidon qu'elle floute. */
.flou {
    filter: blur(4px);
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

/* ================================================================ réseau de sites */

/* Carte « deuxième avis » (relais.js) */
.relais-card {
    position: relative;
    max-width: 560px;
    padding: 16px 44px 16px 18px;
    border-radius: 16px;
    border: 1px solid var(--line-gold-3);
    background: linear-gradient(135deg, rgba(226, 199, 126, 0.08), rgba(124, 77, 255, 0.08));
    animation: relaisIn 0.5s ease both;
}
.relais-titre { margin: 0 0 4px; font-family: var(--serif); font-size: 21px; color: var(--text); }
.relais-texte { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.relais-cta { display: inline-block; padding: 8px 16px; border-radius: 999px; background: var(--gold); color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; }
.relais-cta:hover { background: var(--gold-hi); }
.relais-close { position: absolute; top: 8px; right: 10px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--dim); font-size: 20px; cursor: pointer; }
.relais-close:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
@keyframes relaisIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 899px) { .relais-card { order: 3; width: 100%; text-align: left; } }
@media (prefers-reduced-motion: reduce) { .relais-card { animation: none; } }

/* Bloc « Nos autres oracles » */
.autres-oracles { display: flex; flex-direction: column; gap: 18px; }
.autres-oracles .section-title { margin: 0; }
.autres-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.autre-oracle {
    display: flex; flex-direction: column; gap: 8px;
    padding: 20px; border-radius: 18px;
    border: 1px solid var(--line-gold-2); background: rgba(255, 255, 255, 0.02);
    color: var(--body); text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.autre-oracle:hover { border-color: var(--line-gold-3); transform: translateY(-2px); }
.autre-oracle strong { font-family: var(--serif); font-size: 22px; font-weight: 500; color: var(--text); }
.autre-oracle span { font-size: 14px; }
.autre-oracle em { margin-top: auto; font-style: normal; font-size: 14px; color: var(--gold); }
@media (max-width: 760px) { .autres-grid { grid-template-columns: 1fr; } }

/* Pied de page : versions dans les autres langues */
.footer-langs { width: 100%; margin: 6px 0 0; font-size: 13px; color: var(--dim); display: flex; flex-wrap: wrap; gap: 6px 14px; }
.footer-langs a { color: var(--muted); }
.footer-langs a:hover { color: var(--gold); }
