/* Patch public landing, member space, history, pages and admin editors */
.landing-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 44px auto 28px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
    gap: 42px;
    align-items: center;
}

.landing-copy h1,
.landing-section h2,
.custom-page-card h1 {
    font-family: var(--title-font, Georgia, serif);
    color: var(--body-ink, #2d2926);
}

.beta-box,
.video-placeholder,
.custom-page-card,
.history-card,
.landing-draw-card,
.how-grid article,
.body-callout {
    border: 1px solid rgba(122, 92, 77, .16);
    background: rgba(255, 255, 255, .54);
    box-shadow: 0 20px 60px rgba(45, 41, 38, .08);
    backdrop-filter: blur(14px);
}

.beta-box {
    border-radius: 24px;
    padding: 18px 20px;
    margin-bottom: 24px;
}

.beta-box strong {
    display: block;
    margin-bottom: 8px;
    color: var(--body-terracotta, #b85c38);
}

.landing-oracle-card {
    min-height: 440px;
    display: grid;
    place-items: center;
}

.oracle-object.compact {
    transform: scale(.86);
}

.landing-section {
    width: min(1180px, calc(100% - 32px));
    margin: 36px auto;
}

.section-heading.left {
    text-align: left;
    max-width: 800px;
    margin: 0 0 24px;
}

.how-grid,
.landing-draw-grid,
.member-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.how-grid article,
.landing-draw-card,
.member-quick-grid a {
    border-radius: 26px;
    padding: 22px;
}

.how-grid article span {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(184, 92, 56, .12);
    color: var(--body-terracotta, #b85c38);
    font-weight: 700;
}

.video-embed {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 32px;
    border: 1px solid rgba(122, 92, 77, .18);
    box-shadow: 0 22px 70px rgba(45, 41, 38, .12);
    background: #000;
}

.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.video-placeholder {
    border-radius: 32px;
    min-height: 260px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 32px;
}

.landing-draw-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.landing-draw-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.landing-draw-card .btn {
    margin-top: auto;
}

.body-callout {
    border-radius: 34px;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.member-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 28px;
}

.member-quick-grid a {
    color: inherit;
    text-decoration: none;
    border: 1px solid rgba(122, 92, 77, .14);
    background: rgba(255, 255, 255, .42);
    transition: transform .2s ease, border-color .2s ease;
}

.member-quick-grid a:hover {
    transform: translateY(-2px);
    border-color: rgba(184, 92, 56, .34);
}

.member-quick-grid strong,
.member-quick-grid span {
    display: block;
}

.member-quick-grid span {
    margin-top: 6px;
    opacity: .72;
}

.history-page,
.custom-page-show {
    width: min(980px, calc(100% - 32px));
}

.history-list {
    display: grid;
    gap: 18px;
}

.history-card {
    border-radius: 30px;
    padding: 22px;
}

.history-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.question-box.compact {
    margin: 16px 0;
}

.history-mini-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 18px;
}

.history-mini-cards span {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(122, 92, 77, .08);
    font-size: .88rem;
}

.pagination-wrap {
    margin-top: 22px;
}

.custom-page-card {
    border-radius: 34px;
    padding: clamp(26px, 5vw, 56px);
}

.rich-content {
    line-height: 1.75;
    color: rgba(45, 41, 38, .88);
}

.rich-content h2,
.rich-content h3 {
    margin-top: 1.8em;
    color: var(--body-ink, #2d2926);
}

.rich-content a {
    color: var(--body-terracotta, #b85c38);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.free-draw-question,
.free-draw-save-form {
    margin: 18px 0;
}

.free-draw-question label,
.free-draw-save-form {
    display: grid;
    gap: 8px;
}

.free-draw-question textarea {
    width: 100%;
    border: 1px solid rgba(122, 92, 77, .2);
    border-radius: 18px;
    padding: 14px 16px;
    resize: vertical;
    background: rgba(255,255,255,.72);
}

.free-draw-save-form .btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.translation-reference {
    border: 1px solid rgba(47, 70, 102, .18);
    border-radius: 16px;
    padding: 12px 14px;
    margin: 10px 0;
    background: rgba(47, 70, 102, .06);
}

.translation-reference strong {
    display: block;
    margin-bottom: 6px;
    color: #2f4666;
}

.translation-reference p {
    margin: 0;
    white-space: normal;
    color: rgba(45, 41, 38, .78);
}

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.editor-toolbar button {
    border: 1px solid rgba(122, 92, 77, .18);
    background: rgba(255,255,255,.72);
    border-radius: 999px;
    padding: 8px 12px;
    cursor: pointer;
}

.seo-details {
    margin-top: 18px;
    border: 1px solid rgba(122, 92, 77, .12);
    border-radius: 18px;
    padding: 14px;
}

@media (max-width: 1020px) {
    .landing-hero {
        grid-template-columns: 1fr;
    }

    .landing-oracle-card {
        min-height: 320px;
    }

    .landing-draw-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .landing-hero,
    .landing-section,
    .history-page,
    .custom-page-show {
        width: min(100% - 22px, 1180px);
        margin-top: 24px;
    }

    .how-grid,
    .landing-draw-grid,
    .member-quick-grid {
        grid-template-columns: 1fr;
    }

    .body-callout,
    .history-card-head {
        align-items: stretch;
        flex-direction: column;
    }

    .public-nav {
        gap: 8px;
    }
}


/* Patch paramètres, maintenance, notes, responsive menu et détails carte */
.maintenance-top-alert {
    width: min(1180px, calc(100% - 28px));
    margin: 14px auto 0;
    border: 1px solid rgba(184, 92, 56, .24);
    background: rgba(184, 92, 56, .10);
    color: var(--body-ink, #2d2926);
    border-radius: 18px;
    padding: 12px 16px;
    font-weight: 700;
}

.maintenance-page {
    width: min(840px, calc(100% - 32px));
    margin: 54px auto;
    text-align: center;
}

.member-status-message,
.admin-success {
    border: 1px solid rgba(95, 122, 97, .24);
    background: rgba(95, 122, 97, .10);
    color: #35533a;
    border-radius: 18px;
    padding: 12px 16px;
    margin: 18px 0;
    font-weight: 700;
}

.public-topbar-inner {
    position: relative;
}

.public-nav-toggle {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
    pointer-events: none;
}

.public-nav-button {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(122, 92, 77, .16);
    background: rgba(255,255,255,.62);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.public-nav-button span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--body-ink, #2d2926);
    border-radius: 99px;
}

.settings-list {
    display: grid;
    gap: 14px;
    margin: 22px 0;
}

.setting-row {
    border: 1px solid rgba(122, 92, 77, .14);
    background: rgba(255,255,255,.58);
    border-radius: 22px;
    padding: 18px;
}

.setting-toggle {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    cursor: pointer;
}

.setting-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle-ui {
    width: 54px;
    height: 30px;
    border-radius: 999px;
    background: rgba(122, 92, 77, .22);
    position: relative;
    flex: 0 0 auto;
    transition: background .18s ease;
}

.toggle-ui::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(45,41,38,.18);
    transition: transform .18s ease;
}

.setting-toggle input:checked + .toggle-ui {
    background: var(--body-terracotta, #b85c38);
}

.setting-toggle input:checked + .toggle-ui::after {
    transform: translateX(24px);
}

.setting-toggle strong,
.setting-toggle small {
    display: block;
}

.setting-toggle small {
    margin-top: 5px;
    color: rgba(45,41,38,.64);
    line-height: 1.45;
}

.history-actions,
.draw-notes-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 18px;
}

.btn-danger-soft {
    color: #8d2c22;
    background: rgba(141, 44, 34, .08);
    border-color: rgba(141, 44, 34, .20);
}

.notes-box p {
    white-space: normal;
}

.draw-notes-panel {
    border: 1px solid rgba(122, 92, 77, .16);
    background: rgba(255,255,255,.54);
    box-shadow: 0 20px 60px rgba(45, 41, 38, .08);
    border-radius: 30px;
    padding: clamp(22px, 4vw, 34px);
    margin: 28px 0;
    display: grid;
    gap: 18px;
}

.saved-pill {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    border-radius: 999px;
    padding: 0 14px;
    background: rgba(95, 122, 97, .14);
    color: #35533a;
    font-weight: 800;
}

.free-draw-question.always-visible {
    max-width: 780px;
    margin: 24px auto 0;
    text-align: left;
}

.free-draw-notes {
    margin-top: 22px;
}

.free-card-fan-item img {
    border-radius: 5px;
}

.quick-detail-nav {
    position: sticky;
    top: 92px;
}

.quick-detail-nav .sub-link {
    padding-left: 14px;
    font-size: .92rem;
    opacity: .78;
}

.detail-section,
.interpretation-block {
    scroll-margin-top: 110px;
}

.empty-state.large {
    border: 1px solid rgba(122, 92, 77, .16);
    background: rgba(255,255,255,.54);
    border-radius: 30px;
    padding: clamp(24px, 5vw, 48px);
    text-align: center;
}

@media (max-width: 860px) {
    .public-topbar-inner {
        align-items: center;
    }

    .public-nav-button {
        display: inline-flex;
        margin-left: auto;
    }

    .public-nav {
        display: none;
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        z-index: 30;
        padding: 14px;
        border: 1px solid rgba(122, 92, 77, .16);
        border-radius: 22px;
        background: rgba(250, 246, 239, .96);
        box-shadow: 0 20px 60px rgba(45, 41, 38, .14);
        backdrop-filter: blur(18px);
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .public-nav-toggle:checked ~ .public-nav {
        display: flex;
    }

    .public-nav a,
    .public-logout-form button,
    .language-switcher {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .language-switcher {
        display: flex;
        flex-wrap: wrap;
    }

    .public-logout-form {
        width: 100%;
    }

    .public-logout-form button {
        display: inline-flex;
    }

    .history-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .history-actions .btn,
    .history-actions form,
    .history-actions button {
        width: 100%;
    }
}


/* Patch notes par étape + intention synthèse */
.summary-intention-highlight {
    margin: 22px auto 0;
    max-width: 820px;
    border: 1px solid rgba(184, 92, 56, .18);
    background: rgba(255,255,255,.62);
    border-radius: 26px;
    padding: clamp(18px, 3vw, 28px);
    box-shadow: 0 18px 60px rgba(45, 41, 38, .08);
}

.summary-intention-highlight span {
    display: block;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .74rem;
    font-weight: 900;
    color: var(--body-terracotta, #b85c38);
}

.summary-intention-highlight p {
    margin: 0;
    font-family: var(--font-title, Georgia, serif);
    font-size: clamp(1.35rem, 3vw, 2.2rem);
    line-height: 1.18;
    color: var(--body-ink, #2d2926);
}

.step-note-panel,
.step-note-summary,
.history-step-notes {
    border: 1px solid rgba(122, 92, 77, .14);
    background: rgba(255,255,255,.54);
    border-radius: 24px;
    padding: 18px;
    margin-top: 18px;
}

.step-note-panel h3 {
    margin: 3px 0 8px;
    font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.step-note-panel p,
.step-note-summary p,
.history-step-note-item p {
    color: rgba(45,41,38,.72);
    line-height: 1.55;
}

.step-note-panel label {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.step-note-panel label span,
.step-note-summary span,
.history-step-notes > span {
    font-size: .76rem;
    letter-spacing: .10em;
    text-transform: uppercase;
    font-weight: 900;
    color: var(--body-earth, #7a5c4d);
}

.step-note-panel textarea {
    width: 100%;
    border: 1px solid rgba(122, 92, 77, .18);
    border-radius: 18px;
    padding: 14px 16px;
    background: rgba(255,255,255,.78);
    color: var(--body-ink, #2d2926);
    resize: vertical;
    min-height: 110px;
}

.step-note-summary {
    background: rgba(200, 155, 91, .10);
    border-color: rgba(200, 155, 91, .20);
}

.step-note-summary p {
    margin: 8px 0 0;
    white-space: normal;
}

.history-step-notes {
    display: grid;
    gap: 12px;
}

.history-step-note-item {
    border-top: 1px solid rgba(122, 92, 77, .12);
    padding-top: 12px;
}

.history-step-note-item:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.history-step-note-item strong {
    display: block;
    margin-bottom: 4px;
}

.landing-draw-card p {
    white-space: pre-line;
}
