/* Agendive : une seule couleur par club (--brand), toutes les nuances en dérivent. */

:root {
    --brand: #0b6e99;
    --brand-text: #0b6e99;      /* version lisible sur fond blanc, calculée côté serveur */
    --brand-contrast: #ffffff;  /* texte posé sur la couleur */

    --brand-hover: color-mix(in srgb, var(--brand) 82%, #000);
    --brand-soft: color-mix(in srgb, var(--brand) 10%, #fff);
    --brand-softer: color-mix(in srgb, var(--brand) 4%, #fff);
    --brand-border: color-mix(in srgb, var(--brand) 28%, #fff);
    --brand-ring: color-mix(in srgb, var(--brand) 35%, transparent);

    --ink: #14161a;
    --ink-soft: #4a515c;
    --ink-muted: #6b7380;
    --line: #e3e6ea;
    --surface: #ffffff;
    --page: #f6f7f9;
    --danger: #b42318;
    --danger-soft: #fef3f2;
    --success: #067647;
    --success-soft: #ecfdf3;
    --warning: #93370d;
    --warning-soft: #fffaeb;

    --radius: 10px;
    --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 1px 3px rgb(16 24 40 / 10%);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--page);
}

a { color: var(--brand-text); }
a:hover { color: var(--brand-hover); }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); letter-spacing: -.02em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }
/* Une seule largeur de page dans toute l'application (pas de changement en naviguant). */
.container-narrow, .container-mid { max-width: 1280px; }

/* En-tête */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.logo-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--brand); color: var(--brand-contrast); display: grid; place-items: center; font-size: .95rem; }
.logo-img { width: 36px; height: 36px; object-fit: contain; border-radius: 6px; }
.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav a, .nav button.link { padding: 8px 12px; border-radius: 8px; color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.nav a:hover, .nav button.link:hover { background: var(--brand-soft); color: var(--brand-text); }
.nav a.active { background: var(--brand-soft); color: var(--brand-text); }
.nav .who { color: var(--ink-muted); font-size: .92rem; padding: 0 6px; }

/* Bandeau du club */
.club-band { background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--line); }
.club-band .container { padding-top: 22px; padding-bottom: 22px; }
.club-band h1 { margin: 0; }
.club-band p { margin: 4px 0 0; color: var(--ink-soft); }
.club-band-inner { display: flex; align-items: center; gap: 20px; }
.club-band-logo { width: 72px; height: 72px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px; flex: none; }
@media (max-width: 480px) { .club-band-logo { width: 64px; height: 64px; } }
address { font-style: normal; }

main { padding: 32px 0 56px; }

/* Cartes */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.card + .card { margin-top: 20px; }
.card-soft { background: var(--brand-softer); border-color: var(--brand-border); box-shadow: none; }

/* Boutons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 18px; border-radius: 8px; border: 1px solid transparent;
    font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
    background: var(--brand); color: var(--brand-contrast);
}
.btn:hover { background: var(--brand-hover); color: var(--brand-contrast); }
.btn:focus-visible, .field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: 1px; }
.btn-ghost { background: transparent; color: var(--brand-text); border-color: var(--brand-border); }
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand-text); }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; }
.btn-block { width: 100%; }
button.link { background: none; border: 0; font: inherit; cursor: pointer; }

/* Formulaires */
.form-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.form-row { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 700; font-size: 1.05rem; margin-bottom: 12px; padding: 0; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field .hint { color: var(--ink-muted); font-size: .88rem; margin-top: 6px; }
.field input[type=text], .field input[type=email], .field input[type=password], .field textarea {
    width: 100%; padding: 11px 12px; font: inherit; color: var(--ink);
    background: var(--surface); border: 1px solid #cfd4db; border-radius: 8px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.field .error { color: var(--danger); font-size: .9rem; margin-top: 6px; }

.slug-input { display: flex; align-items: stretch; border: 1px solid #cfd4db; border-radius: 8px; background: var(--surface); overflow: hidden; }
.slug-input:focus-within { outline: 3px solid var(--brand-ring); outline-offset: 1px; }
.slug-input input[type=text] { border: 0; border-radius: 0; min-width: 0; flex: 1; }
.slug-input input[type=text]:focus-visible { outline: none; }
.slug-input .suffix { display: flex; align-items: center; padding: 0 12px; background: var(--page); color: var(--ink-muted); border-left: 1px solid var(--line); white-space: nowrap; }
.field.has-error .slug-input { border-color: var(--danger); }
.slug-status { font-size: .9rem; margin-top: 6px; min-height: 1.4em; }
.slug-status.ok { color: var(--success); }
.slug-status.ko { color: var(--danger); }

.color-field { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.color-field input[type=color] { width: 56px; height: 44px; padding: 2px; border: 1px solid #cfd4db; border-radius: 8px; background: var(--surface); cursor: pointer; }
.swatches { display: flex; gap: 6px; }
.form-row-postal { grid-template-columns: 1fr 2fr; }
@media (max-width: 600px) { .form-row-postal { grid-template-columns: 1fr; } }
.logo-field { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.logo-preview { width: 80px; height: 80px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; padding: 4px; background: #fff; }
.field input[type=file] { font: inherit; max-width: 100%; }
.field label.check { display: inline-flex; gap: 8px; align-items: center; font-weight: 400; margin-top: 8px; }
.swatches span { width: 28px; height: 28px; border-radius: 6px; border: 1px solid rgb(0 0 0 / 8%); }
.swatches span:nth-child(1) { background: var(--c); }
.swatches span:nth-child(2) { background: color-mix(in srgb, var(--c) 82%, #000); }
.swatches span:nth-child(3) { background: color-mix(in srgb, var(--c) 28%, #fff); }
.swatches span:nth-child(4) { background: color-mix(in srgb, var(--c) 10%, #fff); }

/* Messages */
.alert { padding: 14px 16px; border-radius: 8px; margin-bottom: 20px; border: 1px solid; }
.alert-error { background: var(--danger-soft); border-color: #fecdca; color: var(--danger); }
.alert-success { background: var(--success-soft); border-color: #abefc6; color: var(--success); }
.alert-warning { background: var(--warning-soft); border-color: #fedf89; color: var(--warning); }
.alert-info { background: var(--brand-soft); border-color: var(--brand-border); color: var(--ink); }

/* Vitrine */
.hero { padding: 64px 0 40px; }
.hero .lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 640px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--ink-soft); margin: 0; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { counter-increment: step; display: flex; gap: 12px; align-items: baseline; }
.steps li::before { content: counter(step); flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--brand-contrast); display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.section { margin-top: 48px; }

/* Supervision */
.inline-form { display: inline; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 82%, #000); color: #fff; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; min-width: 130px; }
.stat-value { display: block; font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.stat-label { color: var(--ink-muted); font-size: .9rem; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 14px; color: var(--ink-soft); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabs a.active { color: var(--ink); border-bottom-color: var(--brand); }
.tab-count { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 11px; background: var(--page); color: var(--ink-muted); font-size: .8rem; text-align: center; }
.table-card { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table th { font-size: .85rem; color: var(--ink-muted); font-weight: 600; background: var(--page); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .82rem; font-weight: 600; border: 1px solid; }
.badge-pending { background: var(--warning-soft); color: var(--warning); border-color: #fedf89; }
.badge-active { background: var(--success-soft); color: var(--success); border-color: #abefc6; }
.badge-suspended { background: var(--danger-soft); color: var(--danger); border-color: #fecdca; }
.page-head { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .badge { margin-right: 8px; }
.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-bottom: 20px; }
.grid-2 .card + .card { margin-top: 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
.facts dt { color: var(--ink-muted); }
.facts dd { margin: 0; }
.person + .person { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; }
.log { list-style: none; padding: 0; margin: 0; }
.log li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.log li:last-child { border-bottom: 0; }

.muted { color: var(--ink-muted); }
.small { font-size: .9rem; }
.center { text-align: center; }
.mt { margin-top: 20px; }

footer.site-footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--ink-muted); font-size: .9rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.color-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: -2px; border: 1px solid rgb(0 0 0 / 10%); }
.badge-muted { background: var(--page); color: var(--ink-muted); border-color: var(--line); }

/* Membres */
.page-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-title h1 { margin: 0; }
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.season-picker { display: flex; align-items: center; gap: 8px; }
.season-picker label { font-weight: 600; }
select, .search, .field input[type=tel], .field input[type=date] {
    padding: 10px 12px; font: inherit; color: var(--ink); background: var(--surface);
    border: 1px solid #cfd4db; border-radius: 8px; max-width: 100%;
}
.field select, .field input[type=tel], .field input[type=date] { width: 100%; }
.search { min-width: 240px; flex: 0 1 320px; }
select:focus-visible, .search:focus-visible, .field input:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: 1px; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.checks .check, .form-grid > .check { margin-top: 0; }
label.check { display: inline-flex; gap: 8px; align-items: center; font-weight: 400; cursor: pointer; }
.check-strong { font-weight: 600 !important; }
.label-like { font-weight: 600; font-size: 1rem; margin-bottom: 8px; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 600px) { .form-row-3 { grid-template-columns: 1fr; } }
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-weight: 400 !important; margin-bottom: 8px !important; }
.radio-card:has(input:checked) { border-color: var(--brand); background: var(--brand-softer); }
.radio-card input { margin-top: 4px; }
.radio-card > span { display: flex; flex-direction: column; }
.danger-zone { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
.btn-danger-ghost { color: var(--danger); border-color: #fecdca; }
.btn-danger-ghost:hover { background: var(--danger-soft); color: var(--danger); }
section.card h2 { margin-bottom: 4px; }
.table-caption { caption-side: top; text-align: left; padding: 14px 16px; font-weight: 600; }
.plain-steps { padding-left: 20px; margin: 0; display: grid; gap: 10px; }
.tight { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.page-title .actions-row { gap: 8px; }

/* Sorties */

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.btn-sm { padding: 6px 12px; font-size: .88rem; }
.card-pad { padding: 16px 20px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge-brand { background: var(--brand-soft); color: var(--brand-text); border-color: var(--brand-border); }
.month-title { font-size: 1rem; text-transform: none; color: var(--ink-muted); margin: 28px 0 10px; font-weight: 600; }
.outing-card { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center; padding: 14px 16px; margin-bottom: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.outing-card:hover { border-color: var(--brand-border); color: var(--ink); }
.outing-card.is-mine { border-left: 4px solid var(--brand); }
.outing-card.is-cancelled { opacity: .6; }
.outing-card.is-cancelled .outing-title { text-decoration: line-through; }
.outing-card.is-cancelled .badge { text-decoration: none; }
.outing-date { display: flex; flex-direction: column; align-items: center; background: var(--brand-soft); border-radius: 8px; padding: 6px 0; line-height: 1.1; }
.outing-dow { font-size: .75rem; color: var(--ink-muted); }
.outing-day { font-size: 1.5rem; font-weight: 700; color: var(--brand-text); }
.outing-time { font-size: .75rem; color: var(--ink-soft); }
.outing-title { font-weight: 600; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.outing-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; }
.outing-places { text-align: right; white-space: nowrap; }
@media (max-width: 560px) {
    .outing-card { grid-template-columns: 56px 1fr; }
    .outing-places { grid-column: 2; text-align: left; }
}
.tabs-compact { border: 0; margin: 0; }
.tabs-compact a { padding: 6px 10px; }
.outing-when { margin: 0; font-size: 1.1rem; color: var(--ink-soft); }
.outing-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.outing-layout .card + .card { margin-top: 20px; }
.outing-aside .card + .card { margin-top: 20px; }
@media (max-width: 860px) {
    /* Mobile : une seule colonne, blocs réordonnés (participer et inscrits d'abord). */
    .outing-layout { display: flex; flex-direction: column; align-items: stretch; gap: 20px; }
    .outing-layout section { min-width: 0; max-width: 100%; }
    .outing-main, .outing-aside { display: contents; }
    .outing-layout .card + .card, .outing-aside .card + .card { margin-top: 0; }
    .ord-1 { order: 1; } .ord-2 { order: 2; } .ord-3 { order: 3; } .ord-4 { order: 4; }
    .ord-5 { order: 5; } .ord-6 { order: 6; } .ord-7 { order: 7; } .ord-8 { order: 8; }
}
.outing-layout > * { min-width: 0; }
.outing-description { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.map-card { padding: 0; overflow: hidden; }
.map-card iframe { display: block; width: 100%; height: 240px; border: 0; }
.outing-map { height: 240px; z-index: 0; }
.outing-map .leaflet-control-attribution { font-size: 10px; }
.map-card > a { display: block; padding: 10px 16px; }
.my-signup.is-confirmed { border-left: 4px solid var(--success); }
.my-signup.is-waiting { border-left: 4px solid #f79009; }
.my-signup h2 { margin-bottom: 10px; }
.inline-join { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-join input { flex: 1 1 240px; padding: 10px 12px; font: inherit; border: 1px solid #cfd4db; border-radius: 8px; }
/* Inscrits d'une sortie : une ligne par plongeur (nom sur une ligne, niveau et suivi dessous, commentaire en entier). */
.roster-card { padding: 0; }
.roster-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.r-row { position: relative; display: grid; grid-template-columns: 22px auto minmax(0, 1fr) auto auto; column-gap: 10px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.r-row:last-child { border-bottom: 0; }
.r-row.is-waiting { background: #fffcf5; }
.r-row.is-me { background: var(--brand-softer); }
.r-num { color: var(--ink-muted); font-size: .8rem; text-align: right; font-variant-numeric: tabular-nums; }
.r-body { min-width: 0; }
.r-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 3px; font-size: .82rem; color: var(--ink-muted); }
.r-meta .badge { margin: 0; }
.r-prio { display: grid; place-items: center; min-width: 38px; padding: 2px 6px; border-radius: 8px; background: var(--brand-soft); border: 1px solid var(--brand-border); color: var(--brand-text); font-weight: 700; font-size: 1rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.r-prio small { font-size: .62rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-muted); }
.r-prio.is-forced { background: var(--warning-soft); border-color: #fedf89; color: var(--warning); }
.r-comment { grid-column: 3 / -1; margin: 8px 0 0; padding: 6px 10px; background: var(--page); border-radius: 8px; font-size: .88rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.r-sep { padding: 8px 16px; background: var(--warning-soft); color: var(--warning); font-weight: 600; font-size: .9rem; border-bottom: 1px solid var(--line); }
.roster-list .row-menu { position: static; }
.roster-list .row-menu-panel { right: 12px; top: calc(100% - 4px); width: min(300px, calc(100vw - 48px)); }
@media (max-width: 560px) {
    .r-row { grid-template-columns: auto minmax(0, 1fr) auto auto; column-gap: 8px; padding: 10px 12px; }
    .r-num { display: none; }
    .r-comment { grid-column: 2 / -1; }
}
.row-menu { position: relative; }
.row-menu summary { list-style: none; cursor: pointer; }
.row-menu summary::-webkit-details-marker { display: none; }
.row-menu-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; width: 280px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgb(16 24 40 / 14%); padding: 14px; display: grid; gap: 12px; white-space: normal; }
.row-menu-panel .field input, .row-menu-panel .field select { width: 100%; }
.row-menu-panel input[type=number], .row-menu-panel input[type=text] { padding: 8px 10px; font: inherit; border: 1px solid #cfd4db; border-radius: 8px; }
.add-participant { border-top: 1px solid var(--line); }
.add-participant summary { list-style: none; display: inline-flex; cursor: pointer; }
.add-participant summary::-webkit-details-marker { display: none; }
.comment { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.comment-body { flex: 1; min-width: 0; }
.comment-form { margin-top: 16px; }
.comment-form textarea { width: 100%; min-height: 80px; padding: 10px 12px; font: inherit; border: 1px solid #cfd4db; border-radius: 8px; resize: vertical; }
.segmented { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: inline-block; padding: 9px 14px; border: 1px solid #cfd4db; border-radius: 8px; font-weight: 500; }
.segmented input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-text); }
.segmented input:focus-visible + span { outline: 3px solid var(--brand-ring); }
.field input[type=time], .field input[type=number], .field input[type=url] { width: 100%; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid #cfd4db; border-radius: 8px; }

/* Avatars */
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; background: var(--brand-soft); }
.avatar-sm { width: 28px; height: 28px; }
.avatar-xl { width: 140px; height: 140px; font-size: 2.6rem; }
.avatar-initials { display: inline-grid; place-items: center; color: var(--brand-text); font-weight: 700; font-size: .85rem; }
.avatar-sm.avatar-initials { font-size: .72rem; }
.nav-profile { display: inline-flex !important; align-items: center; gap: 8px; }

/* Mes plongées */
.dive-list { display: grid; }
.dive-row { display: grid; grid-template-columns: 220px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.dive-row:last-child { border-bottom: 0; }
.dive-row:hover .dive-title strong { color: var(--brand-text); text-decoration: underline; }
.dive-date { color: var(--ink-soft); }
.dive-title { display: flex; flex-direction: column; gap: 2px; }
.dive-title .badge { align-self: flex-start; }
@media (max-width: 560px) { .dive-row { grid-template-columns: 1fr; gap: 2px; } }

/* Profil */
.photo-editor { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.photo-actions { flex: 1 1 260px; display: grid; gap: 12px; }
.photo-actions label.btn { cursor: pointer; font-weight: 600; }
.photo-buttons .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.photo-buttons .lbl-short { display: none; }
.photo-remove-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--danger); }
@media (max-width: 560px) {
    /* Téléphone : photo centrée, deux boutons côte à côte de même largeur, explication en dessous. */
    .photo-editor { flex-direction: column; align-items: stretch; gap: 16px; }
    .photo-current { align-self: center; }
    .photo-current .avatar-xl { width: 120px; height: 120px; }
    .photo-actions { flex: none; justify-items: stretch; text-align: center; }
    .photo-hint { order: 3; margin: 0; }
    .photo-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .photo-buttons .btn { padding-left: 8px; padding-right: 8px; white-space: nowrap; }
    .photo-buttons .lbl-long { display: none; }
    .photo-buttons .lbl-short { display: inline; }
    .photo-remove { justify-self: center; }
    .camera { justify-items: stretch; }
    .camera video, .camera canvas { max-width: none; }
}
.camera { margin-top: 20px; display: grid; gap: 12px; justify-items: start; }
.camera video, .camera canvas { width: 100%; max-width: 360px; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); background: #000; }
.camera video { transform: scaleX(-1); }

/* Documents, invitations, trombinoscope */
.doc-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.doc-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.doc-link { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-width: 0; }
.doc-link:hover strong { color: var(--brand-text); text-decoration: underline; }
.doc-link > span { display: flex; flex-direction: column; min-width: 0; }
.doc-link .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); flex: none; }
.doc-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 6px; background: var(--danger-soft); color: var(--danger); font-weight: 700; font-size: .8rem; flex: none; }
.doc-upload { padding-top: 12px; border-top: 1px solid var(--line); }
.doc-upload select, .doc-upload input[type=file] { width: 100%; }
.summary-title { font-weight: 700; font-size: 1.05rem; cursor: pointer; }
.plain-textarea { width: 100%; padding: 10px 12px; font: inherit; border: 1px solid #cfd4db; border-radius: 8px; resize: vertical; }
.account-box { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.checks-column { flex-direction: column; gap: 8px; }
.trombi-filters { margin-bottom: 20px; }
.trombi { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.trombi-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 12px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.trombi-photo { width: 110px; height: 110px; font-size: 2rem; margin-bottom: 8px; }
.trombi-card .badge { margin-top: 6px; }

.email-preview { padding: 0; overflow: hidden; }
.email-preview iframe { display: block; width: 100%; height: 640px; border: 0; background: #f6f7f9; }
.email-text { white-space: pre-wrap; font-size: .9rem; margin: 12px 0 0; }

/* Carte du formulaire de sortie */
.map-picker { display: grid; gap: 8px; }
.map-picker-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.map-picker-bar input { flex: 1 1 220px; padding: 8px 12px; font: inherit; border: 1px solid #cfd4db; border-radius: 8px; }
.map-picker-map { height: 340px; border-radius: var(--radius); border: 1px solid var(--line); z-index: 0; }
.map-picker .hint { margin: 0; }

/* Menu burger (mobile) */
.nav-toggle { display: none; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.nav-toggle-icon { display: inline-grid; gap: 4px; }
.nav-toggle-icon i { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 900px) {
    .topbar { position: sticky; top: 0; z-index: 50; }
    .topbar .container { position: relative; flex-wrap: nowrap; }
    .logo { min-width: 0; }
    .logo > :last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .nav-toggle { display: inline-flex; flex: none; }
    .nav-collapsible { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 16px 16px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgb(16 24 40 / 12%); }
    .nav-collapsible.is-open { display: flex; }
    .nav-collapsible a, .nav-collapsible button.link { padding: 13px 12px; font-size: 1.05rem; text-align: left; }
    .nav-collapsible form { display: block !important; }
    .nav-collapsible form button.link { width: 100%; }
    .nav-collapsible .who { padding: 8px 12px 0; }
}

/* Cartes des sorties (repris de l'ancienne interface) */
.o-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); margin-top: 8px; }
.o-card { position: relative; display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 1px 2px rgb(12 39 51 / 6%), 0 6px 18px rgb(12 39 51 / 6%); padding: 18px 16px 14px; overflow: hidden; }
.o-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: linear-gradient(90deg, var(--ev, var(--brand)), color-mix(in srgb, var(--ev, var(--brand)) 35%, #fff)); }
.o-card:hover { border-color: var(--brand-border); }
.o-card.is-mine { box-shadow: 0 0 0 2px var(--brand-border), 0 6px 18px rgb(12 39 51 / 6%); }
.o-card.is-cancelled { opacity: .65; }
.o-card.is-cancelled .o-title a { text-decoration: line-through; }
.o-top { display: grid; grid-template-columns: 82px 1fr auto; gap: 12px; align-items: start; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.o-date { display: flex; flex-direction: column; align-items: center; text-align: center; border: 1px solid var(--line); border-radius: 10px; background: var(--brand-softer); padding: 8px 4px; color: var(--ink); text-decoration: none; line-height: 1.15; }
.o-date:hover { color: var(--ink); border-color: var(--brand-border); }
.o-dow, .o-month, .o-year { font-size: .78rem; color: var(--ink-soft); }
.o-num { font-size: 1.9rem; font-weight: 700; color: var(--brand-text); line-height: 1.05; }
.o-hour { font-size: 1.05rem; font-weight: 700; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); width: 100%; }
.o-head { min-width: 0; }
.o-title { font-size: 1.25rem; line-height: 1.2; margin: 2px 0 4px; }
.o-title a { color: var(--ink); text-decoration: none; }
.o-title a:hover { color: var(--brand-text); }
.o-place { color: var(--ink-soft); font-size: .92rem; }
.o-meta { color: var(--ink-muted); font-size: .85rem; margin-top: 2px; }
.o-head .badges { margin-top: 6px; }
.o-price { font-weight: 700; font-size: 1.05rem; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; background: var(--surface); box-shadow: var(--shadow); white-space: nowrap; }
.o-count { font-size: .92rem; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.o-count b { color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.o-waiting-count { color: var(--warning); font-weight: 600; }
.o-bar { height: 8px; border-radius: 99px; background: var(--page); border: 1px solid var(--line); overflow: hidden; margin-top: -4px; }
.o-bar > i { display: block; height: 100%; border-radius: 99px; background: var(--success); }
.o-bar.near > i { background: #dc8a0e; }
.o-bar.full > i { background: var(--danger); }
.o-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.o-person { display: flex; flex-wrap: nowrap; align-items: center; gap: 5px; min-width: 0; padding: 5px 6px; border-radius: 6px; font-size: .93rem; }
.o-person:hover { background: var(--page); }
.o-person.is-me { background: var(--brand-soft); }
.o-person.is-waiting .o-name { color: var(--ink-soft); }
.o-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.o-person > :not(.o-name) { flex: none; white-space: nowrap; }
.o-level { font-size: .78rem; color: var(--ink-muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; }
.o-level-monitor { background: var(--brand); color: var(--brand-contrast); border-color: transparent; font-weight: 700; }
.o-tag { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; border-radius: 6px; padding: 1px 6px; background: var(--page); color: var(--ink-muted); border: 1px solid var(--line); }
.o-tag-monitor { background: var(--brand); color: var(--brand-contrast); border-color: transparent; }
.o-tag-alert { background: var(--danger); color: #fff; border-color: transparent; }
.o-wait-sep { padding: 8px 6px 2px; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--warning); }
.o-empty { color: var(--ink-muted); font-style: italic; font-size: .9rem; padding: 4px 6px; }
.o-people .is-collapsed { display: none; }
.o-more { align-self: flex-start; border: 1px solid var(--line); background: var(--surface); color: var(--brand-text); font: inherit; font-weight: 600; font-size: .88rem; border-radius: 10px; padding: 7px 12px; cursor: pointer; }
.o-more:hover { background: var(--page); }
.o-pilot { align-self: flex-start; background: var(--page); border: 1px solid var(--line); color: var(--ink-soft); font-size: .85rem; border-radius: 8px; padding: 4px 10px; }
.o-pilot b { color: var(--ink); }
.o-actions { display: flex; gap: 8px; flex-wrap: nowrap; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.o-actions .btn { flex: 1 1 auto; min-width: 0; }
/* Modifier et Dupliquer : icônes seules, pour garder les trois boutons sur une ligne. */
.o-actions .o-icon-btn { flex: 0 0 38px; padding-left: 0; padding-right: 0; display: inline-flex; align-items: center; justify-content: center; }
.medical-alert strong { display: block; margin-bottom: 2px; }
@media (max-width: 420px) {
    .o-top { grid-template-columns: 70px 1fr; }
    .o-price { grid-column: 1 / -1; justify-self: start; }
    .o-num { font-size: 1.6rem; }
}

.activity-card { margin-bottom: 20px; }
.stats-compact { margin: 8px 0 16px; }
.stats-compact .stat { flex: 1 1 140px; min-width: 0; padding: 12px 14px; }
.stats-compact .stat-value { font-size: 1.35rem; }

/* Page de connexion d'un club (accueil des visiteurs) */
.auth-box { max-width: 420px; margin: 16px auto 0; }
.auth-club { text-align: center; margin-bottom: 20px; }
.auth-club h1 { font-size: 1.6rem; margin: 10px 0 2px; }
.auth-club p { margin: 0; }
.auth-logo { width: 88px; height: 88px; object-fit: contain; border-radius: 16px; background: #fff; border: 1px solid var(--line); padding: 6px; }
.auth-logo-mark { display: inline-grid; place-items: center; background: var(--brand); color: var(--brand-contrast); font-size: 2.4rem; font-weight: 700; border: 0; }

/* Sous-menus (Gestion du club, Mon compte) */
.nav-menu { position: relative; }
.nav-menu-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 0; border-radius: 8px; background: none; color: var(--ink-soft); font: inherit; font-weight: 500; cursor: pointer; }
.nav-menu-btn:hover, .nav-menu-btn.active, .nav-menu-btn[aria-expanded="true"] { background: var(--brand-soft); color: var(--brand-text); }
.caret { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 5px solid currentColor; transition: transform .15s; }
.nav-menu-btn[aria-expanded="true"] .caret { transform: rotate(180deg); }
.nav-submenu { display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 230px; flex-direction: column; gap: 2px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgb(16 24 40 / 14%); }
.nav-menu.is-open .nav-submenu { display: flex; }
.nav-submenu a, .nav-submenu button.link { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 6px; color: var(--ink); text-decoration: none; font: inherit; }
.nav-submenu a:hover, .nav-submenu button.link:hover, .nav-submenu a.active { background: var(--brand-soft); color: var(--brand-text); }
.nav-submenu-title { display: none; }
.nav-logout { margin: 0; border-top: 1px solid var(--line); padding-top: 4px; }
@media (max-width: 900px) {
    /* Dans le menu burger : sous-menus ouverts, présentés comme des groupes titrés. */
    .nav-collapsible .nav-menu-btn { display: none; }
    .nav-collapsible .nav-submenu { display: flex; position: static; min-width: 0; padding: 0; border: 0; box-shadow: none; margin-top: 8px; border-top: 1px solid var(--line); border-radius: 0; }
    .nav-collapsible .nav-submenu-title { display: block; padding: 12px 12px 4px; font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-muted); }
    .nav-collapsible .nav-submenu a, .nav-collapsible .nav-submenu button.link { padding: 13px 12px; font-size: 1.05rem; }
    .nav-collapsible .nav-logout { border-top: 0; padding-top: 0; }
}

/* Agenda mensuel */
.cal-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-toolbar .btn-sm { min-width: 40px; font-size: 1.1rem; }
.cal-today-btn { font-size: .88rem !important; }
.cal-range { margin: 0 6px; font-size: 1.15rem; font-weight: 700; min-width: 220px; text-align: center; }
.cal-month-block { margin-bottom: 28px; }
.cal-month { margin: 0 0 10px; font-size: 1.3rem; display: flex; align-items: baseline; gap: 10px; }
.cal-month-count { font-weight: 400; }
.cal-legend { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-left: 8px; }
.type-dive { --ev: #1747c4; }
.type-club_event { --ev: #ec4a0a; }
.type-external_event { --ev: #8a2be2; }
.type-pool { --ev: #0891b2; }
.type-badge { background: color-mix(in srgb, var(--ev) 12%, #fff); color: color-mix(in srgb, var(--ev) 82%, #000); border-color: color-mix(in srgb, var(--ev) 35%, #fff); }
.cal-dot.type-dive, .cal-dot.type-club_event, .cal-dot.type-external_event, .cal-dot.type-pool { background: var(--ev); }
.cal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.cal-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--page); border-bottom: 1px solid var(--line); }
.cal-head > div { padding: 8px; font-size: .8rem; font-weight: 600; color: var(--ink-muted); text-align: center; }
.cal-dow-short { display: none; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-day { min-height: 116px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.is-other { background: var(--page); }
.cal-day.is-other .cal-num { color: #b6bcc5; }
/* Jours passés : fond gris, numéro estompé, sorties « éteintes » (couleur désaturée, texte grisé). */
.cal-day.is-past:not(.is-other) { background: #f3f4f6; }
.cal-day.is-past .cal-num { color: #9aa1ab; }
.cal-day.is-past .cal-event { filter: grayscale(1); opacity: .55; }
.cal-day.is-past .cal-event:hover { opacity: .85; }
.cal-num { align-self: flex-end; font-size: .85rem; font-weight: 600; color: var(--ink-soft); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; text-decoration: none; }
.cal-day.is-today .cal-num { background: var(--brand); color: var(--brand-contrast); }
.cal-event { display: grid; grid-template-columns: auto 1fr auto; gap: 4px; align-items: baseline; padding: 3px 6px; border-radius: 6px; font-size: .78rem; line-height: 1.25; text-decoration: none; color: var(--ink); background: color-mix(in srgb, var(--ev) 15%, #fff); border-left: 4px solid var(--ev); }
.cal-event:hover { background: color-mix(in srgb, var(--ev) 26%, #fff); color: var(--ink); }
.cal-event.is-mine { box-shadow: inset 0 0 0 1px var(--ev); font-weight: 600; }
.cal-event.is-cancelled .cal-title { text-decoration: line-through; }
.cal-event.is-cancelled { opacity: .55; }
.cal-time { font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.cal-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cal-count { font-size: .72rem; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.cal-list { margin-top: 14px; }
.cal-list-day { scroll-margin-top: 80px; margin-bottom: 14px; }
.cal-list-day h3 { font-size: .95rem; color: var(--ink-soft); margin: 0 0 6px; }
.cal-list-day.is-today h3 { color: var(--brand-text); }
.cal-list-item { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; margin-bottom: 6px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--ev); border-radius: 8px; color: var(--ink); text-decoration: none; }
.cal-list-item:hover { border-color: var(--brand-border); color: var(--ink); }
.cal-list-item.is-cancelled { opacity: .6; }
.cal-list-item.is-cancelled strong { text-decoration: line-through; }
.cal-list-day.is-past h3 { color: var(--ink-muted); }
.cal-list-day.is-past h3::after { content: " · passée"; font-weight: 400; font-size: .85rem; }
.cal-list-day.is-past .cal-list-item { background: #f3f4f6; filter: grayscale(1); opacity: .6; }
.cal-list-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-list-main { display: flex; flex-direction: column; min-width: 0; }
.cal-list-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
@media (max-width: 700px) {
    /* Téléphone : grille compacte (une pastille par sortie), détail dans la liste en dessous. */
    .cal-dow-long { display: none; }
    .cal-dow-short { display: inline; }
    .cal-head > div { padding: 6px 2px; }
    .cal-day { min-height: 54px; padding: 4px 2px; align-items: center; gap: 2px; flex-direction: row; flex-wrap: wrap; justify-content: center; align-content: flex-start; }
    .cal-num { align-self: center; width: 100%; height: 24px; border-radius: 6px; }
    .cal-day.is-today .cal-num { width: 26px; border-radius: 50%; }
    .cal-event { display: block; width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: var(--ev); }
    .cal-event.is-mine { box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--ev); }
    .cal-event > span { display: none; }
    .cal-legend { margin-left: 0; width: 100%; }
    .cal-range { min-width: 0; flex: 1; }
    .cal-list-item { grid-template-columns: 46px 1fr; }
    .cal-list-side { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; }
}

/* Choix du club (connexion depuis agendive.fr) */
.club-choice { display: grid; gap: 10px; margin-top: 16px; }
.club-choice .inline-form { display: block; }
.club-choice-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font: inherit; text-align: left; cursor: pointer; box-shadow: var(--shadow); }
.club-choice-item:hover { border-color: var(--brand-border); }
.club-choice-logo { width: 48px; height: 48px; border-radius: 10px; object-fit: contain; flex: none; font-size: 1.4rem; }
.club-choice-text { display: flex; flex-direction: column; }

.nav a.btn, .nav a.btn:hover { color: var(--brand-contrast); background: var(--brand); padding: 8px 14px; }
.nav a.btn:hover { background: var(--brand-hover); }
@media (max-width: 560px) { .topbar .nav a.btn { display: none; } }
/* Agenda (ordinateur) : heure et inscrits sur une ligne, titre sur deux lignes au plus. */
@media (min-width: 701px) {
    .cal-event { grid-template-columns: 1fr auto; grid-template-areas: "time count" "title title"; row-gap: 1px; padding: 4px 6px; }
    .cal-time { grid-area: time; font-size: .72rem; }
    .cal-count { grid-area: count; }
    .cal-title { grid-area: title; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
}

@media (max-width: 600px) { .container { padding: 0 16px; } }

/* Cartes de sortie étroites (3 ou 4 par ligne) : mise en page adaptée à la largeur de la carte. */
.o-card { container-type: inline-size; }
@container (max-width: 330px) {
    .o-top { grid-template-columns: 66px 1fr; gap: 10px; }
    .o-price { grid-column: 1 / -1; justify-self: start; padding: 4px 10px; font-size: .95rem; }
    .o-num { font-size: 1.6rem; }
    .o-dow, .o-month, .o-year { font-size: .72rem; }
    .o-hour { font-size: .95rem; }
    .o-title { font-size: 1.1rem; }
}

/* Certificat médical : pastille sur « Mon compte », lien dans le sous-menu, rappel sur la fiche d'une sortie */
.nav-alert-dot {
    display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
    background: var(--danger); color: #fff; font-size: .72rem; font-weight: 800; line-height: 1;
}
.nav-submenu a.nav-medical { font-weight: 600; border-radius: 8px; }
.nav-submenu a.nav-medical-missing, .nav-submenu a.nav-medical-expired { background: var(--danger-soft); color: var(--danger); }
.nav-submenu a.nav-medical-soon { background: var(--warning-soft); color: var(--warning); }
.medical-reminder {
    display: flex; gap: 12px; align-items: flex-start; margin: -2px 0 16px; padding: 12px 14px;
    background: var(--danger-soft); border: 1px solid #fecdca; border-left: 4px solid var(--danger);
    border-radius: 8px; color: var(--danger);
}
.medical-reminder strong { display: block; margin-bottom: 2px; }
.medical-reminder span { font-size: .92rem; }
.medical-reminder a, .medical-alert a { color: inherit; font-weight: 700; text-decoration: underline; }
.medical-reminder span a { display: inline-block; margin-top: 4px; }
/* Profil : sous-partie « Saison » de la fiche. */
.profile-subtitle { margin: 8px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 1rem; }
.medical-reminder-icon {
    flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
    background: var(--danger); color: #fff; font-weight: 800;
}
/* Agenda (ordinateur) : la grille suffit ; la liste détaillée ne sert que sur téléphone. */
@media (min-width: 701px) {
    .cal-list { display: none; }
    .cal-num { pointer-events: none; }
    .cal-day { min-height: 100px; }
}

/* Historique des sorties : années, filtre, liste compacte groupée par mois */
.hist-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.hist-years, .hist-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.hist-years a, .hist-filter a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: .9rem; font-variant-numeric: tabular-nums; }
.hist-years a:hover, .hist-filter a:hover { border-color: var(--brand-border); color: var(--ink); }
.hist-years a.active, .hist-filter a.active { background: var(--brand); border-color: var(--brand); color: var(--brand-contrast); }
.hist-month { margin-top: 22px; }
.hist-month h2 { font-size: 1.1rem; margin: 0 0 8px; }
.hist-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); gap: 8px; }
.hist-row { display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--ev); border-radius: 8px; color: var(--ink); text-decoration: none; min-width: 0; }
.hist-row:hover { border-color: var(--brand-border); border-left-color: var(--ev); color: var(--ink); }
.hist-row.is-cancelled { opacity: .6; }
.hist-row.is-cancelled strong { text-decoration: line-through; }
.hist-date { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.hist-dow, .hist-time { font-size: .72rem; color: var(--ink-muted); }
.hist-num { font-size: 1.35rem; font-weight: 800; color: var(--brand-text); }
.hist-main { display: flex; flex-direction: column; min-width: 0; }
.hist-main strong, .hist-main .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; white-space: nowrap; }
@media (max-width: 560px) {
    .hist-row { grid-template-columns: 46px 1fr; }
    .hist-side { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; }
    .hist-main strong, .hist-main .small { white-space: normal; }
}

/* Documents du club */
.lib-trail { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 4px; color: var(--ink-muted); }
.lib-folder-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.lib-folder-head h2 { margin: 0; font-size: 1.4rem; }
.lib-section { margin-top: 22px; }
.lib-section-title { font-size: 1.05rem; margin: 0 0 10px; color: var(--ink-soft); }
.lib-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(460px, 100%), 1fr)); gap: 8px; }
.lib-row { display: flex; align-items: stretch; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.lib-row:hover { border-color: var(--brand-border); }
.lib-link { flex: 1; display: flex; align-items: center; gap: 12px; padding: 10px 12px; color: var(--ink); text-decoration: none; min-width: 0; }
.lib-link:hover { color: var(--ink); }
.lib-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.lib-main strong { overflow-wrap: anywhere; }
.lib-desc { color: var(--ink-soft); margin-top: 2px; }
.lib-action { color: var(--brand-text); font-weight: 600; white-space: nowrap; }
.lib-edit { align-self: center; margin-right: 8px; }
.lib-lock { color: var(--warning); font-weight: 600; }
.lib-icon { flex: none; width: 42px; height: 48px; border-radius: 6px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 7px; overflow: hidden; font-size: .62rem; font-weight: 800; letter-spacing: .02em; color: #fff; background: var(--lib, #64748b); position: relative; }
.lib-icon::before { content: ""; position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 12px 12px 0; border-color: transparent var(--surface) color-mix(in srgb, var(--lib, #64748b) 60%, #000) transparent; }
.lib-pdf { --lib: #c0392b; }
.lib-image { --lib: #7c3aed; }
.lib-text { --lib: #2563eb; }
.lib-sheet { --lib: #15803d; }
.lib-slides { --lib: #c2410c; }
.lib-archive { --lib: #64748b; }
.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 10px; }
.folder-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); min-width: 0; }
.folder-card:hover { border-color: var(--brand-border); color: var(--ink); }
.folder-icon { flex: none; color: var(--brand); display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--brand-soft); }
.folder-text { display: flex; flex-direction: column; min-width: 0; }
.folder-text strong { overflow-wrap: anywhere; }
.folder-new { display: block; box-shadow: none; border-style: dashed; background: transparent; }
.folder-new summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; color: var(--brand-text); font-weight: 600; min-height: 42px; }
.folder-new summary::-webkit-details-marker { display: none; }
.folder-plus { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; font-size: 1.5rem; background: var(--brand-soft); }
.folder-new[open] { background: var(--surface); }
.folder-form { margin-top: 10px; gap: 10px; }
.lib-admin { margin-top: 32px; display: grid; gap: 14px; }
.lib-quota .up-bar { margin-top: 6px; max-width: 360px; }
.lib-edit-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 800px) { .lib-edit-layout { grid-template-columns: 1fr; } }

/* Envoi de fichiers : zone de dépôt, progression par fichier et globale */
.uploader { margin-bottom: 8px; }
.uploader.is-collapsed { display: none; }
.drop { display: flex; align-items: center; gap: 14px; padding: 22px; border: 2px dashed var(--brand-border); border-radius: var(--radius); background: var(--brand-softer); cursor: pointer; transition: background .15s, border-color .15s; }
.drop:hover, .drop.is-over { background: var(--brand-soft); border-color: var(--brand); }
.drop-icon { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
.drop-text { display: flex; flex-direction: column; gap: 2px; }
.uploader-options { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }
.up-summary { margin-top: 14px; }
.up-summary-text { font-weight: 600; margin-bottom: 6px; }
.up-bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.up-bar span { display: block; height: 100%; width: 0; background: var(--brand); border-radius: inherit; transition: width .2s; }
.up-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.up-item { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.up-item-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; min-width: 0; }
.up-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.up-status { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.up-item.is-done .up-status { color: var(--success); font-weight: 600; }
.up-item.is-done .up-bar span { background: var(--success); }
.up-item.is-error { border-color: #fecdca; background: var(--danger-soft); }
.up-item.is-error .up-status { color: var(--danger); white-space: normal; text-align: right; }
.up-item.is-error .up-bar { display: none; }
.up-done { margin-top: 12px; }
.spinner { width: 14px; height: 14px; border: 2px solid var(--brand-border); border-top-color: var(--brand); border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 560px) {
    .drop { padding: 16px; }
    .up-item-head { flex-wrap: wrap; }
    .up-name { flex-basis: 100%; }
    .lib-action { display: none; }
}
.folder-form input[type=text] { width: 100%; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid #cfd4db; border-radius: 8px; }
.folder-form input[type=text]:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: 1px; }

/* Site principal : accueil (à propos), pied de page, FAQ, documentation */
.hero-kicker { margin: 0 0 10px; font-weight: 700; color: var(--brand-text); letter-spacing: .02em; }
.about { display: flex; gap: 24px; align-items: flex-start; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 40px; }
.about-avatar { flex: none; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; font-size: 2.2rem; font-weight: 800; color: var(--brand-contrast); background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 55%, #0b1a2a)); }
.about-text h2 { margin-top: 0; }
.about-text p { color: var(--ink-soft); max-width: 760px; }
.about-name { padding: 10px 14px; border-left: 3px solid var(--brand); background: var(--brand-softer); border-radius: 0 8px 8px 0; color: var(--ink) !important; }
@media (max-width: 600px) { .about { flex-direction: column; padding: 20px; gap: 14px; } .about-avatar { width: 64px; height: 64px; font-size: 1.7rem; } }
.site-footer-inner { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; align-items: center; }
.site-footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer-links a { color: var(--ink-soft); }
@media (max-width: 760px) { .topbar .nav a.nav-secondary { display: none; } }

.page-intro { padding: 40px 0 8px; }
.page-intro h1 { margin-bottom: 8px; }
.page-intro .lead { font-size: 1.1rem; color: var(--ink-soft); max-width: 720px; }

.faq { display: grid; gap: 28px; margin: 16px 0 28px; max-width: 860px; }
.faq-group h2 { font-size: 1.2rem; margin: 0 0 10px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; }
.faq-item summary { cursor: pointer; list-style: none; padding: 14px 44px 14px 16px; font-weight: 600; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 1.3rem; font-weight: 400; color: var(--brand-text); }
.faq-item[open] summary::after { content: "–"; }
.faq-item[open] { border-color: var(--brand-border); }
.faq-answer { padding: 0 16px 14px; color: var(--ink-soft); }
.faq-answer p { margin: 0; }
.faq-more { max-width: 860px; margin-bottom: 40px; }

.guide-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: start; margin: 16px 0 48px; }
.guide-toc { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
.guide-toc summary { font-weight: 700; cursor: pointer; margin-bottom: 8px; }
.guide-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: toc; }
.guide-toc li { counter-increment: toc; }
.guide-toc a { display: block; padding: 5px 10px; border-radius: 6px; color: var(--ink-soft); text-decoration: none; font-size: .93rem; }
.guide-toc a::before { content: counter(toc) ". "; color: var(--ink-muted); }
.guide-toc a:hover { background: var(--brand-soft); color: var(--ink); }
.guide-body { max-width: 820px; }
.guide-body section { scroll-margin-top: 16px; padding-bottom: 26px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.guide-body section:last-child { border-bottom: 0; }
.guide-body h2 { margin: 0 0 8px; font-size: 1.4rem; }
.guide-body p, .guide-body li { color: var(--ink-soft); }
.guide-body strong { color: var(--ink); }
.guide-body ul, .guide-body ol { padding-left: 1.2em; }
.guide-body li { margin-bottom: 6px; }
.guide-who { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.guide-who span { font-size: .78rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; border: 1px solid; }
.guide-who-all { background: var(--success-soft); color: var(--success); border-color: #abefc6; }
.guide-who-organizer { background: var(--brand-soft); color: var(--brand-text); border-color: var(--brand-border); }
.guide-who-admin { background: var(--warning-soft); color: var(--warning); border-color: #fedf89; }
.guide-table { width: 100%; border-collapse: collapse; margin: 6px 0 12px; font-size: .95rem; }
.guide-table th, .guide-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.guide-table thead th { background: var(--page); font-size: .85rem; color: var(--ink-muted); }
.guide-table tbody th { white-space: nowrap; color: var(--ink); }
.guide-table td { color: var(--ink-soft); }
.guide-cols { padding: 10px 14px; background: var(--page); border: 1px solid var(--line); border-radius: 8px; font-size: .92rem; }
.guide-types { list-style: none; padding-left: 0 !important; }
.guide-types .cal-dot { margin-left: 0; margin-right: 6px; }
@media (max-width: 900px) {
    .guide-layout { grid-template-columns: 1fr; gap: 12px; }
    .guide-toc { position: static; max-height: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
    .guide-toc summary { margin-bottom: 0; }
    .guide-toc details[open] summary { margin-bottom: 8px; }
    .guide-table tbody th { white-space: normal; }
}
.features > .card { margin: 0; }

/* Application du club : carte d'installation, bouton du menu, explication iPhone */
.install-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 20px; background: var(--surface); border: 1px solid var(--brand-border); border-radius: var(--radius); box-shadow: var(--shadow); position: relative; }
.install-card[hidden] { display: none; }
.install-card-icon { flex: none; width: 52px; height: 52px; border-radius: 12px; box-shadow: 0 1px 3px rgb(0 0 0 / 15%); }
.install-card-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.install-card-close { position: absolute; top: 4px; right: 6px; border: 0; background: none; font-size: 1.3rem; line-height: 1; color: var(--ink-muted); cursor: pointer; padding: 4px 6px; }
.install-card .btn { margin-right: 18px; }
.nav-submenu .nav-install { color: var(--brand-text); font-weight: 600; }
.nav-submenu .nav-install[hidden] { display: none; }
.install-dialog { max-width: 380px; width: calc(100% - 32px); border: 0; border-radius: 16px; padding: 22px; box-shadow: 0 20px 50px rgb(0 0 0 / 25%); }
.install-dialog::backdrop { background: rgb(15 23 42 / 45%); }
.install-dialog h2 { margin: 0 0 10px; font-size: 1.25rem; }
.install-dialog ol { padding-left: 1.2em; }
.install-dialog li { margin-bottom: 8px; }
.install-share { vertical-align: -4px; color: #0a84ff; }

/* Téléphone : en-tête compact fixe en haut, barre de navigation en bas, menu en panneau montant */
.bottom-nav { display: none; }
@media (max-width: 900px) {
    .topbar.has-bottom-nav .container { min-height: 54px; }
    .topbar.has-bottom-nav .nav-toggle { display: none; }
    .topbar.has-bottom-nav .logo-img, .topbar.has-bottom-nav .logo-mark { width: 30px; height: 30px; }
    .topbar.has-bottom-nav .nav-collapsible .nav-primary { display: none; }
    .topbar.has-bottom-nav .nav-collapsible {
        position: fixed; top: auto; left: 0; right: 0; bottom: calc(62px + env(safe-area-inset-bottom));
        max-height: calc(100vh - 140px); overflow-y: auto; overscroll-behavior: contain;
        border: 1px solid var(--line); border-bottom: 0; border-radius: 18px 18px 0 0;
        padding: 6px 16px 12px; box-shadow: 0 -12px 32px rgb(16 24 40 / 18%); z-index: 60;
    }
    .topbar.has-bottom-nav .nav-collapsible .nav-submenu { margin-top: 4px; }
    body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgb(15 23 42 / 30%); z-index: 40; }

    .bottom-nav {
        display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
        height: calc(62px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
        background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
        border-top: 1px solid var(--line); box-shadow: 0 -2px 10px rgb(16 24 40 / 6%);
    }
    .bottom-nav a, .bottom-nav button {
        position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
        padding: 6px 2px 4px; border: 0; background: none; font: inherit; font-size: .7rem; font-weight: 600;
        color: var(--ink-muted); text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
    }
    .bottom-nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .bottom-nav .active, .bottom-nav button[aria-expanded="true"] { color: var(--brand-text); }
    .bottom-nav .active::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); }
    .bottom-nav .active svg { stroke-width: 2.2; }
    .bottom-dot { position: absolute; top: 4px; left: calc(50% + 6px); width: 16px; height: 16px; font-size: .65rem; }
    body:has(.bottom-nav) { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
}

/* Photos des membres : rubrique, grille, visionneuse et repères */
.ph-publish { display: grid; gap: 8px; margin-bottom: 22px; }
.ph-publish-row { display: flex; gap: 10px; }
.ph-publish-row select { flex: 1; min-width: 0; }
.ph-outing { margin-bottom: 22px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--ev, var(--brand)); border-radius: var(--radius); box-shadow: var(--shadow); }
.ph-outing-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; margin-bottom: 10px; }
.ph-outing-head > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.ph-outing-head:hover strong { color: var(--brand-text); }
.ph-outing-count { flex: none; color: var(--brand-text); font-weight: 600; }
.ph-strip { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.ph-strip-item { position: relative; display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--page); }
.ph-strip-item img, .ph-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.ph-strip-item:hover img, .ph-thumb:hover img { transform: scale(1.04); }
.ph-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgb(15 23 42 / 55%); color: #fff; font-weight: 800; font-size: 1.2rem; }
@media (max-width: 700px) { .ph-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } .ph-strip-item:nth-child(n+5) { display: none; } }
.ph-pages { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 10px 0 30px; }
.ph-section-title { font-size: 1.1rem; margin: 22px 0 10px; color: var(--ink-soft); }
.ph-uploader { margin-bottom: 8px; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 30px; }
@media (max-width: 500px) { .ph-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; } }
.ph-thumb { position: relative; display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--page); }
.ph-thumb-label { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px; font-size: .72rem; font-weight: 600; color: #fff; background: linear-gradient(transparent, rgb(0 0 0 / 65%)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

body.pv-open { overflow: hidden; }
.pv { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; background: #0b0f14; color: #e6e9ee; }
.pv[hidden] { display: none; }
.pv-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top)); }
.pv-count { font-size: .9rem; color: #9aa4b2; font-variant-numeric: tabular-nums; }
.pv-tools { display: flex; gap: 6px; }
.pv-btn { border: 1px solid rgb(255 255 255 / 18%); background: rgb(255 255 255 / 8%); color: #fff; font: inherit; font-size: .85rem; font-weight: 600; padding: 7px 12px; border-radius: 999px; cursor: pointer; }
.pv-btn[aria-pressed="false"] { opacity: .55; }
.pv-close { font-size: 1.3rem; line-height: 1; padding: 4px 12px; }
.pv.is-annotating [data-pv="annotate"] { background: var(--brand); border-color: var(--brand); }
.pv-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.pv-frame { position: relative; max-width: 100%; max-height: 100%; }
.pv-img { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.pv.is-annotating .pv-frame { cursor: crosshair; outline: 2px dashed rgb(255 255 255 / 60%); outline-offset: 3px; }
.pv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 64px; border: 0; border-radius: 10px; background: rgb(255 255 255 / 8%); color: #fff; font-size: 2rem; cursor: pointer; }
.pv-prev { left: 8px; } .pv-next { right: 8px; }
@media (max-width: 700px) { .pv-nav { display: none; } }
.pv-hint { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); padding: 8px 14px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.pv-tags { position: absolute; inset: 0; pointer-events: none; }
.pv-tag { position: absolute; display: flex; align-items: center; gap: 6px; transform: translate(-7px, -7px); pointer-events: auto; }
.pv-tag.is-left { flex-direction: row-reverse; transform: translate(calc(-100% + 7px), -7px); }
.pv-tag-dot { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); box-shadow: 0 0 0 2px rgb(0 0 0 / 35%); flex: none; }
.pv-tag-label { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: rgb(11 15 20 / 82%); color: #fff; font-size: .8rem; font-weight: 600; white-space: nowrap; box-shadow: 0 2px 6px rgb(0 0 0 / 30%); }
.pv-tag-del { border: 0; background: none; color: #ff9b9b; font-size: 1rem; line-height: 1; padding: 0 0 0 2px; cursor: pointer; }
.pv-tag.is-pending .pv-tag-dot { border-color: #ffb020; animation: pv-pulse 1s ease-in-out infinite; }
@keyframes pv-pulse { 50% { transform: scale(1.35); } }
.pv-bar { padding: 10px 14px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); background: #121821; border-top: 1px solid rgb(255 255 255 / 8%); display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 6px 16px; }
.pv-info { min-width: 0; flex: 1 1 260px; }
.pv-caption { margin: 0 0 2px; font-weight: 600; color: #fff; }
.pv-meta { margin: 0; font-size: .82rem; color: #9aa4b2; }
.pv-meta a { color: #9cc3ff; }
.pv-actions { display: flex; gap: 14px; }
.pv-link { border: 0; background: none; color: #9cc3ff; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; padding: 2px 0; }
.pv-danger { color: #ff9b9b; }
.pv-form { display: flex; gap: 8px; width: 100%; }
.pv-form[hidden] { display: none; }
.pv-form input { flex: 1; min-width: 0; padding: 9px 12px; font: inherit; border: 0; border-radius: 8px; }
.pv-form .btn-ghost { color: #fff; border-color: rgb(255 255 255 / 30%); background: transparent; }
.ph-strip-card { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 700px) { .ph-strip-card { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ph-strip-card .ph-strip-item:nth-child(n+5) { display: block; } }
/* Ordinateur à écran étroit : menu resserré sur une ligne, « Mon compte » réduit à l'avatar. */
@media (min-width: 901px) and (max-width: 1180px) {
    .topbar .nav-collapsible { gap: 0; }
    .topbar .nav-collapsible > a, .topbar .nav-collapsible .nav-menu-btn { padding-left: 9px; padding-right: 9px; }
    .topbar .nav-account .nav-menu-btn > span:not([class]) { display: none; }
}
.photo-cta { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; padding: 12px 16px; border-radius: var(--radius); background: var(--brand-soft); border: 1px solid var(--brand-border); color: var(--ink); text-decoration: none; }
.photo-cta:hover { border-color: var(--brand); color: var(--ink); }
.photo-cta-icon { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-contrast); }
.photo-cta-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.photo-cta-text strong { color: var(--brand-text); }
.photo-cta-text .small { color: var(--ink-soft); }
.photo-cta-arrow { font-size: 1.6rem; color: var(--brand-text); line-height: 1; }
/* « Publier des photos » : le menu des sorties ne doit jamais élargir la page (titres longs). */
.ph-publish { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.ph-publish-row { min-width: 0; }
.ph-publish-row select { width: 100%; max-width: 100%; min-width: 0; text-overflow: ellipsis; }
@media (max-width: 500px) { .ph-publish-row { flex-direction: column; } .ph-publish-row .btn { width: 100%; } }
.ph-publish .ph-publish-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin-bottom: 12px; }
.ph-publish-label { font-size: .95rem; }
.ph-add-link { display: inline-block; margin-top: 10px; font-weight: 600; color: var(--brand-text); text-decoration: none; }
.ph-add-link:hover { text-decoration: underline; }
/* Paramètres du club : rubriques et options (titre puis description sous la case) */
fieldset { min-width: 0; }
.module-check { display: flex; align-items: flex-start; gap: 10px; }
.module-check input { margin-top: 4px; flex: none; }
.module-check > span { display: flex; flex-direction: column; min-width: 0; }
.module-check > span .small { margin-top: 1px; line-height: 1.4; }
.module-checks { gap: 12px; }

/* Fiche de sécurité : palanquées */
.sf-status { font-weight: 600; }
.sf-status.sf-saved { color: var(--success); }
.sf-status.sf-error { color: var(--danger); }
.sf-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 20px; margin: 0 0 14px; padding: 14px 18px; }
.sf-info dt { font-size: .78rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.sf-info dd { margin: 2px 0 0; font-weight: 600; }
.sf-missing { color: var(--danger); }
.sf-alert-list ul { margin: 0; padding-left: 1.1em; }
.sf-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 20px; }
@media (max-width: 900px) { .sf-layout { grid-template-columns: 1fr; } }
.sf-pool { position: sticky; top: 16px; padding: 16px; }
@media (max-width: 900px) { .sf-pool { position: static; } }
.sf-pool-head h2, .sf-teams-head h2 { font-size: 1.1rem; margin: 0; }
.sf-pool-head p { margin: 4px 0 10px; }
.sf-pool-list { list-style: none; margin: 0; padding: 6px; display: flex; flex-wrap: wrap; gap: 6px; min-height: 48px; border-radius: 10px; }
.sf-pool-list.is-over, .sf-team.is-over { outline: 2px dashed var(--brand); outline-offset: 2px; }
.sf-chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; user-select: none; font-size: .9rem; max-width: 100%; }
.sf-chip:hover { border-color: var(--brand-border); }
.sf-chip.is-selected, .sf-member.is-selected { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); background: var(--brand-soft); }
.sf-chip.is-waiting { cursor: default; opacity: .65; }
.sf-chip.is-dragging, .sf-member.is-dragging { opacity: .4; }
.sf-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-tag { font-size: .68rem; font-weight: 700; text-transform: uppercase; padding: 0 5px; border-radius: 5px; background: var(--page); border: 1px solid var(--line); color: var(--ink-muted); }
.sf-empty, .sf-drop-hint { list-style: none; color: var(--ink-muted); font-size: .88rem; padding: 6px; }
.sf-drop-hint { border: 1px dashed var(--line); border-radius: 8px; text-align: center; padding: 14px 6px; }
.sf-waiting-box { margin-top: 12px; }
.sf-waiting-box summary { cursor: pointer; color: var(--ink-soft); }
.sf-teams-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.sf-team-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 14px; }
.sf-team { padding: 14px; margin: 0 !important; border-top: 4px solid var(--brand); }
.sf-team.is-warning { border-top-color: #f59e0b; }
.sf-team-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sf-team-head h3 { margin: 0; font-size: 1.15rem; }
.sf-team-size { font-size: .82rem; color: var(--ink-muted); font-variant-numeric: tabular-nums; margin-right: auto; }
.sf-team-size.is-full { color: var(--warning); font-weight: 700; }
.sf-icon-btn { border: 0; background: none; color: var(--ink-muted); font-size: 1.2rem; line-height: 1; padding: 4px 6px; cursor: pointer; border-radius: 6px; flex: none; }
.sf-icon-btn:hover { background: var(--danger-soft); color: var(--danger); }
.sf-members { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; }
.sf-member { display: flex; align-items: center; gap: 6px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); min-width: 0; }
.sf-member .sf-name { cursor: pointer; flex: 0 1 auto; }
.sf-member .o-level { flex: none; }
.sf-guide { flex: none; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: #c4c9d1; font-size: .95rem; cursor: pointer; line-height: 1; }
.sf-guide.is-on { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.sf-apt { margin-left: auto; width: 92px; flex: none; padding: 4px 6px; font: inherit; font-size: .82rem; border: 1px solid #cfd4db; border-radius: 6px; background: var(--surface); }
.sf-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
.sf-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sf-field-label { font-size: .74rem; font-weight: 600; color: var(--ink-muted); }
.sf-field input, .sf-field select { width: 100%; padding: 7px 9px; font: inherit; font-size: .9rem; border: 1px solid #cfd4db; border-radius: 7px; background: var(--surface); min-width: 0; }
.sf-after { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.sf-after summary { cursor: pointer; color: var(--ink-soft); margin-bottom: 8px; }
.sf-no-team p { margin: 0; }
.sf-pdf-note { margin-bottom: 40px; }
.sf-info dd select, .sf-info dd .sf-site { width: 100%; max-width: 100%; padding: 7px 9px; font: inherit; font-weight: 600; border: 1px solid #cfd4db; border-radius: 7px; background: var(--surface); }
.sf-info dt label { cursor: pointer; }
.sf-title-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sf-depth-hint { display: block; font-size: .74rem; line-height: 1.3; color: var(--ink-muted); margin-top: 2px; }
.sf-depth-hint.is-alert { color: var(--danger); font-weight: 600; }
.sf-team-alerts { list-style: none; margin: 0 0 10px; padding: 8px 10px 8px 30px; background: var(--warning-soft); border: 1px solid #fedf89; border-radius: 8px; color: var(--warning); font-size: .84rem; line-height: 1.35; position: relative; }
.sf-team-alerts[hidden] { display: none; }
.sf-team-alerts::before { content: "!"; position: absolute; left: 9px; top: 8px; width: 15px; height: 15px; border-radius: 50%; background: #f59e0b; color: #fff; font-size: .7rem; font-weight: 800; display: grid; place-items: center; }
.sf-team-alerts li + li { margin-top: 3px; }
/* Palanquée : 5 places toujours visibles (paramètres alignés d'un bloc à l'autre) */
.sf-member, .sf-slot { height: 42px; box-sizing: border-box; }
.sf-slot { display: flex; align-items: center; justify-content: center; border: 1px dashed var(--line); border-radius: 8px; color: #b6bcc5; font-size: .82rem; }
.sf-team.is-over .sf-slot, .sf-slot:hover { border-color: var(--brand-border); color: var(--brand-text); background: var(--brand-softer); }
.sf-team-alerts { margin: 10px 0 0; }
.o-level-e1 { color: var(--brand-text); border-color: var(--brand-border); background: var(--brand-softer); font-weight: 700; }
/* Formulaire de sortie : lieux habituels sous la carte */
.usual-places { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 4px; }
.usual-places-label { margin-right: 2px; }
.usual-place { border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: .88rem; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.usual-place:hover { border-color: var(--brand-border); background: var(--brand-softer); }
.usual-place.is-on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-text); font-weight: 600; }
.usual-place-pin { font-size: .78rem; }
/* Un élément masqué (attribut hidden) l'est toujours, même s'il a un style d'affichage (boutons…). */
[hidden] { display: none !important; }

/* Mon compte › Notifications */
.notif-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 16px; align-items: start; margin-bottom: 30px; }
.notif-layout .card { margin: 0; }
.notif-layout h2 { font-size: 1.15rem; margin-top: 0; }
.notif-state { margin: 0 0 14px; color: var(--ink-soft); }
.notif-state.is-on { color: var(--success); font-weight: 600; }
.notif-state.is-off { color: var(--danger); }
.notif-ios { margin: 12px 0 0; }
.notif-devices { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.notif-devices li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.notif-devices li > span { display: flex; flex-direction: column; min-width: 0; }
.dive-year { font-size: 1rem; margin: 18px 0 8px; color: var(--ink-soft); }
.dive-year:first-of-type { margin-top: 4px; }
.dive-events summary { list-style-position: inside; }

/* Actions d'une sortie : icône + libellé ; sur téléphone, une seule ligne (libellés courts, icônes seules pour Dupliquer et Historique). */
.outing-actions .btn { display: inline-flex; align-items: center; gap: 6px; }
.outing-actions .act-icon { flex: none; }
.outing-actions .lbl-short { display: none; }
@media (max-width: 560px) {
    .outing-actions { flex-wrap: nowrap; gap: 8px; width: 100%; }
    .outing-actions .btn { flex: 1 1 auto; min-width: 0; justify-content: center; padding-left: 10px; padding-right: 10px; white-space: nowrap; }
    .outing-actions .lbl-long, .outing-actions .act-label { display: none; }
    .outing-actions .lbl-short { display: inline; }
    .outing-actions .act-compact { flex: 0 0 44px; padding-left: 0; padding-right: 0; }
}
@media (max-width: 360px) {
    .outing-actions .act-edit span { display: none; }
    .outing-actions .act-edit { flex: 0 0 44px; padding-left: 0; padding-right: 0; }
}

/* Priorité d'un membre (Mes plongées, fiche membre) */
.priority-box { padding: 12px 16px; margin-bottom: 20px; }
.priority-head { display: flex; gap: 12px; align-items: center; list-style: none; cursor: pointer; }
.priority-head::-webkit-details-marker { display: none; }
.priority-summary { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.priority-value { min-width: 46px; padding: 4px 6px; font-size: 1.25rem; }
.priority-toggle { flex: none; }
.priority-box .when-open, .priority-box[open] .when-closed { display: none; }
.priority-box[open] .when-open { display: inline; }
.priority-body { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.priority-calc { margin: 0 0 6px; font-size: 1.02rem; }
.priority-dives { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; }
@media (max-width: 560px) { .priority-toggle .when-closed, .priority-toggle .when-open { font-size: .85rem; } .priority-box .priority-toggle { padding-left: 8px; padding-right: 8px; } }

/* Liste des membres : tableau sur ordinateur, cartes sur téléphone (toute la carte ouvre la fiche). */
.members-table .m-level-short { display: none; }
@media (max-width: 700px) {
    .members-card { background: transparent; border: 0; box-shadow: none; overflow: visible; }
    .members-table, .members-table tbody { display: block; }
    .members-table thead { display: none; }
    .members-table tr { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 12px 14px; margin-bottom: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
    .members-table tr[hidden] { display: none; }
    .members-table td { display: block; padding: 0; border: 0; }
    .members-table .m-name { flex: 1 1 calc(100% - 110px); min-width: 0; }
    .members-table .m-name a { color: var(--ink); text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .members-table .m-name a::after { content: ""; position: absolute; inset: 0; }
    .members-table .m-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .members-table .m-level { flex: none; display: flex; gap: 4px; align-items: center; }
    .members-table .m-level-long { display: none; }
    .members-table .m-level-short { display: inline-block; font-size: .85rem; padding: 1px 7px; }
    .members-table .m-licence { order: 5; font-size: .82rem; color: var(--ink-muted); }
    .members-table .m-role { order: 6; color: var(--ink-muted); }
    .members-table .m-role.is-member { display: none; }
}
@media (max-width: 560px) {
    .members-actions { width: 100%; flex-wrap: nowrap; }
    .members-actions .btn { flex: 1 1 0; justify-content: center; text-align: center; padding-left: 10px; padding-right: 10px; }
    .toolbar .search { width: 100%; flex: 1 1 100%; }
}
.camera-error { margin: 16px 0 0; }
/* Prix plongeur encadré, sous le prix de base (option du club). */
.o-price small { display: block; font-size: .72rem; font-weight: 600; color: var(--ink-muted); text-align: center; }
.o-price:has(small) { border-radius: 12px; text-align: center; }

/* Trombinoscope : coordonnées d'un membre dans un panneau. */
.trombi-card[role=button] { cursor: pointer; }
.trombi-card[role=button]:hover, .trombi-card[role=button]:focus-visible { border-color: var(--brand-border); box-shadow: 0 0 0 3px var(--brand-ring); outline: none; }
.contact-dialog { width: min(360px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 14px; box-shadow: 0 20px 50px rgb(16 24 40 / 25%); color: var(--ink); }
.contact-dialog::backdrop { background: rgb(16 24 40 / 45%); }
.cd-head { display: flex; align-items: center; gap: 14px; padding: 18px 18px 14px; }
.cd-photo .avatar { width: 64px; height: 64px; font-size: 1.3rem; }
.cd-id { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.cd-id strong { font-size: 1.15rem; }
.cd-close { align-self: flex-start; border: 0; background: none; font-size: 1.6rem; line-height: 1; color: var(--ink-muted); cursor: pointer; padding: 0 4px; }
.cd-row { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; overflow-wrap: anywhere; }
.cd-row svg { flex: none; color: var(--brand-text); }
.cd-row:hover { background: var(--brand-softer); color: var(--brand-text); }
.cd-none { margin: 0; padding: 14px 18px; border-top: 1px solid var(--line); }
.cd-close:focus:not(:focus-visible) { outline: none; }

/* Bureau et CA */
.checks-row { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.trombi-position { margin-top: 4px; font-size: .78rem; font-weight: 700; color: var(--brand-text); background: var(--brand-soft); border-radius: 999px; padding: 2px 10px; }
.cd-position { font-size: .85rem; font-weight: 700; color: var(--brand-text); }
/* Bureau et CA mis en avant ; rôle en version courte. */
.trombi-card.is-board { border: 2px solid var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.trombi-role { font-size: .72rem; padding: 2px 8px; margin-top: 4px; }
/* Caméra du profil : une ligne (action principale + icônes Reprendre et Fermer). */
.camera-actions { flex-wrap: nowrap; width: 100%; max-width: 360px; }
.camera-actions .btn { flex: 1 1 auto; min-width: 0; white-space: nowrap; }
.camera-actions .camera-icon { flex: 0 0 44px; padding-left: 0; padding-right: 0; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 560px) { .camera-actions { max-width: none; } }

/* Navigateurs sans color-mix() (iOS < 16.2) : couleurs de repli pour les teintes calculées à partir d'une variable. */
@supports not (color: color-mix(in srgb, red 50%, blue)) {
    .type-badge { background: #f4f6f8; color: var(--ev); border-color: var(--line); }
    .cal-event { background: #f4f6f8; }
    .cal-event:hover { background: #e9edf2; }
    .btn-danger:hover { background: #912018; }
}
.photo-status { margin: 12px 0 0; font-weight: 600; color: var(--brand-text); }
.photo-status.is-error { color: var(--danger); }
/* Bouton icône (corbeille…) */
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none; padding: 0; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--ink-muted); cursor: pointer; }
.icon-btn:hover, .icon-btn:focus-visible { background: var(--page); border-color: var(--line); }
.icon-btn-danger:hover, .icon-btn-danger:focus-visible { color: var(--danger); background: var(--danger-soft); border-color: #fecdca; }
/* Formation en cours : « › N2 » à côté du niveau, discret. */
.o-training { border-style: dashed; color: var(--brand-text); background: transparent; white-space: nowrap; }
