/* =====================================================================
   GoToEvent Latvija — Design system clair
   Tokens → base → composants → pages → responsive
   ===================================================================== */

:root {
    /* Palette test */
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-warm: #f8fafc;
    --surface-sunken: #f1f5f9;
    --ink: #1f2937;
    --ink-soft: #374151;
    --muted: #6b7280;
    --muted-2: #9ca3af;
    --line: #e5e7eb;
    --line-strong: #d1d5db;

    --brand: #ff4f5e;
    --brand-dark: #e63e4e;
    --brand-soft: #fff1f2;
    --brand-tint: rgba(255, 79, 94, 0.12);

    --teal: #3b82f6;
    --teal-dark: #2563eb;
    --teal-soft: #eff6ff;
    --amber: #f59e0b;
    --amber-soft: #fffbeb;
    --green: #22c55e;
    --green-soft: #f0fdf4;
    --blue: #3b82f6;
    --blue-soft: #eff6ff;

    --shadow-xs: 0 1px 2px rgba(31, 41, 55, 0.05);
    --shadow-sm: 0 2px 8px rgba(31, 41, 55, 0.06);
    --shadow-md: 0 10px 28px rgba(31, 41, 55, 0.08);
    --shadow-lg: 0 22px 54px rgba(31, 41, 55, 0.14);

    /* Rayons */
    --radius-sm: 9px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-pill: 999px;

    /* Layout */
    --layout-max: 1340px;
    --layout-gutter: clamp(16px, 3vw, 36px);
    --nav-h: 64px;

    --ease: 160ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    min-width: 320px;
    overflow-x: clip;
    background:
        radial-gradient(900px 420px at 86% -8%, rgba(255, 79, 94, 0.08), transparent 62%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    background-attachment: fixed;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.55;
    letter-spacing: -0.006em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img,
video {
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

h1, h2, h3, h4 {
    letter-spacing: -0.02em;
    color: var(--ink);
}

main {
    min-height: calc(100vh - var(--nav-h));
}

::selection {
    background: var(--brand-tint);
}

/* ---------------------------------------------------------------------
   Layout shell
   --------------------------------------------------------------------- */
.layout-shell {
    width: min(var(--layout-max), 100%);
    margin-inline: auto;
    padding-inline: var(--layout-gutter);
}

/* ---------------------------------------------------------------------
   Topbar / navigation
   --------------------------------------------------------------------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
}

.topbar-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: var(--nav-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    min-width: max-content;
    color: var(--ink);
    font-weight: 700;
    font-size: 1.08rem;
    letter-spacing: -0.02em;
}

.brand-logo {
    display: block;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    object-fit: contain;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.main-nav a {
    padding: 9px 14px;
    border-radius: var(--radius-pill);
    color: var(--ink-soft);
    font-size: 0.93rem;
    font-weight: 600;
    white-space: nowrap;
    transition: color var(--ease), background var(--ease);
}

.main-nav a:hover {
    color: var(--ink);
    background: var(--surface-warm);
}

.main-nav a[aria-current="page"] {
    color: var(--brand);
    background: var(--brand-soft);
}

.account-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.account-nav form {
    margin: 0;
}

.language-switcher label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.language-switcher span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.language-switcher select {
    width: 64px;
    min-height: 40px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    font-weight: 600;
    cursor: pointer;
}

.nav-user {
    max-width: 160px;
    overflow: hidden;
    color: var(--brand-dark);
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-avatar,
.profile-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    flex-shrink: 0;
    transition: border-color var(--ease), box-shadow var(--ease);
}

.nav-avatar:hover,
.nav-avatar:focus-visible {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-tint);
}

.nav-avatar {
    width: 40px;
    height: 40px;
}

.profile-avatar {
    width: 72px;
    height: 72px;
}

.nav-avatar img,
.profile-avatar img,
.nav-avatar-fallback,
.profile-avatar-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-avatar-fallback,
.profile-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--avatar-color, var(--brand));
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.nav-avatar-fallback {
    font-size: 0.82rem;
}

.profile-avatar-fallback {
    font-size: 1.3rem;
}

/* ---------------------------------------------------------------------
   Boutons
   --------------------------------------------------------------------- */
.primary-button,
.secondary-button,
.ghost-button,
.disabled-button,
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.94rem;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    transition: background var(--ease), border-color var(--ease),
        color var(--ease), box-shadow var(--ease), transform var(--ease);
}

.primary-button {
    background: linear-gradient(150deg, var(--brand), var(--brand-dark));
    color: #fff;
    box-shadow: 0 4px 14px rgba(255, 79, 94, 0.26);
}

.primary-button:hover {
    box-shadow: 0 6px 20px rgba(255, 79, 94, 0.34);
    transform: translateY(-1px);
}

.primary-button:active {
    transform: translateY(0);
}

.secondary-button {
    border-color: transparent;
    background: var(--teal-soft);
    color: var(--teal-dark);
}

.secondary-button:hover {
    background: #dbeafe;
}

.ghost-button {
    border-color: var(--line);
    background: var(--surface);
    color: var(--ink-soft);
}

.ghost-button:hover {
    border-color: var(--line-strong);
    background: var(--surface-warm);
    color: var(--ink);
}

.disabled-button {
    background: var(--surface-sunken);
    color: var(--muted-2);
    cursor: not-allowed;
}

.full-notice {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    margin: 0;
    padding: 0 16px;
    border: 1px solid rgba(245, 158, 11, 0.24);
    border-radius: var(--radius-sm);
    background: var(--amber-soft);
    color: #92400e;
    font-weight: 600;
    text-align: center;
}

.full-notice.full {
    width: 100%;
}

.icon-button {
    width: 42px;
    padding: 0;
    border-color: var(--line);
    background: var(--surface);
    color: var(--ink-soft);
}

.icon-button:hover {
    border-color: var(--line-strong);
    background: var(--surface-warm);
    color: var(--ink);
}

.icon-button.is-confirmed {
    border-color: rgba(34, 197, 94, 0.28);
    background: var(--green-soft);
    color: var(--green);
}

.primary-button svg,
.secondary-button svg,
.ghost-button svg,
.icon-button svg,
.meta-row svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
.ghost-button:focus-visible,
.icon-button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--brand-tint);
    outline-offset: 1px;
}

.full {
    width: 100%;
}

/* ---------------------------------------------------------------------
   Flash messages
   --------------------------------------------------------------------- */
.flash-stack {
    position: fixed;
    top: calc(var(--nav-h) + 14px);
    right: 22px;
    z-index: 50;
    display: grid;
    gap: 10px;
    width: min(420px, calc(100vw - 32px));
}

.flash {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px;
    align-items: center;
    gap: 10px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    font-weight: 500;
    transition: opacity 180ms ease, transform 180ms ease;
}

.flash.is-dismissing {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
}

.flash-close {
    display: inline-grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: currentColor;
    cursor: pointer;
    opacity: 0.65;
}

.flash-close:hover {
    background: rgba(0, 0, 0, 0.05);
    opacity: 1;
}

.flash-close svg {
    width: 15px;
    height: 15px;
}

.flash.success {
    border-color: rgba(34, 197, 94, 0.28);
    background: var(--green-soft);
    color: #166534;
}

.flash.error {
    border-color: rgba(255, 79, 94, 0.28);
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.flash.info {
    border-color: rgba(59, 130, 246, 0.25);
    background: var(--teal-soft);
    color: var(--teal-dark);
}

/* ---------------------------------------------------------------------
   Typographie utilitaire
   --------------------------------------------------------------------- */
.eyebrow {
    margin: 0 0 6px;
    color: var(--brand);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.muted-text {
    margin: 0;
    color: var(--muted);
}

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

/* ---------------------------------------------------------------------
   Formulaires (champs partagés)
   --------------------------------------------------------------------- */
input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    outline: none;
    transition: border-color var(--ease), box-shadow var(--ease);
}

input,
select {
    min-height: 46px;
    padding: 0 13px;
}

textarea {
    resize: vertical;
    min-height: 130px;
    padding: 12px;
}

input::placeholder,
textarea::placeholder {
    color: var(--muted-2);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-tint);
}

.search-field input:focus {
    outline: none;
}

.filter-form,
.editor-form {
    display: grid;
    gap: 16px;
}

.filter-form label,
.editor-form label {
    display: grid;
    gap: 7px;
    color: var(--ink-soft);
    font-size: 0.88rem;
    font-weight: 600;
}

.form-grid {
    display: grid;
    gap: 12px;
}

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

.form-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.button-row,
.form-actions,
.section-title-row,
.group-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.form-actions {
    justify-content: flex-end;
}

.is-disabled {
    opacity: 0.5;
}

/* ---------------------------------------------------------------------
   Explorer (page d'accueil)
   --------------------------------------------------------------------- */
.explorer-shell {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    gap: 26px;
    width: min(var(--layout-max), 100%);
    margin: 0 auto;
    padding: 28px var(--layout-gutter) 56px;
}

.filters-panel {
    position: sticky;
    top: calc(var(--nav-h) + 18px);
    align-self: start;
    display: grid;
    gap: 20px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.panel-heading {
    display: grid;
    gap: 6px;
}

.panel-heading h1,
.collection-header h1,
.form-heading h1,
.auth-panel h1,
.detail-header h1,
.contact-card h1 {
    margin: 0;
    font-size: clamp(1.8rem, 3.4vw, 2.7rem);
    line-height: 1.04;
    font-weight: 700;
}

.panel-heading p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.discovery-panel {
    display: grid;
    gap: 18px;
}

.featured-event-card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-warm);
    transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}

.featured-event-card:hover {
    border-color: var(--brand);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.featured-media {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 96px;
    border-radius: var(--radius-sm);
    background: var(--surface-sunken);
}

.featured-media::before,
.event-card-cover::before {
    content: "";
    position: absolute;
    inset: -16px;
    background-image: var(--cover-image);
    background-position: center;
    background-size: cover;
    filter: blur(18px);
    opacity: 0.36;
    transform: scale(1.08);
}

.featured-media::after,
.event-card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.46));
}

.featured-media img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    min-height: 96px;
    object-fit: contain;
}

.featured-body {
    display: grid;
    align-content: center;
    gap: 6px;
    min-width: 0;
}

.featured-body .eyebrow {
    margin: 0;
}

.featured-body strong {
    color: var(--ink);
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.25;
}

.featured-body span:last-child {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 0.85rem;
}

.featured-body svg {
    width: 15px;
    height: 15px;
    color: var(--teal-dark);
}

/* Stats */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.stat-grid div {
    min-width: 0;
    padding: 13px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-warm);
    text-align: center;
}

.stat-grid div:nth-child(1) {
    border-color: rgba(255, 79, 94, 0.18);
    background: var(--brand-soft);
}

.stat-grid div:nth-child(2) {
    border-color: rgba(34, 197, 94, 0.18);
    background: var(--teal-soft);
}

.stat-grid div:nth-child(3) {
    border-color: rgba(59, 130, 246, 0.18);
    background: var(--blue-soft);
}

.stat-grid strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.stat-grid span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.74rem;
}

/* Quick panels */
.quick-panel {
    display: grid;
    gap: 10px;
}

.quick-filter-grid,
.category-chip-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.quick-filter,
.category-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink-soft);
    font-size: 0.85rem;
    font-weight: 600;
    transition: border-color var(--ease), background var(--ease), color var(--ease);
}

.quick-filter:hover,
.quick-filter.is-active,
.category-chip:hover,
.category-chip.is-active {
    border-color: var(--brand);
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.quick-filter svg,
.category-chip svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.quick-filter span,
.category-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.create-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

/* Zone résultats */
.results-area {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.explorer-search-form {
    display: grid;
    gap: 14px;
}

.search-bar {
    display: flex;
    align-items: stretch;
    gap: 10px;
    flex-wrap: wrap;
}

.search-field {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 240px;
    min-width: 0;
}

.search-field svg {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--muted-2);
    pointer-events: none;
}

.search-field input {
    width: 100%;
    min-height: 46px;
    padding: 0 16px 0 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: 1rem;
}

.search-field input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-tint);
}

.filter-toggle {
    position: relative;
}

.filter-toggle.is-active,
.ghost-button.is-active {
    border-color: var(--brand);
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.filter-active-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 2px var(--surface);
}

.filters-drawer {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-warm);
}

.filters-drawer[hidden] {
    display: none;
}

/* Barre carte + titre résultats */
.map-toolbar,
.collection-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
}

.map-toolbar {
    padding: 0 2px;
}

.map-toolbar h2,
.collection-header h1,
.detail-main h2,
.detail-side h2,
.editor-form h2,
.account-main h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
}

/* Carte */
.map {
    z-index: 1;
    width: 100%;
    min-height: 420px;
    height: clamp(420px, 50vh, 600px);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #e6ecdf;
    box-shadow: var(--shadow-sm);
}

.detail-map {
    min-height: 360px;
    height: 420px;
}

.map-fallback {
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(14, 143, 134, 0.14), rgba(59, 111, 212, 0.12)),
        var(--surface-sunken);
}

.map-fallback div {
    display: grid;
    gap: 8px;
    text-align: center;
}

.leaflet-popup-content {
    display: grid;
    gap: 6px;
    min-width: 160px;
}

.leaflet-popup-content span {
    color: var(--muted);
}

.leaflet-popup-content a {
    color: var(--brand);
    font-weight: 600;
}

.event-map-tooltip.leaflet-tooltip {
    display: grid;
    gap: 2px;
    width: max-content;
    min-width: 148px;
    max-width: 210px;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid rgba(229, 231, 235, 0.96);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 24px rgba(31, 41, 55, 0.14);
    color: var(--ink);
    font: inherit;
    line-height: 1.2;
    opacity: 0 !important;
    pointer-events: none;
    transition: opacity var(--ease);
    white-space: normal;
}

.map.map-labels-visible .event-map-tooltip.leaflet-tooltip {
    opacity: 1 !important;
}

.event-map-tooltip::before {
    display: none;
}

.event-map-tooltip-title,
.event-map-tooltip-meta {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-map-tooltip-title {
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.event-map-tooltip-meta {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ---------------------------------------------------------------------
   Cartes événement (liste)
   --------------------------------------------------------------------- */
.event-list {
    display: grid;
    gap: 14px;
}

.event-list.compact {
    gap: 10px;
}

.event-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 6px;
    padding-top: 8px;
}

.pagination-status {
    min-width: 9rem;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 600;
    text-align: center;
}

.event-card {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr) minmax(132px, auto);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

.event-card:hover,
.event-card.is-highlighted {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.date-badge {
    display: inline-grid;
    width: 112px;
    min-height: 86px;
    align-content: center;
    justify-items: start;
    gap: 6px;
    padding: 12px;
    border-radius: var(--radius-sm);
    background: linear-gradient(160deg, var(--brand), var(--brand-dark));
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 79, 94, 0.22);
}

.date-badge strong {
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.15;
}

.date-badge span {
    color: rgba(255, 255, 255, 0.86);
    font-weight: 700;
    font-size: 0.84rem;
}

.date-badge--compact {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: auto;
    min-height: 0;
    padding: 7px 12px;
    gap: 1px;
    box-shadow: 0 2px 8px rgba(255, 79, 94, 0.16);
}

.date-badge--compact strong {
    font-size: 0.84rem;
    line-height: 1.2;
}

.date-badge--compact span {
    font-size: 0.78rem;
    line-height: 1.2;
}

.event-card-body {
    display: grid;
    align-content: center;
    gap: 10px;
    min-width: 0;
}

.event-topline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}

.event-topline-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.event-copy-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    min-width: 0;
}

.event-copy {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 11px;
    border-radius: var(--radius-pill);
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 0.76rem;
    font-weight: 600;
}

.pill.muted {
    background: var(--teal-soft);
    color: var(--teal-dark);
}

.event-card h3,
.group-card h2 {
    margin: 0;
    font-size: 1.22rem;
    line-height: 1.25;
    font-weight: 700;
}

.event-card h3 a:hover,
.group-card h2 a:hover {
    color: var(--brand);
}

.event-card p,
.group-card p,
.content-section p,
.side-block p,
.contact-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.event-card-body p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    max-width: 62ch;
}

.event-card.has-cover .event-card-body p {
    max-width: none;
}

.event-info-stack {
    display: grid;
    gap: 8px;
    min-width: 0;
    margin-top: 2px;
}

.event-location,
.event-info-row span {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: 7px;
}

.event-location {
    color: var(--ink-soft);
    font-size: 0.93rem;
    font-weight: 600;
}

.event-location svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    color: var(--teal-dark);
}

.event-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.event-info-row span {
    min-height: 30px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--surface-warm);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.event-info-row svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    color: var(--muted);
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.88rem;
}

.meta-row.large {
    margin-top: 14px;
    font-size: 0.96rem;
    color: var(--ink-soft);
}

.meta-row span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.event-actions {
    display: grid;
    justify-items: stretch;
    gap: 8px;
    align-self: center;
}

.event-actions .primary-button,
.event-actions .secondary-button,
.event-actions .full-notice {
    min-height: 44px;
}

.event-actions form {
    margin: 0;
    width: 100%;
}

.event-card.has-cover .event-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-self: stretch;
    gap: 8px;
    width: 140px;
    min-width: 140px;
}

.event-card.has-cover .event-actions > form,
.event-card.has-cover .event-actions > .primary-button,
.event-card.has-cover .event-actions > .secondary-button,
.event-card.has-cover .event-actions > .full-notice {
    width: 100%;
}

.event-card.has-cover .event-actions .primary-button,
.event-card.has-cover .event-actions .secondary-button {
    width: 100%;
}

.event-actions.is-updating,
[data-event-action].is-updating {
    opacity: 0.72;
    pointer-events: none;
}

.event-card-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 8px;
    width: 100%;
}

/* Variante avec couverture */
.event-card.has-cover {
    grid-template-columns: clamp(210px, 28%, 280px) minmax(0, 1fr) 140px;
    gap: 16px;
    align-items: stretch;
    overflow: hidden;
    padding: 0;
}

.event-card-cover {
    position: relative;
    grid-column: auto;
    grid-row: auto;
    align-self: stretch;
    overflow: hidden;
    min-height: 196px;
    margin: 0;
    border-radius: 0;
    background: var(--surface-sunken);
}

.event-card.has-cover .date-badge {
    margin: 0;
}

.event-card.has-cover .event-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 18px 0;
}

.event-card.has-cover .event-actions {
    padding: 18px 16px 18px 0;
}

.event-card-cover img,
.event-card-cover .category-art {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Les photos restent entières, qu'elles soient verticales ou horizontales. */
.event-card.has-cover.has-landscape-cover {
    grid-template-columns: clamp(210px, 28%, 280px) minmax(0, 1fr) 140px;
}

.event-card.has-cover.has-landscape-cover .event-card-cover {
    grid-column: auto;
    grid-row: auto;
    min-height: 196px;
    aspect-ratio: auto;
    max-height: none;
}

.event-card.has-cover.has-landscape-cover .date-badge {
    margin: 0;
}

.event-card.has-cover.has-landscape-cover .event-card-body {
    grid-column: auto;
    grid-row: auto;
}

.event-card.has-cover.has-landscape-cover .event-actions {
    grid-column: auto;
    grid-row: auto;
}

.featured-event-card.has-landscape-cover {
    grid-template-columns: 88px minmax(0, 1fr);
}

.featured-event-card.has-landscape-cover .featured-media {
    min-height: 96px;
    aspect-ratio: auto;
}

/* ---------------------------------------------------------------------
   Visuel de catégorie (placeholder cover)
   --------------------------------------------------------------------- */
.category-art {
    position: relative;
    display: grid;
    min-height: 100%;
    place-items: center;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0)),
        var(--teal-soft);
}

.category-art::before {
    position: absolute;
    inset: 22%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    content: "";
}

.category-art svg {
    position: relative;
    width: 44px;
    height: 44px;
    color: #fff;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.18));
}

.tone-tech .category-art { background: linear-gradient(135deg, #3b82f6, #22c55e); }
.tone-culture .category-art { background: linear-gradient(135deg, #ff4f5e, #3b82f6); }
.tone-music .category-art { background: linear-gradient(135deg, #e63e4e, #f59e0b); }
.tone-sport .category-art { background: linear-gradient(135deg, #22c55e, #3b82f6); }
.tone-nature .category-art { background: linear-gradient(135deg, #22c55e, #84cc16); }
.tone-family .category-art { background: linear-gradient(135deg, #3b82f6, #f59e0b); }
.tone-food .category-art { background: linear-gradient(135deg, #f59e0b, #ff4f5e); }
.tone-learn .category-art { background: linear-gradient(135deg, #3b82f6, #6366f1); }
.tone-volunteer .category-art { background: linear-gradient(135deg, #22c55e, #ff4f5e); }

/* ---------------------------------------------------------------------
   État vide
   --------------------------------------------------------------------- */
.empty-state {
    display: grid;
    justify-items: center;
    gap: 12px;
    min-height: 260px;
    padding: 40px 28px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-lg);
    background: var(--surface-warm);
    text-align: center;
}

.empty-state svg {
    width: 32px;
    height: 32px;
    color: var(--amber);
}

.empty-state h3 {
    margin: 0;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
}

.empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 4px;
}

.empty-state.compact {
    gap: 8px;
    min-height: 0;
    padding: 24px 16px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    background: var(--surface-warm);
}

.empty-state.compact svg {
    width: 26px;
    height: 26px;
}

.empty-state.compact p {
    max-width: 32ch;
    line-height: 1.45;
}

/* ---------------------------------------------------------------------
   Détail (événement / groupe)
   --------------------------------------------------------------------- */
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 26px;
    width: min(var(--layout-max), 100%);
    margin: 0 auto;
    padding: 28px var(--layout-gutter) 56px;
}

.detail-main,
.detail-side,
.collection-shell,
.form-shell,
.auth-shell,
.contact-shell {
    min-width: 0;
}

.detail-main {
    display: grid;
    gap: 22px;
}

.detail-header {
    padding-top: 4px;
}

.detail-header h1 {
    margin-top: 12px;
    font-size: clamp(1.7rem, 3.4vw, 2.6rem);
}

.detail-cover {
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.detail-cover--photo {
    background: var(--surface-warm);
}

.detail-cover--photo img {
    display: block;
    width: 100%;
    height: auto;
    max-height: min(70vh, 540px);
    object-fit: contain;
    object-position: center;
}

.detail-cover--placeholder img,
.detail-visual-row .detail-cover--placeholder img {
    width: 100%;
    height: 100%;
    min-height: 360px;
    max-height: none;
    object-fit: cover;
    object-position: center;
}

.detail-cover--zoomable {
    cursor: zoom-in;
    position: relative;
}

.detail-cover--zoomable:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 3px;
}

.cover-zoom-hint {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(42, 36, 32, 0.7);
    color: #fff;
    pointer-events: none;
}

.cover-zoom-hint svg {
    width: 18px;
    height: 18px;
}

.cover-lightbox:not([open]) {
    display: none;
}

.cover-lightbox[open] {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    padding: 24px;
    border: none;
    background: transparent;
    overflow: hidden;
    display: grid;
    place-items: center;
}

.cover-lightbox::backdrop {
    background: rgba(42, 36, 32, 0.9);
}

.cover-lightbox img {
    display: block;
    max-width: min(96vw, 1100px);
    max-height: 92vh;
    width: auto;
    height: auto;
    margin: 0 auto;
    border-radius: var(--radius);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.cover-lightbox-close {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.cover-lightbox-close:hover {
    background: #fff;
}

.detail-cover:not(.detail-cover--photo) .category-art {
    width: 100%;
    height: 220px;
    display: grid;
}

.detail-cover .category-art svg {
    width: 64px;
    height: 64px;
}

.cover-upload input[type="file"] {
    padding: 10px 0;
    border: none;
    background: transparent;
}

/* Rangée visuel carte + image */
.detail-visual-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
    min-height: 360px;
    isolation: isolate;
}

.detail-visual-row .detail-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
    height: 100%;
    position: relative;
    z-index: 2;
    overflow: hidden;
    isolation: isolate;
}

.detail-visual-row .detail-map {
    height: 100%;
    min-height: 360px;
    position: relative;
    z-index: 1;
    overflow: hidden;
    isolation: isolate;
}

.detail-map-panel {
    display: grid;
    grid-template-rows: minmax(300px, 1fr) auto;
    gap: 10px;
    min-height: 360px;
}

.detail-map-panel .detail-map {
    height: auto;
    min-height: 300px;
}

.directions-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}

.directions-panel > div:first-child {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.directions-panel strong {
    color: var(--ink);
    font-size: 0.94rem;
    line-height: 1.25;
}

.directions-panel span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.directions-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(92px, auto));
    gap: 8px;
}

.directions-actions .secondary-button,
.directions-actions .ghost-button {
    min-height: 38px;
    padding-inline: 12px;
}

.detail-visual-row .detail-map .leaflet-container {
    width: 100%;
    height: 100%;
}

.detail-visual-row .detail-cover--photo img {
    max-height: min(420px, 52vh);
}

.detail-visual-row .detail-cover:not(.detail-cover--photo) .category-art {
    width: 100%;
    height: 100%;
    min-height: 360px;
}

/* Panneaux latéraux (share, participation, contact) */
.detail-side {
    position: sticky;
    top: calc(var(--nav-h) + 18px);
    align-self: start;
    display: grid;
    gap: 14px;
}

.side-block,
.content-section,
.contact-card,
.auth-panel {
    display: grid;
    gap: 14px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.content-section h2,
.side-block h2,
.auth-panel h1 {
    margin: 0;
    font-size: 1.18rem;
    font-weight: 700;
}

.side-block p:last-child,
.contact-card p:last-child {
    margin: 0;
}

.soft-line {
    padding-top: 12px;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

/* Share trigger + modal */
.share-tools {
    align-self: start;
}

.share-trigger {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 66px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    text-align: left;
    box-shadow: var(--shadow-xs);
    transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

.share-trigger:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.share-trigger-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.share-trigger-icon svg {
    width: 19px;
    height: 19px;
}

.share-trigger strong,
.share-trigger small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-trigger strong {
    font-size: 0.95rem;
    line-height: 1.2;
}

.share-trigger small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.share-dialog:not([open]) {
    display: none;
}

.share-dialog[open] {
    width: min(94vw, 430px);
    max-width: 430px;
    padding: 0;
    border: none;
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.share-dialog::backdrop {
    background: rgba(31, 41, 55, 0.46);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.share-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 20px 12px;
}

.share-dialog-header .eyebrow {
    margin-bottom: 5px;
}

.share-dialog-header h3 {
    margin: 0;
    max-width: 24ch;
    overflow: hidden;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-dialog-header .icon-button {
    min-height: 38px;
    min-width: 38px;
    padding: 0;
}

.share-preview {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin: 0 20px 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-warm);
}

.share-preview-thumb {
    display: block;
    width: 44px;
    height: 44px;
    border-radius: 15px;
    object-fit: cover;
    box-shadow: var(--shadow-xs);
}

.share-preview div {
    min-width: 0;
}

.share-preview strong,
.share-preview span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-preview strong {
    color: var(--ink);
    font-size: 0.94rem;
    line-height: 1.25;
}

.share-preview span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 0 20px 14px;
    list-style: none;
}

.share-options li:first-child {
    grid-column: 1 / -1;
}

.share-options a,
.share-options button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 42px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink-soft);
    cursor: pointer;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: background var(--ease), color var(--ease);
}

.share-options li:first-child button {
    min-height: 46px;
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.share-options a:hover,
.share-options button:hover {
    border-color: var(--line-strong);
    background: var(--surface-warm);
    color: var(--ink);
}

.share-options svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--muted);
}

.share-brand-mark {
    display: inline-grid;
    width: 16px;
    height: 16px;
    place-items: center;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1;
}

.share-qr-toggle {
    margin: 0 20px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.share-qr-toggle[hidden] {
    display: none;
}

.share-qr-toggle summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding: 0 12px;
    color: var(--ink-soft);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    list-style: none;
}

.share-qr-toggle summary::-webkit-details-marker {
    display: none;
}

.share-qr-toggle summary span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.share-qr-toggle summary svg {
    width: 17px;
    height: 17px;
}

.share-qr-toggle summary > svg {
    color: var(--muted);
    transition: transform var(--ease);
}

.share-qr-toggle[open] summary > svg {
    transform: rotate(180deg);
}

.qr-card {
    display: grid;
    place-items: center;
    gap: 10px;
    padding: 14px;
    border-top: 1px solid var(--line);
    background: var(--surface-warm);
}

.qr-card img {
    width: min(152px, 100%);
    aspect-ratio: 1;
    border: 8px solid #fff;
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.qr-card .ghost-button {
    width: 100%;
}

.share-dialog .share-status {
    padding: 0 20px 16px;
}

.share-status {
    min-height: 1.25em;
    color: var(--teal-dark);
    font-size: 0.84rem;
    font-weight: 600;
}

.share-status:empty {
    display: none;
}

/* Détail : actions propriétaire */
.detail-owner-actions,
.owner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.owner-actions .ghost-button {
    min-height: 38px;
    padding-inline: 12px;
}

.detail-header .secondary-button {
    margin-top: 14px;
}

.ghost-button.danger-text {
    color: var(--brand);
}

.ghost-button.danger-text:hover {
    background: var(--brand-soft);
}

/* ---------------------------------------------------------------------
   Collections (groupes)
   --------------------------------------------------------------------- */
.collection-shell,
.form-shell,
.auth-shell,
.contact-shell {
    width: min(var(--layout-max), 100%);
    margin: 0 auto;
    padding: 28px var(--layout-gutter) 56px;
}

.collection-header {
    margin-bottom: 22px;
}

.group-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.group-card {
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--ease), transform var(--ease);
}

.group-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.group-card-cover {
    overflow: hidden;
    height: 150px;
    margin: -18px -18px 0;
}

.group-card-cover img,
.group-card-cover .category-art {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.group-footer {
    margin-top: 4px;
}

/* ---------------------------------------------------------------------
   Formulaires de publication (création événement / groupe)
   --------------------------------------------------------------------- */
.form-shell {
    width: min(var(--layout-max), 100%);
}

.publication-layout {
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    gap: 28px;
    width: min(var(--layout-max), 100%);
    margin: 0 auto;
    padding: 28px var(--layout-gutter) 56px;
    align-items: start;
}

.publication-side {
    position: sticky;
    top: calc(var(--nav-h) + 18px);
    display: grid;
    gap: 12px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface-warm);
    box-shadow: var(--shadow-sm);
}

.publication-side h1 {
    margin: 0;
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    line-height: 1.05;
    font-weight: 700;
}

.publication-lead {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
    font-size: 0.92rem;
}

.publication-steps {
    display: grid;
    gap: 8px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.publication-steps li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink-soft);
    font-size: 0.86rem;
    font-weight: 500;
}

.publication-steps li svg {
    width: 16px;
    height: 16px;
    color: var(--brand);
    flex-shrink: 0;
}

.publication-form {
    display: grid;
    gap: 18px;
    padding-bottom: 8px;
}

.form-shell .editor-form,
.form-shell .form-heading {
    max-width: 920px;
}

.form-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.form-panel-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-warm);
}

.form-panel-head h2 {
    margin: 0;
    font-size: 1.06rem;
    font-weight: 700;
}

.form-panel-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.form-panel-icon svg {
    width: 20px;
    height: 20px;
}

.form-panel-body {
    display: grid;
    gap: 16px;
    padding: 20px;
}

.field-block {
    display: grid;
    gap: 8px;
}

.field-hint {
    font-size: 0.8rem;
    color: var(--muted);
}

.field-with-icon .field-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.field-with-icon .field-input-wrap svg {
    position: absolute;
    left: 13px;
    width: 17px;
    height: 17px;
    color: var(--muted-2);
    pointer-events: none;
}

.field-with-icon .field-input-wrap input {
    padding-left: 40px;
}

.cover-dropzone {
    display: grid;
    gap: 14px;
    justify-items: center;
    padding: 22px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    background: var(--surface-warm);
    text-align: center;
}

.cover-dropzone-preview {
    overflow: hidden;
    width: 100%;
    max-width: 420px;
    height: 180px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.cover-dropzone-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-dropzone-empty {
    display: grid;
    gap: 6px;
    justify-items: center;
}

.cover-dropzone-empty svg {
    width: 32px;
    height: 32px;
    color: var(--teal-dark);
}

.cover-dropzone-empty strong {
    font-size: 1rem;
}

.cover-dropzone-button {
    cursor: pointer;
}

.coords-details {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-warm);
}

.coords-details summary {
    cursor: pointer;
    color: var(--ink-soft);
    font-size: 0.88rem;
    font-weight: 600;
    list-style-position: outside;
}

.coords-details[open] summary {
    margin-bottom: 14px;
}

.form-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: sticky;
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(253, 251, 247, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow-md);
}

.form-heading {
    margin-bottom: 22px;
}

.editor-form section {
    display: grid;
    gap: 15px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.editor-form.slim section {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.segmented {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-warm);
}

.segmented label {
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    cursor: pointer;
    color: var(--muted);
    font-weight: 600;
    transition: background var(--ease), color var(--ease), box-shadow var(--ease);
}

.segmented input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.segmented label:has(input:checked) {
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-xs);
}

/* ---------------------------------------------------------------------
   Auth / contact
   --------------------------------------------------------------------- */
.auth-shell {
    display: grid;
    min-height: calc(100vh - var(--nav-h) - 60px);
    place-items: center;
}

.contact-shell {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    min-height: calc(100vh - var(--nav-h) - 60px);
    justify-content: center;
}

.auth-panel,
.contact-card {
    width: min(440px, 100%);
}

.auth-panel h1,
.contact-card h1 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.google-auth-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    font-weight: 600;
    transition: border-color var(--ease), box-shadow var(--ease);
}

.google-auth-button:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-xs);
}

.google-mark {
    display: inline-grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: #4285f4;
    font-weight: 800;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
    flex: 1;
    height: 1px;
    background: var(--line);
    content: "";
}

.switch-auth {
    margin: 4px 0 0;
    color: var(--muted);
}

.auth-forgot-password {
    margin: -4px 0 0;
    text-align: right;
}

.auth-forgot-password a {
    color: var(--brand);
    font-size: 0.88rem;
    font-weight: 600;
}

.auth-forgot-password a:hover {
    color: var(--brand-dark);
}

.switch-auth a,
.contact-lines a {
    color: var(--brand);
    font-weight: 600;
}

.switch-auth a:hover,
.contact-lines a:hover {
    color: var(--brand-dark);
}

.contact-lines {
    display: grid;
    gap: 10px;
}

.contact-lines a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.consent-checkbox {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.45;
}

.consent-checkbox input {
    margin-top: 4px;
}

.auth-legal-notice {
    margin-top: 14px;
    font-size: 0.86rem;
    line-height: 1.45;
}

/* ---------------------------------------------------------------------
   COMPTE — redesign compact & intuitif
   --------------------------------------------------------------------- */
.account-layout {
    display: grid;
    gap: 22px;
    width: min(var(--layout-max), 100%);
    margin: 0 auto;
    padding: 28px var(--layout-gutter) 56px;
}

/* Barre de profil compacte (remplace l'ancien hero géant) */
.account-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "avatar body actions";
    gap: 20px;
    align-items: center;
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.account-hero-avatar {
    grid-area: avatar;
    display: inline-flex;
    overflow: hidden;
    width: 64px;
    height: 64px;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

.account-hero-avatar img,
.account-hero-avatar .profile-avatar-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-hero-avatar .profile-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--avatar-color, var(--brand));
    color: #fff;
    font-weight: 700;
    font-size: 1.3rem;
}

.account-hero-body {
    grid-area: body;
    display: grid;
    gap: 6px;
    min-width: 0;
}

.account-hero-body .eyebrow {
    margin: 0;
}

.account-hero-body h1 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.1;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.account-hero-email {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

/* Stats en chips compactes inline */
.account-stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.account-stat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--surface-warm);
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 500;
}

.account-stat svg {
    width: 16px;
    height: 16px;
    color: var(--brand);
    flex-shrink: 0;
}

.account-stat strong {
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 700;
}

.account-hero-actions {
    grid-area: actions;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.account-hero-action {
    width: auto;
}

/* Contenu du compte : activité + réglages */
.account-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
    gap: 22px;
    align-items: start;
}

.account-main {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.account-sidebar {
    display: grid;
    gap: 18px;
    min-width: 0;
    position: sticky;
    top: calc(var(--nav-h) + 18px);
    align-self: start;
}

.account-activity {
    display: grid;
    gap: 18px;
}

.activity-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.activity-card,
.profile-edit-card {
    display: grid;
    gap: 14px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.section-title-row h2,
.activity-card h2 {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 700;
}

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.section-title-row h2 {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.section-title-row h2 svg {
    width: 18px;
    height: 18px;
    color: var(--brand);
}

.profile-edit-card {
    gap: 16px;
}

.profile-edit-heading {
    display: grid;
    gap: 4px;
}

.profile-edit-heading h2 {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 700;
}

.profile-form {
    display: grid;
    gap: 16px;
}

.avatar-picker {
    display: grid;
    gap: 14px;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-warm);
}

.avatar-picker-preview,
.avatar-picker-preview img,
.avatar-picker-preview .profile-avatar-fallback {
    width: 76px;
    height: 76px;
}

.avatar-picker-preview {
    overflow: hidden;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

.avatar-picker-preview img,
.avatar-picker-preview .profile-avatar-fallback {
    display: block;
    object-fit: cover;
}

.avatar-picker-actions {
    display: grid;
    gap: 6px;
    justify-items: start;
}

.avatar-picker-button {
    cursor: pointer;
}

.profile-fields,
.profile-password-block {
    display: grid;
    gap: 14px;
}

.profile-password-block {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-warm);
}

.profile-password-heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.profile-password-heading svg {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    color: var(--teal-dark);
}

.profile-password-heading strong {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

/* Cartes d'activité : version compacte */
.account-activity .event-card {
    grid-template-columns: 104px minmax(0, 1fr) minmax(108px, auto);
    box-shadow: var(--shadow-xs);
}

.account-activity .event-card:hover {
    box-shadow: var(--shadow-sm);
}

.account-activity .date-badge {
    min-height: 74px;
    padding: 10px;
}

.account-activity .date-badge strong {
    font-size: 0.88rem;
}

.account-activity .event-card h3 {
    font-size: 1.02rem;
}

.activity-split .event-card {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 12px;
}

.activity-split .date-badge {
    min-height: 0;
}

.activity-split .event-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.group-mini-list {
    display: grid;
    gap: 8px;
}

.group-mini-list a {
    position: relative;
    padding: 12px 14px 12px 40px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-warm);
    color: var(--ink-soft);
    font-weight: 600;
    font-size: 0.9rem;
    transition: border-color var(--ease), background var(--ease), color var(--ease);
}

.group-mini-list a::before {
    position: absolute;
    top: 50%;
    left: 14px;
    width: 14px;
    height: 14px;
    border: 2px solid var(--teal);
    border-radius: 50%;
    content: "";
    transform: translateY(-50%);
}

.group-mini-list a:hover {
    border-color: var(--teal);
    color: var(--teal-dark);
    background: var(--teal-soft);
}

/* Données / RGPD */
.data-management-card {
    margin-top: 0;
}

.data-management-actions {
    display: grid;
    gap: 8px;
    margin-bottom: 4px;
}

.data-management-actions .muted-text {
    font-size: 0.85rem;
}

.delete-account-form {
    display: grid;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.delete-account-warning {
    color: #8a4d05;
    background: var(--amber-soft);
    border: 1px solid rgba(201, 115, 10, 0.2);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-size: 0.9rem;
    line-height: 1.45;
}

.danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(255, 79, 94, 0.24);
    background: var(--brand-soft);
    color: var(--brand-dark);
    border-radius: var(--radius-sm);
    min-height: 42px;
    padding: 0 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--ease);
}

.danger-button:hover {
    background: #f7d6dd;
}

.danger-button.full {
    width: 100%;
}

/* ---------------------------------------------------------------------
   Dialogues (confirmation)
   --------------------------------------------------------------------- */
.confirm-dialog:not([open]) {
    display: none;
}

.confirm-dialog[open] {
    width: min(92vw, 420px);
    max-width: 420px;
    padding: 24px;
    border: none;
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
}

.confirm-dialog::backdrop {
    background: rgba(42, 36, 32, 0.5);
}

.confirm-dialog h3 {
    margin: 0 0 10px;
    font-size: 1.15rem;
}

.confirm-dialog p {
    margin: 0;
    color: var(--muted);
}

.confirm-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* ---------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------- */
.site-footer {
    margin-top: 48px;
    padding: 32px 0 40px;
    border-top: 1px solid var(--line);
    background: rgba(255, 252, 247, 0.7);
}

.site-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.site-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--ink);
}

.site-footer-brand .brand-logo {
    width: 30px;
    height: 30px;
}

.site-footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
}

.site-footer-nav a {
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    color: var(--ink-soft);
    font-weight: 500;
    font-size: 0.9rem;
    transition: background var(--ease), color var(--ease);
}

.site-footer-nav a:hover {
    background: var(--surface-warm);
    color: var(--brand-dark);
}

.site-footer-contact {
    color: var(--muted);
    font-size: 0.88rem;
}

.mobile-bottom-nav {
    display: none;
}

.mobile-map-button {
    display: none;
}

/* ---------------------------------------------------------------------
   Bandeau cookies
   --------------------------------------------------------------------- */
.cookie-banner {
    position: fixed;
    inset: auto 0 0;
    z-index: 40;
    padding: 16px 0 calc(16px + env(safe-area-inset-bottom));
    background: rgba(42, 36, 32, 0.96);
    color: #fff;
    box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.2);
}

.cookie-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.cookie-banner p {
    margin: 0;
}

.cookie-banner .ghost-button {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.cookie-banner .ghost-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ---------------------------------------------------------------------
   Pages légales
   --------------------------------------------------------------------- */
.legal-shell {
    max-width: 820px;
    margin: 0 auto;
    padding: 28px 20px 56px;
}

.legal-header h1 {
    margin-top: 8px;
}

.legal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.legal-nav a {
    padding: 8px 15px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    color: var(--ink-soft);
    font-weight: 500;
    background: var(--surface);
    transition: border-color var(--ease), color var(--ease), background var(--ease);
}

.legal-nav a:hover {
    border-color: var(--line-strong);
    background: var(--surface-warm);
}

.legal-nav a[aria-current="page"] {
    border-color: var(--brand);
    color: var(--brand-dark);
    background: var(--brand-soft);
}

.legal-content {
    display: grid;
    gap: 26px;
}

.legal-section h2 {
    margin-bottom: 10px;
    font-size: 1.18rem;
}

.legal-section p {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.6;
}

.legal-section p + p {
    margin-top: 10px;
}

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */
@media (max-width: 1100px) {
    .explorer-shell,
    .detail-layout,
    .account-content,
    .publication-layout {
        grid-template-columns: 1fr;
    }

    .filters-panel,
    .detail-side,
    .account-sidebar,
    .publication-side {
        position: static;
    }

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

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

    .detail-visual-row {
        grid-template-columns: 1fr;
    }

    .account-content {
        gap: 22px;
    }
}

@media (max-width: 820px) {
    body {
        padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
        background:
            linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
        background-attachment: scroll;
    }

    body.mobile-map-open {
        overflow: hidden;
    }

    main {
        min-height: calc(100vh - var(--nav-h) - 76px);
    }

    .topbar-inner {
        min-height: 58px;
        flex-wrap: nowrap;
        gap: 12px;
    }

    .main-nav {
        display: none;
    }

    .account-nav {
        margin-left: auto;
    }

    .account-nav .ghost-button,
    .account-nav .primary-button,
    .account-nav form[action*="logout"] {
        display: none;
    }

    .language-switcher select {
        width: 58px;
        min-height: 38px;
    }

    .mobile-bottom-nav {
        position: fixed;
        inset: auto max(10px, env(safe-area-inset-right, 0px)) max(10px, env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px));
        z-index: 45;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 4px;
        min-height: 66px;
        padding: 7px;
        border: 1px solid rgba(229, 231, 235, 0.95);
        border-radius: 22px;
        background: rgba(255, 255, 255, 0.94);
        box-shadow: 0 18px 40px rgba(31, 41, 55, 0.14);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }

    .mobile-bottom-nav a {
        display: grid;
        min-width: 0;
        min-height: 52px;
        place-items: center;
        gap: 3px;
        padding: 5px 4px;
        border-radius: 16px;
        color: var(--muted);
        font-size: 0.68rem;
        font-weight: 700;
        line-height: 1;
        text-align: center;
    }

    .mobile-bottom-nav a[aria-current="page"] {
        background: var(--brand-soft);
        color: var(--brand-dark);
    }

    .mobile-bottom-nav svg {
        width: 20px;
        height: 20px;
    }

    .mobile-bottom-nav-primary {
        background: linear-gradient(150deg, var(--brand), var(--brand-dark));
        color: #fff !important;
        box-shadow: 0 8px 18px rgba(255, 79, 94, 0.28);
    }

    .mobile-bottom-nav-primary[aria-current="page"] {
        background: linear-gradient(150deg, var(--brand), var(--brand-dark));
        color: #fff;
    }

    .cookie-banner {
        bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    }

    .event-card,
    .event-card.has-cover {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .event-card.has-cover .event-card-cover {
        grid-row: auto;
        min-height: 180px;
    }

    .event-card.has-cover .event-card-body,
    .event-card.has-cover .event-actions {
        padding: 0;
    }

    .event-card.has-cover .event-actions {
        width: 100%;
        min-width: 0;
        flex-direction: column;
    }

    .event-card.has-cover .event-card-body {
        gap: 10px;
    }

    .event-card.has-cover {
        padding: 12px;
    }

    .event-card.has-cover .event-card-cover {
        min-height: 160px;
        margin: -12px -12px 0;
        border-radius: var(--radius) var(--radius) 0 0;
    }

    .event-card.has-cover.has-landscape-cover .event-card-cover {
        grid-column: auto;
        grid-row: auto;
        min-height: 0;
        max-height: none;
        aspect-ratio: 16 / 9;
    }

    .event-card.has-cover.has-portrait-cover .event-card-cover {
        min-height: 280px;
        max-height: 420px;
        aspect-ratio: 4 / 5;
    }

    .event-card.has-cover.has-landscape-cover .date-badge,
    .event-card.has-cover.has-landscape-cover .event-card-body,
    .event-card.has-cover.has-landscape-cover .event-actions {
        grid-column: auto;
        grid-row: auto;
    }

    .event-card.has-cover .date-badge {
        margin: 0;
    }

    .event-card-body p {
        -webkit-line-clamp: 1;
    }

    .event-info-stack {
        gap: 7px;
    }

    .event-location {
        font-size: 0.88rem;
    }

    .event-info-row {
        gap: 6px;
    }

    .event-info-row span {
        min-height: 28px;
        padding: 0 9px;
        font-size: 0.78rem;
    }

    .meta-row {
        gap: 8px 12px;
    }

    .meta-row span:nth-child(n + 3) {
        display: none;
    }

    .event-card.has-cover {
        padding: 14px;
    }

    .event-card.has-cover .event-card-cover {
        margin: -14px -14px 0;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .event-card.has-cover .date-badge {
        margin: 0;
    }

    .date-badge {
        min-height: 68px;
    }

    .date-badge--compact {
        min-height: 0;
    }

    .event-actions {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .event-card.has-cover .event-actions {
        padding-top: 4px;
    }

    .event-actions > .primary-button,
    .event-actions > .secondary-button,
    .event-actions > .full-notice,
    .event-actions > form {
        order: 1;
    }

    .event-actions .event-card-tools {
        order: 2;
    }

    .group-grid,
    .activity-split,
    .form-grid.two,
    .form-grid.three,
    .create-actions {
        grid-template-columns: 1fr;
    }

    .account-hero {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas:
            "avatar body"
            "actions actions";
        gap: 16px;
    }

    .account-hero-actions {
        justify-content: stretch;
    }

    .account-hero-action {
        flex: 1;
    }

    .meta-row span {
        overflow-wrap: anywhere;
    }
}

@media (max-width: 560px) {
    :root {
        --nav-h: 58px;
        --layout-gutter: 14px;
    }

    .topbar {
        padding-block: 0;
    }

    .brand {
        width: auto;
        min-width: 0;
    }

    .brand span:last-child {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .account-nav {
        width: auto;
        justify-content: flex-end;
        flex: 1;
        flex-wrap: nowrap;
        gap: 8px;
        margin-left: auto;
    }

    .account-nav .ghost-button,
    .account-nav .primary-button {
        display: none;
    }

    .mobile-map-button {
        display: inline-flex;
        width: 42px;
        flex: 0 0 42px;
    }

    .mobile-map-button.is-active {
        border-color: var(--brand);
        background: var(--brand-soft);
        color: var(--brand-dark);
    }

    .main-nav {
        display: none;
    }

    .explorer-shell,
    .collection-shell,
    .form-shell,
    .detail-layout,
    .account-layout,
    .publication-layout,
    .auth-shell,
    .contact-shell,
    .layout-shell {
        padding-inline: max(12px, env(safe-area-inset-left, 0px)) max(12px, env(safe-area-inset-right, 0px));
    }

    .explorer-shell,
    .collection-shell,
    .form-shell,
    .detail-layout,
    .account-layout,
    .publication-layout,
    .auth-shell,
    .contact-shell,
    .legal-shell {
        padding-block: 16px 24px;
    }

    .explorer-shell {
        gap: 14px;
    }

    .filters-panel {
        gap: 14px;
        border-radius: 0;
        border-inline: 0;
        margin-inline: -14px;
        box-shadow: none;
    }

    .filters-panel .featured-event-card,
    .filters-panel .quick-panel:nth-of-type(4),
    .filters-panel .create-actions {
        display: none;
    }

    .quick-filter-grid,
    .category-chip-grid {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .quick-filter-grid::-webkit-scrollbar,
    .category-chip-grid::-webkit-scrollbar {
        display: none;
    }

    .quick-filter,
    .category-chip {
        flex: 0 0 auto;
        max-width: 180px;
    }

    .filters-panel,
    .side-block,
    .activity-card,
    .profile-edit-card,
    .content-section,
    .editor-form section,
    .auth-panel,
    .contact-card,
    .form-panel-head,
    .form-panel-body,
    .account-hero {
        padding: 16px;
    }

    .publication-steps {
        grid-template-columns: 1fr;
    }

    .flash-stack {
        top: auto;
        right: 12px;
        left: 12px;
        bottom: calc(92px + env(safe-area-inset-bottom, 0px));
        width: auto;
    }

    .form-actions-bar {
        flex-direction: column-reverse;
        align-items: stretch;
        margin-inline: -4px;
    }

    .form-actions-bar .primary-button,
    .form-actions-bar .ghost-button {
        width: 100%;
    }

    .publication-form {
        padding-bottom: max(96px, calc(72px + env(safe-area-inset-bottom, 0px)));
    }

    .panel-heading h1,
    .collection-header h1,
    .form-heading h1,
    .auth-panel h1,
    .detail-header h1,
    .contact-card h1,
    .publication-side h1,
    .account-hero-body h1 {
        font-size: clamp(1.5rem, 7vw, 1.9rem);
        line-height: 1.08;
        overflow-wrap: anywhere;
    }

    .map-toolbar,
    .collection-header,
    .section-title-row,
    .button-row,
    .group-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .avatar-picker {
        grid-template-columns: auto;
        justify-items: center;
        text-align: center;
    }

    .avatar-picker-actions {
        justify-items: center;
    }

    .search-bar {
        flex-direction: column;
        gap: 8px;
    }

    .search-field {
        flex: 0 0 auto;
    }

    .search-bar .primary-button,
    .search-bar .filter-toggle {
        width: 100%;
    }

    .search-bar .primary-button {
        display: none;
    }

    .filter-toggle {
        min-height: 44px;
    }

    .filters-drawer {
        margin-inline: -2px;
        padding: 14px;
        border-radius: var(--radius);
    }

    .map-toolbar .eyebrow {
        display: none;
    }

    .results-area > .map {
        position: fixed;
        inset: calc(var(--nav-h) + 10px) max(10px, env(safe-area-inset-right, 0px)) calc(86px + env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px));
        z-index: 44;
        display: block;
        width: auto;
        height: auto;
        min-height: 0;
        border-radius: 20px;
        opacity: 0;
        pointer-events: none;
        transform: translateY(8px);
        visibility: hidden;
        box-shadow: 0 20px 50px rgba(42, 36, 32, 0.28);
        transition: opacity var(--ease), transform var(--ease), visibility var(--ease);
    }

    body.mobile-map-open .results-area > .map {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
        visibility: visible;
    }

    .map,
    .map.detail-map {
        min-height: 280px;
        height: min(360px, 52vh);
    }

    .detail-visual-row .detail-map {
        display: block;
    }

    .directions-panel {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

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

    .event-list {
        gap: 10px;
    }

    .event-card,
    .event-card.has-cover,
    .group-card {
        border-radius: var(--radius);
    }

    .event-card.has-cover .event-card-cover {
        min-height: 128px;
    }

    .event-card h3,
    .group-card h2 {
        font-size: 1.04rem;
    }

    .event-card-body {
        gap: 7px;
    }

    .event-card-body p,
    .group-card p {
        display: none;
    }

    .event-location {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .event-info-row span {
        max-width: 100%;
    }

    .event-info-row span:nth-child(n + 2) {
        display: none;
    }

    .event-actions {
        gap: 8px;
    }

    .event-card.has-cover .event-actions {
        width: 100%;
        min-width: 0;
    }

    .event-card-tools {
        grid-template-columns: 1fr 44px;
    }

    .date-badge {
        min-height: 58px;
        grid-template-columns: auto auto;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .date-badge span {
        margin-top: 0;
    }

    .event-actions,
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .filters-panel .stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .share-actions {
        grid-template-columns: 1fr;
    }

    .event-card h3,
    .group-card h2,
    .detail-header h1 {
        overflow-wrap: anywhere;
    }

    .contact-lines a {
        overflow-wrap: anywhere;
    }

    .primary-button,
    .secondary-button,
    .ghost-button,
    .disabled-button,
    .full-notice {
        width: 100%;
    }

    .account-nav .ghost-button,
    .account-nav .primary-button,
    .icon-button,
    .section-title-row .ghost-button,
    .map-toolbar .ghost-button,
    .collection-header .primary-button,
    .account-hero-action {
        width: auto;
    }

    .section-title-row .ghost-button,
    .map-toolbar .ghost-button,
    .collection-header .primary-button {
        width: 100%;
    }

    .site-footer {
        display: none;
    }

    .site-footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-banner {
        bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    }

    .cookie-banner-inner,
    .cookie-banner-actions {
        display: grid;
        gap: 10px;
    }
}
