/*
 * Déclinaison Web du design Flutter.
 * Cette feuille est volontairement chargée après les styles historiques :
 * elle harmonise le rendu sans modifier la logique ni dupliquer les vues.
 */

:root {
    --app-primary: #ff5f45;
    --app-primary-dark: #e84b36;
    --app-primary-light: #ffefeb;
    --app-orange: #f97316;
    --app-secondary: #0f766e;
    --app-secondary-light: #ecfeff;
    --app-background: #fffdf8;
    --app-surface: #ffffff;
    --app-surface-muted: #f8fafc;
    --app-text: #0f172a;
    --app-muted: #64748b;
    --app-border: #e2e8f0;
    --app-success: #0f7b66;
    --app-error: #ef4444;
    --app-sidebar-width: 264px;
    --app-content-width: 1180px;
    --app-card-radius: 20px;
    --app-control-radius: 14px;
    --app-shadow: 0 14px 38px rgba(15, 23, 42, 0.07);
}

body.web-app-surface {
    min-width: 320px;
    background: var(--app-background);
    color: var(--app-text);
    font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.web-app-surface::before {
    display: none;
}

body.web-app-surface :where(button, input, select, textarea) {
    font-family: inherit;
}

body.web-app-surface :where(h1, h2, h3, h4, strong) {
    color: var(--app-text);
}

body.web-app-surface :where(p, small) {
    color: var(--app-muted);
}

body.web-app-surface :where(a, button, input, select, textarea) {
    -webkit-tap-highlight-color: transparent;
}

body.web-app-surface ::selection {
    background: rgba(255, 95, 69, 0.2);
    color: var(--app-text);
}

body.web-app-surface :where(a, button, input, select, textarea):focus-visible {
    outline: 3px solid rgba(255, 95, 69, 0.22);
    outline-offset: 3px;
}

body.web-app-surface .skip-link {
    border-radius: 12px;
    background: var(--app-text);
    color: #ffffff;
}

body.web-app-surface :where(input, select, textarea) {
    border-color: var(--app-border);
    border-radius: var(--app-control-radius);
    background: var(--app-surface);
    color: var(--app-text);
}

body.web-app-surface :where(input, select, textarea):focus {
    border-color: var(--app-primary);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(255, 95, 69, 0.13);
}

body.web-app-surface :where(.template-pill, .eyebrow) {
    border-color: rgba(255, 95, 69, 0.2);
    background: var(--app-primary-light);
    color: var(--app-primary-dark);
}

body.web-app-surface :where(
    .dashboard-primary,
    .auth-submit,
    .event-action-edit,
    .event-rsvp-submit,
    .hero-primary,
    .template-cta
) {
    border: 1px solid var(--app-primary);
    border-radius: var(--app-control-radius);
    background: linear-gradient(135deg, var(--app-primary), var(--app-orange));
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(255, 95, 69, 0.2);
}

body.web-app-surface :where(
    .dashboard-primary,
    .auth-submit,
    .event-action-edit,
    .event-rsvp-submit,
    .hero-primary,
    .template-cta
):hover {
    border-color: var(--app-primary-dark);
    background: linear-gradient(135deg, var(--app-primary-dark), #ea580c);
    transform: translateY(-1px);
}

body.web-app-surface :where(
    .dashboard-secondary,
    .event-action-copy,
    .event-action-share,
    .hero-secondary
) {
    border: 1px solid var(--app-border);
    border-radius: var(--app-control-radius);
    background: var(--app-surface);
    color: var(--app-text);
    box-shadow: none;
}

/* Navigation partagée des pages applicatives. */
body.web-app-surface .site-header {
    box-sizing: border-box;
}

body.web-app-surface .site-header .brand {
    flex: 0 0 auto;
}

body.web-app-surface .site-header .brand-logo {
    display: none;
}

body.web-app-surface .site-header .brand-wordmark {
    display: inline-block;
    color: var(--app-text);
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.55px;
    line-height: 1;
    transform: none;
}

body.web-app-surface .site-header .brand-wordmark span {
    color: var(--app-primary);
}

.app-primary-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.app-nav-item,
.app-account-action button {
    display: flex;
    min-height: 46px;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    border: 0;
    border-radius: var(--app-control-radius);
    background: transparent;
    color: var(--app-muted);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

body.web-app-surface .flash-wrap {
    position: relative;
    z-index: 20;
    padding-top: 14px;
}

body.web-app-surface .flash {
    margin: 0;
    padding: 13px 16px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-control-radius);
    background: var(--app-surface);
    color: var(--app-text);
    box-shadow: var(--app-shadow);
    font-size: 0.88rem;
    font-weight: 700;
}

body.web-app-surface .flash-success {
    border-color: rgba(15, 123, 102, 0.22);
    background: #ecfdf5;
    color: #06654f;
}

body.web-app-surface .flash-error {
    border-color: rgba(239, 68, 68, 0.22);
    background: #fff1f2;
    color: #b91c1c;
}

.app-nav-item svg,
.app-account-action svg {
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app-nav-item:hover,
.app-account-action button:hover {
    background: var(--app-surface-muted);
    color: var(--app-text);
}

.app-nav-item[aria-current="page"] {
    background: var(--app-primary-light);
    color: var(--app-primary-dark);
}

.app-account-action {
    margin: 0;
}

.app-account-action button {
    width: 100%;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    text-align: left;
}

/* Dashboard : reprend les cartes et espacements Flutter. */
body.dashboard-page .dashboard-hero,
body.dashboard-page .dashboard-grid,
body.dashboard-page .dashboard-empty,
body.dashboard-page .flash-wrap {
    width: min(var(--app-content-width), 100%);
}

body.dashboard-page .dashboard-hero {
    gap: 24px;
    padding-top: 44px;
    padding-bottom: 26px;
}

body.dashboard-page .dashboard-hero h1 {
    max-width: 690px;
    margin-top: 14px;
    color: var(--app-text);
    font-size: clamp(2.15rem, 5vw, 3.7rem);
    letter-spacing: -1.1px;
    line-height: 1.08;
}

body.dashboard-page .dashboard-hero p {
    color: var(--app-muted);
}

body.dashboard-page .dashboard-summary,
body.dashboard-page .dashboard-card,
body.dashboard-page .dashboard-empty {
    border-color: var(--app-border);
    border-radius: var(--app-card-radius);
    background: var(--app-surface);
    box-shadow: var(--app-shadow);
}

body.dashboard-page .dashboard-summary span {
    border-radius: 16px;
    background: var(--app-surface-muted);
}

body.dashboard-page .dashboard-summary .dashboard-primary {
    min-height: 48px;
}

body.dashboard-page .dashboard-card {
    border-left: 1px solid var(--app-border);
    padding: 16px;
}

body.dashboard-page .dashboard-card::before {
    display: none;
}

body.dashboard-page .dashboard-card-kicker span {
    border-radius: 12px;
    background: var(--app-primary-light);
}

body.dashboard-page .dashboard-card h2 {
    color: var(--app-text);
}

body.dashboard-page .dashboard-card p,
body.dashboard-page .view-count {
    color: var(--app-muted);
}

body.dashboard-page .dashboard-primary,
body.dashboard-page .dashboard-secondary,
body.dashboard-page .view-count {
    min-height: 44px;
    border-radius: var(--app-control-radius);
}

body.dashboard-page .dashboard-card.is-archived {
    border-color: #adb5bd;
    background:
        repeating-linear-gradient(135deg, #adb5bd 0 2px, #e9ecef 2px 7px) left / 9px 100% no-repeat,
        #f1f3f5;
}

body.dashboard-page .dashboard-empty > span {
    background: var(--app-primary-light);
    color: var(--app-primary);
}

/* Créateur : mêmes contrôles, cartes et hiérarchie que l’assistant Flutter. */
body.creator-page .creator-hero,
body.creator-page .creator-workbench,
body.creator-page .flash-wrap {
    width: min(var(--app-content-width), calc(100% - 48px));
    margin-inline: auto;
}

body.creator-page .creator-hero {
    padding-top: 38px;
}

body.creator-page .creator-intro,
body.creator-page .work-card,
body.creator-page .creator-preview,
body.creator-page .danger-zone {
    border-color: var(--app-border);
    border-radius: var(--app-card-radius);
    background: var(--app-surface);
    box-shadow: var(--app-shadow);
}

body.creator-page .stepper span {
    border-color: var(--app-border);
    border-radius: var(--app-control-radius);
    background: var(--app-surface);
    color: var(--app-muted);
}

body.creator-page .stepper .is-active {
    border-color: rgba(255, 95, 69, 0.32);
    background: var(--app-primary-light);
    color: var(--app-primary-dark);
}

body.creator-page .stepper .is-active b,
body.creator-page .card-index {
    border-color: var(--app-primary);
    background: var(--app-primary);
    color: #ffffff;
}

body.creator-page .paste-zone {
    border-color: rgba(255, 95, 69, 0.45);
    border-radius: var(--app-control-radius);
    background: #fffdfb;
}

body.creator-page .button.button-ai,
body.creator-page button.button-ai,
body.creator-page .sticky-actions button.button,
body.creator-page .sticky-actions .button:not(.button-secondary) {
    border-color: var(--app-primary) !important;
    border-radius: var(--app-control-radius);
    background: linear-gradient(135deg, var(--app-primary), var(--app-orange)) !important;
    box-shadow: 0 10px 24px rgba(255, 95, 69, 0.2);
}

body.creator-page .type-tile,
body.creator-page .module-tile,
body.creator-page .structured-table,
body.creator-page .structured-list {
    border-color: var(--app-border);
    border-radius: var(--app-control-radius);
}

body.creator-page .type-tile:has(input:checked),
body.creator-page .module-tile:has(input:checked) {
    border-color: rgba(255, 95, 69, 0.5);
    background: var(--app-primary-light);
    box-shadow: 0 0 0 3px rgba(255, 95, 69, 0.1);
}

body.creator-page .structured-row > span,
body.creator-page .type-icon,
body.creator-page .module-tile span {
    background: var(--app-primary-light);
    color: var(--app-primary);
}

body.creator-page .button-secondary {
    border-color: var(--app-border) !important;
    border-radius: var(--app-control-radius);
    background: var(--app-surface) !important;
    color: var(--app-text) !important;
    -webkit-text-fill-color: var(--app-text);
}

body.creator-page .form-progress {
    border-color: rgba(255, 95, 69, 0.18);
    border-radius: var(--app-control-radius);
    background: rgba(255, 255, 255, 0.96);
}

body.creator-page progress::-webkit-progress-value,
body.creator-page progress::-moz-progress-bar {
    background: linear-gradient(90deg, var(--app-primary), var(--app-orange));
}

body.creator-page .sticky-actions {
    border-radius: var(--app-card-radius);
}

body.creator-page .danger-zone {
    border-color: rgba(239, 68, 68, 0.2);
    background: #fffafa;
}

body.creator-page .link-danger {
    color: var(--app-error);
}

/* Authentification : carte centrée et champs natifs proches de Flutter. */
.auth-shell {
    width: min(960px, 100%);
}

.auth-copy h1 {
    color: var(--app-text);
    font-size: clamp(2rem, 4.4vw, 3.2rem);
    letter-spacing: -0.8px;
}

.auth-copy p:not(.eyebrow) {
    color: var(--app-muted);
}

.auth-benefits span {
    border-color: rgba(15, 118, 110, 0.14);
    background: var(--app-secondary-light);
    color: var(--app-secondary);
}

.auth-card {
    gap: 16px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-card-radius);
    background: var(--app-surface);
    box-shadow: var(--app-shadow);
}

.auth-card label span {
    color: var(--app-text);
    font-size: 0.78rem;
    text-transform: none;
}

.auth-card input {
    min-height: 52px;
    padding: 13px 16px;
    border-color: var(--app-border);
    border-radius: var(--app-control-radius);
}

.auth-submit {
    min-height: 52px;
}

.auth-switch a {
    color: var(--app-primary-dark);
}

.auth-error {
    border-color: rgba(239, 68, 68, 0.22);
    border-radius: 12px;
    background: #fff1f2;
    color: #b91c1c;
}

.auth-app-message,
.auth-web-fallback {
    border-radius: var(--app-control-radius);
}

.auth-web-fallback {
    padding: 14px;
    background: var(--app-surface-muted);
}

.auth-web-submit {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-control-radius);
    background: var(--app-surface);
    color: var(--app-text);
    cursor: pointer;
    font-weight: 800;
}

/* Fiche événement : largeur lisible et modules identiques aux cartes mobiles. */
body.public-event-page .public-event-shell {
    width: min(880px, calc(100% - 40px));
    margin-inline: auto;
    padding-top: 32px;
}

body.public-event-page :where(
    .event-cover-card,
    .event-fact-card,
    .event-share-card,
    .public-event-block,
    .event-archive-notice
) {
    border-color: var(--app-border);
    border-radius: var(--app-card-radius);
    background-color: var(--app-surface);
    box-shadow: var(--app-shadow);
}

body.public-event-page .event-kind,
body.public-event-page .event-block-heading span,
body.public-event-page .event-fact-emoji {
    color: var(--app-primary);
}

body.public-event-page .event-fact-emoji,
body.public-event-page .event-block-icon {
    background: var(--app-primary-light);
}

body.public-event-page .event-action,
body.public-event-page .event-rsvp-status label,
body.public-event-page .event-rsvp-field input,
body.public-event-page .event-rsvp-submit {
    border-radius: var(--app-control-radius);
}

body.public-event-page .event-location-link {
    color: var(--app-primary-dark);
}

body.public-event-page .public-event-hero h1 {
    color: var(--app-text);
    letter-spacing: -0.8px;
}

body.public-event-page .event-facts-grid {
    gap: 12px;
}

body.public-event-page .event-fact-card {
    min-height: 96px;
    padding: 16px;
}

body.public-event-page .event-share-card {
    gap: 10px;
    padding: 14px;
}

body.public-event-page .public-event-block {
    overflow: hidden;
}

body.public-event-page .event-block-heading {
    border-bottom-color: var(--app-border);
}

body.public-event-page .event-program-dot {
    border-color: var(--app-primary);
    background: var(--app-primary-light);
}

body.public-event-page .event-program-line {
    background: var(--app-border);
}

body.public-event-page .event-rsvp-form {
    gap: 14px;
}

body.public-event-page .event-rsvp-status label:has(input:checked) {
    border-color: var(--app-primary);
    background: var(--app-primary-light);
    color: var(--app-primary-dark);
}

body.public-event-page .event-rsvp-status input {
    accent-color: var(--app-primary);
}

body.public-event-page .event-archive-notice {
    border-color: #adb5bd;
    background:
        repeating-linear-gradient(135deg, rgba(173, 181, 189, 0.18) 0 3px, transparent 3px 9px),
        #f1f3f5;
}

body.public-event-page .event-gate-shell {
    min-height: calc(100vh - 180px);
    align-content: center;
    padding-bottom: 64px;
}

body.public-event-page .event-gate-card {
    display: grid;
    gap: 18px;
    padding: 24px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-card-radius);
    background: var(--app-surface);
    box-shadow: var(--app-shadow);
}

body.public-event-page .event-code-input {
    display: grid;
    gap: 8px;
}

body.public-event-page .event-code-input span {
    color: var(--app-text);
    font-size: 0.8rem;
    font-weight: 800;
}

body.public-event-page .event-code-input input {
    width: 100%;
    min-height: 58px;
    padding: 12px 16px;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.35em;
    text-align: center;
}

body.public-event-page .event-gate-card .event-action {
    width: 100%;
    min-height: 50px;
    border-color: var(--app-primary);
    background: linear-gradient(135deg, var(--app-primary), var(--app-orange));
    color: #ffffff;
}

body.public-event-page .event-gate-error {
    padding: 11px 13px;
    border-radius: 12px;
    background: #fff1f2;
    color: #b91c1c;
    font-weight: 700;
}

/* Accueil marketing : même identité, sans changer son contenu. */
body.home-page .template-page {
    background: var(--app-background);
}

body.home-page .template-pill {
    border-radius: 999px;
}

body.home-page .template-hero h1,
body.home-page .section-heading h2 {
    color: var(--app-text);
    letter-spacing: -0.9px;
}

body.home-page :where(
    .template-demo,
    .draft-pane,
    .result-pane,
    .final-event-card,
    .whatsapp-frame,
    .solution-panel,
    .toolkit-demo,
    .prepared-card
) {
    border-color: var(--app-border);
    border-radius: var(--app-card-radius);
}

body.home-page .final-info-grid div,
body.home-page .final-key-info,
body.home-page .toolkit-demo div {
    border-radius: var(--app-control-radius);
}

body.home-page .template-cta,
body.home-page .template-install,
body.home-page .hero-primary,
body.home-page .hero-secondary,
body.home-page .hero-link {
    border-radius: var(--app-control-radius);
}

body.home-page .template-logo span {
    color: var(--app-primary);
}

body.home-page .problem-section,
body.home-page .toolkit-section {
    background: var(--app-surface);
}

body.home-page .solution-panel {
    background: linear-gradient(145deg, var(--app-secondary-light), #ffffff);
}

body.home-page .toolkit-demo div {
    background: var(--app-surface);
}

body.home-page .toolkit-demo span,
body.home-page .prepared-body span {
    color: var(--app-primary-dark);
}

body.home-page .prepared-card {
    overflow: hidden;
    background: var(--app-surface);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

body.home-page .prepared-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--app-shadow);
}

body.home-page .template-footer {
    color: var(--app-muted);
}

/* Pages de contenu et états secondaires. */
body.legal-page main,
body.web-app-surface:not(.home-page):not(.creator-page):not(.dashboard-page):not(.public-event-page):not(.auth-page) main {
    background: var(--app-background);
}

body.legal-page .legal-heading,
body.legal-page .legal-content,
body.web-app-surface .empty-state {
    width: min(820px, calc(100% - 40px));
    margin-inline: auto;
}

body.legal-page .legal-heading {
    padding-top: 56px;
    padding-bottom: 24px;
}

body.legal-page .legal-heading .eyebrow {
    display: inline-flex;
    width: auto;
    min-height: 34px;
    align-items: center;
    margin-bottom: 14px;
    padding: 0 13px;
    border: 1px solid rgba(255, 95, 69, 0.2);
    border-radius: 999px;
}

body.legal-page .legal-heading h1 {
    color: var(--app-text);
    font-size: clamp(2.2rem, 6vw, 4rem);
    letter-spacing: -1.2px;
    line-height: 1.06;
}

body.legal-page .legal-heading > p:last-child {
    color: var(--app-muted);
}

body.legal-page .legal-content {
    gap: 0;
    margin-bottom: 56px;
    padding: 8px 24px;
    border-color: var(--app-border);
    border-radius: var(--app-card-radius);
    background: var(--app-surface);
    box-shadow: var(--app-shadow);
}

body.legal-page .legal-content h2 {
    margin: 0;
    padding: 22px 0 8px;
    color: var(--app-text);
    font-size: 1.05rem;
}

body.legal-page .legal-content p {
    margin: 0;
    padding: 0 0 22px;
    border-bottom: 1px solid var(--app-border);
    color: var(--app-muted);
}

body.legal-page .legal-content p:last-child {
    border-bottom: 0;
}

body.legal-page .legal-content a {
    color: var(--app-primary-dark);
}

body.web-app-surface .empty-state {
    display: grid;
    min-height: 420px;
    align-content: center;
    justify-items: center;
    gap: 16px;
    margin-top: 48px;
    margin-bottom: 56px;
    padding: 42px 24px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-card-radius);
    background: var(--app-surface);
    box-shadow: var(--app-shadow);
    text-align: center;
}

body.web-app-surface .empty-state::before {
    content: "!";
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 18px;
    background: var(--app-primary-light);
    color: var(--app-primary);
    font-size: 1.5rem;
    font-weight: 800;
}

body.web-app-surface .empty-state h1 {
    color: var(--app-text);
    font-size: clamp(1.8rem, 5vw, 2.8rem);
}

body.web-app-surface .empty-state p {
    max-width: 520px;
    color: var(--app-muted);
}

body.web-app-surface .empty-state .button {
    min-height: 48px;
    border-color: var(--app-primary) !important;
    border-radius: var(--app-control-radius);
    background: linear-gradient(135deg, var(--app-primary), var(--app-orange)) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 24px rgba(255, 95, 69, 0.2);
}

body.web-app-surface > .site-footer {
    color: var(--app-muted);
}

body.web-app-surface > .site-footer a {
    color: var(--app-muted);
}

/* Desktop : menu vertical fixe et contenu borné à droite. */
@media (min-width: 1080px) {
    body.web-app-surface:not(.home-page) .site-header {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 100;
        display: flex;
        width: var(--app-sidebar-width);
        max-width: none;
        min-height: 100vh;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 28px;
        margin: 0;
        padding: 30px 20px 22px;
        overflow-y: auto;
        border: 0;
        border-right: 1px solid var(--app-border);
        border-radius: 0;
        background: rgba(255, 255, 255, 0.97);
        box-shadow: none;
        backdrop-filter: blur(20px);
    }

    body.web-app-surface:not(.home-page) .site-header .brand {
        min-height: 44px;
        padding: 0 10px;
    }

    body.web-app-surface:not(.home-page) .app-primary-nav {
        display: grid;
        align-content: start;
        gap: 6px;
    }

    body.web-app-surface:not(.home-page) .app-nav-item {
        width: 100%;
    }

    body.web-app-surface:not(.home-page) .app-account-action {
        margin-top: auto;
    }

    body.web-app-surface:not(.home-page) main {
        width: auto;
        max-width: none;
        min-height: 100vh;
        margin: 0 0 0 var(--app-sidebar-width);
        padding: 0;
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: var(--app-background);
        box-shadow: none;
    }

    body.web-app-surface:not(.home-page) > .flash-wrap {
        width: min(var(--app-content-width), calc(100% - var(--app-sidebar-width) - 64px));
        margin-left: calc(var(--app-sidebar-width) + 32px);
    }

    body.web-app-surface:not(.home-page) > .site-footer {
        width: auto;
        max-width: var(--app-content-width);
        margin: 0 32px 0 calc(var(--app-sidebar-width) + 32px);
        padding-block: 26px 34px;
    }

    body.home-page .template-header {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 100;
        width: var(--app-sidebar-width);
        height: 100vh;
        border-right: 1px solid var(--app-border);
        background: rgba(255, 255, 255, 0.97);
        box-shadow: none;
        backdrop-filter: blur(20px);
    }

    body.home-page .template-header::before {
        display: none;
    }

    body.home-page .template-nav {
        display: flex;
        width: 100%;
        height: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 26px;
        padding: 32px 20px 22px;
    }

    body.home-page .template-logo {
        min-height: 42px;
        padding: 8px 10px;
        font-size: 1.35rem;
    }

    body.home-page .template-links {
        display: grid;
        width: 100%;
        gap: 6px;
    }

    body.home-page .template-links a {
        display: flex;
        min-height: 46px;
        align-items: center;
        padding: 0 14px;
        border-radius: var(--app-control-radius);
        color: var(--app-muted);
        font-size: 0.88rem;
        font-weight: 700;
    }

    body.home-page .template-links a::before {
        content: "";
        width: 8px;
        height: 8px;
        flex: 0 0 auto;
        margin-right: 11px;
        border: 2px solid currentColor;
        border-radius: 50%;
    }

    body.home-page .template-links a:hover {
        background: var(--app-primary-light);
        color: var(--app-primary-dark);
    }

    body.home-page .template-actions {
        display: grid;
        width: 100%;
        gap: 8px;
        margin-top: auto;
    }

    body.home-page .template-actions > * {
        width: 100%;
    }

    body.home-page main {
        width: auto;
        max-width: none;
        margin: 0 0 0 var(--app-sidebar-width);
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: var(--app-background);
        box-shadow: none;
    }

    body.home-page .template-hero-shell,
    body.home-page .problem-grid,
    body.home-page .toolkit-compact,
    body.home-page .template-footer {
        width: min(var(--app-content-width), calc(100% - 64px));
    }
}

/* Tablette : barre supérieure compacte et contenu moins étiré. */
@media (min-width: 720px) and (max-width: 1079px) {
    body.web-app-surface:not(.home-page) .site-header {
        position: sticky;
        top: 0;
        z-index: 100;
        width: 100%;
        max-width: none;
        min-height: 76px;
        margin: 0;
        padding: 0 24px;
        border: 0;
        border-bottom: 1px solid var(--app-border);
        border-radius: 0;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: none;
        backdrop-filter: blur(18px);
    }

    body.web-app-surface:not(.home-page) main {
        width: 100%;
        max-width: none;
        margin: 0;
        border: 0;
        border-radius: 0;
        background: var(--app-background);
        box-shadow: none;
    }

    .app-nav-item {
        min-height: 42px;
        padding-inline: 11px;
        font-size: 0.8rem;
    }

    .app-nav-item svg {
        width: 19px;
        height: 19px;
    }

    .app-account-action button span {
        display: none;
    }

    .app-account-action button {
        width: 42px;
        min-height: 42px;
        justify-content: center;
        padding: 0;
    }

    body.auth-page .auth-copy {
        text-align: center;
    }

    body.auth-page .auth-copy :where(h1, p) {
        margin-inline: auto;
    }

    body.auth-page .auth-benefits {
        justify-content: center;
    }

    body.auth-page .auth-card {
        width: min(560px, 100%);
        margin-inline: auto;
    }
}

/* Mobile : en-tête léger et navigation inférieure sur l’espace connecté. */
@media (max-width: 719px) {
    body.web-app-surface:not(.home-page) .site-header {
        position: sticky;
        top: 0;
        z-index: 100;
        display: flex;
        width: 100%;
        max-width: none;
        min-height: 64px;
        margin: 0;
        padding: 0 16px;
        border: 0;
        border-bottom: 1px solid var(--app-border);
        border-radius: 0;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: none;
        backdrop-filter: blur(18px);
    }

    body.web-app-surface:not(.home-page) .site-header .brand-wordmark {
        font-size: 1.08rem;
    }

    body.web-app-surface:not(.home-page) main {
        width: 100%;
        max-width: none;
        margin: 0;
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: var(--app-background);
        box-shadow: none;
    }

    body:is(.dashboard-page, .creator-page).is-authenticated {
        padding-bottom: calc(72px + env(safe-area-inset-bottom));
    }

    body:is(.dashboard-page, .creator-page).is-authenticated .app-primary-nav {
        position: fixed;
        inset: auto 0 0;
        z-index: 110;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2px;
        min-height: 68px;
        padding: 6px max(8px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
        border-top: 1px solid var(--app-border);
        background: rgba(255, 255, 255, 0.97);
        box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.06);
        backdrop-filter: blur(18px);
    }

    body:is(.dashboard-page, .creator-page).is-authenticated .app-nav-item {
        min-width: 0;
        min-height: 54px;
        flex-direction: column;
        justify-content: center;
        gap: 3px;
        padding: 4px 3px;
        border-radius: 12px;
        font-size: 0.66rem;
        text-align: center;
    }

    body:is(.dashboard-page, .creator-page).is-authenticated .app-nav-item svg {
        width: 21px;
        height: 21px;
    }

    body.web-app-surface:not(.home-page) .app-account-action {
        margin-left: auto;
    }

    body.web-app-surface:not(.home-page) .app-account-action button {
        width: 40px;
        min-height: 40px;
        justify-content: center;
        padding: 0;
    }

    body.web-app-surface:not(.home-page) .app-account-action button span {
        display: none;
    }

    body.web-app-surface:not(.dashboard-page):not(.creator-page) .app-primary-nav,
    body.web-app-surface.is-guest .app-primary-nav {
        display: none;
    }

    body.dashboard-page .dashboard-hero,
    body.dashboard-page .dashboard-grid,
    body.dashboard-page .dashboard-empty,
    body.dashboard-page .flash-wrap {
        padding-inline: 16px;
    }

    body.dashboard-page .dashboard-hero {
        padding-top: 24px;
    }

    body.dashboard-page .dashboard-hero h1 {
        font-size: 1.9rem;
    }

    body.dashboard-page .dashboard-summary,
    body.dashboard-page .dashboard-card,
    body.dashboard-page .dashboard-empty {
        border-radius: 20px;
    }

    body.dashboard-page .dashboard-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.dashboard-page .dashboard-actions .dashboard-primary {
        grid-column: span 1;
    }

    body.creator-page .creator-hero,
    body.creator-page .creator-workbench,
    body.creator-page .flash-wrap {
        width: 100%;
        padding-inline: 16px;
    }

    body.creator-page .creator-hero {
        padding-top: 22px;
    }

    body.creator-page .work-card,
    body.creator-page .creator-preview {
        border-radius: 18px;
    }

    body.public-event-page .public-event-shell {
        width: 100%;
        padding: 12px 16px 38px;
    }

    body.public-event-page .event-gate-shell {
        padding-top: 24px;
    }

    body.public-event-page .event-gate-card {
        padding: 18px;
    }

    .auth-shell {
        gap: 20px;
        padding: 28px 16px 48px;
    }

    .auth-copy h1 {
        font-size: 1.85rem;
    }

    .auth-copy p:not(.eyebrow) {
        font-size: 0.92rem;
    }

    .auth-benefits {
        display: none;
    }

    .auth-card {
        padding: 18px;
        border-radius: 20px;
    }

    body.home-page .template-header {
        border-bottom-color: var(--app-border);
        background: rgba(255, 255, 255, 0.96);
    }

    body.home-page .template-hero {
        padding-inline: 16px;
    }

    body.home-page .template-demo,
    body.home-page .draft-pane,
    body.home-page .result-pane,
    body.home-page .final-event-card,
    body.home-page .whatsapp-frame,
    body.home-page .solution-panel,
    body.home-page .prepared-card {
        border-radius: 18px;
    }

    body.legal-page .legal-heading,
    body.legal-page .legal-content,
    body.web-app-surface .empty-state {
        width: calc(100% - 32px);
    }

    body.legal-page .legal-heading {
        padding-top: 30px;
    }

    body.legal-page .legal-heading h1 {
        font-size: 2.15rem;
    }

    body.legal-page .legal-content {
        padding-inline: 18px;
        border-radius: 18px;
    }

    body.web-app-surface .empty-state {
        min-height: 360px;
        margin-top: 24px;
        border-radius: 18px;
    }
}

/* Création et modification : assistant en quatre étapes comme dans Flutter. */
body.creator-page :where([data-creator-step], [data-creator-preview], [data-creator-previous], [data-creator-next], [data-creator-submit], [data-creator-cancel])[hidden] {
    display: none !important;
}

body.creator-page .creator-hero,
body.creator-page .creator-workbench,
body.creator-page .danger-zone {
    width: min(660px, calc(100% - 40px));
    padding-inline: 0;
}

body.creator-page .creator-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    padding-top: 22px;
    padding-bottom: 12px;
}

body.creator-page .creator-top-back {
    position: absolute;
    z-index: 2;
    top: 15px;
    left: 0;
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 13px;
    background: transparent;
    color: var(--app-text);
    cursor: pointer;
}

body.creator-page .creator-top-back:hover {
    background: var(--app-surface-muted);
}

body.creator-page .creator-top-back svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.creator-page .creator-intro {
    order: 1;
    display: block;
    padding: 5px 54px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-align: center;
}

body.creator-page .creator-intro .eyebrow,
body.creator-page .creator-intro p:not(.eyebrow),
body.creator-page .creator-intro-visual {
    display: none;
}

body.creator-page .creator-hero h1 {
    margin: 0;
    color: var(--app-text);
    font-size: 1.38rem;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.45px;
}

body.creator-page .stepper {
    order: 2;
    display: flex;
    gap: 0;
    width: 100%;
    max-width: none;
    margin: 22px 0 0;
}

body.creator-page .stepper span {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 30px;
    flex: 1 1 0;
    justify-content: flex-start;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body.creator-page .stepper span:last-child {
    flex: 0 0 30px;
}

body.creator-page .stepper span::after {
    content: "";
    position: absolute;
    z-index: 0;
    top: 14px;
    left: 30px;
    right: 0;
    height: 2px;
    background: var(--app-border);
}

body.creator-page .stepper span:last-child::after {
    display: none;
}

body.creator-page .stepper b {
    position: relative;
    z-index: 1;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid var(--app-border);
    border-radius: 50%;
    background: #fff;
    color: var(--app-muted);
    font-size: 0.7rem;
    font-weight: 800;
}

body.creator-page .stepper em {
    position: absolute;
    top: 36px;
    left: 0;
    color: var(--app-muted);
    font-size: 0.58rem;
    font-style: normal;
    font-weight: 700;
}

body.creator-page .stepper :where(.is-active, .is-complete) b {
    border-color: var(--app-primary);
    background: var(--app-primary);
    color: #fff;
}

body.creator-page .stepper .is-complete::after {
    background: var(--app-primary);
}

body.creator-page .stepper .is-active {
    color: var(--app-primary);
}

body.creator-page .creator-workbench {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    padding-top: 34px;
    padding-bottom: 80px;
}

body.creator-page .editor-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

body.creator-page .creator-guidance {
    display: none;
}

body.creator-page .editor-form > *,
body.creator-page .editor-form > .work-card,
body.creator-page .paste-card,
body.creator-page .structured-card,
body.creator-page .modules-card,
body.creator-page .bonus-card,
body.creator-page .sticky-actions {
    grid-column: 1 !important;
    grid-row: auto !important;
}

body.creator-page :where(.work-card, .bonus-card, .creator-preview, .danger-zone) {
    border: 1px solid var(--app-border);
    border-radius: 19px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

body.creator-page .work-card {
    padding: 18px;
}

body.creator-page .card-title-row {
    margin-bottom: 16px;
}

body.creator-page .card-title-row > div {
    gap: 0;
}

body.creator-page .card-index {
    display: none;
}

body.creator-page .card-title-row h2 {
    color: var(--app-text);
    font-size: 0.96rem;
    font-weight: 800;
}

body.creator-page :where(input, textarea, select) {
    border-color: var(--app-border);
    border-radius: 14px;
    background: #fff;
}

body.creator-page :where(input, select) {
    min-height: 50px;
}

body.creator-page textarea {
    min-height: 150px;
}

body.creator-page .paste-shell,
body.creator-page .type-tile,
body.creator-page .module-tile,
body.creator-page .structured-table {
    border-color: var(--app-border);
    border-radius: 15px;
}

body.creator-page .paste-toolbar {
    display: none;
}

body.creator-page .paste-zone {
    border-radius: 15px;
}

body.creator-page .button-ai,
body.creator-page .button:not(.button-secondary) {
    border-color: var(--app-primary);
    border-radius: 14px;
    background: var(--app-primary);
    color: #fff;
    box-shadow: none;
}

body.creator-page .button-secondary {
    border: 1px solid var(--app-border);
    border-radius: 14px;
    background: #fff;
    color: var(--app-text);
}

body.creator-page .creator-preview {
    width: 100%;
    padding: 18px;
}

body.creator-page .preview-label {
    color: var(--app-text);
    font-size: 0.96rem;
    font-weight: 800;
    text-align: left;
}

body.creator-page .preview-phone {
    width: min(360px, 100%);
    margin: 16px auto 0;
    border-radius: 24px;
}

body.creator-page .sticky-actions {
    position: sticky;
    z-index: 70;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 8px;
    padding: 12px 0;
    border-top: 1px solid var(--app-border);
    background: rgba(248, 250, 252, 0.96);
    backdrop-filter: blur(16px);
}

body.creator-page .sticky-actions > * {
    width: 100%;
    min-height: 50px;
    justify-content: center;
}

body.creator-page > .site-footer {
    display: none;
}

/* Fiche événement : même composition que l’écran Flutter actuel. */
body.public-event-page {
    background: var(--app-background);
}

body.public-event-page main::before,
body.public-event-page main::after {
    display: none;
}

body.public-event-page .public-event-shell {
    width: min(680px, calc(100% - 32px));
    padding: 8px 0 42px;
}

.app-event-toolbar {
    display: flex;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.app-event-toolbar > div {
    display: flex;
    align-items: center;
    gap: 3px;
}

.app-event-toolbar :where(a, button) {
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 13px;
    background: transparent;
    color: var(--app-text);
    cursor: pointer;
}

.app-event-toolbar :where(a, button):hover {
    background: var(--app-surface-muted);
}

.app-event-toolbar svg,
.app-event-location svg,
.app-event-footer-actions svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.public-event-page .public-event-hero {
    display: flex;
    gap: 0;
    flex-direction: column;
    text-align: center;
}

body.public-event-page .event-cover-card {
    position: relative;
    order: 1;
    width: 100%;
    height: clamp(220px, 48vw, 330px);
    margin: 0;
    overflow: hidden;
    border: 0;
    border-radius: 22px;
    background: #e9edf2;
    box-shadow: none;
}

body.public-event-page .public-event-shell.is-archived .event-cover-card img {
    filter: grayscale(1);
}

body.public-event-page .public-event-shell.is-archived .event-cover-card::before {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.24) 0 5px, transparent 5px 18px);
    content: "";
    pointer-events: none;
}

body.public-event-page .event-archived-cover-label {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    background: rgba(66, 72, 82, 0.9);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 900;
    letter-spacing: 1px;
}

body.public-event-page .event-cover-card::after,
body.public-event-page .event-cover-card figcaption {
    display: none;
}

body.public-event-page .event-cover-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-event-organizer-avatar {
    position: relative;
    z-index: 2;
    order: 2;
    width: 68px;
    height: 68px;
    margin: -34px auto 0;
    border: 5px solid var(--app-background);
    font-size: 1.45rem;
}

body.public-event-page .event-title-stack {
    order: 3;
    display: flex;
    justify-items: normal;
    flex-direction: column;
    gap: 0;
    padding: 14px 14px 22px;
}

body.public-event-page .event-kind {
    display: block;
    min-height: 0;
    margin: 0 0 7px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--app-primary);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    box-shadow: none;
}

body.public-event-page .public-event-hero h1 {
    max-width: 600px;
    margin: 0 auto;
    color: var(--app-text);
    font-family: inherit;
    font-size: clamp(1.55rem, 5vw, 2rem);
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -0.55px;
    text-wrap: balance;
}

.app-event-date {
    margin-top: 10px;
    color: var(--app-text);
    font-size: 0.82rem;
    font-weight: 700;
}

.app-event-location {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    align-self: center;
    gap: 5px;
    margin-top: 7px;
    color: var(--app-primary-dark);
    font-size: 0.77rem;
    font-weight: 700;
}

.app-event-location svg {
    width: 16px;
    height: 16px;
}

.app-event-organizer-name {
    margin-top: 7px;
    color: var(--app-muted);
    font-size: 0.72rem;
}

body.public-event-page .event-facts-grid {
    order: 4;
    display: flex;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 2px 0 4px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

body.public-event-page .event-facts-grid::-webkit-scrollbar {
    display: none;
}

body.public-event-page .event-fact-card {
    display: flex;
    min-width: 180px;
    min-height: 78px;
    flex: 1 0 180px;
    gap: 10px;
    align-items: center;
    padding: 12px;
    scroll-snap-align: start;
    border: 1px solid var(--app-border);
    border-radius: 17px;
    background: #fff;
    text-align: left;
    box-shadow: none;
}

body.public-event-page .event-fact-card :where(img, .event-fact-emoji) {
    width: 39px;
    height: 39px;
    flex: 0 0 auto;
    border-radius: 12px;
    background: var(--app-primary-light);
    color: var(--app-primary);
    font-size: 1.15rem;
}

body.public-event-page .event-fact-card span:not(.event-fact-emoji) {
    margin: 0 0 2px;
    color: var(--app-muted);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: none;
}

body.public-event-page .event-fact-card strong {
    color: var(--app-text);
    font-size: 0.73rem;
    font-weight: 800;
}

body.public-event-page .event-share-card {
    display: none;
}

body.public-event-page .event-block-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    width: 100%;
    max-width: none;
    margin: 28px 0 0;
}

body.public-event-page .public-event-block {
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: 19px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

body.public-event-page .public-event-block::after {
    display: none;
}

body.public-event-page .event-block-heading {
    padding: 15px 17px;
    border-bottom: 1px solid var(--app-border);
}

body.public-event-page .event-block-heading > span {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--app-primary-light);
}

body.public-event-page .event-block-heading h2 {
    color: var(--app-text);
    font-size: 0.94rem;
    font-weight: 800;
}

body.public-event-page :where(.event-clean-list, .event-timeline-list, .event-link-list, .event-block-body, .event-rsvp-form, .event-rsvp-intro) {
    margin-inline: 17px;
}

.app-event-footer-actions {
    display: grid;
    gap: 11px;
    margin-top: 30px;
}

.app-event-footer-actions :where(button, a) {
    display: flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    border: 1px solid var(--app-primary);
    border-radius: 14px;
    background: var(--app-primary);
    color: #fff;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
}

.app-event-footer-actions a {
    border-color: var(--app-border);
    background: #fff;
    color: var(--app-text);
}

.app-event-footer-actions p {
    margin: 11px 0 0;
    color: var(--app-muted);
    font-size: 0.68rem;
    text-align: center;
}

body.public-event-page > .site-footer {
    display: none;
}

/* Espace connecté : reproduction des écrans Accueil, Événements et Profil Flutter. */
.app-dashboard {
    min-height: 100vh;
    background: var(--app-background);
}

.app-dashboard-view[hidden],
[data-event-panel][hidden] {
    display: none !important;
}

.app-mobile-page {
    box-sizing: border-box;
    width: min(700px, calc(100% - 40px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 28px 0 96px;
}

.app-home-heading,
.app-page-title,
.app-section-heading,
.app-event-title-row,
.app-event-meta,
.app-profile-identity,
.app-profile-card :where(a, button),
.app-secondary-action,
.app-create-shortcut,
.app-floating-create {
    display: flex;
    align-items: center;
}

.app-home-heading {
    justify-content: space-between;
    margin-bottom: 24px;
}

.app-home-heading > div > span {
    display: block;
    margin-bottom: 3px;
    color: var(--app-muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.app-home-heading h1,
.app-page-title h1,
.app-section-heading h2,
.app-create-card h2,
.app-dashboard-empty h2,
.app-account-dialog h2 {
    margin: 0;
    color: var(--app-text);
    letter-spacing: -0.45px;
}

.app-home-heading h1,
.app-page-title h1 {
    font-size: 1.4rem;
    font-weight: 800;
}

.app-home-heading > a {
    border-radius: 50%;
}

.app-user-avatar {
    display: grid;
    overflow: hidden;
    place-items: center;
    flex: 0 0 auto;
    aspect-ratio: 1;
    border-radius: 50%;
    background: linear-gradient(145deg, #ff8a65, var(--app-primary));
    color: #fff;
    font-weight: 800;
    box-shadow: 0 5px 16px rgba(255, 95, 69, 0.22);
}

.app-user-avatar.is-small {
    width: 44px;
    height: 44px;
    font-size: 1.05rem;
}

.app-user-avatar.is-large {
    width: 88px;
    height: 88px;
    font-size: 2rem;
}

.app-user-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    aspect-ratio: 1;
}

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

.app-create-card {
    position: relative;
    padding: 22px;
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(135deg, #ff805f 0%, #ff5f45 56%, #f24d3d 100%);
    color: #fff;
    box-shadow: 0 14px 28px rgba(235, 79, 57, 0.22);
}

.app-create-card::after {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    right: -52px;
    top: -62px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.13);
}

.app-create-card > svg {
    width: 28px;
    height: 28px;
    margin-bottom: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
}

.app-create-card h2 {
    color: #fff;
    font-size: 1.45rem;
    line-height: 1.22;
}

.app-create-card p {
    margin: 7px 0 18px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.86rem;
}

.app-create-card > a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 7px;
    padding: 0 17px;
    border-radius: 13px;
    background: #fff;
    color: var(--app-primary-dark);
    font-size: 0.86rem;
    font-weight: 800;
    box-shadow: 0 7px 16px rgba(92, 26, 17, 0.14);
}

.app-create-card > a span {
    font-size: 1.15rem;
}

.app-section-heading {
    justify-content: space-between;
    gap: 16px;
    margin: 30px 0 14px;
}

.app-section-heading h2 {
    font-size: 1.08rem;
    font-weight: 800;
}

.app-section-heading a {
    color: var(--app-primary);
    font-size: 0.78rem;
    font-weight: 800;
}

.app-event-list {
    display: grid;
    gap: 12px;
}

.app-event-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.055);
}

.app-event-card-link {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    min-height: 116px;
    color: inherit;
}

.app-event-card.is-compact .app-event-card-link {
    grid-template-columns: 86px minmax(0, 1fr);
    min-height: 106px;
}

.app-event-cover {
    position: relative;
    display: block;
    min-height: 100%;
    overflow: hidden;
    background: #eceff3;
}

.app-event-cover img {
    width: 100%;
    height: 100%;
    min-height: 116px;
    object-fit: cover;
}

.app-event-card.is-compact .app-event-cover img {
    min-height: 106px;
}

.app-event-cover em {
    position: absolute;
    inset: 8px auto auto 7px;
    padding: 4px 7px;
    border-radius: 7px;
    background: #454b54;
    color: #fff;
    font-size: 0.56rem;
    font-style: normal;
    font-weight: 900;
    letter-spacing: 0.7px;
}

.app-event-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 13px 14px;
}

.app-event-title-row {
    min-width: 0;
    justify-content: space-between;
    gap: 8px;
}

.app-event-title-row strong {
    overflow: hidden;
    color: var(--app-text);
    font-size: 0.94rem;
    font-weight: 800;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-event-more {
    position: absolute;
    z-index: 3;
    top: 10px;
    right: 10px;
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    place-items: center;
    border: 1px solid var(--app-border);
    border-radius: 14px;
    background: var(--app-surface-muted);
    color: var(--app-text);
    cursor: pointer;
}

.app-event-more:hover {
    border-color: #d5dbe3;
    background: #e9edf2;
}

.app-event-more svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.app-event-card:not(.is-compact) .app-event-copy {
    padding-right: 70px;
}

.app-event-type {
    display: block;
    margin-top: 4px;
    color: var(--app-primary);
    font-size: 0.67rem;
    font-weight: 900;
    letter-spacing: 0.45px;
    text-transform: uppercase;
}

.app-event-spacer {
    flex: 1 1 auto;
    min-height: 8px;
}

.app-event-meta {
    flex-wrap: wrap;
    gap: 5px 12px;
    color: var(--app-muted);
    font-size: 0.69rem;
    font-weight: 600;
}

.app-event-card.is-compact .app-event-meta {
    display: grid;
    gap: 5px;
}

.app-event-card:not(.is-compact) .app-event-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.app-event-card:not(.is-compact) .app-event-meta > span:first-child {
    grid-column: 1 / -1;
}

.app-event-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.app-event-meta svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app-event-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 9px 12px;
    border-top: 1px solid var(--app-border);
}

.app-event-actions a {
    min-height: 34px;
    padding: 8px 11px;
    border-radius: 10px;
    background: var(--app-surface-muted);
    color: var(--app-text);
    font-size: 0.69rem;
    font-weight: 800;
}

.app-event-menu {
    position: fixed;
    inset: auto 0 0;
    width: min(560px, 100%);
    max-width: none;
    max-height: min(82vh, 720px);
    margin: 0 auto;
    padding: 10px 16px max(20px, env(safe-area-inset-bottom));
    overflow-y: auto;
    border: 0;
    border-radius: 24px 24px 0 0;
    background: #fff;
    color: var(--app-text);
    box-shadow: 0 -18px 48px rgba(15, 23, 42, 0.2);
}

.app-event-menu::backdrop {
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(3px);
}

.app-event-menu-handle {
    width: 42px;
    height: 4px;
    margin: 0 auto 8px;
    border-radius: 99px;
    background: #d7dce3;
}

.app-event-menu-header {
    display: flex;
    min-height: 68px;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 6px 0 12px;
    border-bottom: 1px solid var(--app-border);
}

.app-event-menu-header > div {
    display: grid;
    min-width: 0;
    flex: 1 1 auto;
    gap: 3px;
}

.app-event-menu-header strong {
    overflow: hidden;
    font-size: 0.95rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-event-menu-header span {
    color: var(--app-muted);
    font-size: 0.72rem;
}

.app-event-menu-header > button {
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 13px;
    background: var(--app-surface-muted);
    color: var(--app-text);
    font-size: 1.35rem;
    cursor: pointer;
}

.app-event-menu-list {
    display: grid;
    padding-top: 7px;
}

.app-event-menu-list > :where(a, button),
.app-event-menu-list > form > button {
    display: flex;
    width: 100%;
    min-height: 54px;
    align-items: center;
    gap: 14px;
    padding: 0 10px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--app-text);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.app-event-menu-list > :where(a, button):hover,
.app-event-menu-list > form > button:hover {
    background: var(--app-surface-muted);
}

.app-event-menu-list > form {
    width: 100%;
    margin: 0;
}

.app-event-menu-list > :where(a, button) > span,
.app-event-menu-list > form > button > span {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 10px;
    background: var(--app-primary-light);
    color: var(--app-primary);
    font-size: 1rem;
}

.app-event-menu-list svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app-event-card.is-archived {
    border-color: #c8cdd3;
    background:
        repeating-linear-gradient(135deg, rgba(87, 93, 102, 0.035) 0 3px, transparent 3px 9px),
        #eef0f2;
    filter: grayscale(1);
}

.app-event-card.is-archived .app-event-cover img {
    opacity: 0.48;
}

.app-secondary-action {
    min-height: 48px;
    justify-content: center;
    gap: 9px;
    width: 100%;
    margin-top: 18px;
    padding: 0 18px;
    border: 1px solid var(--app-border);
    border-radius: 14px;
    background: #fff;
    color: var(--app-text);
    font-size: 0.83rem;
    font-weight: 800;
}

.app-secondary-action svg,
.app-page-title svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app-dashboard-empty {
    padding: 32px 22px;
    border: 1px dashed #d7dce2;
    border-radius: 20px;
    background: #fff;
    text-align: center;
}

.app-dashboard-empty > span {
    display: grid;
    width: 48px;
    height: 48px;
    margin: 0 auto 13px;
    place-items: center;
    border-radius: 15px;
    background: var(--app-primary-light);
    color: var(--app-primary);
    font-size: 1.35rem;
}

.app-dashboard-empty h2 {
    font-size: 1rem;
}

.app-dashboard-empty p {
    margin: 6px 0 18px;
    color: var(--app-muted);
    font-size: 0.8rem;
}

.app-dashboard-empty a {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    padding: 0 15px;
    border-radius: 12px;
    background: var(--app-primary);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
}

.app-page-title {
    min-height: 44px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.app-page-title.is-centered {
    justify-content: center;
}

.app-page-title > a {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 13px;
    color: var(--app-text);
}

.app-page-title > a:hover {
    background: var(--app-surface-muted);
}

.app-event-tabs {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 0 auto 20px;
    border-bottom: 1px solid var(--app-border);
}

.app-event-tabs button {
    position: relative;
    min-height: 45px;
    padding: 0 7px;
    border: 0;
    background: transparent;
    color: var(--app-muted);
    font: inherit;
    font-size: 0.79rem;
    font-weight: 800;
    cursor: pointer;
}

.app-event-tabs button[aria-selected="true"] {
    color: var(--app-primary);
}

.app-event-tabs button[aria-selected="true"]::after {
    content: "";
    position: absolute;
    inset: auto 0 -1px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--app-primary);
}

.app-floating-create {
    position: fixed;
    z-index: 80;
    right: max(22px, calc((100vw - 700px) / 2 + 4px));
    bottom: 28px;
    min-height: 48px;
    gap: 7px;
    padding: 0 18px;
    border-radius: 15px;
    background: var(--app-primary);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(255, 95, 69, 0.32);
}

.app-floating-create span {
    font-size: 1.1rem;
}

.app-profile-view {
    max-width: 600px;
}

.app-profile-identity {
    width: 100%;
    flex-direction: column;
    justify-content: center;
    padding: 9px 12px 24px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.app-profile-identity strong {
    margin-top: 12px;
    color: var(--app-text);
    font-size: 1.12rem;
    font-weight: 800;
}

.app-profile-identity > span:not(.app-user-avatar) {
    margin-top: 3px;
    color: var(--app-muted);
    font-size: 0.77rem;
}

.app-profile-card {
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid var(--app-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 7px 20px rgba(15, 23, 42, 0.045);
}

.app-profile-card :where(a, button) {
    width: 100%;
    min-height: 58px;
    gap: 12px;
    padding: 0 16px;
    border: 0;
    border-bottom: 1px solid var(--app-border);
    background: transparent;
    color: var(--app-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.app-profile-card :where(a, button):last-child {
    border-bottom: 0;
}

.app-profile-card strong {
    flex: 1 1 auto;
    font-size: 0.82rem;
    font-weight: 700;
}

.app-profile-card :where(a, button) > span:last-child {
    color: #a3aab4;
    font-size: 1.35rem;
}

.app-profile-icon {
    display: grid;
    width: 33px;
    height: 33px;
    place-items: center;
    border-radius: 10px;
    background: var(--app-primary-light);
    color: var(--app-primary);
    font-size: 0.96rem;
    font-weight: 800;
}

.app-profile-view form .app-secondary-action {
    color: #dc3f34;
}

.app-version {
    margin: 18px 0 0;
    color: #9aa1aa;
    font-size: 0.68rem;
    text-align: center;
}

.app-account-dialog {
    width: min(520px, calc(100% - 30px));
    max-height: calc(100vh - 30px);
    padding: 0;
    overflow: auto;
    border: 0;
    border-radius: 24px;
    background: #fff;
    color: var(--app-text);
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.24);
}

.app-account-dialog::backdrop {
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(3px);
}

.app-account-dialog form {
    position: relative;
    display: grid;
    gap: 14px;
    padding: 24px;
}

.app-account-dialog h2 {
    padding-right: 42px;
    font-size: 1.25rem;
}

.app-dialog-close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 0;
    border-radius: 12px;
    background: var(--app-surface-muted);
    color: var(--app-text);
    font-size: 1.35rem;
    cursor: pointer;
}

.app-dialog-avatar {
    display: flex;
    justify-content: center;
    padding: 3px 0 5px;
}

.app-account-dialog label {
    display: grid;
    gap: 7px;
    color: var(--app-text);
    font-size: 0.73rem;
    font-weight: 800;
}

.app-account-dialog input {
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--app-border);
    border-radius: 13px;
    background: var(--app-surface-muted);
    color: var(--app-text);
    font: inherit;
}

.app-account-dialog p {
    margin: 0;
    color: var(--app-muted);
    font-size: 0.75rem;
}

.app-dialog-done {
    min-height: 46px;
    border: 0;
    border-radius: 13px;
    background: var(--app-primary);
    color: #fff;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
}

.app-sidebar-footer {
    display: grid;
    gap: 8px;
}

.app-download-links {
    display: none;
}

@media (min-width: 1080px) {
    .app-download-links {
        display: grid;
        gap: 8px;
        margin-bottom: 6px;
        padding-bottom: 14px;
        border-bottom: 1px solid var(--app-border);
    }

    .app-download-title {
        padding: 0 4px 2px;
        color: var(--app-muted);
        font-size: 0.68rem;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .app-download-button {
        display: flex;
        width: 100%;
        min-height: 54px;
        align-items: center;
        gap: 11px;
        padding: 8px 12px;
        border: 1px solid #222b3a;
        border-radius: 14px;
        background: #111827;
        color: #fff;
        font: inherit;
        text-align: left;
    }

    .app-download-button.is-android {
        border-color: var(--app-border);
        background: #fff;
        color: var(--app-text);
    }

    .app-download-button:disabled {
        cursor: not-allowed;
        opacity: 0.68;
    }

    .app-download-button svg {
        width: 23px;
        height: 23px;
        flex: 0 0 auto;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.9;
    }

    .app-download-button > img {
        width: 26px;
        height: 26px;
        flex: 0 0 26px;
        object-fit: contain;
    }

    .app-download-button.is-android > img {
        width: 32px;
        flex-basis: 32px;
    }

    .app-download-button > span {
        display: grid;
        gap: 1px;
    }

    .app-download-button small {
        color: inherit;
        font-size: 0.61rem;
        font-weight: 600;
        opacity: 0.7;
    }

    .app-download-button strong {
        font-size: 0.82rem;
        font-weight: 800;
    }

    .app-download-attribution {
        padding-inline: 4px;
        color: var(--app-muted);
        font-size: 0.5rem;
        line-height: 1.35;
    }
}

.app-create-shortcut {
    min-height: 46px;
    justify-content: center;
    gap: 9px;
    padding: 0 13px;
    border-radius: 14px;
    background: var(--app-primary);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(255, 95, 69, 0.22);
}

.app-create-shortcut svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

@media (min-width: 1080px) {
    body.web-app-surface:not(.home-page) .app-sidebar-footer {
        margin-top: auto;
    }

    body.dashboard-page > .site-footer {
        display: none;
    }

    body.dashboard-page .app-mobile-page {
        padding-top: 42px;
    }

    body.dashboard-page .app-floating-create {
        right: max(28px, calc((100vw - var(--app-sidebar-width) - 700px) / 2 + 28px));
    }
}

@media (min-width: 720px) and (max-width: 1079px) {
    .app-sidebar-footer {
        display: flex;
        align-items: center;
        gap: 7px;
        margin-left: auto;
    }

    .app-create-shortcut {
        min-height: 42px;
    }
}

@media (max-width: 719px) {
    body.dashboard-page .site-header {
        min-height: 0;
        height: 0;
        padding: 0;
        border: 0;
        background: transparent;
    }

    body.dashboard-page .site-header .brand {
        display: none;
    }

    body.dashboard-page .app-sidebar-footer,
    body.dashboard-page > .site-footer {
        display: none;
    }

    body.creator-page.is-authenticated {
        padding-bottom: 0;
    }

    body.creator-page .site-header {
        display: none !important;
    }

    body.creator-page .app-primary-nav {
        display: none !important;
    }

    body.creator-page .creator-hero,
    body.creator-page .creator-workbench,
    body.creator-page .danger-zone {
        width: calc(100% - 32px);
    }

    body.creator-page .creator-hero {
        padding-top: 17px;
    }

    .app-mobile-page {
        width: 100%;
        padding: 14px 20px 104px;
    }

    .app-home-view {
        padding-top: 10px;
    }

    .app-page-title {
        margin-bottom: 14px;
    }

    .app-event-card-link {
        grid-template-columns: 92px minmax(0, 1fr);
        min-height: 108px;
    }

    .app-event-card.is-compact .app-event-card-link {
        grid-template-columns: 82px minmax(0, 1fr);
        min-height: 102px;
    }

    .app-event-cover img {
        min-height: 108px;
    }

    .app-event-card.is-compact .app-event-cover img {
        min-height: 102px;
    }

    .app-event-copy {
        padding: 11px 12px;
    }

    .app-event-actions {
        overflow-x: auto;
        justify-content: flex-start;
    }

    .app-event-actions a {
        white-space: nowrap;
    }

    .app-floating-create {
        right: 18px;
        bottom: calc(82px + env(safe-area-inset-bottom));
    }

    .app-account-dialog {
        align-self: end;
        width: 100%;
        max-width: none;
        margin: auto 0 0;
        border-radius: 24px 24px 0 0;
    }
}

/* Correctifs finaux de la liste Mes événements : priorité sur les anciens thèmes. */
body.dashboard-page .app-events-view .app-event-card {
    position: relative;
    overflow: hidden;
}

body.dashboard-page .app-events-view .app-event-card:not(.is-compact) .app-event-copy {
    min-height: 116px;
    padding: 13px 14px;
}

body.dashboard-page .app-events-view .app-event-card:not(.is-compact) :where(.app-event-title-row, .app-event-type) {
    padding-right: 58px;
}

body.dashboard-page .app-events-view .app-event-card > button.app-event-more {
    position: absolute;
    inset: 12px 12px auto auto;
    z-index: 5;
    display: grid;
    appearance: none;
    width: 48px;
    height: 48px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--app-border);
    border-radius: 14px;
    background: var(--app-surface-muted);
    color: var(--app-text);
    box-shadow: none;
    cursor: pointer;
}

body.dashboard-page .app-events-view .app-event-card > button.app-event-more svg {
    display: block;
    width: 24px;
    height: 24px;
    fill: currentColor;
    stroke: none;
}

body.dashboard-page .app-events-view .app-event-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 5px;
    width: 100%;
    padding-right: 58px;
}

body.dashboard-page .app-events-view .app-event-meta > span:first-child {
    grid-column: 1 / -1;
    grid-row: 1;
}

body.dashboard-page .app-events-view .app-event-meta > span:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
}

body.dashboard-page .app-events-view .app-event-card > .app-event-views {
    position: absolute;
    right: 18px;
    bottom: 14px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--app-muted);
    font-size: 0.69rem;
    font-weight: 600;
    pointer-events: none;
}

body.dashboard-page .app-events-view .app-event-card > .app-event-views svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.dashboard-page dialog.app-event-menu[open] {
    position: fixed;
    inset: auto 0 0;
    z-index: 1000;
    display: block;
    box-sizing: border-box;
    width: min(560px, 100%);
    max-width: none;
    max-height: min(82dvh, 720px);
    margin: 0 auto;
    padding: 10px 16px max(20px, env(safe-area-inset-bottom));
    overflow: auto;
    border: 0;
    border-radius: 26px 26px 0 0;
    background: #fff;
    color: var(--app-text);
    box-shadow: 0 -20px 60px rgba(15, 23, 42, 0.24);
    font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, sans-serif;
}

body.dashboard-page dialog.app-event-menu::backdrop {
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(3px);
}

body.dashboard-page dialog.app-event-menu .app-event-menu-handle {
    display: block;
    width: 42px;
    height: 4px;
    margin: 0 auto 10px;
    border-radius: 999px;
    background: #d7dce3;
}

body.dashboard-page dialog.app-event-menu .app-event-menu-header {
    display: flex;
    min-height: 68px;
    align-items: center;
    margin: 0;
    padding: 4px 0 12px;
    border-bottom: 1px solid var(--app-border);
}

body.dashboard-page dialog.app-event-menu .app-event-menu-list {
    display: grid;
    padding-top: 8px;
}

body.dashboard-page dialog.app-event-menu .app-event-menu-list > :where(a, button),
body.dashboard-page dialog.app-event-menu .app-event-menu-list > form > button {
    display: flex;
    width: 100%;
    min-height: 56px;
    align-items: center;
    gap: 14px;
    padding: 0 10px;
    border: 0;
    border-radius: 13px;
    background: transparent;
    color: var(--app-text);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

body.dashboard-page dialog.app-event-menu .app-event-menu-list > :where(a, button):hover,
body.dashboard-page dialog.app-event-menu .app-event-menu-list > form > button:hover {
    background: var(--app-surface-muted);
}

body.dashboard-page dialog.app-event-menu .app-event-menu-delete {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid var(--app-border);
}

body.dashboard-page dialog.app-event-menu .app-event-menu-delete > button {
    color: #d83b32;
}

body.dashboard-page dialog.app-event-menu .app-event-menu-delete > button:hover {
    background: #fff0ef;
    color: #d83b32;
}

body.dashboard-page dialog.app-event-menu .app-event-menu-delete > button > span {
    background: #fff0ef;
    color: #d83b32;
}

/* Écran de gestion des participants, partagé entre mobile Web et desktop. */
body.dashboard-page .app-participants-view {
    display: grid;
    gap: 20px;
    max-width: 720px;
}

.app-participants-header {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 46px;
    align-items: center;
    gap: 12px;
}

.app-participants-header > a {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid var(--app-border);
    border-radius: 14px;
    background: #fff;
    color: var(--app-text);
}

.app-participants-header > a:hover {
    background: var(--app-surface-muted);
}

.app-participants-header svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app-participants-header > div {
    display: grid;
    min-width: 0;
    gap: 3px;
    text-align: center;
}

.app-participants-header h1 {
    margin: 0;
    color: var(--app-text);
    font-size: clamp(1.25rem, 3vw, 1.65rem);
    font-weight: 850;
}

.app-participants-header span {
    overflow: hidden;
    color: var(--app-muted);
    font-size: 0.74rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-participants-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.app-participants-stats > div {
    display: grid;
    min-height: 88px;
    align-content: center;
    gap: 3px;
    padding: 13px 8px;
    border: 1px solid var(--app-border);
    border-radius: 16px;
    background: #fff;
    text-align: center;
    box-shadow: var(--app-shadow);
}

.app-participants-stats strong {
    color: var(--app-primary);
    font-size: 1.25rem;
    font-weight: 900;
}

.app-participants-stats span {
    color: var(--app-muted);
    font-size: 0.66rem;
    font-weight: 700;
}

.app-participant-list {
    display: grid;
    gap: 10px;
}

.app-participant-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    min-height: 72px;
    align-items: center;
    gap: 12px;
    padding: 12px 13px;
    border: 1px solid var(--app-border);
    border-radius: 17px;
    background: #fff;
    box-shadow: var(--app-shadow);
}

.app-participant-avatar {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 50%;
    background: var(--app-primary-light);
    color: var(--app-primary);
    font-size: 0.95rem;
    font-weight: 900;
}

.app-participant-row > div {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.app-participant-row > div strong {
    overflow: hidden;
    color: var(--app-text);
    font-size: 0.83rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-participant-row > div span {
    color: var(--app-muted);
    font-size: 0.69rem;
    font-weight: 650;
}

.app-participant-row form {
    margin: 0;
}

.app-participant-row button {
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 13px;
    background: #fff0ef;
    color: #d83b32;
    cursor: pointer;
}

.app-participant-row button:hover {
    background: #ffe2df;
}

.app-participant-row button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.dashboard-page .app-event-card.is-archived {
    filter: none;
}

body.dashboard-page .app-event-card.is-archived .app-event-card-link {
    filter: grayscale(1);
}

@media (max-width: 719px) {
    body.dashboard-page dialog.app-event-menu[open] {
        width: 100%;
    }

    body.dashboard-page .app-participants-view {
        gap: 16px;
    }

    .app-participants-stats {
        grid-auto-columns: minmax(94px, 1fr);
        grid-auto-flow: column;
        grid-template-columns: none;
        margin-right: -20px;
        padding-right: 20px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .app-participants-stats::-webkit-scrollbar {
        display: none;
    }
}

@media (min-width: 1080px) {
    body.dashboard-page dialog.app-event-menu[open] {
        inset: 50% auto auto 50%;
        width: min(520px, calc(100% - 48px));
        margin: 0;
        border-radius: 26px;
        transform: translate(-50%, -50%);
        box-shadow: 0 24px 76px rgba(15, 23, 42, 0.28);
    }
}

/* Fiche /e/{slug} : parité visuelle avec l’écran Flutter PublicEventScreen. */
body.public-event-page .public-event-shell {
    width: min(680px, calc(100% - 32px));
    padding: 8px 0 44px;
}

body.public-event-page .app-event-toolbar {
    min-height: 52px;
    margin-bottom: 4px;
}

body.public-event-page .app-event-toolbar > div {
    gap: 2px;
}

body.public-event-page .app-event-toolbar-form {
    display: block;
    margin: 0;
}

body.public-event-page .app-event-toolbar-form > input {
    display: none;
}

body.public-event-page .app-event-toolbar :where(a, button) {
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

body.public-event-page .event-cover-card {
    width: 100%;
    height: 230px;
    border: 0;
    border-radius: 18px;
    box-shadow: none;
}

body.public-event-page .event-title-stack {
    padding: 14px 0 16px;
}

body.public-event-page .app-event-module-strip {
    display: flex;
    gap: 9px;
    width: 100%;
    height: 56px;
    margin: 2px 0 0;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

body.public-event-page .event-archive-notice {
    display: grid;
    gap: 12px;
    margin: 2px 0 18px;
    padding: 16px;
    border: 1px solid #adb5bd;
    border-radius: 18px;
    background: #f1f3f5;
    box-shadow: none;
}

body.public-event-page .event-archive-notice > div {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

body.public-event-page .event-archive-notice svg {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.public-event-page .event-archive-notice > div > span {
    display: grid;
    gap: 4px;
}

body.public-event-page .event-archive-notice strong {
    color: #343a40;
    font-size: 0.875rem;
    font-weight: 900;
}

body.public-event-page .event-archive-notice small {
    color: #6c757d;
    font-size: 0.75rem;
}

body.public-event-page .event-archive-notice form {
    margin: 0;
}

body.public-event-page .event-archive-notice form > input {
    display: none;
}

body.public-event-page .event-archive-notice button {
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #adb5bd;
    border-radius: 14px;
    background: transparent;
    color: #495057;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
}

body.public-event-page .event-archive-notice button:hover {
    background: #e7eaed;
}

body.public-event-page .app-event-module-strip::-webkit-scrollbar {
    display: none;
}

body.public-event-page .app-event-module-strip a {
    display: grid;
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    place-items: center;
    border: 1px solid var(--app-border);
    border-radius: 16px;
    background: var(--app-primary-light);
    color: var(--app-primary);
}

body.public-event-page .app-event-module-strip a:hover,
body.public-event-page .app-event-module-strip a:focus-visible {
    border-color: color-mix(in srgb, var(--app-primary) 35%, var(--app-border));
    background: #ffe5df;
}

body.public-event-page .app-event-module-strip svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.public-event-page .event-block-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    margin-top: 28px;
}

body.public-event-page .public-event-block {
    display: block;
    min-height: 0;
    padding: 0;
    overflow: visible;
    scroll-margin-top: 18px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body.public-event-page .event-block-heading {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin: 0 0 14px;
    padding: 0;
    border: 0;
}

body.public-event-page .event-block-heading > span {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 13px;
    background: var(--app-primary-light);
    color: var(--app-primary);
}

body.public-event-page .event-block-heading svg {
    display: block;
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.public-event-page .event-block-heading h2 {
    margin: 0;
    color: var(--app-text);
    font-size: 1.0625rem;
    font-weight: 800;
    line-height: 1.25;
}

body.public-event-page .event-block-heading p {
    display: block;
    margin: 2px 0 0;
    color: var(--app-muted);
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.35;
}

body.public-event-page .event-block-card {
    overflow: hidden;
    border: 1px solid var(--app-border);
    border-radius: 20px;
    background: #fff;
    box-shadow: none;
}

body.public-event-page .event-block-card > :where(.event-block-body, .event-clean-list, .event-timeline-list, .event-link-list, .event-rsvp-form) {
    margin: 0;
}

body.public-event-page .event-block-card > .event-block-body {
    padding: 18px;
    color: var(--app-text);
    font-size: 0.86rem;
    line-height: 1.55;
}

body.public-event-page .event-block-card > .event-timeline-list {
    padding: 18px 18px 18px;
}

body.public-event-page .event-timeline-list::before {
    left: 90px;
    top: 28px;
    ottom: 28px;
	bottom: 56px;
    background: var(--app-border);
}

body.public-event-page .event-timeline-list li.event-timeline-entry {
    grid-template-columns: 52px 18px minmax(0, 1fr);
    gap: 12px;
    padding: 0 0 26px;
}

body.public-event-page .event-timeline-time {
    color: var(--app-primary);
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 20px;
}

body.public-event-page .event-timeline-dot {
    width: 14px;
    height: 14px;
    margin-top: 3px;
    border: 2px solid var(--app-primary);
    background: var(--app-primary-light);
}

body.public-event-page .event-timeline-copy {
    color: var(--app-text);
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 20px;
}

body.public-event-page .event-clean-list {
    display: grid;
    gap: 0;
    padding: 8px;
}

body.public-event-page .event-clean-list li {
    min-height: 52px;
    padding: 14px 12px 14px 44px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--app-text);
    font-size: 0.8125rem;
    font-weight: 600;
}

body.public-event-page .event-clean-list li::before {
    left: 13px;
    top: 50%;
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 50%;
    background: var(--app-primary-light);
    color: var(--app-primary);
    content: "•";
    font-size: 1rem;
    line-height: 22px;
    transform: translateY(-50%);
}

body.public-event-page .event-block-checklist .event-clean-list li::before {
    display: none;
}

body.public-event-page .event-block-checklist .event-clean-list li {
    display: grid;
    min-height: 52px;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 12px;
    line-height: 1.4;
}

body.public-event-page .event-check-icon {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    align-self: center;
    border-radius: 50%;
    background: #e8f7f2;
    color: var(--app-success);
}

body.public-event-page .event-check-icon svg {
    display: block;
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.public-event-page .event-check-text {
    min-width: 0;
    align-self: center;
    line-height: 1.4;
}

body.public-event-page .event-clean-list li + li {
    border-top: 1px solid var(--app-border);
}

body.public-event-page .event-rsvp-form {
    gap: 18px;
    padding: 18px;
}

body.public-event-page .event-rsvp-status span {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 8px;
    border-radius: 14px;
    font-size: 0.68rem;
}

body.public-event-page .event-rsvp-status span svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.public-event-page .event-rsvp-field input {
    min-height: 52px;
    border-radius: 14px;
    background: #fff;
}

body.public-event-page .event-rsvp-submit {
    min-height: 50px;
    border-radius: 14px;
    background: var(--app-primary);
}

body.public-event-page .event-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
}

body.public-event-page .event-gallery-grid a {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 14px;
    background: var(--app-surface-muted);
}

body.public-event-page .event-gallery-grid img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.public-event-page .event-link-list {
    display: grid;
    gap: 0;
}

body.public-event-page .event-link-list a {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 20px;
    gap: 12px;
    min-height: 68px;
    align-items: center;
    padding: 10px 16px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--app-text);
}

body.public-event-page .event-link-list a + a {
    border-top: 1px solid var(--app-border);
}

body.public-event-page .event-link-icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 11px;
    background: var(--app-secondary-light);
    color: var(--app-secondary);
}

body.public-event-page .event-link-list svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.public-event-page .event-link-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
}

body.public-event-page .event-link-copy strong,
body.public-event-page .event-link-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.public-event-page .event-link-copy strong {
    font-size: 0.8125rem;
    font-weight: 650;
}

body.public-event-page .event-link-copy small {
    color: var(--app-muted);
    font-size: 0.68rem;
}

body.public-event-page .event-link-external {
    color: var(--app-muted);
}

body.public-event-page .public-event-stats {
    margin-top: 28px;
}

body.public-event-page .event-stats-card {
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--app-border);
    border-radius: 20px;
    background: #fff;
}

body.public-event-page .event-stats-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

body.public-event-page .event-stats-scroll::-webkit-scrollbar {
    display: none;
}

body.public-event-page .event-stat-tile {
    display: flex;
    width: 104px;
    height: 76px;
    flex: 0 0 104px;
    flex-direction: column;
    justify-content: flex-start;
    padding: 8px 11px;
    border: 1px solid var(--app-border);
    border-radius: 14px;
    background: var(--app-surface-muted);
}

body.public-event-page .event-stat-tile strong {
    color: var(--app-text);
    font-size: 1.1875rem;
    font-weight: 800;
}

body.public-event-page .event-stat-tile small {
    margin-top: 1px;
    color: var(--app-muted);
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1.15;
}

body.public-event-page .event-stats-card > a {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--app-border);
    border-radius: 14px;
    background: #fff;
    color: var(--app-text);
    font-size: 0.78rem;
    font-weight: 800;
}

body.public-event-page .event-stats-card > a:hover {
    background: var(--app-surface-muted);
}

body.public-event-page .event-stats-card > a svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.public-event-page .event-info-list {
    display: grid;
}

body.public-event-page .event-info-row {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) 18px;
    gap: 18px;
    min-height: 74px;
    align-items: center;
    padding: 14px 16px;
    color: var(--app-text);
}

body.public-event-page .event-info-row + .event-info-row {
    border-top: 1px solid var(--app-border);
}

body.public-event-page .event-info-row > svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: var(--app-primary);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.public-event-page .event-info-row > span {
    display: grid;
    min-width: 0;
    gap: 3px;
}

body.public-event-page .event-info-row small {
    color: var(--app-muted);
    font-size: 0.6875rem;
}

body.public-event-page .event-info-row strong {
    overflow-wrap: anywhere;
    font-size: 0.8125rem;
    font-weight: 600;
}

body.public-event-page .event-info-row > svg.event-info-external {
    width: 18px;
    height: 18px;
}

body.public-event-page .event-info-row:not(a) {
    grid-template-columns: 22px minmax(0, 1fr);
}

@media (min-width: 760px) {
    body.public-event-page .event-title-stack {
        align-items: center;
        text-align: center;
		width: 100%;
    }

    body.public-event-page .app-event-module-strip {
        justify-content: center;
    }
}

@media (max-width: 420px) {
    body.public-event-page .public-event-shell {
        width: calc(100% - 24px);
    }

    body.public-event-page .app-event-toolbar :where(a, button) {
        width: 40px;
        height: 40px;
    }

    body.public-event-page .event-cover-card {
        height: 220px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.web-app-surface *,
    body.web-app-surface *::before,
    body.web-app-surface *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Modification d'événement : composition fidèle à l'assistant Flutter. */
body.creator-page .creator-hero.is-editing {
    width: min(660px, calc(100% - 40px));
    padding-top: 16px;
    padding-bottom: 14px;
}

body.creator-page .creator-hero.is-editing .creator-intro {
    min-height: 44px;
    padding: 7px 52px;
}

body.creator-page .creator-hero.is-editing .stepper {
    margin-top: 14px;
    padding: 6px 4px 0;
}

body.creator-page .creator-hero.is-editing::after {
    content: "";
    position: absolute;
    right: -20px;
    bottom: 0;
    left: -20px;
    height: 1px;
    background: var(--app-border);
}

body.creator-page .creator-hero.is-editing .stepper em {
    display: none;
}

body.creator-page .creator-workbench.is-editing {
    width: min(620px, calc(100% - 40px));
    gap: 0;
    padding-top: 22px;
    padding-bottom: 96px;
}

body.creator-page .creator-workbench.is-editing .editor-form {
    gap: 18px;
}

body.creator-page .creator-workbench.is-editing .creator-step-copy {
    order: 1;
}

body.creator-page .creator-workbench.is-editing .general-card {
    order: 2;
}

body.creator-page .creator-workbench.is-editing .paste-card {
    order: 3;
}

body.creator-page .creator-workbench.is-editing .modules-card {
    order: 4;
}

body.creator-page .creator-workbench.is-editing .privacy-card {
    order: 5;
}

body.creator-page .creator-workbench.is-editing .bonus-card {
    order: 6;
}

body.creator-page .creator-workbench.is-editing .creator-preview {
    order: 7;
}

body.creator-page .creator-workbench.is-editing .sticky-actions {
    order: 8;
}

body.creator-page .creator-workbench.is-editing .type-card,
body.creator-page .creator-workbench.is-editing .structured-card {
    display: none !important;
}

body.creator-page .creator-step-copy h2,
body.creator-page .creator-card-heading h2 {
    margin: 0;
    color: var(--app-text);
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.3px;
}

body.creator-page .creator-step-copy p,
body.creator-page .creator-card-heading small {
    display: block;
    margin: 7px 0 0;
    color: var(--app-muted);
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.45;
}

body.creator-page .creator-workbench.is-editing .general-card,
body.creator-page .creator-workbench.is-editing .modules-card {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body.creator-page .creator-workbench.is-editing .general-card .card-title-row {
    display: none;
}

body.creator-page .creator-workbench.is-editing .form-grid {
    grid-template-columns: 1fr;
    gap: 18px;
}

body.creator-page .creator-workbench.is-editing .form-grid > * {
    grid-column: 1 / -1;
}

body.creator-page .creator-workbench.is-editing .field-label {
    color: var(--app-text);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

body.creator-page .creator-workbench.is-editing :where(input, select, textarea) {
    min-height: 54px;
    border: 1px solid var(--app-border);
    border-radius: 14px;
    background: #fff;
    color: var(--app-text);
    font-size: 1rem;
    box-shadow: none;
}

body.creator-page .creator-workbench.is-editing :where(input, select, textarea):focus {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 3px rgba(255, 95, 69, 0.12);
}

body.creator-page .creator-cover-field {
    display: grid;
    gap: 8px;
}

body.creator-page .creator-cover-field img {
    display: block;
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: 17px;
    background: var(--app-surface-muted);
}

body.creator-page .creator-cover-field small {
    color: var(--app-muted);
    font-size: 0.75rem;
    line-height: 1.4;
}

body.creator-page .paste-card.is-collapsible {
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    background: var(--app-primary-light);
    box-shadow: none;
}

body.creator-page .creator-ai-disclosure > summary {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 20px;
    gap: 12px;
    min-height: 74px;
    align-items: center;
    padding: 12px 16px;
    color: var(--app-text);
    cursor: pointer;
    list-style: none;
}

body.creator-page .creator-ai-disclosure > summary::-webkit-details-marker {
    display: none;
}

body.creator-page .creator-ai-disclosure-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 13px;
    background: #fff;
    color: var(--app-primary);
}

body.creator-page .creator-ai-disclosure-icon svg,
body.creator-page .creator-ai-chevron {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.creator-page .creator-ai-disclosure > summary > span:nth-child(2) {
    display: grid;
    gap: 3px;
}

body.creator-page .creator-ai-disclosure > summary strong {
    font-size: 0.9375rem;
    font-weight: 800;
}

body.creator-page .creator-ai-disclosure > summary small {
    color: var(--app-muted);
    font-size: 0.75rem;
    line-height: 1.35;
}

body.creator-page .creator-ai-chevron {
    color: var(--app-muted);
    transition: transform 0.2s ease;
}

body.creator-page .creator-ai-disclosure[open] .creator-ai-chevron {
    transform: rotate(180deg);
}

body.creator-page .creator-ai-disclosure-content {
    padding: 4px 16px 16px;
    border-top: 1px solid rgba(255, 95, 69, 0.14);
}

body.creator-page .creator-ai-disclosure-content > .card-title-row {
    display: none;
}

body.creator-page .creator-ai-disclosure-content textarea {
    min-height: 150px;
}

body.creator-page .creator-workbench.is-editing .modules-card .card-title-row {
    margin-bottom: 18px;
}

body.creator-page .creator-workbench.is-editing .modules-card .card-title-row > div {
    display: block;
}

body.creator-page .creator-workbench.is-editing .module-grid {
    grid-template-columns: 1fr;
    gap: 10px;
}

body.creator-page .creator-workbench.is-editing .module-tile {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 48px;
    grid-template-rows: auto auto;
    gap: 2px 12px;
    min-height: 76px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid var(--app-border);
    border-radius: 16px;
    background: #fff;
    text-align: left;
    box-shadow: none;
    transform: none;
}

body.creator-page .creator-workbench.is-editing .module-tile:hover {
    border-color: color-mix(in srgb, var(--app-primary) 35%, var(--app-border));
    transform: none;
}

body.creator-page .creator-workbench.is-editing .module-tile > span {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: var(--app-primary-light);
    color: var(--app-primary);
}

body.creator-page .creator-workbench.is-editing .module-tile > span svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.creator-page .creator-workbench.is-editing .module-tile > strong {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    color: var(--app-text);
    font-size: 0.9375rem;
    font-weight: 800;
    line-height: 1.25;
}

body.creator-page .creator-workbench.is-editing .module-tile > small {
    display: block;
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    color: var(--app-muted);
    font-size: 0.75rem;
    line-height: 1.3;
}

body.creator-page .creator-workbench.is-editing .module-tile::after {
    content: "";
    grid-column: 3;
    grid-row: 1 / span 2;
    width: 44px;
    height: 26px;
    justify-self: end;
    border-radius: 999px;
    background: #d7dce1;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
    transition: background 0.18s ease;
}

body.creator-page .creator-workbench.is-editing .module-tile::before {
    content: "";
    position: absolute;
    z-index: 1;
    top: 50%;
    right: 32px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transform: translateY(-50%);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.24);
    transition: right 0.18s ease;
}

body.creator-page .creator-workbench.is-editing .module-tile:has(input:checked) {
    border-color: var(--app-border);
    background: #fff;
    box-shadow: none;
}

body.creator-page .creator-workbench.is-editing .module-tile:has(input:checked)::after {
    background: var(--app-primary);
}

body.creator-page .creator-workbench.is-editing .module-tile:has(input:checked)::before {
    right: 16px;
}

body.creator-page .creator-workbench.is-editing .privacy-card {
    padding: 18px;
    border: 1px solid var(--app-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: none;
}

body.creator-page .creator-workbench.is-editing .privacy-card .card-title-row h2 {
    font-size: 1rem;
}

body.creator-page .creator-workbench.is-editing .bonus-card {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

body.creator-page .creator-workbench.is-editing .bonus-card .bonus-kicker {
    color: var(--app-primary);
}

body.creator-page .creator-workbench.is-editing .bonus-card strong {
    display: block;
    margin-top: 5px;
    color: var(--app-text);
    font-size: 1.3rem;
}

body.creator-page .creator-workbench.is-editing .bonus-card p {
    margin: 7px 0 0;
    color: var(--app-muted);
    font-size: 0.875rem;
}

body.creator-page .creator-workbench.is-editing .bonus-card .form-progress {
    display: none;
}

body.creator-page .creator-preview.is-editing-preview {
    padding: 14px;
    border: 1px solid var(--app-border);
    border-radius: 20px;
    background: #fff;
    box-shadow: none;
}

body.creator-page .creator-preview.is-editing-preview .preview-label {
    display: none;
}

body.creator-page .creator-preview.is-editing-preview .preview-phone {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body.creator-page .creator-preview.is-editing-preview :where(.phone-topbar, .phone-confetti, .phone-avatar, .phone-url) {
    display: none;
}

body.creator-page .creator-preview.is-editing-preview .phone-visual {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: 16px;
}

body.creator-page .creator-preview.is-editing-preview .preview-phone h2 {
    margin: 18px 0 0;
    color: var(--app-text);
    font-size: 1.25rem;
    font-weight: 800;
    text-align: left;
}

body.creator-page .creator-preview.is-editing-preview .preview-phone > p {
    margin: 8px 0 0;
    color: var(--app-muted);
    font-size: 0.8125rem;
    text-align: left;
}

body.creator-page .creator-preview.is-editing-preview .phone-modules {
    justify-content: flex-start;
    margin-top: 16px;
}

body.creator-page .creator-preview.is-editing-preview .phone-modules span {
    min-height: 32px;
    border: 0;
    border-radius: 999px;
    background: var(--app-primary-light);
    color: var(--app-primary-dark);
}

body.creator-page .creator-preview.is-editing-preview .preview-note {
    margin: 12px 2px 0;
    color: var(--app-muted);
    font-size: 0.75rem;
    text-align: left;
}

body.creator-page .creator-workbench.is-editing .sticky-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 2px;
    padding: 12px 0;
    border: 0;
    border-top: 1px solid var(--app-border);
    border-radius: 0;
    background: rgba(248, 250, 252, 0.96);
    box-shadow: none;
}

body.creator-page .creator-workbench.is-editing .sticky-actions .button {
    min-height: 50px;
    border-radius: 14px;
    font-size: 0.875rem;
}

@media (max-width: 719px) {
    body.creator-page .creator-hero.is-editing,
    body.creator-page .creator-workbench.is-editing,
    body.creator-page .danger-zone {
        width: calc(100% - 40px);
    }

    body.creator-page .creator-workbench.is-editing {
        padding-top: 20px;
    }
}

/* Éditeur d’événement : cartes de section et actions calquées sur Flutter. */
body.creator-page [data-block-editor][hidden] {
    display: none !important;
}

body.creator-page [data-editor-address-row][hidden] {
    display: none !important;
}

body.creator-page .creator-block-editor {
    display: grid;
    gap: 14px;
    margin-top: 30px;
}

body.creator-page .creator-block-editor > header {
    display: flex;
    align-items: center;
    gap: 12px;
}

body.creator-page .creator-block-editor > header > span {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 13px;
    background: var(--app-primary-light);
    color: var(--app-primary);
}

body.creator-page .creator-block-editor > header svg,
body.creator-page .creator-icon-field > svg,
body.creator-page .creator-readonly-location svg,
body.creator-page .creator-repeat-row > button svg,
body.creator-page .creator-add-row svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.creator-page .creator-block-editor > header h3 {
    margin: 0;
    color: var(--app-text);
    font-size: 1.0625rem;
    font-weight: 800;
    line-height: 1.3;
}

body.creator-page .creator-block-editor-card {
    display: grid;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--app-border);
    border-radius: 18px;
    background: #fff;
}

body.creator-page .creator-address-field {
    display: grid;
    gap: 8px;
}

body.creator-page .creator-readonly-location {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 11px;
    min-height: 54px;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid var(--app-border);
    border-radius: 14px;
    background: #fff;
}

body.creator-page .creator-readonly-location > span:first-child {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 11px;
    background: var(--app-primary-light);
    color: var(--app-primary);
}

body.creator-page .creator-readonly-location strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--app-text);
    font-size: 0.875rem;
    font-weight: 600;
}

body.creator-page .creator-icon-field {
    position: relative;
    display: block;
}

body.creator-page .creator-icon-field > svg {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 16px;
    color: var(--app-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

body.creator-page .creator-icon-field > input {
    width: 100%;
    padding-left: 50px;
}

body.creator-page .creator-repeat-list {
    display: grid;
    gap: 10px;
}

body.creator-page .creator-repeat-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 9px;
    align-items: end;
}

body.creator-page .creator-repeat-row.is-program-row {
    grid-template-columns: 106px minmax(0, 1fr) 44px;
}

body.creator-page .creator-repeat-row.is-link-row {
    grid-template-columns: minmax(110px, 3fr) minmax(160px, 5fr) 44px;
    gap: 8px;
}

body.creator-page .creator-repeat-row > label {
    min-width: 0;
}

body.creator-page .creator-repeat-row input {
    width: 100%;
}

body.creator-page .creator-repeat-row > button {
    display: grid;
    width: 44px;
    height: 54px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 13px;
    background: transparent;
    color: var(--app-muted);
    cursor: pointer;
}

body.creator-page .creator-repeat-row > button:hover {
    background: var(--app-primary-light);
    color: var(--app-primary);
}

body.creator-page .creator-add-row {
    display: inline-flex;
    width: fit-content;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 16px;
    border: 1px solid var(--app-primary);
    border-radius: 999px;
    background: #fff;
    color: var(--app-primary);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

body.creator-page .creator-add-row:hover {
    background: var(--app-primary-light);
}

body.creator-page .creator-gallery-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

body.creator-page .creator-gallery-thumbnail {
    position: relative;
    display: block;
    width: 92px;
    height: 92px;
}

body.creator-page .creator-gallery-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid var(--app-border);
    border-radius: 14px;
    background: var(--app-surface-muted);
}

body.creator-page .creator-gallery-thumbnail > button {
    position: absolute;
    top: -7px;
    right: -7px;
    display: grid;
    width: 30px;
    height: 30px;
    min-height: 30px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--app-primary);
    box-shadow: 0 5px 12px rgba(255, 95, 69, 0.28);
    color: #fff;
    font: inherit;
    font-size: 1.45rem;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
}

body.creator-page .creator-gallery-thumbnail > button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2;
}

body.creator-page .creator-gallery-thumbnail > button:hover {
    background: #e94f39;
}

body.creator-page .creator-editor-empty {
    margin: 0;
    padding: 16px;
    border: 1px solid var(--app-border);
    border-radius: 14px;
    background: #fff;
    color: var(--app-muted);
    font-size: 0.875rem;
}

body.creator-page .creator-editor-note {
    color: var(--app-muted);
    font-size: 0.75rem;
    line-height: 1.4;
}

body.creator-page .creator-workbench.is-editing .sticky-actions {
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

body.creator-page .creator-workbench.is-editing .sticky-actions.is-single-action {
    grid-template-columns: 1fr;
}

body.creator-page .creator-workbench.is-editing .sticky-actions .button-secondary {
    border-color: var(--app-primary) !important;
    background: #fff !important;
    color: var(--app-primary) !important;
    box-shadow: none !important;
    -webkit-text-fill-color: var(--app-primary);
}

body.creator-page .creator-workbench.is-editing .sticky-actions .button:not(.button-secondary) {
    border-color: var(--app-primary) !important;
    background: linear-gradient(135deg, var(--app-primary), var(--app-orange)) !important;
    color: #fff;
}

body.creator-page .stepper .is-active {
    border: 0;
    background: transparent;
}

body.creator-page .stepper span::after {
    right: auto;
    width: 100%;
    border-top: 0;
}

body.creator-page .creator-file-button {
    position: relative;
    display: inline-flex;
    width: fit-content;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 16px;
    border: 1px solid var(--app-primary);
    border-radius: 999px;
    background: #fff;
    color: var(--app-primary);
    font-size: 0.875rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

body.creator-page .creator-cover-change-button {
    align-self: start;
}

body.creator-page .creator-workbench.is-editing .form-grid label.creator-file-button {
    display: inline-flex;
    grid-template-columns: none;
    grid-auto-flow: column;
    width: fit-content;
    align-items: center;
    justify-content: center;
    justify-self: start;
    gap: 9px;
    color: var(--app-primary);
    line-height: 1;
}

body.creator-page .creator-workbench.is-editing .form-grid label.creator-file-button > :where(svg, span) {
    grid-column: auto;
    grid-row: auto;
    margin: 0;
}

body.creator-page .creator-file-button:hover {
    background: var(--app-primary-light);
}

body.creator-page .creator-file-button svg,
body.creator-page .creator-add-row svg {
    display: block;
    width: 21px;
    height: 21px;
    flex: 0 0 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.creator-page .creator-file-button > span {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

body.creator-page .creator-file-button input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

body.creator-page [data-gallery-preview][hidden] {
    display: none !important;
}

/* Étape 4 : récapitulatif fidèle à la carte Flutter. */
body.creator-page .creator-workbench.is-editing .creator-summary-heading h2 {
    margin: 0;
    color: var(--app-text);
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.15;
}

body.creator-page .creator-workbench.is-editing .bonus-card .creator-summary-heading p {
    margin: 8px 0 0;
    color: var(--app-muted);
    font-size: 1rem;
    line-height: 1.5;
}

body.creator-page .creator-preview.is-editing-preview {
    padding: 14px;
}

body.creator-page .creator-preview.is-editing-preview .creator-summary-type {
    display: block;
    margin-top: 18px;
    color: var(--app-primary);
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.3;
}

body.creator-page .creator-preview.is-editing-preview .creator-summary-card > h2 {
    margin-top: 5px;
}

body.creator-page .creator-summary-lines {
    display: grid;
    gap: 9px;
    margin-top: 14px;
}

body.creator-page .creator-summary-lines p {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 11px;
    margin: 0;
    color: var(--app-muted);
    font-size: 0.875rem;
    line-height: 1.35;
}

body.creator-page .creator-summary-lines p[hidden] {
    display: none;
}

body.creator-page .creator-summary-lines svg {
    width: 21px;
    height: 21px;
    flex: 0 0 21px;
    fill: none;
    stroke: var(--app-primary);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

body.creator-page .creator-summary-groups {
    display: grid;
    gap: 16px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--app-border);
}

body.creator-page .creator-summary-groups section {
    display: grid;
    gap: 9px;
}

body.creator-page .creator-summary-groups h3 {
    margin: 0;
    color: var(--app-muted);
    font-size: 0.8125rem;
    font-weight: 800;
}

body.creator-page .creator-summary-groups section > div {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

body.creator-page .creator-summary-groups section > div > span {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 7px 12px;
    border: 1px solid color-mix(in srgb, var(--app-text) 22%, var(--app-border));
    border-radius: 9px;
    background: #fff;
    color: var(--app-text);
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.2;
}

body.creator-page .creator-preview.is-editing-preview .preview-note {
    display: none;
}

@media (max-width: 560px) {
    body.creator-page .creator-repeat-row.is-program-row {
        grid-template-columns: 96px minmax(0, 1fr) 40px;
        gap: 7px;
    }

    body.creator-page .creator-repeat-row.is-link-row {
        grid-template-columns: minmax(88px, 3fr) minmax(0, 5fr) 40px;
        gap: 7px;
    }

    body.creator-page .creator-repeat-row > button {
        width: 40px;
    }
}

@media (max-width: 390px) {
    body.creator-page .creator-repeat-row.is-link-row {
        grid-template-columns: 1fr 40px;
    }

    body.creator-page .creator-repeat-row.is-link-row > label:first-child {
        grid-column: 1 / -1;
    }

    body.creator-page .creator-repeat-row.is-link-row > label:nth-child(2) {
        grid-column: 1;
    }

    body.creator-page .creator-repeat-row.is-link-row > button {
        grid-column: 2;
    }
}

/* /e/{slug} : occupe réellement la largeur mobile, sans colonne vide à droite. */
@media (max-width: 719px) {
    html.public-event-document {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    body.public-event-page,
    body.public-event-page main {
        position: relative;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin: 0;
        padding-inline: 0;
        overflow-x: hidden;
    }

    body.public-event-page .public-event-shell {
        box-sizing: border-box;
        width: 100%;
        max-width: none;
        min-width: 0;
        margin-inline: 0;
        padding: 8px 16px 44px;
        overflow-x: hidden;
    }

    body.public-event-page :where(
        .public-event-hero,
        .app-event-toolbar,
        .event-archive-notice,
        .app-event-module-strip,
        .public-event-stats,
        .event-block-list,
        .public-event-block,
        .app-event-footer-actions
    ) {
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    body.public-event-page .event-block-gallery,
    body.public-event-page .event-block-gallery .event-block-card,
    body.public-event-page .event-gallery-grid {
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    body.public-event-page .event-block-gallery .event-block-card {
        overflow: hidden;
    }

    body.public-event-page .event-gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(90px, 100%), 1fr));
    }

    body.public-event-page .event-gallery-grid > a,
    body.public-event-page .event-gallery-grid img {
        min-width: 0;
        max-width: 100%;
    }

    body.public-event-page :where(
        .app-event-module-strip,
        .event-facts-grid,
        .event-stats-scroll,
        .app-gallery-lightbox-thumbnails
    ) {
        max-width: 100%;
        min-width: 0;
        overscroll-behavior-inline: contain;
    }

    body.public-event-page dialog:not([open]) {
        display: none;
    }
}

/* Modales média partagées : QR Code et galerie de la fiche événement. */
.app-media-dialog {
    width: min(520px, calc(100% - 32px));
    max-width: none;
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 24px;
    background: #fff;
    color: var(--app-text);
    box-shadow: 0 26px 80px rgba(15, 23, 42, 0.3);
    font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, sans-serif;
}

.app-media-dialog::backdrop {
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(4px);
}

.app-media-dialog-close {
    position: absolute;
    z-index: 3;
    top: 14px;
    right: 14px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.82);
    color: #fff;
    font: inherit;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.app-qr-dialog-shell {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 16px;
    padding: 30px;
    text-align: center;
}

.app-qr-dialog h2 {
    max-width: calc(100% - 70px);
    margin: 0;
    color: var(--app-text);
    font-size: 1.18rem;
    line-height: 1.35;
}

.app-qr-dialog-frame {
    width: min(340px, 100%);
    aspect-ratio: 1;
    padding: 14px;
    border: 1px solid var(--app-border);
    border-radius: 20px;
    background: #fff;
}

.app-qr-dialog-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.app-qr-dialog p {
    margin: 0;
    color: var(--app-muted);
    font-size: 0.78rem;
}

.app-gallery-lightbox {
    width: min(1120px, calc(100% - 24px));
    height: min(860px, calc(100dvh - 24px));
    max-height: none;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    background: #0b0f19;
    color: #fff;
    box-shadow: 0 32px 100px rgba(0, 0, 0, 0.55);
}

.app-gallery-lightbox-shell {
    display: grid;
    height: 100%;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.app-gallery-lightbox-header {
    display: grid;
    min-height: 76px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 18px;
    padding: 14px 18px 14px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(11, 15, 25, 0.96);
}

.app-gallery-lightbox-header > div {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.app-gallery-lightbox-header h2 {
    margin: 0;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
}

.app-gallery-lightbox-header [data-gallery-lightbox-caption] {
    overflow: hidden;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.73rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-gallery-lightbox .app-media-dialog-close {
    position: static;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.1);
}

.app-gallery-lightbox .app-media-dialog-close svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.app-gallery-lightbox-stage {
    position: relative;
    display: grid;
    min-height: 0;
    place-items: center;
    overflow: hidden;
    padding: 18px 76px;
    touch-action: pan-y;
}

.app-gallery-lightbox figure {
    display: flex;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.app-gallery-lightbox figure img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    border-radius: 14px;
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
}

.app-gallery-lightbox-arrow {
    position: absolute;
    z-index: 2;
    top: 50%;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    background: rgba(17, 24, 39, 0.76);
    color: #fff;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.app-gallery-lightbox-arrow.is-previous {
    left: 18px;
}

.app-gallery-lightbox-arrow.is-next {
    right: 18px;
}

.app-gallery-lightbox-arrow:hover {
    background: rgba(255, 255, 255, 0.16);
}

.app-gallery-lightbox-arrow svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app-gallery-lightbox-count {
    min-width: 54px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.74rem;
    font-weight: 700;
    text-align: center;
}

.app-gallery-lightbox-thumbnails {
    display: flex;
    min-height: 84px;
    align-items: center;
    gap: 9px;
    padding: 10px 18px;
    overflow-x: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(11, 15, 25, 0.96);
    scrollbar-width: thin;
}

.app-gallery-lightbox-thumbnails button {
    width: 60px;
    height: 60px;
    flex: 0 0 60px;
    padding: 2px;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 11px;
    background: transparent;
    cursor: pointer;
    opacity: 0.58;
}

.app-gallery-lightbox-thumbnails button[aria-current="true"] {
    border-color: var(--app-primary);
    opacity: 1;
}

.app-gallery-lightbox-thumbnails img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 7px;
    object-fit: cover;
}

@media (max-width: 600px) {
    .app-qr-dialog-shell {
        padding: 26px 20px 22px;
    }

    .app-gallery-lightbox {
        width: 100%;
        height: 100dvh;
        max-width: none;
        margin: 0;
        border: 0;
        border-radius: 0;
    }

    .app-gallery-lightbox-header {
        min-height: 66px;
        gap: 10px;
        padding: max(10px, env(safe-area-inset-top)) 12px 10px 16px;
    }

    .app-gallery-lightbox-stage {
        padding: 12px;
    }

    .app-gallery-lightbox-arrow {
        display: none;
    }

    .app-gallery-lightbox-thumbnails {
        min-height: 76px;
        padding: 8px 12px max(8px, env(safe-area-inset-bottom));
    }

    .app-gallery-lightbox-thumbnails button {
        width: 54px;
        height: 54px;
        flex-basis: 54px;
    }
}
