:root {
    --felt-green: #0b3d2e;
    --felt-green-dark: #082a20;
    --felt-green-light: #12513d;
    --gold: #d4af37;
    --gold-light: #f2d879;
    --card-red: #b3312c;
    --ink: #1c1f1e;
    --paper: #f7f5f0;
    --paper-alt: #ece7db;
    --muted: #6b6f6d;

    /* Couleurs réglables dans Administration > Visuels (App\Services\Visuals, même ordre). */
    --surface: #ffffff;
    --on-dark: #ffffff;
    --c-field-border: #d5d0c2;
    --c-row-line: #eeeeee;
    --c-frame-border: #e2dccd;
    --c-card-border: #ddd6c6;
    --c-grey-border: #cccccc;
    --c-grey-bg: #fafafa;
    --c-preview-bg: #f4f1ea;
    --c-grip: #999999;
    --c-editor-text: #222222;
    --c-success: #1e6b3a;
    --c-success-bg: #e2f3e6;
    --c-success-border: #bfe4c9;
    --c-success-soft: #f3faf5;
    --c-danger: #b3261e;
    --c-danger-bg: #fbe6e5;
    --c-danger-border: #f3c3c1;
    --c-danger-soft: #fdf3f2;
    --c-warning: #c98a12;
    --c-warning-text: #8a6416;
    --c-warning-bg: #fff3cd;
    --c-warning-soft: #fffaf0;
    --c-note-text: #6b5313;
    --c-note-bg: #fdf6e3;
    --c-note-border: #ecd9a2;
    --c-info: #24527a;
    --c-info-bg: #e5eef8;
    --c-cal-border: #d5d5d3;
    --c-cal-outside: #efefed;
    --c-cal-outside-text: #b5b7b6;
    --c-search-border: #b9bcbb;
    --c-deep: #10231d;
    --c-deep-text: #f7faf9;
    --c-doc-changelog: #f5f8f6;
    --c-doc-toc: #dde3df;
    --c-doc-inline-code: #eef2ef;
    --c-doc-quote: #fdf9ec;
    --c-np-ink: #1d1b17;
    --c-np-paper: #fbf8f0;
    --c-np-border: #ddd3bd;
    --c-np-muted: #6b6456;
    --c-np-rule: #b9ad92;
    --c-pcard-bg: #fffdf8;
    --c-pcard-border: #e3dccb;
    --c-suit-diamond: #1f5fa8;
    --c-suit-club: #1e7a3c;
    --c-ticker-red: #ff8a84;
    --c-preview-check-1: #efeadf;
    --c-preview-check-2: #f5f1e8;
    --c-device-shell: #111111;
    --c-device-shadow: #333333;
    --radius: 10px;
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.55;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--felt-green);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3 {
    font-family: Georgia, "Times New Roman", serif;
    color: var(--felt-green-dark);
    line-height: 1.2;
}

/* Header */
.site-header {
    background: linear-gradient(135deg, var(--felt-green-dark), var(--felt-green));
    box-shadow: var(--shadow);
}

.top-bar {
    background: var(--felt-green-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.82rem;
}

.top-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 8px 20px;
    flex-wrap: wrap;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.top-bar-social {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.top-bar-social a {
    display: flex;
    color: rgba(255, 255, 255, 0.75);
}

.top-bar-social a:hover {
    color: var(--gold-light);
}

.top-bar-search {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 3px 4px 3px 14px;
    width: 220px;
    min-width: 0;
}

.top-bar-search input {
    background: none;
    border: none;
    color: var(--paper);
    font-size: 0.85rem;
    flex: 1;
    min-width: 0;
    padding: 3px 0;
}

.top-bar-search input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.top-bar-search input:focus {
    outline: none;
}

.top-bar-search button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    display: flex;
    padding: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.top-bar-search button:hover {
    color: var(--gold-light);
}

.top-bar-auth {
    display: flex;
    align-items: center;
    gap: 18px;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.85);
}

.top-bar-auth a {
    color: inherit;
}

.top-bar-auth a:hover {
    color: var(--gold-light);
    text-decoration: none;
}

@media (max-width: 640px) {
    .top-bar-inner {
        justify-content: center;
    }

    .top-bar-left {
        flex-basis: 100%;
        justify-content: center;
    }

    .top-bar-search {
        width: auto;
        flex: 1;
        max-width: 280px;
    }

    /* Comptes avec droits : nom, Admin | Membre, Administration, Déconnexion passent à la ligne au lieu
       d'élargir la page. L'aperçu par appareil ne sert à rien sur un téléphone. */
    .top-bar-auth {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 6px 14px;
        width: 100%;
    }

    .top-bar-auth .device-switch {
        display: none;
    }
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    flex-wrap: wrap;
}

.profile-completion-banner {
    background: var(--gold-light);
}

.profile-completion-banner .container {
    padding: 8px 20px;
}

.profile-completion-banner a {
    display: block;
    color: var(--felt-green-dark);
    font-size: 0.88rem;
    font-weight: 600;
    text-align: center;
}

.pending-member-banner .container {
    color: var(--felt-green-dark);
    font-size: 0.88rem;
    font-weight: 600;
    text-align: center;
}

.profile-completion-banner a:hover {
    text-decoration: underline;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--paper);
    font-weight: bold;
    font-size: 1.25rem;
}

.brand:hover {
    text-decoration: none;
}

.brand-mark {
    color: var(--gold);
    font-size: 1.6rem;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.main-nav a {
    color: var(--paper);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.95rem;
}

.main-nav a:hover {
    background: rgba(255, 255, 255, 0.12);
    text-decoration: none;
}

/* Logo du club qui apparaît à gauche du titre d'un menu survolé */
.main-nav a::before,
.main-nav .nav-group-label::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 22px;
    margin-right: 0;
    vertical-align: middle;
    background: url('../img/menu-logo.png') no-repeat center / contain;
    opacity: 0;
    transition: width 0.2s ease, margin-right 0.2s ease, opacity 0.2s ease;
}

.main-nav a:hover::before,
.main-nav a:focus-visible::before,
.main-nav .nav-group-label:hover::before,
.main-nav .nav-group-label:focus::before,
.nav-item.has-submenu:hover > a::before,
.nav-item.has-submenu:hover > .nav-group-label::before {
    width: 30px;
    margin-right: 6px;
    opacity: 1;
}

/* Titre de menu sans lien, qui sert seulement à regrouper des sous-menus */
.main-nav .nav-group-label {
    display: inline-block;
    color: var(--paper);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: default;
}

.main-nav .nav-group-label:hover,
.main-nav .nav-group-label:focus {
    background: rgba(255, 255, 255, 0.12);
    outline: none;
}

/* Sous-menus (menu déroulant) */
.nav-item.has-submenu {
    position: relative;
}

.nav-caret {
    font-size: 0.7em;
    margin-left: 2px;
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--felt-green-dark);
    border-radius: 6px;
    box-shadow: var(--shadow);
    padding: 6px;
    flex-direction: column;
    z-index: 20;
}

.nav-item.has-submenu:hover .submenu,
.nav-item.has-submenu:focus-within .submenu {
    display: flex;
}

.submenu a {
    white-space: nowrap;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    /* Garde le bouton du menu mobile collé à droite, qu'il y ait ou non
       un élément avant lui dans l'en-tête. */
    margin-left: auto;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--paper);
    display: block;
}

/* Footer */
.site-footer {
    background: var(--felt-green-dark);
    color: var(--paper);
    margin-top: 60px;
    padding: 24px 0;
}

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

.footer-nav a {
    color: var(--paper);
    margin-left: 16px;
}

.footer-inner p {
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
}

.footer-texts {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-inner .footer-text {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.65);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
}

.footer-nav a {
    margin-left: 0;
}

/* Administration > Pied de page */
.footer-links-table input[type="text"],
.footer-links-table select {
    width: 100%;
    min-width: 160px;
}

.footer-links-table .footer-link-url {
    margin-top: 6px;
}

.btn.footer-btn {
    color: var(--felt-green-dark);
    border-color: var(--felt-green-dark);
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin: 18px 0;
    font-size: 0.95rem;
}

.alert-success {
    background: var(--c-success-bg);
    color: var(--c-success);
    border: 1px solid var(--c-success-border);
}

.alert-error {
    background: var(--c-danger-bg);
    color: var(--card-red);
    border: 1px solid var(--c-danger-border);
}

.alert-info {
    background: var(--c-note-bg);
    color: var(--c-note-text);
    border: 1px solid var(--c-note-border);
}

/* Hero */
.hero {
    background: radial-gradient(circle at top right, var(--felt-green-light), var(--felt-green-dark));
    color: var(--paper);
    border-radius: var(--radius);
    padding: 56px 40px;
    margin: 0 0 32px;
    box-shadow: var(--shadow);
}

.hero h1 {
    color: var(--paper);
    font-size: 2.2rem;
    margin-top: 0;
}

.hero p {
    max-width: 640px;
    color: rgba(255, 255, 255, 0.9);
}

/* Blocs de l'accueil : un cadre par bloc (vert du club par défaut, ou couleur choisie), séparés. */
.home-blocks {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 0 0 32px;
}

.home-block {
    background: radial-gradient(circle at top right, var(--felt-green-light), var(--felt-green-dark));
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

.home-block.block-custom-bg {
    background-image: none;
}

/* Contenu centré dans le cadre : un texte centré dans l'éditeur l'est aussi sur la page. */
.home-block > h3,
.home-block .block-content {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.home-block > h3 {
    margin-top: 0;
}

.home-block .block-content > :first-child {
    margin-top: 0;
}

.home-block .block-content > :last-child {
    margin-bottom: 0;
}

/* Texte clair sur fond foncé, texte foncé sur fond clair (choisi selon la couleur du bloc). */
.block-tone-dark {
    color: rgba(255, 255, 255, 0.92);
}

.block-tone-dark h1, .block-tone-dark h2, .block-tone-dark h3, .block-tone-dark h4 {
    color: var(--paper);
}

.block-tone-dark a {
    color: var(--gold-light);
}

.block-tone-light.block-custom-bg {
    color: var(--ink);
}

.block-tone-light.block-custom-bg h1, .block-tone-light.block-custom-bg h2,
.block-tone-light.block-custom-bg h3, .block-tone-light.block-custom-bg h4 {
    color: var(--felt-green-dark);
}

.block-tone-light.block-custom-bg a {
    color: var(--felt-green);
}

.home-block img {
    max-width: 100%;
    border-radius: 6px;
}

.home-block iframe {
    max-width: 100%;
    border: 0;
    border-radius: 6px;
}

.home-block table,
.home-block .table-wrapper {
    color: var(--ink);
}

@media (max-width: 600px) {
    .home-block {
        padding: 24px 16px;
    }
}

.hero-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    background: var(--gold);
    color: var(--felt-green-dark);
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn:hover {
    background: var(--gold-light);
    text-decoration: none;
}

.btn-secondary {
    background: transparent;
    color: var(--paper);
    border: 1px solid var(--paper);
}

.btn-danger {
    background: var(--card-red);
    color: var(--on-dark);
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Cards / grids */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

/* Trombinoscope (page Membres) : voir « Page Membres » en fin de feuille. */

.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.card-body {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-body h3 {
    margin-top: 0;
}

.card-date {
    color: var(--muted);
    font-size: 0.85rem;
}

.card-body .btn, .card-body a.read-more {
    margin-top: auto;
    align-self: flex-start;
}

/* Liste d'actualités (page "Actualités", en colonne plutôt qu'en grille) */
.per-page-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.per-page-selector select {
    width: auto;
}

.search-page-form {
    display: flex;
    gap: 10px;
    max-width: 480px;
    margin: 20px 0;
}

.search-page-form input {
    flex: 1;
    min-width: 0;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 24px 0;
}

.news-row {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
}

.news-row-thumb {
    flex: 0 0 220px;
    display: block;
}

.news-row-thumb img {
    width: 100%;
    height: 100%;
    min-height: 150px;
    object-fit: cover;
    display: block;
}

.news-row-body {
    padding: 18px 22px;
    flex: 1;
    min-width: 0;
}

.news-row-body h3 {
    margin: 4px 0 8px;
}

.news-row-body h3 a {
    color: inherit;
    text-decoration: none;
}

.news-row-body h3 a:hover {
    text-decoration: underline;
}

.news-row-body p {
    color: var(--muted);
}

@media (max-width: 640px) {
    .news-row {
        flex-direction: column;
    }

    .news-row-thumb {
        flex-basis: auto;
    }

    .news-row-thumb img {
        height: 180px;
        min-height: 0;
    }
}

section {
    margin: 40px 0;
}

/* Forms */
.form-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
    max-width: 480px;
    margin: 32px auto;
}

.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--c-field-border);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

textarea {
    resize: vertical;
    min-height: 140px;
}

.form-hint {
    color: var(--muted);
    font-size: 0.82rem;
    margin-top: 4px;
}

.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.honeypot-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* Tables (classements) */
.table-wrapper {
    overflow-x: auto;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 20px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--c-row-line);
    font-size: 0.92rem;
}

table thead th {
    background: var(--felt-green);
    color: var(--on-dark);
    position: sticky;
    top: 0;
}

table tbody tr:nth-child(odd) {
    background: var(--paper-alt);
}

.sheet-meta {
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 6px;
}

.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 24px 0;
}

.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: 6px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.pagination .current {
    background: var(--felt-green);
    color: var(--on-dark);
}

.pagination .ellipsis {
    box-shadow: none;
    background: none;
    color: var(--muted);
    padding: 8px 2px;
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.status-pending { background: var(--c-warning-bg); color: var(--c-warning-text); }
.status-active { background: var(--c-success-bg); color: var(--c-success); }
.status-technical { background: var(--c-grey-bg); color: var(--muted); box-shadow: inset 0 0 0 1px var(--c-grey-border); }
.status-rejected, .status-suspended { background: var(--c-danger-bg); color: var(--card-red); }
.status-info { background: var(--c-info-bg); color: var(--c-info); }

.role-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    background: var(--paper-alt);
}

.user-list-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.user-list-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--felt-green);
    color: var(--gold-light);
    font-size: 0.78rem;
    font-weight: bold;
}

/* Admin layout */
.admin-body {
    background: var(--paper-alt);
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 230px;
    background: var(--felt-green-dark);
    color: var(--on-dark);
    display: flex;
    flex-direction: column;
    padding: 20px;
    flex-shrink: 0;
}

.admin-sidebar .brand {
    margin-bottom: 24px;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.admin-nav a {
    color: rgba(255, 255, 255, 0.85);
    padding: 10px 12px;
    border-radius: 6px;
}

.admin-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.admin-nav-group {
    display: flex;
    flex-direction: column;
}

.admin-nav-group-label {
    padding: 10px 12px 2px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.55);
}

.admin-nav-group a {
    padding-left: 24px;
    font-size: 0.94rem;
}

.admin-content {
    flex: 1;
    min-width: 0;
}

.admin-topbar {
    background: var(--surface);
    padding: 18px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.admin-topbar h1 {
    margin: 0;
    font-size: 1.4rem;
}

.admin-body-inner {
    padding: 32px;
}

.admin-table {
    width: 100%;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-collapse: collapse;
}

.admin-table th, .admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--c-row-line);
    text-align: left;
    font-size: 0.9rem;
    vertical-align: middle;
}

.admin-table th a {
    color: inherit;
    white-space: nowrap;
}

.admin-table th a:hover {
    text-decoration: underline;
}

.admin-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-actions form {
    display: inline;
}

.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.admin-filters input[type="search"] {
    width: auto;
    min-width: 200px;
}

.admin-filters select {
    width: auto;
}

.bulk-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 12px 16px;
    margin-bottom: 12px;
}

.bulk-toolbar select {
    width: auto;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--felt-green);
}

.stat-card .stat-label {
    color: var(--muted);
    font-size: 0.85rem;
}

.page-content p {
    margin: 0 0 1em;
}

.page-content img,
.block-content img {
    max-width: 100%;
    height: auto;
}

.page-content iframe {
    max-width: 100%;
    border: 0;
    border-radius: 6px;
}

/* Vidéos intégrées (bouton « Vidéo » de l'éditeur, 1.058.007) : toute la largeur de la colonne, format 16/9. */
iframe[src*="youtube-nocookie.com/embed/"],
iframe[src*="youtube.com/embed/"],
iframe[src*="player.vimeo.com/video/"],
iframe[src*="dailymotion.com/embed/video/"] {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}

.prose {
    max-width: 720px;
}

@media (max-width: 800px) {
    .nav-toggle {
        display: flex;
    }

    .main-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        order: 3;
        margin-top: 10px;
        align-items: stretch;
    }

    .main-nav.open {
        display: flex;
    }

    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
    }

    .admin-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .admin-body-inner {
        padding: 18px;
    }

    .admin-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Sur mobile, pas de survol possible : le sous-menu reste affiché en
       liste indentée sous son lien principal, sans dérouler au survol. */
    .submenu {
        display: flex;
        position: static;
        box-shadow: none;
        background: none;
        padding: 0 0 0 20px;
    }

    .nav-caret {
        display: none;
    }
}

/* Éditeur WYSIWYG (Quill) */
.wysiwyg-editor {
    background: var(--surface);
    border-radius: 0 0 6px 6px;
}

/* Même police, taille et interligne que le site (le conteneur porte à la fois .wysiwyg-editor et .ql-container ;
   plus précis que la feuille de style de Quill, chargée après celle-ci). */
.wysiwyg-wrapper .wysiwyg-editor.ql-container {
    min-height: 220px;
    font-size: 1rem;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wysiwyg-wrapper .wysiwyg-editor .ql-editor {
    line-height: 1.55;
    color: var(--ink);
}

.wysiwyg-wrapper .wysiwyg-editor .ql-editor p {
    margin: 0 0 0.6em;
}

.wysiwyg-wrapper .wysiwyg-editor .ql-editor h1,
.wysiwyg-wrapper .wysiwyg-editor .ql-editor h2,
.wysiwyg-wrapper .wysiwyg-editor .ql-editor h3 {
    font-family: Georgia, "Times New Roman", serif;
    color: var(--felt-green-dark);
    line-height: 1.2;
    margin: 0.4em 0;
}

/* Éditeur des modèles d'emails : paragraphes et titres comme dans l'email envoyé (sans marge, police Arial). */
.wysiwyg-wrapper.wysiwyg-email .wysiwyg-editor .ql-editor {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

.wysiwyg-wrapper.wysiwyg-email .wysiwyg-editor .ql-editor p,
.wysiwyg-wrapper.wysiwyg-email .wysiwyg-editor .ql-editor h1,
.wysiwyg-wrapper.wysiwyg-email .wysiwyg-editor .ql-editor h2,
.wysiwyg-wrapper.wysiwyg-email .wysiwyg-editor .ql-editor h3 {
    margin: 0;
    font-family: inherit;
    color: inherit;
}

/* Listes « Titre » et « Taille » de la barre d'outils, en français. */
.wysiwyg-wrapper .ql-snow .ql-picker.ql-header .ql-picker-label::before,
.wysiwyg-wrapper .ql-snow .ql-picker.ql-header .ql-picker-item::before { content: 'Paragraphe'; }
.wysiwyg-wrapper .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
.wysiwyg-wrapper .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before { content: 'Titre 1'; }
.wysiwyg-wrapper .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
.wysiwyg-wrapper .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before { content: 'Titre 2'; }
.wysiwyg-wrapper .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
.wysiwyg-wrapper .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before { content: 'Titre 3'; }
.wysiwyg-wrapper .ql-snow .ql-picker.ql-header { width: 118px; }

.wysiwyg-wrapper .ql-snow .ql-picker.ql-size { width: 124px; }
.wysiwyg-wrapper .ql-snow .ql-picker.ql-size .ql-picker-label::before,
.wysiwyg-wrapper .ql-snow .ql-picker.ql-size .ql-picker-item::before { content: 'Taille normale'; }
.wysiwyg-wrapper .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="0.75em"]::before,
.wysiwyg-wrapper .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="0.75em"]::before { content: 'Très petit'; font-size: 0.75em; }
.wysiwyg-wrapper .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="0.875em"]::before,
.wysiwyg-wrapper .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="0.875em"]::before { content: 'Petit'; font-size: 0.875em; }
.wysiwyg-wrapper .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="1.125em"]::before,
.wysiwyg-wrapper .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="1.125em"]::before { content: 'Un peu grand'; font-size: 1.125em; }
.wysiwyg-wrapper .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="1.25em"]::before,
.wysiwyg-wrapper .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="1.25em"]::before { content: 'Grand'; font-size: 1.25em; }
.wysiwyg-wrapper .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="1.5em"]::before,
.wysiwyg-wrapper .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="1.5em"]::before { content: 'Très grand'; font-size: 1.5em; }
.wysiwyg-wrapper .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="2em"]::before,
.wysiwyg-wrapper .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="2em"]::before { content: 'Énorme'; font-size: 2em; }
.wysiwyg-wrapper .ql-snow .ql-picker.ql-size .ql-picker-label::before { font-size: 1em !important; }

.wysiwyg-editor .ql-toolbar {
    border-radius: 6px 6px 0 0;
    background: var(--paper-alt);
}

.ql-source-toggle,
.ql-iframe-insert,
.ql-facebook-insert,
.ql-video-insert,
/* Plus précis que « .ql-snow.ql-toolbar button » de Quill, qui les forçait à 28 px de large. */
.ql-snow.ql-toolbar button.ql-source-toggle,
.ql-snow.ql-toolbar button.ql-iframe-insert,
.ql-snow.ql-toolbar button.ql-facebook-insert,
.ql-snow.ql-toolbar button.ql-video-insert {
    width: auto;
    height: auto;
    white-space: nowrap;
    line-height: 1.3;
    color: var(--ink, var(--c-editor-text));
    background: var(--surface);
    border: 1px solid var(--c-field-border);
    border-radius: 4px;
    padding: 3px 8px;
    margin-left: 8px;
    font-family: monospace;
    font-size: 0.85rem;
    cursor: pointer;
    vertical-align: middle;
}

.ql-source-toggle.active,
.ql-source-toggle:hover,
.ql-iframe-insert:hover,
.ql-facebook-insert:hover,
.ql-video-insert:hover,
.ql-snow.ql-toolbar button.ql-source-toggle.active,
.ql-snow.ql-toolbar button.ql-source-toggle:hover,
.ql-snow.ql-toolbar button.ql-iframe-insert:hover,
.ql-snow.ql-toolbar button.ql-facebook-insert:hover,
.ql-snow.ql-toolbar button.ql-video-insert:hover {
    background: var(--gold);
    border-color: var(--gold);
}

/* Boutons ajoutés à la barre d'outils (1.058.007) : groupés, dans l'ordre, passent ensemble à la ligne. */
.ql-snow.ql-toolbar .ql-formats.wysiwyg-extras {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 4px 0;
}
.ql-snow.ql-toolbar .ql-formats.wysiwyg-extras button { float: none; margin-left: 0; }
.ql-snow.ql-toolbar button.ql-video-insert { font-family: inherit; font-weight: 600; }

/* Emojis de l'éditeur (1.056.007) : bouton « 😀 Emoji » et panneau par thème. */
.ql-snow.ql-toolbar button.ql-emoji-insert {
    width: auto;
    height: auto;
    white-space: nowrap;
    font-weight: 600;
    padding: 1px 8px;
    margin-left: 8px;
    font-size: 0.9rem;
    line-height: 1.3;
    border: 1px solid var(--c-field-border);
    border-radius: 4px;
    background: var(--surface);
    vertical-align: middle;
    cursor: pointer;
}
.ql-snow.ql-toolbar button.ql-emoji-insert:hover,
.ql-snow.ql-toolbar button.ql-emoji-insert.active {
    background: var(--gold);
    border-color: var(--gold);
}
.wysiwyg-wrapper { position: relative; }
.emoji-panel {
    position: absolute;
    z-index: 30;
    width: 320px;
    max-width: calc(100vw - 32px);
    background: var(--surface);
    border: 1px solid var(--c-field-border);
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    padding: 6px;
}
.emoji-panel[hidden] { display: none; }
.emoji-tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--c-field-border);
    padding-bottom: 4px;
    margin-bottom: 4px;
}
.emoji-tab, .emoji-cell {
    background: none;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "Noto Sans Symbols 2", sans-serif;
}
.emoji-tab { font-size: 1.15rem; padding: 3px 6px; }
.emoji-tab.is-active { background: var(--paper-alt); box-shadow: inset 0 -2px 0 var(--felt-green); }
.emoji-caption { grid-column: 1 / -1; font-size: 0.78rem; color: var(--muted); margin: 0 2px 2px; }
.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    max-height: 210px;
    overflow-y: auto;
}
.emoji-cell { font-size: 1.35rem; line-height: 1.2; padding: 3px 0; }
.emoji-cell:hover, .emoji-tab:hover { background: var(--paper-alt); }

.wysiwyg-editor .ql-editor iframe {
    max-width: 100%;
    display: block;
    border: 1px dashed var(--c-field-border);
}

.wysiwyg-source {
    width: 100%;
    min-height: 220px;
    border: none;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.85rem;
    padding: 12px;
    resize: vertical;
}

/* Bannière d'en-tête personnalisable */
.site-banner {
    padding-top: 20px;
}

.site-banner img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
}

/* Mise en page avec colonne latérale */
.page-layout {
    padding: 28px 0;
}

.page-layout.with-sidebar {
    display: grid;
    grid-template-columns: var(--sidebar-width, 280px) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

/* Un tableau large défile dans son cadre (.table-wrapper) au lieu d'élargir la page. */
.page-main {
    min-width: 0;
}

.page-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-widget {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
}

.sidebar-widget h3 {
    margin-top: 0;
    font-size: 1.05rem;
}

.sidebar-widget table {
    font-size: 0.85rem;
}

.sidebar-widget .table-wrapper {
    box-shadow: none;
    margin: 10px 0;
}

.sidebar-widget .btn-small {
    margin-top: 8px;
}

.sidebar-widget iframe {
    max-width: 100%;
    border: 0;
    border-radius: 6px;
}

.sidebar-widget img {
    max-width: 100%;
    border-radius: 6px;
    display: block;
}

@media (max-width: 900px) {
    .page-layout.with-sidebar {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Agenda : bandeau sous le menu, affiché sur tout le site (pas une page) */
.agenda-banner {
    background: var(--paper-alt);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 16px 0;
}

.agenda-login-hint {
    margin: 8px 0 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.agenda-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 10px;
}

.agenda-toolbar select {
    padding: 4px 8px;
    font-size: 0.8rem;
    border-radius: 5px;
    border: 1px solid var(--paper-alt);
    background: var(--surface);
    max-width: 200px;
}

.agenda-toolbar .btn-small {
    padding: 5px 10px;
    font-size: 0.78rem;
}

.agenda-strip-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.agenda-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 4px 2px 10px;
    flex: 1;
}

.agenda-strip-arrow {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--paper-alt);
    background: var(--surface);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--felt-green);
}

.agenda-strip-arrow:hover {
    background: var(--paper-alt);
}

.agenda-card {
    flex: 0 0 122px;
    background: var(--surface);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.agenda-card.is-past {
    opacity: 0.55;
}

.agenda-card:hover,
.agenda-card:focus-visible {
    outline: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.agenda-date-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--on-dark);
    border-radius: 6px;
    padding: 6px 4px;
    line-height: 1.1;
}

.agenda-date-day {
    font-size: 1.2rem;
    font-weight: 700;
}

.agenda-date-month {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.agenda-date-year {
    font-size: 0.6rem;
    opacity: 0.85;
}

.agenda-type-badge {
    display: inline-block;
    align-self: flex-start;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--on-dark);
}

.agenda-card-title {
    font-weight: 600;
    font-size: 0.76rem;
    line-height: 1.25;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.agenda-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.agenda-modal-overlay.is-open {
    display: flex;
}

.agenda-modal {
    background: var(--paper);
    border-radius: var(--radius);
    max-width: 640px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    padding: 28px;
    position: relative;
    box-shadow: var(--shadow);
}

.agenda-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    color: var(--muted);
}

.agenda-modal-dates {
    float: right;
    text-align: right;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--muted);
    margin: 4px 34px 8px 12px;
}

.agenda-modal-dates strong {
    color: var(--ink);
}

/* Vue inscriptions en page (/agenda/{id}/inscriptions) : contenu de la fenêtre, sans la croix de fermeture. */
.agenda-page-content .agenda-modal-dates {
    margin-right: 0;
}

.agenda-detail-list {
    list-style: none;
    padding: 0;
    margin: 16px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px 16px;
}

.agenda-detail-list li {
    background: var(--paper-alt);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.9rem;
}

.agenda-registration {
    margin: 16px 0;
}

.agenda-registrant-remove {
    background: none;
    border: none;
    color: var(--card-red);
    font-size: 0.78rem;
    text-decoration: underline;
    cursor: pointer;
    flex-shrink: 0;
}

.agenda-registrant-comment {
    font-size: 0.82rem;
    color: var(--muted);
    font-style: italic;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agenda-registrant-comment-edit {
    display: flex;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

input[type="text"].agenda-comment-input {
    flex: 1;
    min-width: 0;
    padding: 4px 8px;
    font-size: 0.82rem;
    border-radius: 5px;
    border: 1px solid var(--paper-alt);
}

.agenda-comment-save {
    flex-shrink: 0;
    padding: 4px 10px;
    font-size: 0.78rem;
    border-radius: 5px;
    border: 1px solid var(--felt-green);
    background: var(--surface);
    color: var(--felt-green);
    cursor: pointer;
}

.agenda-description-edit {
    margin: 10px 0 16px;
}

.agenda-description-edit textarea {
    font-family: inherit;
    font-size: 0.9rem;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid var(--paper-alt);
}

.agenda-description-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.agenda-admin-panel {
    margin: 16px 0;
    padding: 12px;
    background: var(--paper-alt);
    border-radius: 8px;
}

.agenda-admin-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Floor de la partie (fenêtre de l'évènement, administrateurs). */
.agenda-floor {
    margin: 16px 0;
    padding: 12px;
    border: 1px dashed var(--felt-green-dark);
    border-radius: 8px;
}

.agenda-floor p {
    margin: 0 0 8px;
}

/* Plusieurs Floor (1.048.001) : un nom par ligne, avec sa croix pour le retirer. */
.floor-list {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
}

.floor-list li {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 6px;
    padding: 2px 0;
}

.floor-list form {
    display: inline;
    margin: 0;
}

.floor-remove {
    border: 1px solid var(--card-red);
    background: transparent;
    color: var(--card-red);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    line-height: 18px;
    padding: 0;
    font-size: 16px;
    cursor: pointer;
}

.floor-remove:hover,
.floor-remove:focus-visible {
    background: var(--card-red);
    color: var(--on-dark);
}

/* Floor de la page « Classement » (vue normale, administrateurs). */
.standings-floor {
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px dashed var(--felt-green-dark);
    border-radius: 8px;
}

.standings-floor .floor-add {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.standings-floor .floor-add input[type="search"],
.standings-floor .floor-add select {
    max-width: 260px;
    padding: 4px 8px;
    font-size: 0.95em;
}

.agenda-admin-existing,
.agenda-admin-new,
.agenda-admin-guest {
    margin-top: 10px;
}

.agenda-admin-existing input[type="text"],
.agenda-admin-guest input[type="text"] {
    width: 100%;
    padding: 6px 10px;
    border-radius: 5px;
    border: 1px solid var(--paper-alt);
    margin-bottom: 8px;
    box-sizing: border-box;
}

.agenda-member-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 160px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.agenda-member-list button {
    width: 100%;
    text-align: left;
    padding: 6px 10px;
    background: var(--surface);
    border: 1px solid var(--paper-alt);
    border-radius: 5px;
    cursor: pointer;
}

.agenda-member-list button:hover {
    background: var(--paper);
}

/* Inscription d'un joueur à l'essai : nom + bouton sur une ligne */
.agenda-guest-new {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.agenda-guest-new input[type="text"] {
    flex: 1;
    min-width: 0;
}

.agenda-admin-guest .agenda-member-list li {
    display: flex;
    align-items: center;
    gap: 6px;
}

.agenda-admin-guest .agenda-member-list button {
    width: auto;
    flex: 0 0 auto;
}

.agenda-admin-guest .agenda-member-list .form-hint {
    margin: 0;
    font-size: 0.8em;
}

.agenda-admin-new .form-group {
    margin-bottom: 8px;
}

.agenda-admin-new input,
.agenda-admin-new select {
    width: 100%;
    padding: 6px 10px;
    border-radius: 5px;
    border: 1px solid var(--paper-alt);
    box-sizing: border-box;
}

/* Aperçu (en grand) d'un barème de points (Administration > Championnats > Barèmes de points) */
.scale-preview-trigger {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    text-align: left;
    border-bottom: 1px dotted var(--muted);
    cursor: pointer;
}

.scale-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.scale-modal-overlay.is-open {
    display: flex;
}

.scale-modal {
    background: var(--paper);
    border-radius: var(--radius);
    max-width: 90vw;
    max-height: 88vh;
    overflow: auto;
    padding: 28px;
    position: relative;
    box-shadow: var(--shadow);
}

.scale-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    color: var(--muted);
}

.scale-modal h3 {
    margin-top: 0;
    color: var(--felt-green-dark);
}

.scale-modal table {
    border-collapse: collapse;
    max-width: none;
}

.scale-modal th,
.scale-modal td {
    padding: 8px 16px;
    text-align: center;
    border: 1px solid var(--paper-alt);
    font-size: 1rem;
}

.scale-modal th:first-child,
.scale-modal td:first-child {
    text-align: left;
    font-weight: 600;
}

/* ---------------------------------------------------------------
   Page Agenda : calendrier mensuel
   --------------------------------------------------------------- */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.agenda-page {
    margin: 10px 0 30px;
}

.agenda-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 18px;
}

.agenda-month-title {
    margin: 0;
    font-weight: 300;
    font-size: 2.1rem;
    letter-spacing: 0.18em;
    color: var(--ink);
}

.agenda-page-tools {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.agenda-search {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--c-search-border);
    border-radius: 3px;
    background: var(--surface);
    overflow: hidden;
}

.agenda-search input[type="search"] {
    border: none;
    border-radius: 0;
    padding: 7px 10px;
    width: 200px;
    font-size: 0.95rem;
    background: transparent;
}

.agenda-search input[type="search"]:focus {
    outline: none;
}

.agenda-search svg {
    box-sizing: content-box;
    padding: 0 10px;
    height: auto;
    background: var(--felt-green-dark);
    color: var(--on-dark);
}

.agenda-month-nav {
    display: inline-flex;
    gap: 2px;
}

.agenda-month-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 36px;
    background: var(--felt-green-dark);
    color: var(--on-dark);
    font-size: 1.5rem;
    line-height: 1;
    border-radius: 3px;
    text-decoration: none;
}

.agenda-month-nav a:hover {
    background: var(--felt-green-light);
    text-decoration: none;
}

.agenda-today-link {
    color: var(--ink);
}

.agenda-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin-bottom: 18px;
}

.agenda-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.agenda-legend-swatch {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.agenda-cal {
    border: 1px solid var(--c-cal-border);
    background: var(--surface);
}

.agenda-cal-weekdays,
.agenda-cal-week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.agenda-cal-weekdays {
    background: var(--felt-green-dark);
    color: var(--on-dark);
}

.agenda-cal-weekdays div {
    padding: 14px 6px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.85rem;
}

.agenda-cal-day {
    min-height: 120px;
    padding: 8px 10px 10px;
    border-right: 1px solid var(--c-cal-border);
    border-top: 1px solid var(--c-cal-border);
    min-width: 0;
}

.agenda-cal-day:nth-child(7n) {
    border-right: none;
}

.agenda-cal-day.is-outside {
    background: var(--c-cal-outside);
}

.agenda-cal-daynum {
    margin-bottom: 6px;
    font-size: 1.15rem;
}

.agenda-cal-dayname {
    display: none;
}

.agenda-cal-day.is-outside .agenda-cal-number {
    color: var(--c-cal-outside-text);
}

.agenda-cal-day.is-today .agenda-cal-number {
    display: inline-block;
    min-width: 34px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--felt-green-dark);
    color: var(--on-dark);
    text-align: center;
    font-weight: 700;
}

.agenda-cal-event {
    display: block;
    max-width: 100%;
    margin: 0 0 6px;
    padding: 4px 7px;
    border: none;
    border-radius: 2px;
    color: var(--on-dark);
    font: inherit;
    font-size: 0.78rem;
    line-height: 1.35;
    text-align: left;
    text-transform: uppercase;
    overflow-wrap: anywhere;
    cursor: pointer;
}

.agenda-cal-event:hover,
.agenda-cal-event:focus-visible {
    filter: brightness(1.12);
    outline: 2px solid var(--gold);
    outline-offset: 1px;
}

.agenda-cal-event-time {
    font-weight: 700;
    margin-right: 4px;
}

.agenda-cal-message {
    margin: 16px 0 0;
    color: var(--muted);
}

.agenda-page-footer {
    margin-top: 20px;
}

@media (max-width: 760px) {
    .agenda-month-title {
        font-size: 1.5rem;
    }

    .agenda-search {
        flex: 1 1 100%;
    }

    .agenda-search input[type="search"] {
        width: 100%;
    }

    .agenda-cal-weekdays {
        display: none;
    }

    .agenda-cal-week {
        display: block;
    }

    .agenda-cal-day {
        display: none;
        min-height: 0;
        border-right: none;
    }

    .agenda-cal-day.has-events:not(.is-outside) {
        display: grid;
        grid-template-columns: 84px minmax(0, 1fr);
        column-gap: 12px;
    }

    .agenda-cal-daynum {
        grid-row: 1 / span 20;
        margin: 0;
        font-size: 0.95rem;
    }

    .agenda-cal-dayname {
        display: block;
        font-size: 0.75rem;
        color: var(--muted);
        text-transform: uppercase;
        letter-spacing: 0.08em;
    }

    .agenda-cal-event {
        grid-column: 2;
        width: 100%;
    }
}

/* Import d'un classement collé */
.standings-import-box {
    margin: 12px 0 18px;
    padding: 10px 14px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 640px;
}

.standings-import-box summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--felt-green);
}

.standings-import-box[open] summary {
    margin-bottom: 8px;
}

.standings-import-table select {
    min-width: 200px;
    max-width: 280px;
}

.import-pseudo-action {
    border: none;
    padding: 0;
    margin: 0;
}

.import-pseudo-action label {
    display: block;
    font-weight: normal;
    font-size: 0.85rem;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .standings-import-table thead {
        display: none;
    }

    .standings-import-table,
    .standings-import-table tbody,
    .standings-import-table tr,
    .standings-import-table td {
        display: block;
        width: 100%;
    }

    .standings-import-table tr {
        padding: 10px 12px;
        border-bottom: 1px solid var(--c-row-line);
    }

    .standings-import-table td {
        padding: 3px 0;
        border: none;
    }

    .standings-import-table td:first-child {
        float: left;
        width: auto;
        margin-right: 10px;
        font-weight: 700;
    }

    .standings-import-table select {
        width: 100%;
        max-width: none;
    }
}

/* Tableau d'un championnat : colonnes d'identification des joueurs */
.checkbox-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
}

.standings-photo-cell {
    width: 44px;
}

/* Tableaux de classement : place et total en gras ; colonnes du joueur et total fixes au
   défilement horizontal (décalages calculés par main.js) ; places au-delà du top masquées. */
.standings-rank,
.standings-total,
.standings-place {
    font-weight: 700;
}

.standings-table th,
.standings-table td {
    white-space: nowrap;
}

.standings-table .sticky-col {
    position: sticky;
    z-index: 1;
    background: var(--surface);
}

.standings-table tbody tr:nth-child(odd) .sticky-col {
    background: var(--paper-alt);
}

.standings-table thead .sticky-col {
    z-index: 2;
    background: var(--felt-green);
}

.standings-table .sticky-col-last {
    box-shadow: inset -2px 0 0 rgba(0, 0, 0, 0.12);
}

.standings-table:not(.show-all) tr.standings-extra {
    display: none;
}

/* Recaves (1.071.001) : bouton Rebuy / Re-entry et nombre de recaves d'un joueur. */
.btn.recave-btn {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--ink);
    /* 1.073.001 : icône de pièces + nombre restant, sans texte (le nom est au survol). */
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

.recave-icon {
    flex: none;
}

/* Bloc des recaves du timer (1.073.001) : caché sans rebuy ni re-entry, même en disposition personnalisée. */
.desk-clock-stat[hidden] {
    display: none !important;
}

.recave-count {
    font-size: 0.78rem;
    color: var(--muted);
    white-space: nowrap;
    margin: 0 4px;
}

/* Statistiques d'un championnat sous son titre (1.070.001). */
.championship-summary {
    margin: -4px 0 12px;
    color: var(--muted);
}

.standings-more {
    margin: -8px 0 12px;
}

.standings-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.standings-avatar-placeholder {
    background: var(--felt-green-light);
    color: var(--on-dark);
    font-weight: 700;
    font-size: 0.85rem;
}

/* Menu d'administration : sections Gestion du club / Gestion du site */
.admin-nav-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 14px;
}

.admin-nav-section-label {
    padding: 6px 12px 6px;
    margin-bottom: 2px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gold-light);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

/* Classement d'une partie : mode de saisie (automatique / manuel) */
.standings-mode-box {
    margin: 12px 0 16px;
    padding: 10px 14px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 640px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.standings-mode-box .form-hint {
    flex-basis: 100%;
}

/* Import d'un championnat : choix du mode de chaque partie */
.import-mode-cell label {
    display: block;
    font-weight: normal;
    font-size: 0.85rem;
    white-space: nowrap;
}

.import-players-table select {
    min-width: 220px;
    max-width: 320px;
}

/* Administration > Documentation API */
.api-docs-downloads {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
}

.api-docs-changelog {
    max-width: 900px;
    margin: 16px 0;
    padding: 12px 16px;
    border-left: 4px solid var(--felt-green-dark);
    background: var(--c-doc-changelog);
}

.api-docs-changelog h1,
.api-docs-changelog h2 {
    font-size: 1.05rem;
    margin: 4px 0;
}

.api-docs-toc {
    max-width: 900px;
    margin: 16px 0;
    padding: 12px 16px;
    border: 1px solid var(--c-doc-toc);
    border-radius: 6px;
}

.api-docs-toc ol {
    margin: 6px 0 0;
    columns: 2;
}

.api-docs {
    max-width: 900px;
}

.api-docs pre {
    background: var(--c-deep);
    color: var(--c-deep-text);
    padding: 12px 14px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.45;
}

.api-docs code {
    font-family: Menlo, Consolas, monospace;
    font-size: 0.9em;
}

.api-docs :not(pre) > code {
    background: var(--c-doc-inline-code);
    padding: 1px 4px;
    border-radius: 3px;
}

.api-docs :not(pre) > code,
.api-docs-changelog code,
.form-hint code {
    overflow-wrap: anywhere;
}

.api-docs blockquote {
    margin: 12px 0;
    padding: 8px 14px;
    border-left: 4px solid var(--gold);
    background: var(--c-doc-quote);
}

@media (max-width: 640px) {
    .api-docs-toc ol {
        columns: 1;
    }
}

@media print {
    .admin-sidebar,
    .api-docs-downloads {
        display: none !important;
    }

    .api-docs pre {
        white-space: pre-wrap;
        background: #fff;
        color: #000;
        border: 1px solid #999;
    }
}

/* Bandeau d'information du club (partials/club_news_banner.php) */
/* Mêmes couleurs que l'écran d'accueil de l'appli, pour lesquelles sont prévues les couleurs du texte. */
.club-news-banner {
    background: var(--c-deep);
    color: var(--c-deep-text);
    border-bottom: 2px solid var(--gold);
    padding: 10px 0;
    line-height: 1.4;
}
.club-news-banner .club-news-content p,
.club-news-banner .club-news-content div {
    margin: 0;
}
.club-news-align-center { text-align: center; }
.club-news-align-right { text-align: right; }
.club-news-size-small { font-size: 0.9rem; }
.club-news-size-large { font-size: 1.2rem; }

/* Joueur à l'essai (pas encore adhérent) dans un classement */
.guest-mark {
    display: inline-block;
    font-size: 0.75em;
    padding: 1px 6px;
    border-radius: 8px;
    background: var(--paper-alt);
    color: var(--muted);
    white-space: nowrap;
}

/* Joueurs à l'essai : un joueur par ligne (formulaires en ligne, sans retour à la ligne). */
.guests-table th,
.guests-table td {
    white-space: nowrap;
    padding: 6px 8px;
}

.guests-table .btn-small {
    padding: 4px 10px;
}

.guests-inline-form {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
    margin: 0;
}

.guests-inline-form input[type="text"],
.guests-inline-form select {
    margin: 0;
    padding: 4px 6px;
    font-size: 0.9rem;
}

/* Classements : fiche statistique d'un joueur au survol de sa ligne (voir main.js). */
.player-card-trigger {
    cursor: help;
}

.player-card {
    position: absolute;
    z-index: 50;
    width: max-content;
    max-width: calc(100vw - 16px);
    background: var(--surface);
    color: var(--ink);
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    border-top: 4px solid var(--felt-green);
    padding: 14px 16px;
    font-size: 0.88rem;
    pointer-events: none;
}

.player-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.player-card-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.player-card-photo-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--felt-green-light);
    color: var(--on-dark);
    font-weight: 700;
    font-size: 1.4rem;
}

.player-card-name {
    font-weight: 700;
    font-size: 1.1rem;
}

.player-card-pseudo {
    color: var(--muted);
}

.player-card .player-card-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

.player-card .player-card-table th,
.player-card .player-card-table td {
    padding: 4px 6px;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--c-row-line);
    white-space: nowrap;
    position: static;
}

.player-card .player-card-table thead th {
    white-space: normal;
    background: var(--paper-alt);
    color: var(--ink);
    font-weight: 600;
}

.player-card .player-card-table tbody tr:nth-child(odd) {
    background: transparent;
}

.player-card-table td:not(:first-child),
.player-card-table th:not(:first-child) {
    text-align: center;
}

.player-card-icon {
    display: inline-block;
    width: 1.5em;
}

.player-card-titles > div {
    margin-top: 4px;
}
/* Championnats gagnés, sous leur nombre (1.078.004). */
.player-card-title-list {
    margin: 2px 0 0 26px;
    padding: 0;
    list-style: disc;
    font-size: 0.92em;
}

/* N° du tournoi Winamax sous le titre d'une partie online (utilisateurs connectés). */
.standings-winamax-id {
    font-weight: 400;
    font-size: 0.78rem;
    opacity: 0.85;
}

/* Recaves d'une partie (1.071.001) sous son titre : nombre de rebuys ou de re-entries et effet sur le barème. */
.standings-recave {
    font-weight: 400;
    font-size: 0.78rem;
    font-style: italic;
    opacity: 0.85;
}

/* Classements : le tableau défile dans son cadre (hauteur limitée à l'écran) pour que la ligne
   d'en-tête reste visible en défilant vers le bas, en plus des colonnes fixes à gauche. */
.standings-wrapper {
    max-height: 80vh;
    overflow: auto;
}

.standings-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.standings-table thead th.sticky-col {
    z-index: 3;
}

.standings-ko {
    color: var(--muted);
    font-size: 0.85em;
}

/* Prizepool du championnat (1.043.001) : icône cadeau en 2e colonne, bulle du gain. */
.standings-table .standings-prize { width: 2.2em; text-align: center; padding-left: 4px; padding-right: 4px; }
.gift-tip { display: inline-flex; align-items: center; justify-content: center; color: var(--gold); cursor: help; border-radius: 4px; }
.standings-table thead .gift-tip { color: inherit; }
.gift-tip:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.gift-icon { display: block; }
.gift-bubble {
    position: absolute;
    z-index: 60;
    max-width: min(320px, calc(100vw - 16px));
    background: var(--surface);
    color: var(--ink);
    border-radius: var(--radius);
    border-top: 3px solid var(--gold);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    padding: 8px 12px;
    font-size: 0.88rem;
    line-height: 1.4;
    pointer-events: none;
}
.gift-bubble strong { display: block; margin-bottom: 2px; }

/* Gain du joueur (prizepool personnalisé ou gains importés, 1.042.002). */
.standings-gain {
    font-weight: 600;
    white-space: nowrap;
}

/* Journal des modifications et logs de l'API */
.log-table td {
    vertical-align: top;
}

.log-details {
    margin-top: 6px;
}

.log-details summary {
    cursor: pointer;
    color: var(--felt-green-dark);
    font-size: 0.85rem;
}

.log-details pre {
    background: var(--paper-alt);
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    max-height: 360px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.log-bodies {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}

.log-standings {
    width: auto;
    margin: 6px 0;
}

.log-standings th,
.log-standings td {
    padding: 3px 10px;
    font-size: 0.82rem;
}

.log-help {
    font-size: 0.82rem;
    min-width: 170px;
    max-width: 260px;
    overflow-wrap: anywhere;
}

.log-table td,
.log-table th {
    padding: 10px 10px;
}

.log-table .log-details pre {
    max-width: 380px;
}

/* Export CSV des adhérents : colonnes à cocher et à ranger */
.export-columns { list-style: none; margin: 0; padding: 0; border: 1px solid rgba(0,0,0,.12); border-radius: 8px; background: var(--surface); }
.export-columns li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid rgba(0,0,0,.06); cursor: grab; }
.export-columns li:last-child { border-bottom: 0; }
.export-columns li.is-dragging { opacity: .5; background: rgba(0,0,0,.04); }
.export-columns label { flex: 1; display: flex; align-items: center; gap: 6px; font-weight: normal; margin: 0; cursor: pointer; }
.export-grip { color: var(--c-grip); font-size: 1.1em; }
.export-move { display: flex; gap: 4px; }
.export-move .btn { padding: 2px 8px; }

/* Administration > Emails */
.email-admin-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; align-items: start; max-width: 1100px; margin-top: 16px; }
.email-admin-card { background: var(--surface); border-radius: 10px; padding: 18px 20px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.email-admin-card h2 { margin-top: 0; font-size: 1.2rem; }
@media (max-width: 900px) { .email-admin-grid { grid-template-columns: minmax(0, 1fr); } }

/* Administration > Hébergement et sauvegardes */
.hosting-section { background: var(--surface); border-radius: 10px; padding: 18px 20px; box-shadow: 0 1px 3px rgba(0,0,0,.08); margin-bottom: 24px; max-width: 1100px; }
.hosting-section > h2 { margin-top: 0; font-size: 1.25rem; }
/* Titre d'un bloc avec un lien à droite (ex. phpMyAdmin, 1.057.002). */
.hosting-section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.hosting-section-head > h2 { margin: 0; font-size: 1.25rem; }
.hosting-usage { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.usage-bar { height: 14px; background: var(--c-row-line); border-radius: 7px; overflow: hidden; margin: 6px 0 4px; }
.usage-bar > span { display: block; height: 100%; background: var(--felt-green, var(--c-success)); min-width: 2px; }
.usage-bar.is-high > span { background: var(--c-warning); }
.usage-bar.is-full > span { background: var(--card-red, var(--c-danger)); }
.usage-list { font-size: .9rem; margin: 8px 0 0; padding: 0; list-style: none; }
.usage-list li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border-bottom: 1px dashed rgba(0,0,0,.08); }
.hosting-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.hosting-actions form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin: 0; }
.report-finding { border-left: 4px solid var(--c-grey-border); padding: 8px 12px; margin: 8px 0; background: var(--c-grey-bg); border-radius: 0 6px 6px 0; }
.report-finding.is-danger { border-color: var(--card-red, var(--c-danger)); background: var(--c-danger-soft); }
.report-finding.is-warning { border-color: var(--c-warning); background: var(--c-warning-soft); }
.report-finding.is-info { border-color: var(--c-info); }
.report-finding.is-ok { border-color: var(--c-success); background: var(--c-success-soft); }
.report-finding ul { margin: 6px 0 0 18px; font-size: .88rem; word-break: break-word; }
.report-finding .form-hint { margin: 6px 0 0; }
.report-files { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.report-files label { font-weight: normal; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; font-size: .9rem; }
.report-files .btn { margin-top: 4px; }
.report-file { width: 100%; padding: 6px 0; border-top: 1px dashed rgba(0,0,0,.08); }
.report-file:first-child { border-top: 0; }
.report-known { font-size: .85rem; margin: 4px 0 0 22px; color: var(--c-info); }
.report-file .form-hint { margin: 2px 0 0 22px; }
.report-file-details { margin: 4px 0 0 22px; font-size: .85rem; }
.report-file-details summary { cursor: pointer; color: var(--felt-green-dark, var(--c-success)); }
.report-file-details dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 6px 0; }
.report-file-details dt { font-weight: 600; }
.report-file-details dd { margin: 0; }
.report-preview { max-height: 220px; overflow: auto; background: var(--c-preview-bg); border: 1px solid rgba(0,0,0,.1); border-radius: 6px; padding: 8px; font-size: .8rem; white-space: pre-wrap; word-break: break-all; }
.report-files-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.report-files-toolbar .btn { color: var(--felt-green-dark); border-color: var(--felt-green-dark); }
.report-thumb { display: block; max-width: 180px; max-height: 140px; margin: 6px 0; border-radius: 6px; border: 1px solid rgba(0,0,0,.1); background: var(--surface); }

/* Actualités : boutons Créer / Modifier affichés aux administrateurs et éditeurs */
.page-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 8px;
}

.page-title-bar h1 {
    margin: 0;
}

.prose .page-title-bar {
    margin: 0 0 16px;
}

.news-row-body .news-edit {
    margin-left: 12px;
    vertical-align: middle;
}

/* Administration > Versions */
/* Haut du menu d'administration : retour au site, déconnexion, versions du site et de la base */
.admin-sidebar .brand {
    margin-bottom: 12px;
}

.admin-sidebar-top {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.85rem;
}

.admin-sidebar-links {
    display: flex;
    gap: 6px 16px;
    flex-wrap: wrap;
}

.admin-sidebar-links a {
    color: rgba(255, 255, 255, 0.8);
}

.admin-sidebar-versions {
    display: flex;
    gap: 2px 12px;
    flex-wrap: wrap;
}

.admin-sidebar-top .admin-version {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
}

.admin-sidebar-top a.admin-version:hover {
    color: var(--gold);
}

.admin-sidebar-top .admin-version.is-late {
    color: var(--gold-light);
    font-weight: 700;
}

.version-entry h2 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.version-entry.is-current {
    border-left: 4px solid var(--gold);
}

.version-block {
    margin: 10px 0;
    padding: 8px 12px;
    border-radius: 6px;
    background: var(--paper-alt);
}

.version-block ul {
    margin: 4px 0 0;
}

.version-db {
    background: var(--c-warning-bg);
}

.version-files td:first-child {
    width: 90px;
}

.version-change {
    font-size: 0.8rem;
    font-weight: 600;
}

.version-change.is-added { color: var(--c-success); }
.version-change.is-modified { color: var(--c-info); }
.version-change.is-deleted { color: var(--card-red); }

/* Galerie : progression de l'envoi des photos par lots */
.upload-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.upload-progress progress {
    flex: 1;
    height: 12px;
}

/* Tableaux triables : un clic sur l'en-tête trie la colonne */
table[data-sortable] th.sortable {
    cursor: pointer;
    user-select: none;
}

table[data-sortable] th.sortable:hover {
    text-decoration: underline;
}

table[data-sortable] th.sorted-asc::after {
    content: " ▲";
    font-size: 0.7em;
}

table[data-sortable] th.sorted-desc::after {
    content: " ▼";
    font-size: 0.7em;
}

.standings-table .standings-subhead th {
    font-size: 0.78rem;
    font-weight: 600;
}

/* Saisie du classement : autres fonctionnalités repliées par défaut (bouton « Afficher toutes les fonctionnalités ») */
.standings-panel.options-collapsed .standings-option {
    display: none;
}

.standings-options-bar {
    margin: 0 0 12px;
}

/* Formulaire d'un bloc : pastilles des couleurs du site pour le fond */
.block-color-picker {
    margin-top: 6px;
}

.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.25);
    cursor: pointer;
    padding: 0;
}

.color-swatch:hover {
    transform: scale(1.1);
}

.color-swatch.is-selected {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

/* Info-bulle : icône « i » ; le texte s'affiche au survol ou au toucher (focus). */
.info-tip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 4px;
    border-radius: 50%;
    border: 1px solid currentColor;
    font-size: 11px;
    font-weight: bold;
    font-style: italic;
    font-family: Georgia, serif;
    line-height: 1;
    cursor: help;
    vertical-align: middle;
    opacity: 0.85;
}

.info-tip::after {
    content: attr(data-tip);
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: min(340px, calc(100vw - 24px));
    padding: 8px 10px;
    border-radius: 6px;
    background: var(--ink);
    color: var(--on-dark);
    font-size: 0.8rem;
    line-height: 1.4;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-style: normal;
    font-weight: normal;
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
    white-space: normal;
    box-shadow: var(--shadow);
    z-index: 50;
    /* Masquée par display (et non visibility) : une bulle cachée n'élargit pas la page sur téléphone (1.057.001). */
    display: none;
    pointer-events: none;
}

/* Près d'un bord de l'écran (main.js) : bulle alignée sur l'icône au lieu d'être centrée. */
.info-tip.info-tip-start::after {
    left: -4px;
    transform: none;
}

.info-tip.info-tip-end::after {
    left: auto;
    right: -4px;
    transform: none;
}

/* L'opacité de l'icône crée un contexte d'empilement : on la passe devant (en-têtes de tableaux collants...). */
.info-tip:hover,
.info-tip:focus {
    z-index: 60;
    opacity: 1;
}

.info-tip:hover::after,
.info-tip:focus::after {
    display: block;
}

.info-tip:focus {
    outline: 2px solid var(--gold);
    outline-offset: 1px;
}


/* Contenu externe en attente d'accord (voir ExternalEmbeds et main.js) */
.embed-consent {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    max-width: 100%;
    padding: 18px;
    border: 1px dashed var(--muted);
    border-radius: 6px;
    background: var(--paper-alt);
    color: var(--ink);
    text-align: center;
    font-size: 0.9rem;
}
.embed-consent.embed-consent-video { width: 100%; aspect-ratio: 16 / 9; min-height: 180px; }

.embed-consent p {
    margin: 0;
}

.embed-consent .embed-consent-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.embed-consent .btn-secondary {
    color: var(--felt-green-dark);
    border-color: var(--felt-green-dark);
}

.embed-consent a.embed-consent-more {
    color: var(--felt-green);
    font-size: 0.85rem;
}

/* Bandeau cookies (bas de l'écran, choix « Accepter » et « Refuser » à égalité) */
.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1000;
    max-width: 760px;
    margin: 0 auto;
    padding: 16px 18px;
    border-radius: var(--radius);
    background: var(--ink);
    color: var(--on-dark);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
    font-size: 0.9rem;
}

.cookie-banner p {
    margin: 0 0 10px;
}

.cookie-banner a {
    color: var(--gold-light);
}

.cookie-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Politique de confidentialité : page d'accord */
.privacy-consent-box {
    max-height: 420px;
    overflow: auto;
    padding: 16px 20px;
    border: 1px solid var(--paper-alt);
    border-radius: var(--radius);
    background: var(--surface);
    margin-bottom: 18px;
}

.privacy-consent-form label {
    display: block;
    margin-bottom: 14px;
}

/* Placement aux tables (panneau de classement d'un tournoi live) */
.seating-panel {
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid var(--paper-alt);
    border-radius: var(--radius);
    background: var(--surface);
}

.seating-panel h3 {
    margin-top: 0;
}

.seating-panel .seating-secondary {
    color: var(--felt-green-dark);
    border-color: var(--felt-green-dark);
}

.seating-tables {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px;
    margin: 10px 0;
}

/* Nombre de colonnes choisi selon le nombre de tables ouvertes : rangées équilibrées (4 tables = 2 × 2). */
.seating-tables.seating-cols-1 { grid-template-columns: minmax(0, 1fr); max-width: 320px; }
.seating-tables.seating-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seating-tables.seating-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seating-tables.seating-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.seating-tables > .seating-closed {
    grid-column: 1 / -1;
}

@media (max-width: 900px) {
    .seating-tables.seating-cols-3,
    .seating-tables.seating-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
    .seating-tables.seating-cols-2,
    .seating-tables.seating-cols-3,
    .seating-tables.seating-cols-4 { grid-template-columns: minmax(0, 1fr); }
}

.seating-table {
    border-radius: 8px;
    border: 2px solid var(--felt-green);
    padding: 8px 10px;
    background: var(--paper);
}

.seating-table-2, .seating-table-3 { border-color: var(--card-red); }

.seating-table-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}

.seating-seats {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

.seating-seats li {
    padding: 2px 0;
}

.seating-seat {
    display: inline-block;
    min-width: 22px;
    padding: 0 4px;
    border-radius: 4px;
    background: var(--felt-green);
    color: var(--on-dark);
    text-align: center;
    font-size: 0.8rem;
}

.seating-closed {
    grid-column: 1 / -1;
    margin: 0;
}

.seating-pending {
    margin: 10px 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--c-note-bg);
    border: 1px solid var(--c-note-border);
}

.seating-pending ul {
    margin: 6px 0;
    padding-left: 20px;
}

.seat-mark {
    display: inline-block;
    font-size: 0.75em;
    padding: 1px 6px;
    border-radius: 8px;
    background: var(--felt-green);
    color: var(--on-dark);
    white-space: nowrap;
}

.seat-mark-2, .seat-mark-3 { background: var(--card-red); }

/* ------------------------------------------------------------------------------------------------
   Blocs « News » (16 modèles de présentation des actualités). Chaque bloc s'adapte à sa propre
   largeur (accueil, colonne latérale, mobile) grâce aux requêtes de conteneur.
   ------------------------------------------------------------------------------------------------ */
.news-block {
    container-type: inline-size;
    --nb-accent: var(--gold);
    --nb-accent-ink: var(--felt-green-dark);
}

.nb-accent-green { --nb-accent: var(--felt-green); --nb-accent-ink: var(--on-dark); }
.nb-accent-red { --nb-accent: var(--card-red); --nb-accent-ink: var(--on-dark); }
.nb-accent-ink { --nb-accent: var(--ink); --nb-accent-ink: var(--on-dark); }

.news-block-plain {
    margin: 0;
}

.home-blocks > .news-block-plain + .home-block,
.home-blocks > .home-block + .news-block-plain {
    margin-top: 8px;
}

.nb-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-bottom: 16px;
}

.nb-head h2,
.nb-head h3 {
    margin: 0;
}

.nb-all {
    font-weight: 600;
    font-size: 0.92rem;
}

.nb-empty {
    margin: 0;
}

.news-block .nb-title {
    margin: 0 0 6px;
    line-height: 1.25;
}

.news-block .nb-title a {
    color: inherit;
}

.nb-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-bottom: 6px;
    font-size: 0.82rem;
}

.nb-date {
    color: var(--muted);
    font-size: 0.82rem;
}

.nb-type {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--nb-accent);
    color: var(--nb-accent-ink);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.nb-excerpt {
    margin: 0 0 10px;
}

.nb-more {
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: auto;
}

.news-block img.nb-img,
.news-block .nb-noimg {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    max-width: none;
}

.news-block .nb-noimg {
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 70% 30%, var(--felt-green-light), var(--felt-green-dark));
    color: rgba(242, 216, 121, 0.55);
    font-family: Georgia, serif;
    font-size: 3rem;
    min-height: 60px;
}

.nb-red {
    color: var(--card-red);
}

/* Surfaces blanches (cartes) : toujours texte foncé, même dans un bloc à fond foncé. */
.news-block .nb-surface {
    background: var(--surface);
    color: var(--ink);
}

.news-block .nb-surface .nb-title,
.news-block .nb-surface h3,
.news-block .nb-surface h4 {
    color: var(--felt-green-dark);
}

.news-block .nb-surface a {
    color: var(--felt-green);
}

.news-block .nb-surface .nb-title a {
    color: var(--felt-green-dark);
}

.block-tone-dark .nb-date {
    color: rgba(255, 255, 255, 0.7);
}

.block-tone-dark .nb-surface .nb-date {
    color: var(--muted);
}

/* Titres sur image (bannière, mosaïque, diaporama, tuiles) : toujours en blanc. */
.nb-hero-text,
.nb-tile-text,
.nb-slide-text,
.nb-photo-text {
    color: var(--on-dark);
}

.news-block .nb-hero-text .nb-title,
.news-block .nb-tile-text .nb-title,
.news-block .nb-slide-text .nb-title,
.news-block .nb-photo-text .nb-title,
.news-block .nb-hero-text a,
.news-block .nb-tile-text a,
.news-block .nb-slide-text a {
    color: var(--on-dark);
}

.nb-hero-text .nb-date,
.nb-tile-text .nb-date,
.nb-slide-text .nb-date,
.nb-photo-text .nb-date {
    color: rgba(255, 255, 255, 0.85);
}

.news-block .nb-hero-text .nb-more,
.news-block .nb-slide-text .nb-more {
    color: var(--gold-light);
}

/* 1. Cartes */
.nb-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
}

.nb-cards.nb-cols-2 { grid-template-columns: repeat(2, 1fr); }
.nb-cards.nb-cols-3 { grid-template-columns: repeat(3, 1fr); }
.nb-cards.nb-cols-4 { grid-template-columns: repeat(4, 1fr); }

.nb-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--nb-radius, var(--radius));
    overflow: hidden;
}

.nb-card-shadow .nb-card { box-shadow: var(--shadow); }
.nb-card-border .nb-card { border: 1px solid var(--c-card-border); }
.nb-card-flat .nb-card { background: var(--paper-alt); }

.nb-card-media {
    display: block;
    aspect-ratio: var(--nb-ratio, 16/9);
    overflow: hidden;
}

.nb-card-media img {
    transition: transform 0.3s;
}

.nb-hover-zoom .nb-card:hover .nb-card-media img {
    transform: scale(1.04);
}

.nb-card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.nb-card-body .nb-title {
    font-size: calc(1.15rem * var(--nb-ts, 1));
}

/* 2. Liste avec vignettes */
.nb-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.nb-list.nb-separated .nb-list-item + .nb-list-item {
    border-top: 1px solid rgba(128, 128, 128, 0.25);
    padding-top: 18px;
}

.nb-list-item {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.nb-thumb-right .nb-list-item {
    flex-direction: row-reverse;
}

.nb-list-media {
    flex: 0 0 180px;
    aspect-ratio: 4/3;
    border-radius: var(--nb-radius-sm, 8px);
    overflow: hidden;
}

.nb-thumb-small .nb-list-media { flex-basis: 110px; }
.nb-thumb-large .nb-list-media { flex-basis: 260px; }

.nb-list-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.nb-list-body .nb-title {
    font-size: calc(1.15rem * var(--nb-ts, 1));
}

/* 3. À la une + liste */
.nb-featured {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 22px;
}

.nb-featured-right .nb-featured-main {
    order: 2;
}

.nb-featured-alone {
    grid-template-columns: 1fr;
}

.nb-featured-main {
    border-radius: var(--nb-radius, var(--radius));
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.nb-featured-media {
    position: relative;
    display: block;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.nb-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--nb-accent);
    color: var(--nb-accent-ink);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.nb-badge-inline {
    position: static;
    align-self: flex-start;
    margin: 16px 18px 0;
}

.nb-featured-body {
    padding: 16px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.nb-featured-body .nb-title {
    font-size: calc(1.45rem * var(--nb-ts, 1));
}

.nb-featured-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.nb-side-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.25);
}

.nb-side-item:last-child {
    border-bottom: 0;
}

.nb-side-media {
    flex: 0 0 96px;
    aspect-ratio: 4/3;
    border-radius: var(--nb-radius-sm, 6px);
    overflow: hidden;
}

.nb-side-item .nb-title {
    font-size: calc(1rem * var(--nb-ts, 1));
}

.nb-side-titles .nb-side-item {
    border-left: 3px solid var(--nb-accent);
    border-bottom: 0;
    padding: 2px 0 2px 12px;
}

/* 4. Grande bannière */
.nb-hero {
    position: relative;
    border-radius: var(--nb-radius, var(--radius));
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    background: var(--felt-green-dark);
    box-shadow: var(--shadow);
}

.nb-hero .nb-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: none;
    border-radius: 0;
}

.nb-hero::after,
.nb-tile::after,
.nb-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, var(--nb-overlay, 0.55)) 0%, rgba(0, 0, 0, calc(var(--nb-overlay, 0.55) * 0.35)) 55%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

.nb-hero-noimage {
    background: radial-gradient(circle at top right, var(--felt-green-light), var(--felt-green-dark));
}

.nb-hero-text {
    position: relative;
    z-index: 1;
    padding: 28px 32px;
    max-width: 760px;
}

.nb-align-center {
    justify-content: center;
    text-align: center;
}

.nb-align-center .nb-hero-text {
    margin: 0 auto;
}

.nb-align-center .nb-meta {
    justify-content: center;
}

.nb-hero-text .nb-title {
    font-size: calc(2rem * var(--nb-ts, 1));
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.nb-hero-text .nb-excerpt {
    font-size: 1.02rem;
}

.nb-hero-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.nb-mini-card {
    border-radius: var(--nb-radius-sm, 8px);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.nb-mini-card > a {
    display: block;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.nb-mini-body {
    padding: 10px 14px 14px;
}

.nb-mini-body .nb-title {
    font-size: calc(1rem * var(--nb-ts, 1));
}

.nb-hero-list {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nb-hero-list li {
    padding-left: 12px;
    border-left: 3px solid var(--nb-accent);
}

/* 5. Magazine (mosaïque) */
.nb-magazine {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    height: var(--nb-mosaic-height, 420px);
    gap: 12px;
}

.nb-gap-none { gap: 0; }
.nb-gap-small { gap: 6px; }
.nb-gap-large { gap: 20px; }

.nb-magazine .nb-tile-main {
    grid-row: 1 / span 2;
}

.nb-main-right .nb-tile-main {
    grid-column: 3;
}

.nb-magazine.nb-count-1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.nb-magazine.nb-count-2 { grid-template-columns: 2fr 1fr; }
.nb-magazine.nb-count-2 .nb-tile:not(.nb-tile-main) { grid-row: 1 / span 2; }
.nb-magazine.nb-count-3 { grid-template-columns: 2fr 1fr; }
.nb-magazine.nb-count-4 { grid-template-columns: 2fr 1fr 1fr; }
.nb-magazine.nb-count-4 .nb-tile:last-child { grid-column: span 2; }
.nb-main-right.nb-count-2 .nb-tile-main,
.nb-main-right.nb-count-3 .nb-tile-main { grid-column: 2; }
.nb-main-right.nb-count-4 .nb-tile:last-child { grid-column: 1 / span 2; }

.nb-tile {
    position: relative;
    overflow: hidden;
    border-radius: var(--nb-radius-sm, 8px);
    display: flex;
    align-items: flex-end;
    min-height: 0;
    background: var(--felt-green-dark);
}

.nb-gap-none .nb-tile {
    border-radius: 0;
}

.nb-tile .nb-tile-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: none;
    border-radius: 0;
    transition: transform 0.4s;
}

.nb-hover-zoom .nb-tile:hover .nb-tile-img {
    transform: scale(1.05);
}

.nb-tile-text {
    position: relative;
    z-index: 1;
    padding: 14px 16px;
}

.nb-tile-text .nb-title {
    font-size: calc(1.05rem * var(--nb-ts, 1));
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.nb-tile-main .nb-tile-text {
    padding: 22px 24px;
}

.nb-tile-main .nb-title {
    font-size: calc(1.6rem * var(--nb-ts, 1));
}

.nb-tile-text .nb-title a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
}

/* 6. Diaporama */
.nb-carousel {
    position: relative;
    border-radius: var(--nb-radius, var(--radius));
    overflow: hidden;
    background: var(--felt-green-dark);
    box-shadow: var(--shadow);
}

.nb-slides {
    position: relative;
    height: 100%;
}

.nb-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, transform 0.6s ease, visibility 0.6s;
}

.nb-transition-slide .nb-slide {
    transform: translateX(6%);
}

.nb-transition-slide .nb-slide.is-leaving {
    transform: translateX(-6%);
}

.nb-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.nb-slide .nb-slide-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: none;
    border-radius: 0;
}

.nb-slide-text {
    position: relative;
    z-index: 1;
    padding: 26px 72px 48px 72px;
    max-width: 860px;
}

.nb-slide-text .nb-title {
    font-size: calc(1.8rem * var(--nb-ts, 1));
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.nb-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.85);
    color: var(--felt-green-dark);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.nb-arrow:hover,
.nb-arrow:focus-visible {
    background: var(--gold-light);
}

.nb-prev { left: 12px; }
.nb-next { right: 12px; }

.nb-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14px;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.nb-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid var(--surface);
    background: transparent;
    cursor: pointer;
}

.nb-dot.is-active {
    background: var(--nb-accent);
    border-color: var(--nb-accent);
}

/* 7. Chronologie */
.nb-timeline {
    list-style: none;
    margin: 0;
    padding: 0 0 0 34px;
    position: relative;
}

.nb-timeline::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 2px;
    background: var(--nb-accent);
    opacity: 0.7;
}

.nb-tl-item {
    position: relative;
    margin-bottom: 18px;
}

.nb-tl-item:last-child {
    margin-bottom: 0;
}

.nb-tl-marker {
    position: absolute;
    left: -34px;
    top: 10px;
    width: 29px;
    height: 29px;
    border-radius: 50%;
    background: var(--surface);
    border: 3px solid var(--nb-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Georgia, serif;
    font-size: 1rem;
    color: var(--ink);
}

.nb-tl-marker.nb-red {
    color: var(--card-red);
}

.nb-marker-dots .nb-tl-marker {
    width: 17px;
    height: 17px;
    left: -28px;
    top: 14px;
    background: var(--nb-accent);
}

.nb-marker-chips .nb-tl-marker {
    background: repeating-conic-gradient(var(--nb-accent) 0 30deg, var(--surface) 30deg 60deg);
    border: 3px solid var(--nb-accent);
    box-shadow: inset 0 0 0 5px var(--nb-accent);
}

.nb-tl-card {
    border-radius: var(--nb-radius, var(--radius));
    padding: 14px 18px;
    box-shadow: var(--shadow);
}

.nb-tl-date {
    font-weight: 700;
    color: var(--felt-green);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 4px;
}

.nb-tl-card .nb-type {
    margin-bottom: 6px;
}

.nb-tl-card .nb-title {
    font-size: calc(1.15rem * var(--nb-ts, 1));
}

.nb-tl-media {
    display: block;
    aspect-ratio: 21/9;
    max-height: 200px;
    width: 100%;
    border-radius: var(--nb-radius-sm, 6px);
    overflow: hidden;
    margin: 8px 0 10px;
}

/* 8. Titres seuls */
.nb-compact {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0 28px;
}

.nb-compact li {
    display: flex;
    gap: 12px;
    align-items: baseline;
    padding: 9px 0;
    border-bottom: 1px solid rgba(128, 128, 128, 0.25);
}

.nb-compact li:last-child {
    border-bottom: 0;
}

.nb-compact .nb-date {
    flex: 0 0 auto;
    font-weight: 600;
    color: var(--felt-green);
}

.block-tone-dark .nb-compact .nb-date {
    color: var(--gold-light);
}

.nb-compact-text {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
    min-width: 0;
}

.nb-date-after .nb-compact-text {
    flex-direction: column;
    gap: 2px;
}

.nb-date-after .nb-date {
    font-weight: normal;
    color: var(--muted);
}

.nb-compact a.nb-title {
    font-weight: 600;
    margin: 0;
}

.nb-numbered {
    counter-reset: nb-compact;
}

.nb-numbered li::before {
    counter-increment: nb-compact;
    content: counter(nb-compact);
    flex: 0 0 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--nb-accent);
    color: var(--nb-accent-ink);
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
}

/* 9. Tuiles photo */
.nb-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.nb-tiles.nb-cols-2 { grid-template-columns: repeat(2, 1fr); }
.nb-tiles.nb-cols-3 { grid-template-columns: repeat(3, 1fr); }
.nb-tiles.nb-cols-4 { grid-template-columns: repeat(4, 1fr); }

.nb-photo {
    position: relative;
    display: block;
    aspect-ratio: var(--nb-ratio, 1/1);
    overflow: hidden;
    background: var(--felt-green-dark);
}

.nb-rounded .nb-photo {
    border-radius: var(--nb-radius, var(--radius));
}

.nb-photo .nb-photo-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: none;
    border-radius: 0;
    transition: transform 0.4s;
}

.nb-photo:hover {
    text-decoration: none;
}

.nb-hover-zoom .nb-photo:hover .nb-photo-img {
    transform: scale(1.06);
}

.nb-photo-text {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 34px 14px 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
    transition: opacity 0.25s, transform 0.25s;
}

.nb-photo-text .nb-title {
    display: block;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
    font-size: calc(1.02rem * var(--nb-ts, 1));
    line-height: 1.25;
    margin: 0;
}

.nb-photo-text .nb-meta {
    margin-bottom: 4px;
}

@media (hover: hover) {
    .nb-title-hover .nb-photo-text {
        opacity: 0;
        transform: translateY(8px);
    }

    .nb-title-hover .nb-photo:hover .nb-photo-text,
    .nb-title-hover .nb-photo:focus-visible .nb-photo-text {
        opacity: 1;
        transform: none;
    }
}

/* 10. Bandeau défilant */
.nb-ticker {
    display: flex;
    align-items: stretch;
    overflow: hidden;
    border-radius: var(--nb-radius-sm, 8px);
    background: var(--felt-green-dark);
    color: var(--on-dark);
    box-shadow: var(--shadow);
}

.nb-ticker-label {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: var(--nb-accent);
    color: var(--nb-accent-ink);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
}

.nb-ticker-viewport {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}

.nb-ticker-track {
    display: flex;
    width: max-content;
    animation: nb-ticker linear infinite;
}

.nb-pause-hover:hover .nb-ticker-track,
.nb-ticker:focus-within .nb-ticker-track {
    animation-play-state: paused;
}

.nb-ticker-group {
    display: flex;
    white-space: nowrap;
}

.nb-tick-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
}

.news-block .nb-tick-item a {
    color: var(--on-dark);
    font-weight: 600;
}

.nb-tick-item .nb-date {
    color: var(--gold-light);
    font-weight: 600;
}

.nb-tick-sep {
    color: var(--gold-light);
    font-family: Georgia, serif;
}

.nb-tick-sep.nb-red {
    color: var(--c-ticker-red);
}

@keyframes nb-ticker {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .nb-ticker-track {
        animation: none;
        width: auto;
    }

    .nb-ticker-group {
        flex-wrap: wrap;
        white-space: normal;
    }

    .nb-ticker-group[aria-hidden="true"] {
        display: none;
    }

    .nb-slide,
    .nb-tile .nb-tile-img,
    .nb-photo .nb-photo-img {
        transition: none;
    }
}

/* Largeur réduite (colonne latérale, téléphone) : tout sur une colonne. */
@container (max-width: 640px) {
    .nb-cards.nb-cols-3,
    .nb-cards.nb-cols-4,
    .nb-tiles.nb-cols-3,
    .nb-tiles.nb-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .nb-featured {
        grid-template-columns: 1fr;
    }

    .nb-featured-right .nb-featured-main {
        order: 0;
    }

    .nb-magazine {
        height: auto;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: none;
        grid-auto-rows: minmax(150px, auto);
    }

    .nb-magazine .nb-tile-main,
    .nb-main-right .nb-tile-main {
        grid-column: 1 / -1;
        grid-row: auto;
        min-height: 230px;
    }

    .nb-magazine.nb-count-2 .nb-tile:not(.nb-tile-main),
    .nb-magazine.nb-count-4 .nb-tile:last-child,
    .nb-main-right.nb-count-4 .nb-tile:last-child {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .nb-hero-text,
    .nb-slide-text {
        padding: 18px 20px 40px;
    }

    .nb-slide-text {
        padding-right: 20px;
    }

    .nb-hero-text .nb-title,
    .nb-slide-text .nb-title,
    .nb-tile-main .nb-title {
        font-size: calc(1.35rem * var(--nb-ts, 1));
    }

    .nb-arrow {
        top: 18px;
        transform: none;
        width: 34px;
        height: 34px;
        font-size: 1.4rem;
    }

    .nb-prev { left: auto; right: 54px; }
}

@container (min-width: 641px) {
    .nb-compact-cols-2 {
        grid-template-columns: 1fr 1fr;
    }

    .nb-alternate {
        padding-left: 0;
    }

    .nb-alternate::before {
        left: calc(50% - 1.5px);
    }

    .nb-alternate .nb-tl-item {
        width: calc(50% - 30px);
    }

    .nb-alternate .nb-tl-item:nth-child(odd) {
        margin-right: auto;
    }

    .nb-alternate .nb-tl-item:nth-child(even) {
        margin-left: auto;
    }

    .nb-alternate .nb-tl-item:nth-child(odd) .nb-tl-marker {
        left: auto;
        right: -45px;
    }

    .nb-alternate .nb-tl-item:nth-child(even) .nb-tl-marker {
        left: -45px;
    }

    .nb-alternate.nb-marker-dots .nb-tl-item:nth-child(odd) .nb-tl-marker {
        right: -38px;
    }

    .nb-alternate.nb-marker-dots .nb-tl-item:nth-child(even) .nb-tl-marker {
        left: -38px;
    }
}

@container (max-width: 420px) {
    .nb-cards.nb-cols-2,
    .nb-cards.nb-cols-3,
    .nb-cards.nb-cols-4 {
        grid-template-columns: 1fr;
    }

    .nb-list-item,
    .nb-thumb-right .nb-list-item {
        flex-direction: column;
    }

    .nb-list-media,
    .nb-thumb-small .nb-list-media,
    .nb-thumb-large .nb-list-media {
        flex-basis: auto;
        width: 100%;
        aspect-ratio: 16/9;
    }

    .nb-in-sidebar .nb-list-item {
        flex-direction: row;
    }

    .nb-in-sidebar .nb-list-media {
        flex: 0 0 72px;
        width: 72px;
        aspect-ratio: 1/1;
    }

    .nb-magazine {
        grid-template-columns: 1fr;
        grid-auto-rows: minmax(170px, auto);
    }

    .nb-ticker {
        flex-direction: column;
    }

    .nb-ticker-label {
        justify-content: center;
        padding: 6px 12px;
    }
}

/* Blocs « News » : réglages communs (taille des titres, lignes, coins, survol, titre du bloc, largeur,
   pastille « Nouveau », temps de lecture, apparition à l'écran). */
.nb-tsize-small { --nb-ts: 0.86; }
.nb-tsize-large { --nb-ts: 1.15; }
.nb-tsize-xlarge { --nb-ts: 1.32; }

.nb-radius-square { --nb-radius: 0; --nb-radius-sm: 0; }
.nb-radius-round { --nb-radius: 22px; --nb-radius-sm: 14px; }

.nb-clamp-title .nb-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--nb-title-lines, 2);
    line-clamp: var(--nb-title-lines, 2);
    overflow: hidden;
}

.nb-clamp-excerpt .nb-excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--nb-excerpt-lines, 3);
    line-clamp: var(--nb-excerpt-lines, 3);
    overflow: hidden;
}

.nb-hover-lift .nb-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nb-hover-lift .nb-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

.nb-hover-lift .nb-pcard.nb-item:hover {
    transform: translateY(-6px) rotate(0deg);
}

.nb-head-accent .nb-head h2,
.nb-head-accent .nb-head h3 {
    padding-bottom: 6px;
    background: linear-gradient(var(--nb-accent), var(--nb-accent)) left bottom / 56px 4px no-repeat;
}

.nb-head-centered .nb-head {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.nb-head-suits .nb-head h2::before,
.nb-head-suits .nb-head h3::before {
    content: "♠ ♥ ";
    color: var(--nb-accent);
    font-size: 0.8em;
    letter-spacing: 0.08em;
    margin-right: 6px;
}

.nb-head-suits .nb-head h2::after,
.nb-head-suits .nb-head h3::after {
    content: " ♦ ♣";
    color: var(--nb-accent);
    font-size: 0.8em;
    letter-spacing: 0.08em;
    margin-left: 6px;
}

.news-block.nb-width-wide,
.news-block.nb-width-medium,
.news-block.nb-width-narrow {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.news-block.nb-width-wide { max-width: 1000px; }
.news-block.nb-width-medium { max-width: 820px; }
.news-block.nb-width-narrow { max-width: 680px; }

.nb-new {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--card-red);
    color: var(--on-dark);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.nb-reading {
    color: var(--muted);
    font-size: 0.8rem;
}

.block-tone-dark .nb-reading,
.nb-hero-text .nb-reading,
.nb-slide-text .nb-reading,
.nb-tile-text .nb-reading {
    color: rgba(255, 255, 255, 0.8);
}

.nb-animate-ready .nb-item {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: var(--nb-delay, 0s);
}

.nb-animate-ready[data-nb-animate="rise"] .nb-item {
    transform: translateY(22px);
}

.nb-animate-ready .nb-item.is-visible {
    opacity: 1;
    transform: none;
}

/* 11. Alterné (zigzag) */
.nb-split {
    display: flex;
    flex-direction: column;
    gap: 34px;
}

.nb-split-item {
    display: grid;
    grid-template-columns: var(--nb-split-img, 50%) 1fr;
    gap: 30px;
    align-items: center;
}

.nb-split-noimage .nb-split-item {
    grid-template-columns: 1fr;
}

.nb-split-first-left .nb-split-item:nth-child(even) .nb-split-media,
.nb-split-first-right .nb-split-item:nth-child(odd) .nb-split-media {
    order: 2;
}

.nb-split-first-left .nb-split-item:nth-child(even),
.nb-split-first-right .nb-split-item:nth-child(odd) {
    grid-template-columns: 1fr var(--nb-split-img, 50%);
}

.nb-split-divided .nb-split-item + .nb-split-item {
    border-top: 1px solid rgba(128, 128, 128, 0.25);
    padding-top: 34px;
}

.nb-split-media {
    display: block;
    aspect-ratio: var(--nb-ratio, 4/3);
    border-radius: var(--nb-radius, var(--radius));
    overflow: hidden;
    box-shadow: var(--shadow);
}

.nb-hover-zoom .nb-split-item:hover .nb-split-media img,
.nb-hover-zoom .nb-slider-card:hover .nb-card-media img,
.nb-hover-zoom .nb-brick:hover .nb-brick-media img,
.nb-hover-zoom .nb-pcard:hover .nb-pcard-media img {
    transform: scale(1.05);
}

.nb-split-media img,
.nb-slider-card .nb-card-media img,
.nb-brick-media img,
.nb-pcard-media img {
    transition: transform 0.35s;
}

.nb-split-body .nb-title {
    font-size: calc(1.5rem * var(--nb-ts, 1));
}

.nb-split-body {
    display: flex;
    flex-direction: column;
}

/* 12. Carrousel horizontal */
.nb-slider {
    position: relative;
}

.nb-slider-track {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 4px 4px 14px;
    scrollbar-width: thin;
    scrollbar-color: var(--nb-accent) transparent;
}

.nb-slider-track:focus-visible {
    outline: 2px solid var(--nb-accent);
    outline-offset: 2px;
}

.nb-slider-card {
    flex: 0 0 var(--nb-slide-w, 280px);
    max-width: 85%;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    border-radius: var(--nb-radius, var(--radius));
    overflow: hidden;
    box-shadow: var(--shadow);
}

.nb-slider-card .nb-title {
    font-size: calc(1.08rem * var(--nb-ts, 1));
}

.nb-slider .nb-arrow {
    top: calc(50% - 20px);
}

.nb-slider .nb-prev { left: -10px; }
.nb-slider .nb-next { right: -10px; }

.nb-slider .nb-arrow[disabled] {
    opacity: 0;
    pointer-events: none;
}

/* 13. Mur (mosaïque libre) */
.nb-masonry {
    columns: 3 240px;
    column-gap: 18px;
}

.nb-mcols-2 { columns: 2; }
.nb-mcols-3 { columns: 3; }
.nb-mcols-4 { columns: 4; }
.nb-mgap-small { column-gap: 10px; }
.nb-mgap-large { column-gap: 28px; }

.nb-brick {
    break-inside: avoid;
    margin-bottom: 18px;
    border-radius: var(--nb-radius, var(--radius));
    overflow: hidden;
    display: block;
}

.nb-mgap-small .nb-brick { margin-bottom: 10px; }
.nb-mgap-large .nb-brick { margin-bottom: 28px; }

.nb-mstyle-cards .nb-brick {
    box-shadow: var(--shadow);
}

.nb-brick-media {
    display: block;
    overflow: hidden;
}

.nb-brick-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
}

.nb-brick-body .nb-title {
    font-size: calc(1.1rem * var(--nb-ts, 1));
}

.nb-mstyle-overlay .nb-brick {
    position: relative;
    background: var(--felt-green-dark);
}

.nb-mstyle-overlay .nb-brick-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 40px 14px 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
    color: var(--on-dark);
    pointer-events: none;
}

.news-block .nb-mstyle-overlay .nb-title,
.news-block .nb-mstyle-overlay .nb-title a,
.nb-mstyle-overlay .nb-date {
    color: var(--on-dark);
}

.nb-mstyle-overlay .nb-title a {
    pointer-events: auto;
}

/* 14. Cartes à jouer */
.nb-playing {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 26px;
    padding: 8px 4px;
}

.nb-playing.nb-cols-2 { grid-template-columns: repeat(2, 1fr); }
.nb-playing.nb-cols-3 { grid-template-columns: repeat(3, 1fr); }
.nb-playing.nb-cols-4 { grid-template-columns: repeat(4, 1fr); }

.nb-pcard {
    --nb-suit: var(--ink);
    position: relative;
    background: var(--c-pcard-bg);
    color: var(--ink);
    border-radius: var(--nb-radius, 14px);
    border: 1px solid var(--c-pcard-border);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
    padding: 34px 30px 36px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.nb-radius-rounded .nb-pcard { --nb-radius: 14px; }

.nb-suit-heart, .nb-suit-diamond { --nb-suit: var(--card-red); }
.nb-pcolors-four .nb-suit-diamond { --nb-suit: var(--c-suit-diamond); }
.nb-pcolors-four .nb-suit-club { --nb-suit: var(--c-suit-club); }

.nb-tilt .nb-pcard:nth-child(3n + 1) { transform: rotate(-1.6deg); }
.nb-tilt .nb-pcard:nth-child(3n + 2) { transform: rotate(1.1deg); }
.nb-tilt .nb-pcard:nth-child(3n) { transform: rotate(-0.6deg); }

.nb-tilt .nb-pcard:hover {
    transform: rotate(0deg) translateY(-4px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
}

.nb-pcorner {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    color: var(--nb-suit);
    font-family: Georgia, "Times New Roman", serif;
}

.nb-pcorner b {
    font-size: 1.15rem;
}

.nb-pcorner i {
    font-style: normal;
    font-size: 1rem;
}

.nb-pcorner-top { top: 8px; left: 9px; }
.nb-pcorner-bottom { bottom: 8px; right: 9px; transform: rotate(180deg); }

.nb-pcard-media {
    display: block;
    aspect-ratio: 4/3;
    border-radius: var(--nb-radius-sm, 8px);
    overflow: hidden;
    margin-bottom: 12px;
    border: 3px solid var(--surface);
    box-shadow: 0 0 0 1px var(--c-pcard-border);
}

.nb-pcard-pip {
    display: block;
    text-align: center;
    font-size: 3.4rem;
    line-height: 1;
    color: var(--nb-suit);
    margin-bottom: 10px;
    font-family: Georgia, serif;
}

.news-block .nb-pcard .nb-title,
.news-block .nb-pcard .nb-title a {
    color: var(--felt-green-dark);
    font-size: calc(1.1rem * var(--nb-ts, 1));
}

.nb-pcard .nb-date {
    color: var(--muted);
}

.news-block .nb-pcard a.nb-more {
    color: var(--nb-suit);
}

/* 15. Journal */
.nb-newspaper {
    background: var(--c-np-paper);
    color: var(--c-np-ink);
    padding: 20px 24px 24px;
    border: 1px solid var(--c-np-border);
    box-shadow: var(--shadow);
    font-family: Georgia, "Times New Roman", serif;
}

.nb-np-masthead {
    text-align: center;
    border-bottom: 3px double var(--c-np-ink);
    padding-bottom: 8px;
    margin-bottom: 16px;
}

.nb-np-name {
    display: block;
    font-size: calc(2.2rem * var(--nb-ts, 1));
    font-weight: 700;
    letter-spacing: 0.02em;
    font-variant: small-caps;
    line-height: 1.1;
}

.nb-np-dateline {
    display: block;
    border-top: 1px solid var(--c-np-ink);
    margin-top: 6px;
    padding-top: 4px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.news-block .nb-newspaper .nb-title,
.news-block .nb-newspaper .nb-title a {
    color: var(--c-np-ink);
}

.news-block .nb-newspaper a.nb-more {
    color: var(--card-red);
}

.nb-newspaper .nb-date,
.nb-newspaper .nb-reading {
    color: var(--c-np-muted);
    font-style: italic;
}

.nb-np-lead {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 22px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--c-np-ink);
}

.nb-np-lead:has(> .nb-np-lead-text:only-child) {
    grid-template-columns: 1fr;
}

.nb-np-media,
.nb-np-thumb {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
    filter: grayscale(0.35) sepia(0.15);
}

.nb-np-thumb {
    margin: 6px 0 8px;
}

.nb-np-lead .nb-title {
    font-size: calc(1.8rem * var(--nb-ts, 1));
}

.nb-np-dropcap .nb-np-lead .nb-excerpt::first-letter {
    float: left;
    font-size: 3.4em;
    line-height: 0.8;
    padding: 6px 8px 0 0;
    font-weight: 700;
    color: var(--card-red);
}

.nb-np-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.nb-np-cols-2 .nb-np-columns {
    grid-template-columns: repeat(2, 1fr);
}

.nb-np-article {
    padding: 0 16px;
}

.nb-np-article:first-child {
    padding-left: 0;
}

.nb-np-rules .nb-np-article + .nb-np-article {
    border-left: 1px solid var(--c-np-rule);
}

.nb-np-article .nb-title {
    font-size: calc(1.1rem * var(--nb-ts, 1));
}

.nb-np-article .nb-excerpt {
    text-align: justify;
    hyphens: auto;
    font-size: 0.93rem;
}

/* 16. Accordéon */
.nb-accordion {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nb-acc-item {
    background: var(--surface);
    color: var(--ink);
    border-radius: var(--nb-radius-sm, 8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid transparent;
    transition: border-color 0.2s;
}

.nb-acc-item[open] {
    border-left-color: var(--nb-accent);
}

.nb-acc-item summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    list-style: none;
}

.nb-acc-item summary::-webkit-details-marker {
    display: none;
}

.nb-acc-item summary:focus-visible {
    outline: 2px solid var(--nb-accent);
    outline-offset: 2px;
}

.nb-acc-head {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 2px 12px;
}

.news-block .nb-acc-head .nb-title {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
    font-size: calc(1.08rem * var(--nb-ts, 1));
    color: var(--felt-green-dark);
}

.nb-acc-head .nb-meta {
    margin: 0;
}

.nb-acc-icon {
    flex: 0 0 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--paper-alt);
    color: var(--felt-green-dark);
    font-weight: 700;
    transition: transform 0.25s, background 0.2s;
}

.nb-acc-plus .nb-acc-icon::before { content: "+"; font-size: 1.2rem; }
.nb-acc-plus .nb-acc-item[open] .nb-acc-icon::before { content: "−"; }
.nb-acc-chevron .nb-acc-icon::before { content: "›"; font-size: 1.4rem; line-height: 1; }
.nb-acc-chevron .nb-acc-item[open] .nb-acc-icon { transform: rotate(90deg); }
.nb-acc-suits .nb-acc-icon { background: transparent; font-family: Georgia, serif; font-size: 1.2rem; }
.nb-acc-suits .nb-acc-icon.nb-red { color: var(--card-red); }

.nb-acc-item[open] .nb-acc-icon {
    background: var(--nb-accent);
    color: var(--nb-accent-ink);
}

.nb-acc-suits .nb-acc-item[open] .nb-acc-icon {
    background: transparent;
    color: inherit;
    transform: scale(1.2);
}

.nb-acc-body {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 0 16px 16px 54px;
}

.nb-acc-media {
    flex: 0 0 180px;
    aspect-ratio: 4/3;
    border-radius: var(--nb-radius-sm, 6px);
    overflow: hidden;
}

.news-block .nb-acc-body a.nb-more {
    color: var(--felt-green);
}

@container (max-width: 640px) {
    .nb-split-item,
    .nb-split-first-left .nb-split-item:nth-child(even),
    .nb-split-first-right .nb-split-item:nth-child(odd) {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .nb-split-item .nb-split-media {
        order: 0 !important;
    }

    .nb-masonry,
    .nb-mcols-3,
    .nb-mcols-4 {
        columns: 2;
    }

    .nb-playing.nb-cols-3,
    .nb-playing.nb-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .nb-np-lead,
    .nb-np-columns,
    .nb-np-cols-2 .nb-np-columns {
        grid-template-columns: 1fr;
    }

    .nb-np-article,
    .nb-np-article:first-child {
        padding: 12px 0;
    }

    .nb-np-rules .nb-np-article + .nb-np-article {
        border-left: 0;
        border-top: 1px solid var(--c-np-rule);
    }

    .nb-acc-body {
        flex-direction: column;
        padding-left: 16px;
    }

    .nb-acc-media {
        flex-basis: auto;
        width: 100%;
    }

    .nb-slider .nb-prev { left: 4px; }
    .nb-slider .nb-next { right: 4px; }
}

@container (max-width: 420px) {
    .nb-masonry,
    .nb-mcols-2,
    .nb-mcols-3,
    .nb-mcols-4,
    .nb-playing.nb-cols-2,
    .nb-playing.nb-cols-3,
    .nb-playing.nb-cols-4 {
        columns: 1;
        grid-template-columns: 1fr;
    }

    .nb-newspaper {
        padding: 14px;
    }

    .nb-np-name {
        font-size: calc(1.6rem * var(--nb-ts, 1));
    }
}

@media (prefers-reduced-motion: reduce) {
    .nb-slider-track {
        scroll-behavior: auto;
    }

    .nb-hover-lift .nb-item,
    .nb-pcard,
    .nb-acc-icon {
        transition: none;
    }
}

/* Administration : formulaire des blocs de News (choix du modèle, réglages, aperçu en direct). */
.nb-form [hidden] {
    display: none !important;
}

.nb-form-title {
    font-size: 1.15rem;
    margin: 8px 0 12px;
}

.nb-model-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 26px;
}

.nb-model {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 8px 8px 12px;
    background: var(--surface);
    border: 2px solid var(--c-frame-border);
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: normal;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.nb-model:hover {
    border-color: var(--gold);
}

.nb-model.is-selected {
    border-color: var(--felt-green);
    box-shadow: 0 0 0 3px rgba(11, 61, 46, 0.18);
}

.nb-model.is-selected::after {
    content: "✓";
    position: absolute;
    top: 12px;
    right: 12px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--felt-green);
    color: var(--on-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.nb-model input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.nb-model:focus-within {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.nb-model-img {
    display: block;
    aspect-ratio: 16/10;
    border-radius: 6px;
    overflow: hidden;
    background: var(--paper);
    border: 1px solid var(--paper-alt);
}

.nb-model-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.nb-model-name {
    font-weight: 700;
    color: var(--felt-green-dark);
    margin-top: 4px;
}

.nb-model-desc {
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.35;
}

.nb-form-grid {
    display: grid;
    grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.nb-form-preview {
    position: sticky;
    top: 16px;
    min-width: 0;
}

.nb-fieldset {
    border: 1px solid var(--c-frame-border);
    border-radius: var(--radius);
    padding: 12px 16px 4px;
    margin: 0 0 18px;
    background: var(--surface);
}

.nb-fieldset legend {
    padding: 0 6px;
    font-weight: 700;
    color: var(--felt-green-dark);
}

label.nb-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    margin-bottom: 6px;
}

.nb-preview-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 10px;
}

.nb-preview-widths {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.btn.btn-outline {
    background: transparent;
    color: var(--felt-green-dark);
    border: 1px solid var(--felt-green-dark);
}

.nb-preview-frame-wrap {
    background: repeating-linear-gradient(45deg, var(--c-preview-check-1), var(--c-preview-check-1) 10px, var(--c-preview-check-2) 10px, var(--c-preview-check-2) 20px);
    border: 1px solid var(--c-frame-border);
    border-radius: var(--radius);
    padding: 10px;
    overflow: auto;
    max-height: calc(100vh - 150px);
}

#nb-preview-frame {
    display: block;
    width: 100%;
    min-height: 160px;
    border: 0;
    margin: 0 auto;
    background: var(--paper);
    border-radius: 6px;
    transition: width 0.2s;
}

#nb-preview-frame.nb-preview-sidebar {
    width: 320px;
    max-width: 100%;
}

#nb-preview-frame.nb-preview-phone {
    width: 390px;
    max-width: 100%;
}

@media (max-width: 1100px) {
    .nb-form-grid {
        grid-template-columns: 1fr;
    }

    .nb-form-preview {
        position: static;
    }
}

/* Administration : liste des blocs par emplacement, ordre par glisser-déplacer. */
.blocks-add {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin: 0 0 12px;
}

.blocks-add label {
    margin: 0;
}

.blocks-add select {
    width: auto;
    max-width: 100%;
}

.blocks-zone {
    margin: 26px 0;
}

.blocks-zone-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 16px;
    margin-bottom: 8px;
}

.blocks-zone-head h2 {
    margin: 0;
    font-size: 1.2rem;
}

.blocks-zone-links {
    margin-left: auto;
    display: flex;
    gap: 14px;
    font-size: 0.9rem;
}

.blocks-zone-status {
    font-size: 0.85rem;
    color: var(--felt-green);
    font-weight: 600;
}

.blocks-zone-status.is-error {
    color: var(--card-red);
}

.blocks-table .drag-cell {
    width: 44px;
    text-align: center;
    padding-left: 6px;
    padding-right: 6px;
}

.drag-handle {
    border: 1px solid var(--c-field-border);
    background: var(--surface);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    cursor: grab;
    touch-action: none;
    font-weight: 700;
    letter-spacing: -2px;
    color: var(--muted);
    line-height: 1;
}

.drag-handle:hover,
.drag-handle:focus-visible {
    border-color: var(--felt-green);
    color: var(--felt-green);
}

.blocks-table tr.is-dragging {
    background: var(--gold-light) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    position: relative;
    z-index: 2;
}

.blocks-table tr.is-dragging .drag-handle,
body.is-sorting,
body.is-sorting * {
    cursor: grabbing !important;
    user-select: none;
}

.blocks-group-head td {
    background: var(--paper-alt) !important;
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--felt-green-dark);
}

.blocks-empty td {
    color: var(--muted);
    font-style: italic;
    text-align: center;
    border: 2px dashed var(--c-card-border);
}

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

/* Blocs placés sur une page, au-dessus ou en dessous de son contenu. */
.page-blocks-before {
    margin: 0 0 28px;
}

.page-blocks-after {
    margin: 32px 0 0;
}

.blocks-table {
    table-layout: fixed;
    width: 100%;
}

.blocks-table .col-drag { width: 56px; }
.blocks-table .col-type { width: 26%; }
.blocks-table .col-title { width: 30%; }
.blocks-table .col-active { width: 90px; }

.blocks-table td {
    overflow-wrap: anywhere;
}

@media (max-width: 800px) {
    .blocks-table .col-type { width: 30%; }
    .blocks-table .col-title { width: 34%; }
    .blocks-table .col-active,
    .blocks-table th:nth-child(4),
    .blocks-table td:nth-child(4) { display: none; }
}

/* Administration : rôles et droits. */
.role-chip {
    display: inline-block;
    margin: 2px 4px 2px 0;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--paper-alt);
    color: var(--felt-green-dark);
    font-size: 0.8rem;
    font-weight: 600;
}

label.role-permission {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-weight: normal;
    padding: 10px 0;
    border-bottom: 1px solid var(--paper-alt);
}

label.role-permission:last-of-type {
    border-bottom: 0;
}

label.role-permission input {
    margin-top: 4px;
}

label.role-permission > span {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.role-scope {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--felt-green);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Aperçu par appareil (administrateurs) : icônes du bandeau et fenêtre d'aperçu. */
.device-switch {
    display: inline-flex;
    gap: 2px;
    padding: 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    vertical-align: middle;
}

.device-switch button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
}

.device-switch button:hover,
.device-switch button:focus-visible {
    color: var(--on-dark);
    background: rgba(255, 255, 255, 0.12);
}

.device-switch button.is-active {
    background: var(--gold);
    color: var(--felt-green-dark);
}

.device-switch svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.in-device-preview .device-switch {
    display: none;
}

.device-preview-open body {
    overflow: hidden;
}

.device-preview {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    background: rgba(12, 20, 17, 0.94);
}

.device-preview-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    padding: 10px 16px;
    color: var(--on-dark);
    font-size: 0.9rem;
    background: var(--felt-green-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.device-preview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.device-preview-actions button {
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: transparent;
    color: var(--on-dark);
    border-radius: 6px;
    padding: 5px 12px;
    cursor: pointer;
    font-size: 0.85rem;
}

.device-preview-actions button:hover,
.device-preview-actions button.is-active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--felt-green-dark);
}

.device-preview-actions .device-preview-close {
    border-color: var(--gold-light);
}

.device-preview-stage {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 16px 20px;
    overflow: hidden;
}

.device-preview-shell {
    flex: 0 0 auto;
    padding: 14px;
    border-radius: 34px;
    background: var(--c-device-shell);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55), inset 0 0 0 2px var(--c-device-shadow);
    transform-origin: top center;
}

.device-preview-shell.device-tablet {
    border-radius: 26px;
}

.device-preview-shell iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 20px;
    background: var(--surface);
}

.device-preview-shell.device-tablet iframe {
    border-radius: 12px;
}

/* Blocs « News » en grille (Cartes, Tuiles photo, Cartes à jouer) : sur une seule ligne avec un ascenseur
   horizontal au lieu de passer à la ligne. */
.news-block .nb-row-scroll {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    padding: 6px 4px 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--nb-accent) rgba(128, 128, 128, 0.15);
}

.news-block .nb-row-scroll[data-nb-autoscroll] {
    scroll-snap-type: none;
}

.news-block .nb-row-scroll > * {
    flex: 0 0 var(--nb-item-w, 280px);
    max-width: 85%;
    scroll-snap-align: start;
}

.news-block .nb-row-scroll::-webkit-scrollbar {
    height: 10px;
}

.news-block .nb-row-scroll::-webkit-scrollbar-thumb {
    background: var(--nb-accent);
    border-radius: 999px;
}

.news-block .nb-row-scroll::-webkit-scrollbar-track {
    background: rgba(128, 128, 128, 0.15);
    border-radius: 999px;
}

.news-block .nb-playing.nb-row-scroll {
    padding: 14px 10px 20px;
}

/* Cartes à jouer : image de l'actualité en fond de la carte, transparence réglable. */
.nb-pcard-bg {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    pointer-events: none;
}

.nb-pcard-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: none;
    border-radius: 0;
    opacity: var(--nb-pbg-opacity, 0.25);
}

.nb-pbg .nb-pcard-inner {
    position: relative;
    z-index: 1;
}

.nb-pbg .nb-pcorner {
    z-index: 2;
}

/* Image de fond très visible : voile clair derrière le texte pour qu'il reste lisible. */
.nb-pbg .nb-pcard-inner .nb-title,
.nb-pbg .nb-pcard-inner .nb-excerpt,
.nb-pbg .nb-pcard-inner .nb-meta,
.nb-pbg .nb-pcard-inner .nb-more {
    text-shadow: 0 0 6px rgba(255, 253, 248, 0.95), 0 0 2px rgba(255, 253, 248, 0.95);
}

.nb-pbg .nb-pcard-pip {
    position: relative;
    text-shadow: 0 0 10px rgba(255, 253, 248, 0.9);
}

.nb-pbg .nb-pcard-inner {
    border-radius: 10px;
    margin: -6px -8px;
    padding: 6px 8px;
    /* Voile clair qui apparaît quand l'image de fond dépasse 40 % d'opacité. */
    background: rgba(255, 253, 248, calc((var(--nb-pbg-opacity, 0.25) - 0.4) * 1.3));
}

.role-suboption {
    margin: -4px 0 8px 30px;
    padding: 8px 12px;
    border-left: 3px solid var(--gold);
    background: var(--paper);
    border-radius: 0 6px 6px 0;
}

.role-suboption[hidden] {
    display: none;
}

/* Confirmation du mot de passe avant une action grave */
.reauth-dialog { border: 0; border-radius: 10px; padding: 0; max-width: min(420px, calc(100vw - 32px)); box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.reauth-dialog::backdrop { background: rgba(0,0,0,.45); }
.reauth-form { padding: 20px; }
.reauth-form h3 { margin: 0 0 8px; }
.reauth-form input[type=password] { width: 100%; box-sizing: border-box; margin: 8px 0; }
.reauth-error { color: var(--c-danger); margin: 4px 0 8px; font-weight: 600; }

/* Blocs de contenu : espacements réglés à la main (padding en ligne, écart titre / contenu). */
.block-custom-spacing > h3 {
    margin-top: 0;
    margin-bottom: var(--block-title-gap, 16px);
}

.block-custom-spacing .block-content > :first-child,
.block-custom-spacing .block-fit-inner > :first-child,
.home-block .block-fit-inner > :first-child {
    margin-top: 0;
}

.block-custom-spacing .block-content > :last-child,
.block-custom-spacing .block-fit-inner > :last-child,
.home-block .block-fit-inner > :last-child {
    margin-bottom: 0;
}

/* Contenu adapté à la hauteur du bloc : main.js règle le zoom de .block-fit-inner pour qu'il tienne. */
.block-fit .block-content {
    display: flow-root;
}

/* Administration > Visuels */
.visual-preview-bar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 8px 16px;
    background: var(--gold);
    color: var(--felt-green-dark);
    font-size: 0.9rem;
    font-weight: 600;
}

.visual-preview-bar a {
    color: var(--felt-green-dark);
    text-decoration: underline;
}

.visuals-table tr.is-shown td {
    background: var(--c-note-bg);
}

.visuals-table .status-badge {
    margin-left: 6px;
}

.visual-btn {
    color: var(--felt-green-dark);
    border-color: var(--felt-green-dark);
}

.visual-strip {
    display: inline-flex;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.visual-strip span {
    width: 22px;
    height: 22px;
}

.visual-group-title {
    margin: 22px 0 8px;
}

.visual-swatch {
    display: inline-block;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
    vertical-align: middle;
}

.visual-swatch-small {
    width: 18px;
    height: 18px;
    border-radius: 4px;
}

.visual-colors td.visual-usage {
    white-space: normal;
    min-width: 260px;
}

.visual-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.visual-form-preview {
    position: sticky;
    top: 16px;
}

.visual-fieldset {
    border: 1px solid var(--c-frame-border);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 10px 16px 14px;
    margin: 0 0 16px;
}

.visual-fieldset legend {
    font-weight: 700;
    padding: 0 6px;
}

.visual-color-row {
    display: grid;
    grid-template-columns: 48px 92px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--c-row-line);
}

.visual-color-row:last-child {
    border-bottom: 0;
}

.visual-color-row input[type="color"] {
    width: 48px;
    height: 36px;
    padding: 2px;
}

.visual-color-row .visual-hex {
    font-family: monospace;
    padding: 6px 8px;
}

.visual-color-text {
    display: flex;
    flex-direction: column;
}

.visual-color-text .form-hint {
    margin: 0;
}

.visual-preview {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--paper);
    color: var(--ink);
    font-size: 0.9rem;
}

.vp-header {
    background: var(--felt-green);
    color: var(--paper);
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vp-brand {
    font-weight: 700;
}

.vp-mark {
    color: var(--gold);
}

.vp-nav {
    font-size: 0.8rem;
    opacity: 0.85;
}

.vp-body {
    padding: 14px;
}

.vp-body .alert {
    padding: 8px 10px;
    margin: 6px 0;
}

.vp-muted {
    color: var(--muted);
}

.vp-table {
    width: 100%;
    margin: 10px 0;
    background: var(--surface);
}

.vp-block {
    padding: 14px;
    margin-top: 10px;
}

.vp-block h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.vp-footer {
    background: var(--felt-green-dark);
    color: var(--paper);
    padding: 10px 14px;
    font-size: 0.8rem;
}

@media (max-width: 1000px) {
    .visual-form {
        grid-template-columns: 1fr;
    }

    .visual-form-preview {
        position: static;
        order: -1;
    }

    .visual-color-row {
        grid-template-columns: 48px 92px minmax(0, 1fr);
    }

    .visual-color-row [data-color-reset] {
        grid-column: 3;
        justify-self: start;
    }
}

/* Menu d'administration : page affichée et sous-menus repliables */
.admin-nav a.is-active {
    background: rgba(255, 255, 255, 0.12);
    color: var(--on-dark);
}

.admin-nav-collapsible > summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 6px;
    border-radius: 6px;
}

.admin-nav-collapsible > summary::-webkit-details-marker {
    display: none;
}

.admin-nav-collapsible > summary::after {
    content: "▸";
    font-size: 0.9rem;
    transition: transform 0.15s;
}

.admin-nav-collapsible[open] > summary::after {
    transform: rotate(90deg);
}

.admin-nav-collapsible > summary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.admin-nav-collapsible {
    display: block;
}

.admin-nav-group-links {
    display: flex;
    flex-direction: column;
}

.admin-nav-collapsible .admin-nav-group-links a {
    padding-left: 24px;
    font-size: 0.94rem;
}

/* Administration > Menu d'administration : éditeur par glisser-déplacer */
.menu-editor {
    max-width: 760px;
}

.me-sections {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.me-section {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 12px 14px;
}

.me-section-head,
.me-group-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.me-section-head .me-label {
    flex: 1;
    min-width: 180px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.me-group-head .me-label {
    flex: 1;
    min-width: 160px;
}

.me-items {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 40px;
    border-radius: 6px;
}

.me-items.is-empty {
    border: 2px dashed var(--c-field-border);
    justify-content: center;
}

.me-items.is-empty::before {
    content: "Glissez des pages ici";
    color: var(--muted);
    font-size: 0.85rem;
    text-align: center;
}

.me-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    background: var(--paper);
    border: 1px solid var(--c-frame-border);
    border-radius: 6px;
}

.me-link .form-hint {
    margin: 0 0 0 auto;
    font-size: 0.78rem;
    overflow-wrap: anywhere;
    text-align: right;
}

.me-group {
    padding: 8px 10px 10px;
    border: 1px solid var(--c-frame-border);
    border-left: 4px solid var(--gold);
    border-radius: 6px;
    background: var(--paper-alt);
}

.me-group-items {
    margin-left: 18px;
}

.me-collapsed-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: normal;
    margin: 0;
    white-space: nowrap;
}

.me-btn {
    color: var(--felt-green-dark);
    border-color: var(--felt-green-dark);
}

.me-section.is-dragging,
.me-group.is-dragging,
.me-link.is-dragging {
    opacity: 0.6;
    outline: 2px dashed var(--gold);
}

.menu-editor .drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
}

/* Bandeau tout en haut du site (Administration > Bandeau du haut) */
.top-announce {
    display: block;
    padding: 8px 0;
    font-size: 0.95rem;
    line-height: 1.4;
    text-align: center;
}

a.top-announce {
    text-decoration: none;
    cursor: pointer;
}

a.top-announce:hover {
    filter: brightness(1.08);
    text-decoration: none;
}

a.top-announce:focus-visible {
    outline: 3px solid var(--felt-green-dark);
    outline-offset: -3px;
}

.top-announce-inner > :first-child {
    margin-top: 0;
}

.top-announce-inner > :last-child {
    margin-bottom: 0;
}

.top-announce-inner p {
    margin: 0 0 4px;
}

.top-announce-inner img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

.top-announce.block-tone-dark,
.top-announce.block-tone-dark a {
    color: var(--on-dark);
}

.top-announce.block-tone-light,
.top-announce.block-tone-light a {
    color: var(--ink);
}

a.top-announce.block-tone-dark *,
a.top-announce.block-tone-light * {
    color: inherit;
}

/* Images placées à gauche ou à droite du texte (éditeur : cliquer sur l'image) : le cadre du contenu les garde à
   l'intérieur au lieu de les laisser déborder ; sur téléphone, elles laissent de la place au texte. */
.page-content:has(img[style*="float"]),
.block-content:has(img[style*="float"]),
.top-announce-inner:has(img[style*="float"]) {
    display: flow-root;
}

.page-content img[style*="float"],
.block-content img[style*="float"],
.top-announce-inner img[style*="float"] {
    max-width: 50%;
}

@media (max-width: 600px) {
    .page-content img[style*="float"],
    .block-content img[style*="float"],
    .top-announce-inner img[style*="float"] {
        max-width: 40%;
    }
}

.wysiwyg-image-hint {
    margin: 6px 0 0;
}

/* Interligne choisi dans l'éditeur (classe lh-… sur le paragraphe) : espace entre les lignes et entre les
   paragraphes. Plus précis que les marges des cadres de contenu (.page-content p, .top-announce-inner p...). */
body :is(p, h1, h2, h3, h4, li, blockquote).lh-serre { line-height: 1.15; margin-top: 0; margin-bottom: 0.1em; }
body :is(p, h1, h2, h3, h4, li, blockquote).lh-compact { line-height: 1.3; margin-top: 0; margin-bottom: 0.35em; }
body :is(p, h1, h2, h3, h4, li, blockquote).lh-aere { line-height: 1.9; margin-bottom: 1em; }

.wysiwyg-wrapper .ql-snow .ql-picker.ql-lineheight { width: 150px; }
.wysiwyg-wrapper .ql-snow .ql-picker.ql-lineheight .ql-picker-label::before,
.wysiwyg-wrapper .ql-snow .ql-picker.ql-lineheight .ql-picker-item::before { content: 'Interligne normal'; }
.wysiwyg-wrapper .ql-snow .ql-picker.ql-lineheight .ql-picker-label[data-value="serre"]::before,
.wysiwyg-wrapper .ql-snow .ql-picker.ql-lineheight .ql-picker-item[data-value="serre"]::before { content: 'Interligne serré'; }
.wysiwyg-wrapper .ql-snow .ql-picker.ql-lineheight .ql-picker-label[data-value="compact"]::before,
.wysiwyg-wrapper .ql-snow .ql-picker.ql-lineheight .ql-picker-item[data-value="compact"]::before { content: 'Interligne compact'; }
.wysiwyg-wrapper .ql-snow .ql-picker.ql-lineheight .ql-picker-label[data-value="aere"]::before,
.wysiwyg-wrapper .ql-snow .ql-picker.ql-lineheight .ql-picker-item[data-value="aere"]::before { content: 'Interligne aéré'; }
.wysiwyg-wrapper .wysiwyg-editor .ql-editor .lh-serre { line-height: 1.15; margin-top: 0; margin-bottom: 0.1em; }
.wysiwyg-wrapper .wysiwyg-editor .ql-editor .lh-compact { line-height: 1.3; margin-top: 0; margin-bottom: 0.35em; }
.wysiwyg-wrapper .wysiwyg-editor .ql-editor .lh-aere { line-height: 1.9; margin-bottom: 1em; }

/* Classements sur téléphone : cellules plus serrées et message « faites glisser » (main.js). */
.standings-scroll-hint {
    display: none;
    margin: 0 0 6px;
    font-size: 0.82rem;
    color: var(--muted);
}

@media (max-width: 700px) {
    .standings-scroll-hint {
        display: block;
    }

    .standings-table th,
    .standings-table td {
        padding-left: 7px;
        padding-right: 7px;
    }
}

/* ------------------------------------------------------------------
   Page Membres (App\Services\MembersPage) : 11 présentations.
   Réglages communs : couleur d'accent, forme et taille des photos, titres, survol, largeur.
   ------------------------------------------------------------------ */
.members-page {
    --mp-accent: var(--gold);
    --mp-accent-ink: var(--felt-green-dark);
    --mp-photo: 88px;
    --mp-radius: 50%;
}

.mp-accent-green { --mp-accent: var(--felt-green); --mp-accent-ink: var(--on-dark); }
.mp-accent-red { --mp-accent: var(--card-red); --mp-accent-ink: var(--on-dark); }
.mp-accent-ink { --mp-accent: var(--ink); --mp-accent-ink: var(--on-dark); }
.mp-size-small { --mp-photo: 64px; }
.mp-size-large { --mp-photo: 120px; }
.mp-shape-rounded { --mp-radius: 18%; }
.mp-shape-square { --mp-radius: 4px; }

.members-page.mp-width-wide .mp-body,
.members-page.mp-width-medium .mp-body,
.members-page.mp-width-narrow .mp-body {
    margin-left: auto;
    margin-right: auto;
}

.members-page.mp-width-wide .mp-body { max-width: 1000px; }
.members-page.mp-width-medium .mp-body { max-width: 820px; }
.members-page.mp-width-narrow .mp-body { max-width: 680px; }

.mp-intro {
    margin-bottom: 14px;
}

.mp-section {
    margin: 20px 0 36px;
}

.mp-head h2 {
    margin-bottom: 16px;
}

.mp-count {
    color: var(--muted);
    font-size: 0.7em;
    font-weight: normal;
}

.mp-head-accent .mp-head h2 {
    padding-bottom: 6px;
    background: linear-gradient(var(--mp-accent), var(--mp-accent)) left bottom / 56px 4px no-repeat;
}

.mp-head-centered .mp-head {
    text-align: center;
}

.mp-head-suits .mp-head h2::before,
.mp-head-suits .mp-head h2::after {
    color: var(--mp-accent);
    font-size: 0.8em;
    letter-spacing: 0.08em;
}

.mp-head-suits .mp-head h2::before { content: "♠ ♥ "; margin-right: 6px; }
.mp-head-suits .mp-head h2::after { content: " ♦ ♣"; margin-left: 6px; }

.mp-search {
    margin: 12px 0 4px;
}

.mp-search input {
    width: 100%;
    max-width: 360px;
}

.mp-search-empty {
    color: var(--muted);
}

/* Photo et remplaçants (initiale, symbole de carte, jeton). */
.members-page .mp-photo {
    width: var(--mp-photo);
    height: var(--mp-photo);
    border-radius: var(--mp-radius);
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.members-page .mp-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--felt-green);
    color: var(--gold-light);
    font-weight: bold;
    font-size: calc(var(--mp-photo) * 0.36);
    line-height: 1;
    overflow: hidden;
}

.mp-ph-suit {
    background: var(--c-pcard-bg);
    border: 1px solid var(--c-pcard-border);
    color: var(--ink);
    font-family: Georgia, serif;
    font-size: calc(var(--mp-photo) * 0.5);
}

.mp-ph-suit.mp-suit-heart,
.mp-ph-suit.mp-suit-diamond {
    color: var(--card-red);
}

.mp-ph-chip {
    border-radius: 50% !important;
    background: repeating-conic-gradient(var(--mp-accent) 0 22.5deg, var(--surface) 22.5deg 45deg);
    color: var(--ink);
}

.mp-ph-chip span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64%;
    height: 64%;
    border-radius: 50%;
    background: var(--surface);
    border: 2px dashed var(--mp-accent);
    font-size: calc(var(--mp-photo) * 0.26);
}

.members-page .mp-name {
    font-weight: 600;
    color: var(--felt-green-dark);
}

.members-page .mp-function {
    color: var(--mp-accent);
    font-size: 0.82rem;
    font-weight: 600;
    margin-top: 2px;
}

.mp-accent-gold .mp-function {
    color: var(--c-warning-text);
}

.mp-detail {
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 4px;
    overflow-wrap: anywhere;
}

.mp-wmx {
    display: inline-block;
    padding: 0 5px;
    border-radius: 4px;
    background: var(--card-red);
    color: var(--on-dark);
    font-size: 0.7rem;
    font-weight: 700;
}

/* Survol et apparition. */
.mp-hover-lift .mp-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mp-hover-lift .mp-item:hover {
    transform: translateY(-4px);
}

.mp-hover-zoom .mp-item img.mp-photo {
    transition: transform 0.3s ease;
}

.mp-hover-zoom .mp-item:hover img.mp-photo {
    transform: scale(1.07);
}

.nb-animate-ready .mp-item {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: var(--nb-delay, 0s);
}

.nb-animate-ready[data-nb-animate="rise"] .mp-item {
    transform: translateY(22px);
}

.nb-animate-ready .mp-item.is-visible {
    opacity: 1;
    transform: none;
}

/* Colonnes des grilles (Cartes, Polaroïd, Cartes à jouer, Grandes photos). */
.mp-cards,
.mp-polaroids,
.mp-playing,
.mp-portraits {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(var(--mp-min, 150px), 1fr));
}

.mp-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mp-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mp-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mp-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.mp-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

@media (max-width: 800px) {
    .mp-cols-4, .mp-cols-5, .mp-cols-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .mp-cols-3, .mp-cols-4, .mp-cols-5, .mp-cols-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 1. Cartes (présentation d'origine) */
.mp-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px;
    min-width: 0;
}

.mp-card-shadow .mp-card { box-shadow: var(--shadow); }
.mp-card-border .mp-card { border: 1px solid var(--c-card-border); }
.mp-card-flat .mp-card { background: var(--paper-alt); }
.mp-align-center .mp-card { text-align: center; }
.mp-align-center .mp-card .mp-photo { margin: 0 auto 10px; }
.mp-align-left .mp-card .mp-photo { margin: 0 0 10px; }
.mp-spot-small { --mp-min: 130px; --mp-photo: 64px; }

/* 2. Liste */
.mp-list {
    display: grid;
    gap: 0 28px;
}

.mp-list-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mp-list-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 800px) {
    .mp-list-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .mp-list-cols-2, .mp-list-cols-3 { grid-template-columns: 1fr; }
}

.mp-list { --mp-photo: 56px; }
.mp-list.mp-list-cols-1 { --mp-photo: 64px; }
.mp-size-small .mp-list { --mp-photo: 42px; }
.mp-size-large .mp-list { --mp-photo: 84px; }

.mp-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 4px;
    min-width: 0;
}

.mp-list-photo-right .mp-row { flex-direction: row-reverse; justify-content: space-between; }
.mp-list-sep .mp-row { border-bottom: 1px solid var(--c-row-line); }
.mp-row-text { min-width: 0; }
.mp-row .mp-detail { margin-top: 1px; }

/* 3. Polaroïd */
.mp-polaroids { --mp-min: 170px; gap: 28px 22px; padding: 6px; }

.mp-polaroid {
    position: relative;
    margin: 0;
    padding: 10px 10px 14px;
    background: var(--surface);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
    text-align: center;
    min-width: 0;
}

.mp-pol-tilt .mp-polaroid:nth-child(4n+1) { transform: rotate(-2.5deg); }
.mp-pol-tilt .mp-polaroid:nth-child(4n+2) { transform: rotate(1.8deg); }
.mp-pol-tilt .mp-polaroid:nth-child(4n+3) { transform: rotate(-1deg); }
.mp-pol-tilt .mp-polaroid:nth-child(4n) { transform: rotate(2.6deg); }
.mp-pol-tilt.mp-polaroids .mp-polaroid:hover,
.mp-hover-lift .mp-pol-tilt .mp-polaroid:hover { transform: rotate(0deg) translateY(-4px); }

.mp-pol-tape .mp-polaroid::before {
    content: "";
    position: absolute;
    top: -9px;
    left: 50%;
    width: 64px;
    height: 20px;
    transform: translateX(-50%) rotate(-3deg);
    background: rgba(242, 216, 121, 0.55);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.mp-pol-photo .mp-photo {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 0;
    font-size: 3rem;
}

.mp-polaroid figcaption {
    padding-top: 10px;
}

.mp-pol-font-hand .mp-polaroid .mp-name {
    font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", "Chalkboard SE", cursive;
    font-size: 1.15rem;
    font-weight: normal;
    color: var(--ink);
}

/* 4. Cartes à jouer */
.mp-playing { --mp-min: 150px; gap: 20px; padding-top: 4px; padding-bottom: 4px; }

.mp-pcard {
    position: relative;
    aspect-ratio: 5 / 7;
    padding: 34px 22px 34px;
    background: var(--c-pcard-bg);
    border: 1px solid var(--c-pcard-border);
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    color: var(--ink);
    --mp-suit-color: var(--ink);
}

.mp-pcard.mp-suit-heart,
.mp-pcard.mp-suit-diamond { --mp-suit-color: var(--card-red); }
.mp-pc-colors-four .mp-pcard.mp-suit-diamond { --mp-suit-color: var(--c-suit-diamond); }
.mp-pc-colors-four .mp-pcard.mp-suit-club { --mp-suit-color: var(--c-suit-club); }

.mp-pc-tilt .mp-pcard:nth-child(odd) { transform: rotate(-1.5deg); }
.mp-pc-tilt .mp-pcard:nth-child(even) { transform: rotate(1.5deg); }
.mp-pc-tilt .mp-pcard:hover { transform: rotate(0deg) translateY(-4px); }

.mp-pc-corner {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    color: var(--mp-suit-color);
    font-family: Georgia, serif;
    font-weight: bold;
}

.mp-pc-tl { top: 8px; left: 9px; }
.mp-pc-br { bottom: 8px; right: 9px; transform: rotate(180deg); }
.mp-pc-rank { font-size: 1.15rem; }
.mp-pc-suit { font-size: 1rem; }

.mp-pcard .mp-photo {
    margin: 0 auto 8px;
    border: 3px solid var(--mp-suit-color);
}

.mp-pc-big {
    font-size: 3.4rem;
    line-height: 1;
    color: var(--mp-suit-color);
    margin-bottom: 8px;
    font-family: Georgia, serif;
}

.mp-pcard .mp-name { color: var(--ink); }
.mp-pcard .mp-detail { font-size: 0.8rem; }

/* 5. Tableau */
.mp-table-wrap {
    overflow-x: auto;
}

.mp-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.mp-table th,
.mp-table td {
    padding: 10px 14px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--c-row-line);
}

.mp-table th {
    background: var(--felt-green);
    color: var(--on-dark);
    font-size: 0.85rem;
    font-weight: 600;
}

.mp-tb-striped tbody tr:nth-child(even) { background: var(--c-grey-bg); }
.mp-tb-dense th, .mp-tb-dense td { padding: 5px 10px; }
.mp-table { --mp-photo: 40px; }
.mp-tb-dense { --mp-photo: 30px; }
.mp-table .mp-tb-photo { width: 1%; }
.mp-table td.mp-function { margin: 0; }

/* 6. Pastilles */
.mp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    --mp-photo: 32px;
    --mp-radius: 50%;
}

.mp-chip-align-center { justify-content: center; }
.mp-chip-size-small { --mp-photo: 24px; font-size: 0.85rem; gap: 8px; }
.mp-chip-size-large { --mp-photo: 44px; font-size: 1.05rem; gap: 12px; }

.mp-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 14px 4px 4px;
    border-radius: 999px;
    background: var(--surface);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    max-width: 100%;
}

.mp-chip-style-outline .mp-chip { background: transparent; box-shadow: none; border: 1.5px solid var(--mp-accent); }
.mp-chip-style-accent .mp-chip { background: var(--mp-accent); color: var(--mp-accent-ink); box-shadow: none; }
.mp-chip-style-accent .mp-chip .mp-name,
.mp-chip-style-accent .mp-chip .mp-function { color: var(--mp-accent-ink); }
.mp-chip-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.mp-chip .mp-function { margin-top: 0; font-size: 0.75em; }
.mp-chip .mp-ph { font-size: calc(var(--mp-photo) * 0.45); }

/* 7. Grandes photos */
.mp-portraits { --mp-min: 190px; gap: 16px; }

.mp-portrait {
    position: relative;
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: var(--mp-pt-ratio, 3 / 4);
    background: var(--felt-green);
    min-width: 0;
}

.mp-portrait .mp-photo {
    width: 100%;
    height: 100%;
    border-radius: 0;
    font-size: 4rem;
}

.mp-portrait figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 40px 14px 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, var(--mp-pt-overlay, 0.6)), transparent);
    color: var(--on-dark);
    transition: opacity 0.25s ease;
}

.mp-portrait .mp-name { color: var(--on-dark); font-size: 1.1rem; }
.mp-portrait .mp-function { color: var(--gold-light); }
.mp-portrait .mp-detail { color: rgba(255, 255, 255, 0.85); }
.mp-accent-gold .mp-portrait .mp-function { color: var(--gold-light); }

@media (hover: hover) {
    .mp-pt-caption-hover .mp-portrait figcaption { opacity: 0; }
    .mp-pt-caption-hover .mp-portrait:hover figcaption,
    .mp-pt-caption-hover .mp-portrait:focus figcaption { opacity: 1; }
}

/* 8. Bulles */
.mp-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 22px 26px;
    --mp-photo: var(--mp-bb-size, 96px);
    --mp-radius: 50%;
}

.mp-bb-align-center { justify-content: center; }

.mp-bubble {
    position: relative;
    width: calc(var(--mp-photo) + 30px);
    text-align: center;
}

.mp-bubble .mp-photo {
    margin: 0 auto 8px;
    transition: transform 0.25s ease;
}

.mp-bubble:hover .mp-photo { transform: scale(1.06); }
.mp-bb-ring .mp-bubble .mp-photo { box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--mp-accent); }
.mp-bubble:nth-child(3n+2) { margin-top: 18px; }
.mp-bubble .mp-detail { font-size: 0.78rem; }

.mp-bb-details-hover .mp-bubble-details {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: calc(100% - var(--mp-photo) * 0.2);
    transform: translateX(-50%);
    min-width: 150px;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--ink);
    color: var(--on-dark);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.mp-bb-details-hover .mp-bubble-details .mp-detail { color: rgba(255, 255, 255, 0.85); }
.mp-bb-details-hover .mp-bubble-details .mp-function { color: var(--gold-light); }
.mp-bb-details-hover .mp-bubble:hover .mp-bubble-details,
.mp-bb-details-hover .mp-bubble:focus .mp-bubble-details { opacity: 1; }

/* 9. Bureau en vedette */
.mp-spot-board {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    --mp-photo: 140px;
}

.mp-size-small .mp-spot-board { --mp-photo: 110px; }
.mp-size-large .mp-spot-board { --mp-photo: 180px; }

.mp-spot-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-top: 4px solid var(--mp-accent);
    padding: 22px 18px;
    text-align: center;
    min-width: 0;
}

.mp-spot-card .mp-photo { margin: 0 auto 14px; }
.mp-spot-card .mp-name { font-size: 1.2rem; }
.mp-spot-card .mp-function { font-size: 0.9rem; margin-bottom: 4px; }

.mp-spot-badge {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 999px;
    background: var(--mp-accent);
    color: var(--mp-accent-ink) !important;
}

.mp-spot-side {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    --mp-photo: 110px;
}

.mp-spot-side .mp-spot-card {
    display: flex;
    align-items: center;
    gap: 18px;
    text-align: left;
    border-top: 0;
    border-left: 4px solid var(--mp-accent);
}

.mp-spot-side .mp-spot-card .mp-photo { margin: 0; }

.mp-spot-names {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 0;
    line-height: 1.8;
}

.mp-spot-names .mp-item:not(:last-child)::after {
    content: "·";
    margin: 0 10px;
    color: var(--mp-accent);
    font-weight: bold;
}

.mp-spot-names em { color: var(--muted); font-size: 0.9em; }

/* 10. Annuaire alphabétique */
.mp-alpha {
    columns: 3 220px;
    column-gap: 36px;
}

.mp-alpha-cols-1 { columns: 1; }
.mp-alpha-cols-2 { columns: 2 220px; }
.mp-alpha-cols-4 { columns: 4 180px; }
.mp-al-dots.mp-alpha { column-gap: 44px; }

.mp-alpha-group {
    break-inside: avoid;
    margin-bottom: 14px;
}

.mp-alpha-letter {
    font-family: Georgia, serif;
    font-size: 1.8rem;
    font-weight: bold;
    line-height: 1;
    color: var(--mp-accent);
    border-bottom: 2px solid var(--mp-accent);
    padding-bottom: 4px;
    margin-bottom: 6px;
}

.mp-alpha ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mp-alpha li {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 3px 0;
}

.mp-alpha li .mp-name { white-space: nowrap; }
.mp-alpha-fill { flex: 1; min-width: 12px; }
.mp-al-dots .mp-alpha-fill { border-bottom: 1px dotted var(--c-grey-border); }

.mp-alpha-info {
    color: var(--muted);
    font-size: 0.85rem;
    text-align: right;
}

/* 11. Table de poker */
.mp-poker-tables {
    display: grid;
    gap: 34px;
    --mp-felt: var(--felt-green);
    --mp-felt-light: var(--felt-green-light);
    --mp-photo: 58px;
    --mp-radius: 50%;
}

.mp-felt-blue { --mp-felt: var(--c-info); --mp-felt-light: var(--c-info); }
.mp-felt-red { --mp-felt: var(--card-red); --mp-felt-light: var(--card-red); }
.mp-felt-ink { --mp-felt: var(--ink); --mp-felt-light: var(--c-device-shadow); }
.mp-size-small .mp-poker-tables { --mp-photo: 46px; }
.mp-size-large .mp-poker-tables { --mp-photo: 72px; }

.mp-poker {
    position: relative;
    aspect-ratio: 16 / 9;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.mp-poker-felt {
    position: absolute;
    inset: 13% 11%;
    border-radius: 999px;
    background: radial-gradient(ellipse at center, var(--mp-felt-light), var(--mp-felt));
    border: 12px solid var(--c-deep);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12), 0 10px 24px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mp-poker-center {
    color: rgba(255, 255, 255, 0.75);
    font-family: Georgia, serif;
    font-size: 1.3rem;
    font-weight: bold;
    letter-spacing: 0.04em;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.mp-poker-center small {
    font-size: 0.7em;
    font-weight: normal;
    opacity: 0.8;
}

.mp-seat {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 130px;
    text-align: center;
}

.mp-seat .mp-photo {
    box-shadow: 0 0 0 3px var(--surface), 0 4px 10px rgba(0, 0, 0, 0.3);
}

.mp-seat-text {
    display: flex;
    flex-direction: column;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    line-height: 1.25;
    max-width: 100%;
}

.mp-seat .mp-name { font-size: 0.9rem; }
.mp-seat .mp-function { font-size: 0.72rem; margin-top: 0; }
.mp-seat .mp-detail { font-size: 0.72rem; margin-top: 0; }

.mp-dealer {
    position: absolute;
    top: -6px;
    right: 22px;
    z-index: 2;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--ink);
    color: var(--ink);
    font-size: 0.75rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Table de poker sur petit écran : le tapis devient un bandeau, les joueurs une grille. */
@media (max-width: 640px) {
    .mp-poker {
        aspect-ratio: auto;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
        gap: 14px 8px;
        padding: 12px;
        border-radius: 18px;
        background: radial-gradient(ellipse at center, var(--mp-felt-light), var(--mp-felt));
        border: 6px solid var(--c-deep);
    }

    .mp-poker-felt {
        position: static;
        grid-column: 1 / -1;
        border: 0;
        box-shadow: none;
        background: none;
        padding: 4px 0;
    }

    .mp-seat {
        position: relative;
        left: auto !important;
        top: auto !important;
        transform: none;
        width: auto;
    }
}

.members-page [hidden] {
    display: none !important;
}

/* ------------------------------------------------------------------
   Page Contact (App\Services\ContactPage) : coordonnées, plan, formulaire et disposition.
   ------------------------------------------------------------------ */
.cp-intro {
    margin-bottom: 8px;
}

.cp-body {
    display: grid;
    gap: 28px;
    margin: 24px 0;
}

.cp-body > section {
    min-width: 0;
}

.cp-body h2 {
    margin-bottom: 12px;
}

.contact-page .form-card {
    margin: 0 auto;
}

.cp-form-medium .form-card { max-width: 680px; }
.cp-form-full .form-card { max-width: none; }
.cp-form-narrow .cp-form-part h2,
.cp-form-medium .cp-form-part h2 { text-align: center; }

.cp-frame {
    background: var(--surface);
    border-radius: var(--radius);
}

.cp-frame-shadow .cp-frame { box-shadow: var(--shadow); }
.cp-frame-border .cp-frame { box-shadow: none; border: 1px solid var(--c-card-border); }
.cp-frame-flat .cp-frame { box-shadow: none; background: var(--paper-alt); }

.cp-details {
    list-style: none;
    margin: 0;
    padding: 20px 24px;
    display: grid;
    gap: 14px;
}

.cp-details li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.cp-details li > span:last-child {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-wrap: anywhere;
}

.cp-details strong {
    color: var(--felt-green-dark);
    font-size: 0.85rem;
}

.cp-icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--felt-green);
    color: var(--gold-light);
    font-size: 0.95rem;
    line-height: 1;
}

.cp-detail-phone .cp-icon,
.cp-detail-email .cp-icon { color: var(--on-dark); background: var(--card-red); }

.cp-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.cp-card {
    padding: 18px 20px;
    text-align: center;
    overflow-wrap: anywhere;
}

.cp-card-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--felt-green-dark);
    margin-bottom: 6px;
}

.cp-card .cp-icon {
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
}

.cp-map {
    margin: 16px 0;
    border-radius: var(--radius);
    overflow: hidden;
}

.cp-map iframe {
    display: block;
    width: 100%;
}

.cp-closed {
    padding: 16px 20px;
    border-radius: var(--radius);
    background: var(--c-note-bg);
    border: 1px solid var(--c-note-border);
    color: var(--c-note-text);
}

@media (min-width: 860px) {
    .cp-side .cp-body {
        grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
        align-items: start;
    }

    .cp-side.cp-layout-side_left .cp-body {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    }

    .cp-side .form-card {
        max-width: none;
    }

    .cp-side .cp-form-part h2 {
        text-align: left;
    }
}

/* Visuels prédéfinis (Administration > Visuels > Nouveau visuel) : couleurs des vignettes données par chaque carte. */
.vpreset-picker {
    background: var(--surface);
    border: 1px solid var(--c-frame-border);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 20px;
}

.vpreset-picker h2 {
    margin: 0 0 6px;
    font-size: 1.15rem;
}

.vpreset-families {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 12px 0 14px;
}

.vpreset-family {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px 5px 6px;
    border: 1px solid var(--c-field-border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}

.vpreset-family:hover {
    border-color: var(--felt-green);
}

.vpreset-family.is-active {
    border-color: var(--felt-green-dark);
    background: var(--felt-green-dark);
    color: var(--on-dark);
}

.vpreset-swatch {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
    flex-shrink: 0;
}

.vpreset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
}

.vpreset-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    border: 2px solid var(--c-frame-border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.vpreset-card:hover {
    border-color: var(--felt-green-light);
    transform: translateY(-2px);
}

.vpreset-card.is-selected {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
}

.vpreset-mock {
    display: flex;
    flex-direction: column;
    height: 96px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--vp-bg);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.vpm-top {
    height: 16px;
    background: var(--vp-pd);
    display: flex;
    align-items: center;
    padding-left: 6px;
}

.vpm-mark {
    color: var(--vp-a);
    font-size: 11px;
    line-height: 1;
}

.vpm-nav {
    height: 14px;
    background: var(--vp-p);
    display: flex;
    align-items: center;
    gap: 5px;
    padding-left: 6px;
}

.vpm-nav i {
    width: 16px;
    height: 3px;
    border-radius: 2px;
    background: var(--vp-bg);
    opacity: 0.85;
}

.vpm-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 7px 8px;
}

.vpm-title {
    width: 55%;
    height: 5px;
    border-radius: 3px;
    background: var(--vp-pd);
}

.vpm-card {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 5px;
    border-radius: 4px;
    background: var(--vp-s);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.vpm-line {
    height: 3px;
    border-radius: 2px;
    background: var(--vp-ink);
    opacity: 0.55;
}

.vpm-line.short {
    width: 60%;
    background: var(--vp-p);
    opacity: 1;
}

.vpm-actions {
    display: flex;
    gap: 5px;
}

.vpm-btn {
    width: 34px;
    height: 9px;
    border-radius: 3px;
    background: var(--vp-a);
}

.vpm-red {
    width: 12px;
    height: 9px;
    border-radius: 3px;
    background: var(--vp-r);
}

.vpreset-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--felt-green-dark);
}

.vpreset-desc {
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.3;
}

.vpreset-applied:empty {
    display: none;
}

.vpreset-grid[hidden] {
    display: none;
}

/* Modèles d'emails (Administration > Emails > Modèles d'emails) */
.email-template-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

@media (max-width: 900px) {
    .email-template-grid {
        grid-template-columns: 1fr;
    }
}

.email-template textarea {
    font-family: inherit;
}

.email-vars {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.email-var {
    font-family: monospace;
}

.email-var-list {
    margin: 4px 0 10px;
    padding-left: 18px;
}

.email-preview {
    border: 1px solid var(--c-frame-border);
    border-radius: var(--radius);
    background: var(--c-grey-bg);
    overflow: hidden;
}

.email-preview-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--c-frame-border);
    background: var(--surface);
}

.email-preview pre {
    margin: 0;
    padding: 12px 14px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--ink);
}

/* Texte écrit avec l'éditeur : aperçu dans un cadre isolé (comme dans la messagerie). */
.email-preview iframe {
    display: block;
    width: 100%;
    height: 380px;
    border: 0;
    background: var(--surface);
}

.email-preview iframe[hidden],
.email-preview pre[hidden] {
    display: none;
}

.email-editor-toggle {
    margin-bottom: 8px;
}

/* Pièces jointes d'un modèle d'email */
.email-attachments {
    margin-top: 14px;
}

.email-attachments > label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.email-attachment-list {
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
}

.email-attachment-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
    overflow-wrap: anywhere;
}

.email-attachment-remove {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    font-size: 0.85rem;
    font-weight: normal;
}

.email-attachments input[type="file"] {
    max-width: 100%;
}

/* Formulaire d'actualité : « Utiliser la 1re image de l'article » comme couverture */
.cover-from-article {
    margin-top: 8px;
}

.cover-from-article-ask {
    margin-top: 8px;
    padding: 10px 12px;
    border: 1px solid var(--c-frame-border);
    border-radius: var(--radius);
    background: var(--c-grey-bg);
}

.cover-from-article-ask p {
    margin: 0 0 8px;
}

.cover-from-article-ask .btn {
    margin: 2px 6px 2px 0;
}

.cover-from-article .form-hint:empty {
    display: none;
}

/* Textes du site (Administration > Textes du site) */
.site-texts-search {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 8px 0;
    background: var(--paper-alt);
}

.site-texts-search input {
    width: 100%;
    max-width: 480px;
}

.site-text {
    max-width: 820px;
}

.site-text-badge {
    display: none;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--c-note-bg);
    color: var(--c-note-text);
    font-size: 0.72rem;
    font-weight: 600;
}

.site-text.is-custom .site-text-badge {
    display: inline-block;
}

.site-text .form-hint code {
    font-size: 0.85em;
}

.link-button {
    background: none;
    border: 0;
    padding: 0;
    color: var(--felt-green);
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.site-texts-actions {
    position: sticky;
    bottom: 0;
    padding: 10px 0;
    background: var(--paper-alt);
}

.site-text[hidden],
.site-texts-group[hidden] {
    display: none;
}

/* Administration : boutons secondaires lisibles sur les fonds clairs (sur le site, ils sont posés sur le vert). */
.admin-content .btn-secondary,
.admin-in-site .btn-secondary {
    color: var(--felt-green-dark);
    border-color: var(--felt-green-dark);
}

.admin-content .btn-secondary:hover,
.admin-in-site .btn-secondary:hover {
    background: var(--paper-alt);
}

/* Menu du membre connecté (barre du haut, à droite) : Mon profil, Mon historique, Déconnexion. */
.user-menu {
    position: relative;
}

.user-menu-toggle {
    background: none;
    border: 0;
    padding: 4px 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.user-menu-toggle:hover,
.user-menu.is-open .user-menu-toggle {
    color: var(--gold-light);
}

.user-menu-list {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 60;
    min-width: 190px;
    padding: 6px;
    border-radius: 6px;
    border-top: 2px solid var(--gold);
    background: var(--felt-green-dark);
    box-shadow: var(--shadow);
}

/* Petit pont invisible entre le nom et le menu : le survol ne se perd pas en descendant la souris. */
.user-menu-list::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -10px;
    height: 10px;
}

.user-menu:hover .user-menu-list,
.user-menu:focus-within .user-menu-list,
.user-menu.is-open .user-menu-list {
    display: block;
}

.top-bar-auth .user-menu-list a {
    display: block;
    padding: 8px 12px;
    border-radius: 4px;
    color: var(--paper);
    font-size: 0.95rem;
}

.top-bar-auth .user-menu-list a::before {
    content: '♠';
    display: inline-block;
    width: 0;
    overflow: hidden;
    color: var(--gold);
    transition: width 0.15s ease, margin-right 0.15s ease;
    vertical-align: bottom;
}

.top-bar-auth .user-menu-list a:hover,
.top-bar-auth .user-menu-list a:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    color: var(--gold-light);
}

.top-bar-auth .user-menu-list a:hover::before,
.top-bar-auth .user-menu-list a:focus-visible::before {
    width: 1em;
    margin-right: 4px;
}

/* Déconnexion : dernière entrée du menu du membre, séparée des autres. */
.top-bar-auth .user-menu-list a.user-menu-logout {
    margin-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0 0 4px 4px;
}

/* Saisons d'adhésion (fiche de l'adhérent, profil) : paiement HelloAsso sur la ligne de la saison. */
.membership-payment {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.9rem;
    white-space: normal;
    min-width: 0;
}

.membership-payment .status-badge {
    align-self: flex-start;
}

.membership-payment-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
}

/* Page Saisons : dates de début et de fin, modifiables sur la ligne. */
.season-dates {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.season-dates input[type="date"] {
    padding: 4px 6px;
}

/* Téléphone : chaque saison devient une carte (libellé de la colonne devant chaque valeur). */
@media (max-width: 640px) {
    .membership-years-table thead {
        display: none;
    }

    .membership-years-table,
    .membership-years-table tbody,
    .membership-years-table tr,
    .membership-years-table td {
        display: block;
        width: 100%;
    }

    .membership-years-table tr {
        padding: 8px 12px;
    }

    .membership-years-table td {
        display: flex;
        gap: 10px;
        padding: 4px 0;
        border: 0;
    }

    .membership-years-table td[data-label]::before {
        content: attr(data-label);
        flex: 0 0 105px;
        font-weight: 600;
    }

    .membership-years-table td > * {
        min-width: 0;
        white-space: normal;
    }
}

.membership-reload {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.membership-reload label {
    margin: 0;
}

.membership-reload .form-hint {
    flex-basis: 100%;
}

/* Mon historique (Espace membres) */
.history-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 16px;
    margin: 14px 0;
}

.history-filters .form-group {
    margin-bottom: 0;
    min-width: 180px;
}

.history-reset {
    padding-bottom: 8px;
}

.history-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 6px 0 18px;
}

.history-summary > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 92px;
    padding: 10px 14px;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.history-summary strong {
    font-size: 1.35rem;
    color: var(--felt-green);
}

.history-summary span {
    font-size: 0.78rem;
    color: var(--muted);
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.history-table th,
.history-table td {
    padding: 9px 12px;
    text-align: left;
    border-bottom: 1px solid var(--c-row-line);
    vertical-align: middle;
}

.history-table th {
    background: var(--felt-green);
    color: var(--on-dark);
    font-size: 0.85rem;
}

.history-table .history-num {
    text-align: right;
    white-space: nowrap;
}

.history-row {
    cursor: pointer;
}

.history-row:hover,
.history-row.is-active,
.history-row:focus {
    background: var(--paper-alt);
    outline: none;
}

.history-row.is-podium .history-place strong {
    color: var(--felt-green);
}

.history-date {
    white-space: nowrap;
    color: var(--muted);
    font-size: 0.9rem;
}

.history-title {
    display: block;
    font-weight: 600;
    color: var(--felt-green-dark);
}

.history-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 3px;
}

.history-type,
.history-game {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
}

.history-type {
    background: var(--type-color);
    color: var(--on-dark);
}

.history-game {
    background: var(--paper-alt);
    color: var(--muted);
}

.history-champ {
    font-size: 0.85rem;
    color: var(--muted);
}

.history-place strong {
    font-size: 1.05rem;
}

.history-field {
    color: var(--muted);
    font-size: 0.85rem;
}

.history-pop {
    position: absolute;
    z-index: 80;
    width: 330px;
    max-width: calc(100vw - 24px);
    max-height: 420px;
    overflow: auto;
    padding: 10px 12px;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--c-frame-border);
}

.history-pop[hidden] {
    display: none;
}

.history-pop-head {
    display: flex;
    flex-direction: column;
    margin-bottom: 6px;
}

.history-pop-head span,
.history-pop-loading {
    color: var(--muted);
    font-size: 0.8rem;
}

.history-pop-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.history-pop-table th,
.history-pop-table td {
    padding: 3px 6px;
    text-align: left;
    border-bottom: 1px solid var(--c-row-line);
}

.history-pop-table th:nth-child(n+3),
.history-pop-table td:nth-child(n+3) {
    text-align: right;
}

.history-pop-table tr.is-me td {
    background: var(--c-note-bg);
    font-weight: 700;
}

@media (max-width: 700px) {
    .history-champ,
    .history-table th:nth-child(3) {
        display: none;
    }

    .history-table th,
    .history-table td {
        padding: 8px 7px;
    }
}

.history-type,
.history-game {
    white-space: nowrap;
}

/* ------------------------------------------------------------------------------------------------
   Galerie photo : 16 thèmes (Administration > Pages spéciales > Galerie photo, App\Services\GalleryLayouts).
   Chaque thème présente la liste des albums (.gl-mode-list) et la page d'un album (.gl-mode-album).
   ------------------------------------------------------------------------------------------------ */
.gallery-page {
    --gl-accent: var(--gold);
    --gl-accent-ink: var(--felt-green-dark);
    --gl-radius: var(--radius);
    --gl-radius-sm: 6px;
    --gl-gap: 18px;
    --gl-ratio: 4/3;
    --nb-accent: var(--gl-accent);
}

.gl-accent-green { --gl-accent: var(--felt-green); --gl-accent-ink: var(--on-dark); }
.gl-accent-red { --gl-accent: var(--card-red); --gl-accent-ink: var(--on-dark); }
.gl-accent-ink { --gl-accent: var(--ink); --gl-accent-ink: var(--on-dark); }
.gl-corners-square { --gl-radius: 0; --gl-radius-sm: 0; }
.gl-corners-round { --gl-radius: 20px; --gl-radius-sm: 12px; }
.gl-gap-none { --gl-gap: 0px; }
.gl-gap-small { --gl-gap: 8px; }
.gl-gap-large { --gl-gap: 30px; }

.gallery-page [hidden] { display: none !important; }

.gl-width-wide .gl-body, .gl-width-wide .gl-album-head, .gl-width-wide .gl-intro { max-width: 1000px; }
.gl-width-medium .gl-body, .gl-width-medium .gl-album-head, .gl-width-medium .gl-intro { max-width: 820px; }
.gl-width-narrow .gl-body, .gl-width-narrow .gl-album-head, .gl-width-narrow .gl-intro { max-width: 680px; }
.gl-width-wide .gl-body, .gl-width-medium .gl-body, .gl-width-narrow .gl-body { margin-left: auto; margin-right: auto; }

.gl-intro { margin-bottom: 18px; }
.gl-back { margin-bottom: 6px; }
.gl-album-head { margin-bottom: 20px; }
.gl-album-head h1 { margin-bottom: 4px; }
.gl-album-desc { margin-top: 8px; }

.gallery-page .gl-title {
    margin: 0 0 4px;
    font-size: 1.15rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.gallery-page .gl-title a { color: inherit; text-decoration: none; }
.gallery-page .gl-title a:hover, .gallery-page .gl-title a:focus-visible { text-decoration: underline; }

.gallery-page .gl-meta {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 2px 0 6px;
}

.gallery-page .gl-desc {
    margin: 6px 0 10px;
    font-size: 0.95rem;
}

.gallery-page .gl-more {
    font-weight: 600;
    color: var(--felt-green);
    text-decoration: none;
}

.gallery-page .gl-more:hover { text-decoration: underline; }

.gl-badge {
    display: inline-block;
    vertical-align: middle;
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--gl-accent);
    color: var(--gl-accent-ink);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* Album sans photo : fond vert et symbole de carte. */
.gallery-page .gl-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 60px;
    background: linear-gradient(135deg, var(--felt-green-light), var(--felt-green-dark));
    color: var(--gold-light);
    font-family: Georgia, serif;
    font-size: 2.6rem;
    line-height: 1;
}

/* Photos : lien (visionneuse), image, légende dessous ou au survol. */
.gallery-page figure { margin: 0; }
.gl-photo { min-width: 0; }

.gl-photo-link {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--gl-radius-sm);
    background: var(--felt-green-dark);
}

[data-gl-viewer] .gl-photo-link { cursor: zoom-in; }

.gallery-page .gl-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: none;
}

.gl-cap {
    padding: 6px 2px 0;
    color: var(--muted);
    font-size: 0.85rem;
    overflow-wrap: anywhere;
}

.gl-cap-hover {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px 10px 8px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
    color: var(--on-dark);
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.gl-photo-link:hover .gl-cap-hover,
.gl-photo-link:focus-visible .gl-cap-hover { opacity: 1; }

@media (hover: none) {
    .gl-cap-hover { opacity: 1; }
}

/* Survol et apparition. */
.gl-hover-zoom .gl-item a img {
    transition: transform 0.35s ease;
}

.gl-hover-zoom .gl-item:hover a img {
    transform: scale(1.05);
}

.gl-hover-lift .gl-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gl-hover-lift .gl-item:hover {
    transform: translateY(-4px);
}

.nb-animate-ready .gl-item {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: var(--nb-delay, 0s);
}

.nb-animate-ready[data-nb-animate="rise"] .gl-item { transform: translateY(22px); }
.nb-animate-ready .gl-item.is-visible { opacity: 1; transform: none; }

/* Colonnes des grilles. */
.gl-cards,
.gl-grid,
.gl-tiles,
.gl-polaroids,
.gl-playing {
    display: grid;
    gap: var(--gl-gap);
    grid-template-columns: repeat(auto-fill, minmax(var(--gl-min, 250px), 1fr));
}

.gl-grid { --gl-min: 200px; }
.gl-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gl-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gl-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gl-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.gl-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

@media (max-width: 900px) {
    .gl-cols-4, .gl-cols-5, .gl-cols-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .gl-cols-3, .gl-cols-4, .gl-cols-5, .gl-cols-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gl-mode-list .gl-cards:not(.gl-cols-2) { grid-template-columns: 1fr; }
    .gl-grid, .gl-tiles { --gl-min: 140px; }
}

/* 1. Cartes (thème d'origine) */
.gl-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border-radius: var(--gl-radius);
    background: var(--surface);
    color: var(--ink);
}

.gl-card-shadow .gl-card { box-shadow: var(--shadow); }
.gl-card-border .gl-card { border: 1px solid var(--c-card-border); }
.gl-card-flat .gl-card { background: var(--paper-alt); }

.gl-card-media {
    display: block;
    aspect-ratio: var(--gl-ratio);
    overflow: hidden;
    background: var(--felt-green-dark);
}

.gl-card-media > img { display: block; width: 100%; height: 100%; object-fit: cover; }

.gl-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 14px 16px 16px;
}

.gl-card-body .gl-more { margin-top: auto; }
.gl-card .gl-title a { color: var(--felt-green-dark); }

.gl-photo-card .gl-photo-link { aspect-ratio: var(--gl-ratio); }
.gl-card-shadow .gl-photo-card .gl-photo-link { box-shadow: var(--shadow); }
.gl-card-border .gl-photo-card .gl-photo-link { border: 1px solid var(--c-card-border); }

/* 2. Tuiles photo */
.gl-tiles { --gl-min: 210px; gap: calc(var(--gl-gap) / 2); }

.gl-tile {
    position: relative;
    aspect-ratio: var(--gl-ratio);
    overflow: hidden;
    border-radius: var(--gl-radius-sm);
    background: var(--felt-green-dark);
    min-width: 0;
}

.gl-tile .gl-tile-img,
.gl-tile > .gl-ph,
.gl-tile .gl-photo-link {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.gl-tile-text {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 40px 14px 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
    color: var(--on-dark);
    transition: opacity 0.25s ease;
}

.gallery-page .gl-tile-text .gl-title a,
.gallery-page .gl-tile-text .gl-meta { color: var(--on-dark); }
.gl-tile-text .gl-title a::after { content: ""; position: absolute; inset: 0; }
.gl-tile-text .gl-desc { margin: 4px 0 0; font-size: 0.85rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gl-tile-text .gl-badge { position: relative; z-index: 1; }

@media (hover: hover) {
    .gl-tiles-title-hover .gl-tile-text { opacity: 0; }
    .gl-tiles-title-hover .gl-tile:hover .gl-tile-text,
    .gl-tiles-title-hover .gl-tile:focus-within .gl-tile-text { opacity: 1; }
}

/* 3. Mur (mosaïque libre) */
.gl-masonry { columns: 3 240px; column-gap: var(--gl-gap); }
.gl-mcols-2 { columns: 2; }
.gl-mcols-3 { columns: 3; }
.gl-mcols-4 { columns: 4; }
.gl-mcols-5 { columns: 5; }

@media (max-width: 800px) {
    .gl-mcols-3, .gl-mcols-4, .gl-mcols-5 { columns: 2; }
}

@media (max-width: 480px) {
    .gl-mode-list .gl-masonry { columns: 1; }
}

.gl-brick {
    display: block;
    break-inside: avoid;
    margin: 0 0 var(--gl-gap);
    overflow: hidden;
    border-radius: var(--gl-radius);
    background: var(--surface);
    color: var(--ink);
}

.gl-brick-media { display: block; overflow: hidden; }
.gl-brick-media > img { display: block; width: 100%; height: auto; }
.gl-brick-media > .gl-ph { aspect-ratio: 4/3; }
.gallery-page .gl-masonry .gl-img { height: auto; }
.gl-mode-album .gl-brick { background: transparent; }
.gl-brick-body { padding: 12px 14px 14px; }
.gl-mstyle-cards .gl-brick { box-shadow: var(--shadow); }
.gl-mstyle-cards .gl-brick-body .gl-title a { color: var(--felt-green-dark); }

.gl-mstyle-overlay.gl-masonry .gl-brick:not(.gl-photo) { position: relative; background: var(--felt-green-dark); }

.gl-mstyle-overlay .gl-brick-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 44px 14px 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
    color: var(--on-dark);
    pointer-events: none;
}

.gallery-page .gl-mstyle-overlay .gl-brick-body .gl-title a,
.gallery-page .gl-mstyle-overlay .gl-brick-body .gl-meta { color: var(--on-dark); pointer-events: auto; }
.gl-mstyle-overlay .gl-brick-body .gl-desc { margin: 2px 0 0; font-size: 0.85rem; }

/* 4. Polaroïd */
.gl-polaroids { --gl-min: 200px; gap: calc(var(--gl-gap) + 12px) calc(var(--gl-gap) + 6px); padding: 8px; }

.gl-polaroid {
    position: relative;
    padding: 12px 12px 16px;
    background: var(--surface);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
    text-align: center;
    min-width: 0;
    color: var(--ink);
}

.gl-pol-tilt .gl-polaroid:nth-child(4n+1) { transform: rotate(-2.5deg); }
.gl-pol-tilt .gl-polaroid:nth-child(4n+2) { transform: rotate(1.8deg); }
.gl-pol-tilt .gl-polaroid:nth-child(4n+3) { transform: rotate(-1deg); }
.gl-pol-tilt .gl-polaroid:nth-child(4n) { transform: rotate(2.6deg); }
.gl-pol-tilt .gl-polaroid:hover { transform: rotate(0deg) translateY(-4px); }
.gl-pol-tilt .gl-polaroid { transition: transform 0.2s ease; }

.gl-pol-tape .gl-polaroid::before {
    content: "";
    position: absolute;
    top: -9px;
    left: 50%;
    z-index: 1;
    width: 64px;
    height: 20px;
    transform: translateX(-50%) rotate(-3deg);
    background: rgba(242, 216, 121, 0.55);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.gl-pol-photo { display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 0; background: var(--felt-green-dark); }
.gl-pol-photo > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gl-polaroid figcaption { padding-top: 10px; }
.gl-polaroid .gl-title a { color: var(--ink); }

.gl-pol-font-hand .gl-polaroid .gl-title,
.gl-pol-font-hand .gl-pol-cap {
    font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", "Chalkboard SE", cursive;
    font-size: 1.25rem;
    font-weight: normal;
}

.gl-pol-cap { min-height: 1.5em; padding-top: 10px; overflow-wrap: anywhere; }

/* 5. Cartes à jouer */
.gl-playing { --gl-min: 190px; padding: 4px 0; }

.gl-pcard {
    --gl-suit-color: var(--ink);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 5 / 7;
    min-width: 0;
    padding: 34px 20px;
    background: var(--c-pcard-bg);
    border: 1px solid var(--c-pcard-border);
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
    text-align: center;
    color: var(--ink);
}

.gl-pcard.gl-suit-heart, .gl-pcard.gl-suit-diamond { --gl-suit-color: var(--card-red); }
.gl-pc-colors-four .gl-pcard.gl-suit-diamond { --gl-suit-color: var(--c-suit-diamond); }
.gl-pc-colors-four .gl-pcard.gl-suit-club { --gl-suit-color: var(--c-suit-club); }
.gl-pc-tilt .gl-pcard { transition: transform 0.2s ease; }
.gl-pc-tilt .gl-pcard:nth-child(odd) { transform: rotate(-1.5deg); }
.gl-pc-tilt .gl-pcard:nth-child(even) { transform: rotate(1.5deg); }
.gl-pc-tilt .gl-pcard:hover { transform: rotate(0deg) translateY(-4px); }

.gl-pc-corner {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    color: var(--gl-suit-color);
    font-family: Georgia, serif;
    font-weight: bold;
}

.gl-pc-tl { top: 8px; left: 9px; }
.gl-pc-br { bottom: 8px; right: 9px; transform: rotate(180deg); }
.gl-pc-rank { font-size: 1.15rem; }
.gl-pc-suit { font-size: 1rem; }

.gl-pc-photo {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    margin-bottom: 10px;
    overflow: hidden;
    border: 3px solid var(--gl-suit-color);
    border-radius: 6px;
    background: var(--felt-green-dark);
}

.gl-pc-photo > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gl-pcard-photo .gl-pc-photo { flex: 1; min-height: 0; aspect-ratio: auto; margin-bottom: 0; }
.gl-pcard-photo .gl-cap { padding-top: 6px; }
.gl-pc-big { font-size: 3.4rem; line-height: 1; color: var(--gl-suit-color); margin-bottom: 8px; font-family: Georgia, serif; }
.gl-pcard .gl-title { font-size: 1.05rem; }
.gl-pcard .gl-title a { color: var(--ink); }
.gl-pcard .gl-desc { font-size: 0.82rem; margin: 2px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

@media (max-width: 600px) {
    .gl-playing { --gl-min: 150px; }
    .gl-pcard { padding: 30px 12px; }
}

/* 6. Liste avec vignettes */
.gl-list { --gl-thumb: 170px; display: flex; flex-direction: column; }
.gl-thumb-small { --gl-thumb: 110px; }
.gl-thumb-large { --gl-thumb: 260px; }
.gl-mode-album .gl-list { --gl-thumb: 300px; }
.gl-mode-album .gl-thumb-small { --gl-thumb: 200px; }
.gl-mode-album .gl-thumb-large { --gl-thumb: 440px; }

.gl-row {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 14px 4px;
    min-width: 0;
}

.gl-list-sep .gl-row { border-bottom: 1px solid var(--c-row-line); }
.gl-list-sep .gl-row:last-child { border-bottom: 0; }

.gl-row-thumb {
    display: block;
    flex: 0 0 var(--gl-thumb);
    max-width: 42%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--gl-radius-sm);
    background: var(--felt-green-dark);
}

.gl-row-thumb > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gl-row-text { flex: 1; min-width: 0; }
.gl-row .gl-title a { color: var(--felt-green-dark); }
.gl-row-previews { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.gl-row-previews img { width: 58px; height: 44px; object-fit: cover; border-radius: 4px; display: block; }
.gl-row-cap { font-size: 1.08rem; font-weight: 600; color: var(--felt-green-dark); margin-bottom: 4px; overflow-wrap: anywhere; }

@media (max-width: 600px) {
    .gl-mode-album .gl-row { flex-direction: column; }
    .gl-mode-album .gl-row-thumb { flex-basis: auto; width: 100%; max-width: none; }
}

/* 7. À la une + liste */
.gl-featured {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: max(var(--gl-gap), 18px);
    align-items: start;
}

.gl-feat-alone { grid-template-columns: 1fr; }
.gl-feat-right .gl-feat-main { order: 2; }

.gl-feat-main {
    overflow: hidden;
    border-radius: var(--gl-radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    color: var(--ink);
}

.gl-feat-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--felt-green-dark); }
.gl-feat-media > img { display: block; width: 100%; height: 100%; object-fit: cover; }

.gl-feat-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--gl-accent);
    color: var(--gl-accent-ink);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.gl-feat-body { padding: 18px 20px 20px; }
.gallery-page .gl-feat-main .gl-title { font-size: 1.5rem; }
.gl-feat-main .gl-title a, .gl-feat-row .gl-title a { color: var(--felt-green-dark); }
.gl-feat-list { list-style: none; margin: 0; padding: 0; }

.gl-feat-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--c-row-line);
}

.gl-feat-row:first-child { padding-top: 0; }
.gl-feat-row .gl-title { font-size: 1rem; }
.gl-feat-row .gl-meta { margin-bottom: 0; }
.gl-feat-thumb { flex: 0 0 100px; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--gl-radius-sm); background: var(--felt-green-dark); }
.gl-feat-thumb > img { display: block; width: 100%; height: 100%; object-fit: cover; }

.gl-featured-album {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--gl-gap);
}

.gl-feat-main-photo { grid-column: 1 / span 2; grid-row: span 2; display: flex; flex-direction: column; }
.gl-feat-right .gl-feat-main-photo { grid-column: 3 / span 2; }
.gl-feat-main-photo .gl-photo-link { flex: 1; min-height: 240px; }
.gl-feat-photo .gl-photo-link { aspect-ratio: 4 / 3; }

@media (max-width: 760px) {
    .gl-featured { grid-template-columns: 1fr; }
    .gl-feat-right .gl-feat-main { order: 0; }
    .gl-featured-album { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gl-feat-main-photo, .gl-feat-right .gl-feat-main-photo { grid-column: 1 / -1; grid-row: auto; }
    .gl-feat-main-photo .gl-photo-link { aspect-ratio: 4 / 3; min-height: 0; }
}

/* 8. Grande bannière */
.gl-hero {
    --gl-overlay: 0.55;
    position: relative;
    display: flex;
    align-items: flex-end;
    margin-bottom: max(var(--gl-gap), 18px);
    overflow: hidden;
    border-radius: var(--gl-radius);
    background: var(--felt-green-dark);
    color: var(--on-dark);
    box-shadow: var(--shadow);
}

.gl-hero .gl-hero-img,
.gl-hero > .gl-ph,
.gl-hero-link {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.gl-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, var(--gl-overlay)) 0%, rgba(0, 0, 0, calc(var(--gl-overlay) * 0.25)) 100%);
    pointer-events: none;
}

.gl-hero-text { position: relative; z-index: 1; padding: 28px 34px; max-width: 780px; pointer-events: none; }
.gl-hero-text a { pointer-events: auto; }
.gl-hero-center { justify-content: center; text-align: center; }
.gl-hero-center .gl-hero-text { margin: 0 auto; }
.gallery-page .gl-hero .gl-title { font-size: 2rem; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); }
.gallery-page .gl-hero h1 { color: var(--on-dark); margin: 0 0 6px; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); }
.gallery-page .gl-hero .gl-title a,
.gallery-page .gl-hero .gl-meta,
.gallery-page .gl-hero .gl-desc { color: var(--on-dark); }
.gallery-page .gl-hero .gl-more { color: var(--gold-light); }
.gl-hero-album .gl-hero-link { z-index: 0; }

@media (max-width: 600px) {
    .gl-hero { height: auto !important; min-height: 280px; }
    .gl-hero-text { padding: 22px 18px; }
    .gallery-page .gl-hero .gl-title { font-size: 1.5rem; }
}

/* 9. Magazine (mosaïque) */
.gl-magazine {
    --gl-overlay: 0.55;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    height: var(--gl-mosaic-height, 440px);
    gap: var(--gl-gap);
    margin-bottom: var(--gl-gap);
}

.gl-mtile {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 0;
    overflow: hidden;
    border-radius: var(--gl-radius-sm);
    background: var(--felt-green-dark);
    color: var(--on-dark);
}

.gl-mtile-main { grid-row: 1 / span 2; }
.gl-main-right .gl-mtile-main { grid-column: 3; }
.gl-magazine.gl-count-1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.gl-magazine.gl-count-2 { grid-template-columns: 2fr 1fr; }
.gl-magazine.gl-count-2 .gl-mtile:not(.gl-mtile-main) { grid-row: 1 / span 2; }
.gl-magazine.gl-count-3 { grid-template-columns: 2fr 1fr; }
.gl-magazine.gl-count-4 .gl-mtile:last-child { grid-column: span 2; }
.gl-main-right.gl-count-2 .gl-mtile-main,
.gl-main-right.gl-count-3 .gl-mtile-main { grid-column: 2; }
.gl-main-right.gl-count-4 .gl-mtile:last-child { grid-column: 1 / span 2; }

.gl-mtile .gl-mtile-img,
.gl-mtile > .gl-ph,
.gl-mtile-link {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.gl-mtile-link { display: flex; align-items: flex-end; background: transparent; color: var(--on-dark); }
.gl-mtile::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, var(--gl-overlay)) 0%, rgba(0, 0, 0, 0) 70%);
    pointer-events: none;
}

.gl-mtile-text { position: relative; z-index: 2; padding: 14px 16px; }
.gl-mtile-main .gl-mtile-text { padding: 22px 24px; }
.gallery-page .gl-mtile .gl-title { font-size: 1.05rem; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4); }
.gallery-page .gl-mtile-main .gl-title { font-size: 1.6rem; }
.gallery-page .gl-mtile .gl-title a,
.gallery-page .gl-mtile .gl-meta,
.gallery-page .gl-mtile .gl-desc { color: var(--on-dark); }
.gl-mtile .gl-title a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.gl-mtile .gl-badge { position: relative; z-index: 3; }
.gl-mtile-cap { font-size: 0.9rem; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5); }

@media (max-width: 700px) {
    .gl-magazine,
    .gl-magazine[class*="gl-count-"] {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: none;
        grid-auto-rows: auto;
        height: auto;
    }
    .gl-magazine .gl-mtile,
    .gl-magazine .gl-mtile:last-child,
    .gl-magazine.gl-count-2 .gl-mtile:not(.gl-mtile-main) { grid-column: auto; grid-row: auto; height: 170px; }
    .gl-magazine .gl-mtile.gl-mtile-main { grid-column: 1 / -1; grid-row: auto; height: 250px; }
    .gl-magazine.gl-count-2 .gl-mtile:not(.gl-mtile-main),
    .gl-magazine.gl-count-4 .gl-mtile:last-child { grid-column: 1 / -1; }
}

/* 10. Diaporama (mêmes diapositives que les blocs News, main.js data-nb-carousel) */
.gl-carousel { position: relative; }

.gl-car-stage {
    position: relative;
    height: var(--gl-car-h, 440px);
    overflow: hidden;
    border-radius: var(--gl-radius);
    background: var(--c-deep);
    box-shadow: var(--shadow);
}

.gl-slide .gl-slide-img,
.gl-slide > .gl-ph,
.gl-slide-link {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.gl-slide-link { background: transparent; }
.gl-fit-contain .gl-slide .gl-slide-img { object-fit: contain; }

.gl-slide-text {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 50px 72px 40px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
    color: var(--on-dark);
}

.gl-slide-text > * { max-width: 760px; }
.gallery-page .gl-slide .gl-title { font-size: 1.7rem; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); }
.gallery-page .gl-slide .gl-title a,
.gallery-page .gl-slide .gl-meta,
.gallery-page .gl-slide .gl-desc { color: var(--on-dark); }
.gallery-page .gl-slide .gl-more { color: var(--gold-light); }
.gl-slide-cap { pointer-events: none; padding-bottom: 36px; }
.gl-slide-num { margin-left: 8px; opacity: 0.75; font-size: 0.85rem; white-space: nowrap; }

.gl-car-thumbs {
    position: relative;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 2px 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--gl-accent) transparent;
}

.gl-car-thumb {
    flex: 0 0 84px;
    height: 60px;
    padding: 0;
    overflow: hidden;
    border: 3px solid transparent;
    border-radius: var(--gl-radius-sm);
    background: var(--felt-green-dark);
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

.gl-car-thumb:hover, .gl-car-thumb:focus-visible { opacity: 0.9; }
.gl-car-thumb.is-active { opacity: 1; border-color: var(--gl-accent); }
.gl-car-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gl-car-thumb .gl-ph { font-size: 1.4rem; min-height: 0; }

@media (max-width: 600px) {
    .gl-car-stage { height: max(min(var(--gl-car-h, 440px), 78vw), 260px); }
    .gl-slide-text { padding: 40px 56px 34px 18px; }
    .gallery-page .gl-slide .gl-title { font-size: 1.25rem; }
    .gl-slide .gl-desc { display: none; }
}

/* 11. Carrousel horizontal (main.js data-nb-slider) */
.gl-slider .nb-slider-card.gl-card { box-shadow: var(--shadow); }
.gl-slider-photos .nb-slider-track { align-items: flex-start; }

.gl-slide-photo.nb-slider-card {
    flex: 0 0 auto;
    max-width: none;
    overflow: visible;
    border-radius: 0;
    box-shadow: none;
}

.gl-slide-photo .gl-photo-link { height: var(--gl-photo-h, 300px); }
.gallery-page .gl-slide-photo .gl-img { width: auto; height: 100%; min-width: 60px; }
.gl-slide-photo .gl-cap { width: 0; min-width: 100%; }

.gl-rows-2 .nb-slider-track {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(2, auto);
    grid-auto-columns: max-content;
}

@media (max-width: 600px) {
    .gl-slide-photo .gl-photo-link { height: min(var(--gl-photo-h, 300px), 60vw); }
}

/* 12. Alterné (zigzag) */
.gl-split { --gl-split-media: 1fr; --gl-split-text: 1fr; display: flex; flex-direction: column; gap: max(calc(var(--gl-gap) * 2), 20px); }
.gl-split-w40 { --gl-split-media: 2fr; --gl-split-text: 3fr; }
.gl-split-w60 { --gl-split-media: 3fr; --gl-split-text: 2fr; }

.gl-split-row {
    display: grid;
    grid-template-columns: minmax(0, var(--gl-split-media)) minmax(0, var(--gl-split-text));
    gap: 28px;
    align-items: center;
}

.gl-split-first-left .gl-split-row:nth-child(even),
.gl-split-first-right .gl-split-row:nth-child(odd) {
    grid-template-columns: minmax(0, var(--gl-split-text)) minmax(0, var(--gl-split-media));
}

.gl-split-first-left .gl-split-row:nth-child(even) .gl-split-media,
.gl-split-first-right .gl-split-row:nth-child(odd) .gl-split-media { order: 2; }
.gl-split .gl-split-row.gl-split-nomedia { grid-template-columns: 1fr; }

.gl-split-media {
    display: block;
    aspect-ratio: var(--gl-ratio);
    overflow: hidden;
    border-radius: var(--gl-radius);
    background: var(--felt-green-dark);
    box-shadow: var(--shadow);
}

.gl-split-media > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery-page .gl-split-body .gl-title { font-size: 1.5rem; }
.gl-split-body .gl-title a { color: var(--felt-green-dark); }
.gl-split-num { font-family: Georgia, serif; font-size: 2.4rem; font-weight: bold; line-height: 1; color: var(--gl-accent); }
.gl-split-num span { font-size: 1rem; color: var(--muted); font-weight: normal; }
.gl-split-cap { margin: 8px 0 4px; font-size: 1.15rem; overflow-wrap: anywhere; }

@media (max-width: 700px) {
    .gl-split .gl-split-row,
    .gl-split-first-left .gl-split-row:nth-child(even),
    .gl-split-first-right .gl-split-row:nth-child(odd) { grid-template-columns: 1fr; gap: 12px; }
    .gl-split .gl-split-row .gl-split-media { order: 0; }
}

/* 13. Chronologie */
.gl-timeline { position: relative; list-style: none; margin: 0; padding: 0 0 0 38px; }

.gl-timeline::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 2px;
    background: var(--gl-accent);
    opacity: 0.7;
}

.gl-tl-item { position: relative; margin-bottom: max(var(--gl-gap), 14px); }
.gl-tl-item:last-child { margin-bottom: 0; }

.gl-tl-marker {
    position: absolute;
    left: -38px;
    top: 12px;
    width: 29px;
    height: 29px;
    border-radius: 50%;
    background: var(--surface);
    border: 3px solid var(--gl-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Georgia, serif;
    font-size: 1rem;
    color: var(--ink);
}

.gl-tl-marker.gl-red { color: var(--card-red); }
.gl-marker-dots .gl-tl-marker { width: 17px; height: 17px; left: -32px; top: 16px; background: var(--gl-accent); }

.gl-marker-chips .gl-tl-marker {
    background: repeating-conic-gradient(var(--gl-accent) 0 30deg, var(--surface) 30deg 60deg);
    box-shadow: inset 0 0 0 5px var(--gl-accent);
}

.gl-tl-card { padding: 14px 18px; border-radius: var(--gl-radius); background: var(--surface); box-shadow: var(--shadow); color: var(--ink); }
.gl-tl-date { margin-bottom: 4px; color: var(--felt-green); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; }
.gl-tl-card .gl-title a { color: var(--felt-green-dark); }
.gl-tl-media { display: block; aspect-ratio: 16 / 9; max-height: 260px; width: 100%; margin: 8px 0 10px; overflow: hidden; border-radius: var(--gl-radius-sm); background: var(--felt-green-dark); }
.gl-tl-media > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gl-tl-photo.gl-tl-media { aspect-ratio: auto; max-height: none; }
.gallery-page .gl-tl-photo .gl-img { height: auto; }
.gl-tl-cap { margin: 4px 0 0; overflow-wrap: anywhere; }

@media (min-width: 900px) {
    .gl-timeline.gl-alternate { padding-left: 0; }
    .gl-alternate::before { left: calc(50% - 1.5px); }
    .gl-alternate .gl-tl-item { width: 50%; padding-right: 36px; }
    .gl-alternate .gl-tl-item:nth-child(even) { margin-left: 50%; padding-right: 0; padding-left: 36px; }
    .gl-alternate .gl-tl-marker { left: auto; right: -14.5px; }
    .gl-alternate .gl-tl-item:nth-child(even) .gl-tl-marker { right: auto; left: -14.5px; }
    .gl-alternate.gl-marker-dots .gl-tl-marker { right: -8.5px; }
    .gl-alternate.gl-marker-dots .gl-tl-item:nth-child(even) .gl-tl-marker { right: auto; left: -8.5px; }
}

/* 14. Journal */
.gl-newspaper {
    padding: 22px 26px;
    background: var(--c-np-paper);
    border: 1px solid var(--c-np-border);
    box-shadow: var(--shadow);
    color: var(--c-np-ink);
    font-family: Georgia, "Times New Roman", serif;
}

.gl-np-masthead { margin-bottom: 18px; padding-bottom: 8px; border-bottom: 3px double var(--c-np-rule); text-align: center; }
.gl-np-name { font-size: 2.4rem; font-weight: 900; line-height: 1.1; letter-spacing: 0.02em; }

.gl-np-line {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
    padding-top: 4px;
    border-top: 1px solid var(--c-np-rule);
    color: var(--c-np-muted);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.gl-np-cols { columns: 3; column-gap: 28px; }
.gl-np-cols-2 { columns: 2; }
.gl-np-rules { column-rule: 1px solid var(--c-np-rule); }
.gl-np-article { break-inside: avoid; margin: 0 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--c-np-border); }
.gl-np-lead { column-span: all; }
.gallery-page .gl-np-article .gl-title { font-family: inherit; font-size: 1.25rem; line-height: 1.2; }
.gallery-page .gl-np-lead .gl-title { font-size: 1.9rem; }
.gl-np-article .gl-title a { color: var(--c-np-ink); }
.gallery-page .gl-newspaper .gl-meta { color: var(--c-np-muted); font-style: italic; }
.gl-np-media { display: block; margin: 8px 0; border-radius: 0; background: transparent; }
.gl-np-media > img, .gallery-page .gl-np-media .gl-img { display: block; width: 100%; height: auto; filter: saturate(0.85); }
.gl-np-media > .gl-ph { aspect-ratio: 4 / 3; }
.gl-np-lead .gl-np-media > img { max-height: 420px; object-fit: cover; }
.gl-np-cap { margin-top: 4px; color: var(--c-np-muted); font-size: 0.85rem; font-style: italic; }
.gl-np-photo { padding-bottom: 10px; }

@media (max-width: 900px) {
    .gl-np-cols { columns: 2; }
}

@media (max-width: 600px) {
    .gl-newspaper { padding: 16px 14px; }
    .gl-np-name { font-size: 1.7rem; }
    .gl-mode-list .gl-np-cols { columns: 1; }
}

/* 15. Accordéon */
.gl-accordion { display: flex; flex-direction: column; gap: max(var(--gl-gap), 8px); }

.gl-acc {
    overflow: hidden;
    border-radius: var(--gl-radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    color: var(--ink);
}

.gl-acc[open] { box-shadow: inset 4px 0 0 var(--gl-accent), var(--shadow); }

.gl-acc summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    padding: 14px 18px;
    list-style: none;
    cursor: pointer;
}

.gl-acc summary::-webkit-details-marker { display: none; }
.gl-acc summary:hover .gl-acc-title { text-decoration: underline; }
.gl-acc[open] summary { border-bottom: 1px solid var(--c-row-line); }
.gl-acc-title { flex: 1; min-width: 0; color: var(--felt-green-dark); font-size: 1.1rem; font-weight: 700; overflow-wrap: anywhere; }
.gallery-page .gl-acc summary .gl-meta { margin: 0; }

.gl-acc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--gl-accent);
    color: var(--gl-accent-ink);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
    transition: transform 0.25s ease;
}

.gl-acc-icon-plus .gl-acc-icon::before { content: "+"; }
.gl-acc-icon-plus .gl-acc[open] .gl-acc-icon::before { content: "\2212"; }
.gl-acc-icon-chevron .gl-acc-icon::before { content: "\203A"; font-size: 1.5rem; margin-top: -3px; }
.gl-acc-icon-chevron .gl-acc[open] .gl-acc-icon { transform: rotate(90deg); }
.gl-acc-icon-suits .gl-acc-icon { background: var(--surface); border: 2px solid var(--gl-accent); color: var(--ink); font-family: Georgia, serif; }
.gl-acc-icon-suits .gl-acc-icon.gl-red { color: var(--card-red); }
.gl-acc-icon-suits .gl-acc-icon::before { content: attr(data-suit); }
.gl-acc-icon-suits .gl-acc[open] .gl-acc-icon { transform: rotate(360deg); }
.gl-acc-body { padding: 14px 18px 18px; }
.gl-acc-body .gl-desc { margin-top: 0; }
.gl-acc-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: 10px 0 12px; }
.gl-acc-previews img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--gl-radius-sm); }
.gl-acc-grid { --gl-min: 170px; }

@media (max-width: 600px) {
    .gl-acc-grid { --gl-min: 130px; }
}

/* 16. Pellicule */
.gl-films {
    --gl-film: rgba(14, 14, 14, 0.96);
    --gl-film-hole: rgba(247, 245, 240, 0.92);
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.gl-film-brown { --gl-film: rgba(58, 38, 22, 0.96); }
.gl-film-green { --gl-film: var(--felt-green-dark); }

.gl-film,
.gl-film-wrap .gl-frame {
    background:
        repeating-linear-gradient(90deg, transparent 0 7px, var(--gl-film-hole) 7px 17px, transparent 17px 26px) left 0 top 6px / 100% 9px no-repeat,
        repeating-linear-gradient(90deg, transparent 0 7px, var(--gl-film-hole) 7px 17px, transparent 17px 26px) left 0 bottom 6px / 100% 9px no-repeat,
        var(--gl-film);
}

.gl-film {
    position: relative;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 24px 12px;
    background-attachment: local;
    scrollbar-width: thin;
    scrollbar-color: var(--gl-film-hole) transparent;
    text-decoration: none;
}

.gl-frame {
    position: relative;
    flex: 0 0 auto;
    height: var(--gl-frame-h, 160px);
    overflow: hidden;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.06);
}

.gl-frame img { display: block; height: 100%; width: auto; min-width: 40px; }
.gl-frame-empty .gl-ph { width: calc(var(--gl-frame-h, 160px) * 1.4); }
.gl-film-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 8px; }
.gl-film-head .gl-title a { color: var(--felt-green-dark); }
.gl-film-head .gl-meta { margin: 0; }
.gl-film-album .gl-desc { margin-top: 10px; }

.gl-film.gl-film-wrap {
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 0;
    padding: 0;
    overflow: visible;
    background: none;
}

.gl-film-wrap .gl-frame {
    display: flex;
    flex-direction: column;
    height: auto;
    padding: 24px 5px;
    border-radius: 0;
}

.gl-film-wrap .gl-photo-link { height: var(--gl-frame-h, 160px); border-radius: 2px; }
.gallery-page .gl-film-wrap .gl-img { width: auto; height: 100%; }
.gl-frame-cap { width: 0; min-width: 100%; padding-top: 4px; overflow: hidden; color: rgba(255, 255, 255, 0.82); font-family: "Courier New", monospace; font-size: 0.72rem; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 600px) {
    .gl-frame, .gl-film-wrap .gl-photo-link { height: min(var(--gl-frame-h, 160px), 34vw); }
    .gl-film-wrap .gl-frame { height: auto; }
}

/* ------------------------------------------------------------------------------------------------
   Visionneuse de photos (main.js) : flèches, clavier, glissement du doigt, compteur, légende, vignettes,
   diaporama, zoom (double-clic ou double toucher, puis glisser), téléchargement.
   ------------------------------------------------------------------------------------------------ */
body.glv-open { overflow: hidden; }

.gl-viewer {
    --glv-btn: rgba(255, 255, 255, 0.12);
    --glv-btn-hover: rgba(255, 255, 255, 0.26);
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.92);
    color: var(--on-dark);
    user-select: none;
    -webkit-user-select: none;
    animation: glv-in 0.2s ease;
}

.gl-viewer:focus { outline: none; }
.gl-viewer-black { background: rgba(0, 0, 0, 1); }
.gl-viewer-green { background: var(--felt-green-dark); }
.gl-viewer-light { --glv-btn: rgba(0, 0, 0, 0.07); --glv-btn-hover: rgba(0, 0, 0, 0.16); background: var(--paper); color: var(--ink); }

@keyframes glv-in { from { opacity: 0; } to { opacity: 1; } }

.glv-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: 0 0 auto; padding: 10px 14px; }
.glv-counter { font-size: 0.95rem; font-variant-numeric: tabular-nums; opacity: 0.85; }
.glv-tools { display: flex; gap: 8px; margin-left: auto; }

.glv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--glv-btn);
    color: inherit;
    font-size: 1.15rem;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease;
}

.glv-btn:hover, .glv-btn:focus-visible { background: var(--glv-btn-hover); color: inherit; }
.glv-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.glv-play.is-playing { background: var(--gold); color: var(--felt-green-dark); }

.glv-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    touch-action: none;
}

.glv-img {
    display: block;
    max-width: calc(100% - 130px);
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.28s ease, opacity 0.28s ease;
    will-change: transform;
    -webkit-user-drag: none;
}

.glv-zoomable .glv-img { cursor: zoom-in; }
.glv-zoomed .glv-img { cursor: grab; max-width: calc(100% - 130px); }
.glv-dragging .glv-img { transition: none; cursor: grabbing; }
.glv-stage.is-loading .glv-img { opacity: 0.25; }

.glv-stage.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 38px;
    height: 38px;
    margin: -19px 0 0 -19px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: glv-spin 0.8s linear infinite;
}

@keyframes glv-spin { to { transform: rotate(360deg); } }

.glv-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 54px;
    height: 54px;
    margin-top: -27px;
    font-size: 2.2rem;
}

.glv-prev { left: 14px; }
.glv-next { right: 14px; }
.glv-arrow[disabled] { opacity: 0.25; cursor: default; }

.glv-progress {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;
    width: 0;
    height: 3px;
    background: var(--gold);
}

.glv-caption { flex: 0 0 auto; min-height: 1.6em; padding: 8px 16px 2px; text-align: center; font-size: 1rem; overflow-wrap: anywhere; }

.glv-thumbs {
    position: relative;
    display: flex;
    gap: 6px;
    flex: 0 0 auto;
    overflow-x: auto;
    padding: 8px 12px 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

.glv-thumb {
    flex: 0 0 66px;
    height: 50px;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 5px;
    background: var(--glv-btn);
    opacity: 0.5;
    cursor: pointer;
    transition: opacity 0.15s ease, border-color 0.15s ease;
}

.glv-thumb:first-child { margin-left: auto; }
.glv-thumb:last-child { margin-right: auto; }
.glv-thumb:hover, .glv-thumb:focus-visible { opacity: 0.85; }
.glv-thumb.is-active { opacity: 1; border-color: var(--gold); }
.glv-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.glv-hint { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-size: 0.8rem; opacity: 0.6; pointer-events: none; }

@media (max-width: 700px) {
    .glv-img, .glv-zoomed .glv-img { max-width: 100%; }
    .glv-arrow { width: 40px; height: 40px; margin-top: -20px; font-size: 1.7rem; background: rgba(0, 0, 0, 0.35); color: var(--on-dark); }
    .glv-prev { left: 6px; }
    .glv-next { right: 6px; }
    .glv-thumb { flex-basis: 52px; height: 40px; }
    .glv-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .gl-viewer, .glv-img { animation: none; transition: none; }
}

/* Aperçu (Administration > Pages spéciales > Galerie photo) : la visionneuse s'ouvre dans le cadre d'aperçu. */
.gl-preview-doc .gl-viewer { position: absolute; bottom: auto; height: 620px; }

/* Administration > Albums photo : ordre par glisser-déplacer (mêmes poignée et styles que la liste des blocs). */
#albums-order .blocks-zone-status { display: block; min-height: 1.4em; margin-bottom: 4px; text-align: right; }
.albums-table .col-visibility { width: 190px; }
.albums-table .col-count { width: 80px; }
.albums-table .col-album-actions { width: 40%; }

@media (max-width: 700px) {
    .albums-table { table-layout: auto; }
}

/* Administration > Albums photo > Gérer les photos : sélection (suppression groupée) et photo de couverture. */
.gp-toolbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin: 0 0 14px;
    padding: 10px 14px;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.gp-toolbar [hidden] { display: none !important; }
.gp-all { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 600; cursor: pointer; }
.gp-count { color: var(--muted); font-size: 0.9rem; }
.gp-toolbar #gp-delete { margin-left: auto; }
.gp-status { flex-basis: 100%; min-height: 0; font-size: 0.85rem; color: var(--c-success); }
.gp-status:empty { display: none; }
.gp-status.is-error { color: var(--card-red); }

.gp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
    user-select: none;
}

.gp-card {
    position: relative;
    overflow: hidden;
    border: 3px solid transparent;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.gp-card img { display: block; width: 100%; height: 150px; object-fit: cover; }
.gp-card.is-selected { border-color: var(--c-info); }
.gp-card.is-selected img { opacity: 0.82; }
.gp-card.is-cover { border-color: var(--gold); }
.gp-card.is-selected.is-cover { border-color: var(--c-info); box-shadow: 0 0 0 3px var(--gold), var(--shadow); }

.gp-select,
.gp-cover {
    position: absolute;
    top: 8px;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 4px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
}

.gp-select { left: 8px; }
.gp-cover { right: 8px; }
.gp-select input,
.gp-cover input { width: 17px; height: 17px; margin: 0; cursor: pointer; accent-color: var(--felt-green); }
.gp-card.is-cover .gp-cover { background: var(--gold); color: var(--felt-green-dark); }
.gp-cover input[disabled] + span { color: var(--muted); }

.gp-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    cursor: default;
}

.gp-num { color: var(--muted); font-size: 0.8rem; }

@media (max-width: 600px) {
    .gp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .gp-card img { height: 120px; }
    .gp-select, .gp-cover { top: 6px; padding: 3px 6px; font-size: 0.72rem; }
    .gp-select { left: 6px; }
    .gp-cover { right: 6px; }
    .gp-toolbar #gp-delete { margin-left: 0; }
}

/* Menu : liens réservés aux membres, estompés avec un cadenas pour les visiteurs (clic = page de connexion). */
.main-nav .nav-locked {
    opacity: 0.5;
}

.main-nav .nav-locked:hover,
.main-nav .nav-locked:focus-visible {
    opacity: 0.8;
}

.main-nav .nav-lock {
    display: inline-block;
    margin-left: 2px;
    vertical-align: -1px;
}

/* ------------------------------------------------------------------
   Tableau de bord de l'administration (blocs choisis par chacun, statistiques)
   ------------------------------------------------------------------ */
.db-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.db-toolbar .form-hint {
    margin: 0;
}

.db-panel,
.db-grid-empty,
.db-tooltip {
    box-sizing: border-box;
}

.db-panel[hidden],
.db-grid-empty[hidden],
.db-tooltip[hidden] {
    display: none !important;
}

.db-panel {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
    margin-bottom: 20px;
}

.db-panel-intro {
    margin: 0 0 12px;
    font-size: 0.9rem;
}

.db-status {
    font-weight: 600;
    color: var(--c-success);
}

.db-status.is-error {
    color: var(--c-danger);
}

.db-catalog h3,
.db-tracking h3 {
    font-size: 0.95rem;
    margin: 14px 0 8px;
}

.db-catalog-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.db-catalog-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 8px;
}

.db-add {
    border: 1px solid var(--c-field-border);
    background: var(--surface);
    color: var(--ink);
    border-radius: 999px;
    padding: 5px 12px;
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}

.db-add:hover:not([disabled]),
.db-add:focus-visible {
    border-color: var(--felt-green);
    color: var(--felt-green);
}

.db-add[disabled] {
    cursor: default;
    opacity: 0.55;
}

.db-add-card {
    border-radius: 8px;
    padding: 8px 10px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.db-add-label {
    font-weight: 600;
}

.db-add-desc {
    color: var(--muted);
    font-size: 0.8rem;
}

.db-panel-actions {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.db-tracking {
    margin-top: 16px;
    border-top: 1px solid var(--c-row-line);
    padding-top: 4px;
}

.db-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 6px 0;
    font-size: 0.9rem;
}

/* Grille : 4 colonnes ; P = 1, M = 2, L = 4 (2 colonnes sur écran moyen, 1 sur téléphone). */
.db-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.db-size-s { grid-column: span 1; }
.db-size-m { grid-column: span 2; }
.db-size-l { grid-column: span 4; }

@media (max-width: 1250px) {
    .db-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .db-size-l { grid-column: span 2; }
}

@media (max-width: 680px) {
    .db-toolbar { flex-direction: column; align-items: stretch; }
    .db-grid { grid-template-columns: minmax(0, 1fr); }
    .db-size-s, .db-size-m, .db-size-l { grid-column: span 1; }
}

.db-grid > .db-block {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 18px;
    margin: 0;
    min-width: 0;
    position: relative;
}

.db-block.is-loading {
    opacity: 0.5;
}

.db-editing .db-block {
    outline: 2px dashed var(--c-field-border);
    outline-offset: -2px;
}

.db-block.is-dragging {
    outline-color: var(--felt-green);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
    opacity: 0.85;
    z-index: 2;
}

.db-edit-bar {
    display: none;
    align-items: center;
    gap: 6px;
    margin: -4px 0 10px;
}

.db-editing .db-edit-bar {
    display: flex;
}

.db-edit-bar .drag-handle {
    width: 28px;
    height: 28px;
}

.db-sizes {
    display: inline-flex;
    border: 1px solid var(--c-field-border);
    border-radius: 6px;
    overflow: hidden;
}

.db-size-btn,
.db-remove {
    border: 0;
    background: var(--surface);
    color: var(--muted);
    font: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 26px;
    height: 26px;
    cursor: pointer;
}

.db-size-btn + .db-size-btn {
    border-left: 1px solid var(--c-field-border);
}

.db-size-btn[aria-pressed="true"] {
    background: var(--felt-green);
    color: var(--on-dark);
}

.db-remove {
    margin-left: auto;
    border: 1px solid var(--c-field-border);
    border-radius: 6px;
}

.db-remove:hover,
.db-remove:focus-visible {
    color: var(--c-danger);
    border-color: var(--c-danger);
}

/* Accès rapide */
.db-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: inherit;
    text-decoration: none;
    min-height: 54px;
}

.db-link-label {
    font-weight: 700;
    color: var(--felt-green);
}

.db-link:hover .db-link-label,
.db-link:focus-visible .db-link-label {
    text-decoration: underline;
}

.db-link-hint {
    color: var(--muted);
    font-size: 0.85rem;
}

.db-badge {
    display: inline-block;
    align-self: flex-start;
    border-radius: 999px;
    padding: 1px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--c-info-bg);
    color: var(--c-info);
}

.db-badge.is-warning { background: var(--c-warning-bg); color: var(--c-warning-text); }
.db-badge.is-danger { background: var(--c-danger-bg); color: var(--c-danger); }
.db-badge.is-ok { background: var(--c-success-bg); color: var(--c-success); }

/* Bloc de statistiques */
.db-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.db-head h2 {
    font-size: 1rem;
    margin: 0;
}

.db-head .db-period {
    width: auto;
    max-width: 50%;
    margin: 0;
    flex: 0 0 auto;
    font: inherit;
    font-size: 0.8rem;
    padding: 2px 6px;
    border: 1px solid var(--c-field-border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--ink);
}

.db-empty,
.db-note,
.db-foot {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 8px 0 0;
}

.db-note {
    color: var(--c-warning-text);
}

.db-summary {
    font-size: 0.9rem;
    margin: 0 0 10px;
}

.db-subtitle {
    font-size: 0.85rem;
    margin: 14px 0 4px;
    color: var(--muted);
}

.db-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 12px;
}

.db-kpi {
    min-width: 0;
}

.db-kpi.is-selected {
    border-left: 3px solid var(--felt-green);
    padding-left: 8px;
}

.db-kpi-label {
    color: var(--muted);
    font-size: 0.8rem;
}

.db-kpi-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.db-kpi-unit {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--muted);
}

.db-kpi-sub {
    font-size: 0.85rem;
    color: var(--ink);
}

.db-trend {
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 600;
}

.db-trend.is-up { color: var(--c-success); }
.db-trend.is-down { color: var(--c-danger); }

/* Histogramme (une seule couleur, axe et grille discrets) */
.db-chart {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px;
}

.db-yaxis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 160px;
    font-size: 0.7rem;
    color: var(--muted);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.db-yaxis span {
    line-height: 1;
}

.db-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 160px;
    border-bottom: 1px solid var(--c-grey-border);
    background-image: linear-gradient(var(--c-row-line), var(--c-row-line)), linear-gradient(var(--c-row-line), var(--c-row-line));
    background-size: 100% 1px, 100% 1px;
    background-position: 0 0, 0 50%;
    background-repeat: no-repeat;
}

.db-bar {
    flex: 1 1 0;
    min-width: 0;
    background: var(--felt-green);
    border-radius: 4px 4px 0 0;
    outline: none;
}

.db-bar.is-current {
    background: var(--felt-green-light);
}

.db-bar:hover,
.db-bar:focus-visible {
    background: var(--gold);
}

.db-xlabels {
    display: flex;
    gap: 2px;
    margin-top: 4px;
}

.db-xlabels span {
    flex: 1 1 0;
    min-width: 0;
    font-size: 0.68rem;
    color: var(--muted);
    text-align: center;
    white-space: nowrap;
    overflow: visible;
}

.db-table {
    margin-top: 10px;
    font-size: 0.85rem;
}

/* Bloc Adhérents : nombre d'adhérents par type d'adhésion (saison en cours, puis toutes les saisons). */
.db-types {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    font-size: 0.9rem;
}

.db-types li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 3px 0;
    border-bottom: 1px dashed var(--paper-alt);
}

.db-types .db-types-total {
    border-bottom: 0;
    font-weight: 600;
}

.db-seasons {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
}

.db-seasons li {
    padding: 5px 0;
    border-bottom: 1px dashed var(--paper-alt);
}

.db-seasons-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.db-seasons .is-current .db-seasons-head {
    font-weight: 600;
}

.db-seasons-types {
    color: var(--muted);
    font-size: 0.8rem;
}

.db-muted {
    color: var(--muted);
}

.db-table summary {
    cursor: pointer;
    color: var(--muted);
}

.db-table table {
    margin-top: 6px;
    max-height: 260px;
}

/* Carte de chaleur jours × heures (une couleur, du clair au foncé) */
.db-heat {
    display: grid;
    grid-template-columns: 32px repeat(24, minmax(0, 1fr));
    gap: 2px;
    font-size: 0.68rem;
    color: var(--muted);
    align-items: center;
}

.db-heat-hour {
    white-space: nowrap;
    overflow: visible;
}

.db-heat-cell {
    display: inline-block;
    aspect-ratio: 1;
    min-height: 10px;
    border-radius: 2px;
    background: var(--c-grey-bg);
    outline: none;
}

.db-heat .db-heat-cell:hover,
.db-heat .db-heat-cell:focus-visible {
    box-shadow: 0 0 0 2px var(--gold);
}

.db-heat-cell.lv0 { background: var(--c-grey-bg); box-shadow: inset 0 0 0 1px var(--c-row-line); }
.db-heat-cell.lv1 { background: color-mix(in srgb, var(--felt-green) 15%, var(--surface)); }
.db-heat-cell.lv2 { background: color-mix(in srgb, var(--felt-green) 32%, var(--surface)); }
.db-heat-cell.lv3 { background: color-mix(in srgb, var(--felt-green) 52%, var(--surface)); }
.db-heat-cell.lv4 { background: color-mix(in srgb, var(--felt-green) 74%, var(--surface)); }
.db-heat-cell.lv5 { background: var(--felt-green); }

.db-legend {
    display: flex;
    align-items: center;
    gap: 3px;
    justify-content: flex-end;
    margin-top: 8px;
    font-size: 0.72rem;
    color: var(--muted);
}

.db-legend .db-heat-cell {
    width: 12px;
    min-height: 12px;
}

/* Barres horizontales et listes */
.db-hbars {
    list-style: none;
    margin: 0;
    padding: 0;
}

.db-hbars li {
    display: grid;
    grid-template-columns: minmax(90px, 40%) minmax(0, 1fr) 46px;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 0.85rem;
}

.db-hbar-value {
    text-align: right;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.db-hbar-track {
    display: block;
    background: var(--c-grey-bg);
    box-shadow: inset 0 0 0 1px var(--c-row-line);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

.db-hbar-fill {
    display: block;
    background: var(--felt-green);
    height: 100%;
    border-radius: 4px;
}

.db-rank {
    margin: 0;
    padding-left: 22px;
    font-size: 0.88rem;
}

.db-rank li {
    padding: 4px 0;
}

.db-rank-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 3px;
}

.db-rank-row a {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.db-rank-value {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.db-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.88rem;
}

.db-list li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 4px 10px;
    padding: 6px 0;
    border-bottom: 1px solid var(--c-row-line);
}

.db-list li:last-child {
    border-bottom: 0;
}

.db-meta {
    color: var(--muted);
    font-size: 0.8rem;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.db-tag {
    border: 1px solid var(--c-field-border);
    border-radius: 4px;
    padding: 0 5px;
    font-size: 0.72rem;
}

.db-path {
    word-break: break-all;
}

.db-events li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.db-event-date {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 0.78rem;
}

.db-events .db-hbar-track {
    grid-column: 1 / -1;
    height: 5px;
}

.db-activity li {
    flex-direction: column;
    align-items: flex-start;
}

/* Infobulle des graphiques */
.db-tooltip {
    position: fixed;
    z-index: 1000;
    max-width: 260px;
    background: var(--c-deep);
    color: var(--c-deep-text);
    padding: 6px 9px;
    border-radius: 6px;
    font-size: 0.8rem;
    pointer-events: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

/* Joueur ajouté après le tirage des places : façon de le placer (panneau de classement) */
.seating-arrival {
    flex-basis: 100%;
    order: 1;
    border: 1px solid var(--c-field-border);
    border-radius: 8px;
    padding: 8px 12px 10px;
    margin: 0;
    background: var(--c-grey-bg);
}

.seating-arrival legend {
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0 4px;
}

.seating-arrival-option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 6px 0;
    font-size: 0.9rem;
    font-weight: 400;
}

.seating-arrival-option input[type="radio"] {
    margin-top: 3px;
    width: auto;
}

.seating-arrival-option select {
    width: auto;
    display: inline-block;
    margin: 0 4px;
    padding: 2px 6px;
}

.seating-arrival-full {
    margin: 2px 0 4px;
    color: var(--c-warning-text);
}

.seating-arrival + .btn,
form .seating-arrival ~ button[type="submit"] {
    order: 2;
}

/* Partie lancée : chiffres de la gestion du classement, fenêtre de l'agenda (vue adhérents) */
.standings-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin: 0 0 12px;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--c-grey-bg);
    border: 1px solid var(--c-row-line);
    font-size: 0.95rem;
}

.live-standings-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.agenda-live-banner {
    margin: 12px 0;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--felt-green);
    color: var(--on-dark);
}

.agenda-live-facts {
    columns: 2 220px;
}

.agenda-live-pending {
    margin: 12px 0;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--c-warning-soft);
    border: 1px solid var(--c-note-border);
}

.agenda-live-pending ul {
    margin: 6px 0;
}

.agenda-live-inplay {
    font-size: 0.92rem;
}

.agenda-view-switch {
    margin: 12px 0;
}

/* Vue admin / vue membre (barre du haut, comptes qui ont des droits) */
.view-switch {
    display: inline-flex;
    gap: 2px;
    padding: 2px;
    margin: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    vertical-align: middle;
}

.view-switch button {
    border: 0;
    border-radius: 999px;
    padding: 3px 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.view-switch button:hover,
.view-switch button:focus-visible {
    color: var(--on-dark);
    background: rgba(255, 255, 255, 0.12);
}

.view-switch button.is-active {
    background: var(--gold);
    color: var(--felt-green-dark);
}

.member-view-back {
    border: 1px solid var(--felt-green-dark);
    border-radius: 999px;
    padding: 2px 12px;
    background: transparent;
    color: var(--felt-green-dark);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.member-view-back:hover,
.member-view-back:focus-visible {
    background: var(--felt-green-dark);
    color: var(--gold);
}

/* Ordre de cassage des tables (formulaire d'un évènement) */
.break-order-title {
    font-size: 1.05rem;
    margin: 20px 0 6px;
}

.break-order {
    list-style: none;
    margin: 8px 0 16px;
    padding: 0;
    max-width: 420px;
}

.break-order li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    margin-bottom: 6px;
    border: 1px solid var(--c-field-border);
    border-radius: 8px;
    background: var(--surface);
}

.break-order li.is-final {
    border-color: var(--felt-green);
    box-shadow: inset 4px 0 0 var(--felt-green);
}

.break-order li.is-dragging {
    background: var(--gold-light);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.break-order-name {
    font-weight: 600;
    flex: 1;
}

.break-order li.is-final .break-order-rank {
    color: var(--felt-green);
    font-weight: 700;
}

/* Répartition des tables au lancement du placement */
.seating-planned {
    margin: 4px 0 8px;
}

.seating-dist[hidden] {
    display: none !important;
}

.seating-dist {
    margin: 8px 0 14px;
    padding: 12px 14px;
    border: 1px solid var(--c-field-border);
    border-radius: 8px;
    background: var(--c-grey-bg);
}

.seating-dist-table {
    max-width: 460px;
}

.seating-dist-table input[type="number"] {
    width: 90px;
    margin: 0;
}

.seating-dist-add {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.seating-dist-add select {
    width: auto;
    margin: 0;
}

.seating-dist-total {
    font-weight: 600;
    color: var(--c-danger);
}

.seating-dist-total.is-ok {
    color: var(--c-success);
}

/* ------------------------------------------------------------------ HelloAsso et adhérents à valider (1.024.001) */
.status-inactive { background: var(--paper-alt); color: var(--muted); }
.ha-intro, .validate-intro { max-width: 900px; }
.ha-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ha-form { max-width: 820px; }
.ha-row { display: flex; gap: 16px; flex-wrap: wrap; }
.ha-row > div { flex: 1 1 260px; min-width: 0; }
.ha-check { display: flex; gap: 8px; align-items: flex-start; font-weight: normal; margin: 4px 0; }
.ha-check input { width: auto; margin-top: 3px; }
.ha-inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.ha-inline input[type="date"], .ha-inline select { width: auto; }
.ha-url { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 0; padding: 10px 12px; background: var(--c-grey-bg); border: 1px solid var(--c-frame-border); border-radius: 8px; }
.ha-url-label { font-weight: 600; flex: 0 0 auto; }
.ha-url-value { flex: 1 1 320px; min-width: 0; overflow-wrap: anywhere; font-size: .9rem; }
.ha-map select { width: 100%; max-width: 420px; }
.ha-message { max-width: 420px; font-size: .88rem; overflow-wrap: anywhere; }
/* Contacts Google (Administration > Contacts Google) : procédure de mise en place */
.gc-steps { max-width: 900px; margin: 0 0 16px; }
.google-contact-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.gc-rules { display: grid; gap: 12px; max-width: 980px; margin-bottom: 10px; }
.gc-rule { margin: 0; padding: 12px 14px; border: 1px solid var(--c-frame-border); border-radius: 8px; background: var(--surface); min-width: 0; }
.gc-rule legend { font-weight: 600; padding: 0 4px; }
.gc-rule .form-group { margin-bottom: 8px; }
.gc-rule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 18px; }
.gc-rule-grid select { width: 100%; max-width: 280px; margin-bottom: 8px; }
.gc-rule-label { display: block; font-weight: 600; font-size: .9rem; margin: 2px 0 4px; }
.gc-rule-delete { color: var(--c-danger, inherit); }
.gc-rule-options { max-width: 900px; margin-top: 14px; }
.gc-steps summary { cursor: pointer; font-weight: 600; }
.gc-steps ol { margin: 10px 0 0; padding-left: 22px; display: grid; gap: 8px; }
.validate-list { display: grid; gap: 16px; max-width: 1100px; }
.validate-list > .validate-card { margin: 0; }
.validate-card { background: var(--surface); border: 1px solid var(--c-card-border); border-radius: 10px; padding: 14px 18px; }
.validate-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.validate-head h2 { margin: 0; font-size: 1.15rem; }
.validate-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0; padding: 0; color: var(--muted); }
.validate-actions { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: flex-end; margin-top: 10px; }
.validate-merge { display: grid; gap: 4px; flex: 1 1 300px; min-width: 0; }
.validate-merge label { font-size: .9rem; font-weight: 600; }
.validate-merge-row { display: flex; gap: 8px; }
.validate-merge-row select { flex: 1 1 auto; min-width: 0; }
.validate-merge-row .btn { white-space: nowrap; }
.db-validate li { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.db-validate-who { display: grid; min-width: 0; }
.db-validate-note { font-size: .82rem; color: var(--muted); }
.db-validate form { margin: 0; flex: 0 0 auto; }
.db-more { margin: 8px 0 0; text-align: right; }
.home-validate { background: var(--surface); border: 1px solid var(--c-warning); border-left-width: 5px; border-radius: 10px; padding: 14px 18px; margin-bottom: 20px; }
.home-validate-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; justify-content: space-between; }
.home-validate-head h2 { margin: 0 0 6px; font-size: 1.15rem; }

/* ------------------------------------------------------------------ Placement aux tables en plein écran */
.seating-fullscreen-btn { margin-left: 8px; vertical-align: middle; }
.agenda-live-fullscreen { margin: 8px 0 0; }
/* « Par nom » / « Par table » de la vue classement des membres (1.054.004) : lisible sur le fond clair de la page. */
.agenda-live-fullscreen .seating-mode-btn { color: var(--felt-green-dark); border-color: var(--felt-green-dark); }
.seating-fs-only { display: none; }
body.seating-fs-open { overflow: hidden; }
.seating-fs {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    background: var(--felt-green-dark);
    color: var(--on-dark);
    overflow: auto;
    padding: clamp(10px, 2vh, 28px) clamp(12px, 2vw, 36px);
    font-size: clamp(1rem, 1.3vw, 1.7rem);
}
.seating-fs:fullscreen { background: var(--felt-green-dark); }
.seating-fs-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-bottom: 1.5vh; }
.seating-fs-title { font-size: 1.3em; color: var(--gold); flex: 1 1 auto; }
.seating-fs-time { font-size: 0.7em; opacity: .8; }
.seating-fs-close { flex: 0 0 auto; }
.seating-fs-body { flex: 1 1 auto; }
.seating-fs .seating-fs-only { display: block; }
.seating-fs .seating-fs-hide,
.seating-fs .seating-fs-body form,
.seating-fs .seating-fs-body h3 { display: none; }
.seating-fs-final { margin: 0 0 1vh; font-size: 1.4em; font-weight: 700; color: var(--gold); text-align: center; }
.seating-fs .seating-tables { gap: 1.5vh 1.5vw; margin: 0; }
.seating-fs .seating-tables.seating-cols-1 { max-width: 760px; margin: 0 auto; }
.seating-fs .seating-table { background: var(--surface); color: var(--ink); padding: 1vh 1vw; border-width: 3px; }
.seating-fs .seating-table-head { font-size: 1.15em; margin-bottom: .6vh; }
.seating-fs .seating-table-head .form-hint { font-size: .75em; }
.seating-fs .seating-seats { font-size: 1em; }
.seating-fs .seating-seats li { padding: .35vh 0; }
.seating-fs .seating-seat { min-width: 2em; font-size: .85em; }
.seating-fs .seating-closed { color: var(--on-dark); opacity: .8; font-size: .8em; }
.seating-fs .seating-pending,
.seating-fs .agenda-live-pending { color: var(--ink); font-size: .9em; margin: 0 0 1.5vh; }
@media (min-width: 900px) {
    .seating-fs .seating-tables.seating-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .seating-fs .seating-tables.seating-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* Écran large (télé, ordinateur) : jusqu'à 4 tables sur une seule rangée, pour tout voir sans faire défiler. */
@media (min-width: 900px) and (min-aspect-ratio: 4/3) {
    .seating-fs .seating-tables:not(:has(> .seating-table:nth-of-type(5))) { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
    .seating-fs .seating-tables > .seating-closed { grid-column: auto; grid-row: 2; }
}

/* Deux colonnes (gestion à gauche, liste à droite) : body.event-wide, utilisé par la gestion détaillée (1.045.001) ; le
   bouton de pleine largeur des pages d'un évènement (1.044.002) est retiré depuis 1.047.001. */
body.event-wide .live-standings-wrap { max-width: none; }
@media (min-width: 1000px) {
    body.event-wide .event-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 0 28px; align-items: start; }
    body.event-wide .event-split-list { border-left: 1px solid var(--c-frame-border); padding-left: 28px; min-height: 100%; }
    body.event-wide .event-split-list > h3:first-child,
    body.event-wide .event-split-list > p:first-child { margin-top: 0; }
}

/* Gestion détaillée d'une partie (1.045.001) : page pleine largeur, gestion à gauche (navigation, vues, horloge, actions),
   liste des joueurs à droite. */
body.game-desk-body { background: var(--felt-green-dark); padding: 12px; }
.game-desk-body .live-standings-wrap { max-width: none; margin: 0 auto; background: var(--surface); border-radius: 8px; padding: 16px; }
.game-desk .btn-secondary { color: var(--felt-green-dark); border-color: var(--felt-green-dark); }
.game-desk .desk-clock .btn-secondary { color: var(--on-dark); border-color: rgba(255, 255, 255, 0.6); }
.desk-side { display: grid; gap: 12px; margin-bottom: 16px; }
.desk-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.desk-dropdown-panel { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; width: min(420px, calc(100vw - 32px)); max-height: 60vh; overflow: auto;
    padding: 10px 12px; background: var(--surface); color: var(--ink); border: 1px solid var(--c-frame-border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); }
.desk-dropdown-panel .form-hint { margin: 0 0 6px; }
.desk-games { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.desk-games a { display: block; padding: 6px 8px; border-radius: 6px; color: var(--ink); text-decoration: none; }
.desk-games a:hover, .desk-games a:focus-visible { background: var(--paper); }
.desk-games .is-current a { background: var(--paper); font-weight: 600; }
.desk-games-when { display: inline-block; min-width: 6.5em; color: var(--muted); font-variant-numeric: tabular-nums; }
.desk-title { margin: 0; font-size: 1.35rem; }
.desk-title small { font-size: 0.7em; font-weight: normal; color: var(--muted); }
.desk-views { display: flex; flex-wrap: wrap; gap: 6px; }
.desk-side > section { margin: 0; }
.desk-clock { background: var(--felt-green-dark); color: var(--on-dark); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 6px; }
.desk-clock-head { display: flex; justify-content: space-between; gap: 10px; font-size: 0.95rem; }
.desk-clock-status { opacity: 0.85; }
.desk-clock-time { font-size: clamp(2.6rem, 5vw, 3.6rem); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.desk-clock.is-break .desk-clock-time { color: var(--gold); }
.desk-clock-blinds { font-size: 1.35rem; font-weight: 600; }
.desk-clock-next { font-size: 0.9rem; opacity: 0.85; }
.desk-clock-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 4px 0 0; }
.desk-clock-stats div { background: rgba(255, 255, 255, 0.08); border-radius: 6px; padding: 6px 8px; }
.desk-clock-stats dt { font-size: 0.75rem; opacity: 0.8; }
.desk-clock-stats dd { margin: 0; font-size: 1.05rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.desk-clock-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.desk-clock-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 42px; padding: 6px 12px; }
.desk-clock-btn svg { display: block; }
.desk-clock .btn-secondary { background: transparent; color: var(--on-dark); border-color: rgba(255, 255, 255, 0.6); }
.desk-clock-play .i-pause, .desk-clock.is-running .desk-clock-play .i-play { display: none; }
.desk-clock.is-running .desk-clock-play .i-pause { display: inline; }
.desk-clock-error { color: var(--gold-light); margin: 0; }
.desk-actions { border: 1px solid var(--c-frame-border); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 12px; background: var(--surface); }
.desk-actions h2 { margin: 0; font-size: 1.1rem; }
.desk-action h3 { margin: 0 0 6px; font-size: 0.98rem; }
.desk-action form { margin: 0; }
.desk-action .form-hint { margin: 4px 0 0; }
.desk-inline { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.desk-inline select { max-width: 100%; }
.desk-switch { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; cursor: pointer; }
.desk-players-left { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 4px; }
.desk-players-left label { font-weight: 600; }
.desk-players-left input { width: 90px; }
.desk-dialog { max-width: 520px; width: calc(100vw - 32px); border: none; border-radius: var(--radius); padding: 18px 20px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3); }
.desk-dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
.desk-dialog h3 { margin-top: 0; }
.desk-dialog fieldset { border: 1px solid var(--c-frame-border); border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; display: grid; gap: 8px; }
.desk-dialog-actions { display: flex; gap: 8px; justify-content: flex-end; }
/* Blocs refermables de la gestion détaillée (1.047.001) : projecteurs, déplacement, réinitialisation, prizepool, gestion
   du tirage, paramètres du classement, ajout de joueur. */
.desk-block { border: 1px solid var(--c-frame-border); border-radius: var(--radius); background: var(--surface); padding: 0 12px; margin: 0 0 12px; }
.desk-block > summary { cursor: pointer; font-weight: 600; padding: 9px 0; list-style-position: inside; }
.desk-block[open] { padding-bottom: 12px; }
.desk-block[open] > summary { border-bottom: 1px solid var(--c-frame-border); margin-bottom: 10px; }
.desk-actions .desk-block { margin: 0; }
.desk-prizepool-list { margin: 0 0 10px; padding-left: 18px; }
.projector-panel .seating-projector-list { width: 100%; }
.projector-panel .seating-projector-actions form { margin: 0 4px 4px 0; }
.seating-draw-block .seating-draw-part + .seating-draw-part { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--c-frame-border); }
.seating-redraw .desk-inline { margin-top: 6px; }
.desk-clock-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
/* Six cadres quand le bloc des recaves est affiché (1.073.001). */
.desk-clock-stats:has(> [data-c="recave-box"]:not([hidden])) { grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(0, 1.6fr); }
/* « Rebuy · terminé » sur une seule ligne (1.073.002). */
.desk-clock-stat[data-c="recave-box"] dt { white-space: nowrap; }
@media (max-width: 520px) { .desk-clock-stats, .desk-clock-stats:has(> [data-c="recave-box"]:not([hidden])) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.projector-panel .seating-projector-list td .form-hint { display: block; font-size: 0.8rem; }
@media (min-width: 1000px) {
    .game-desk-body .event-split-list { position: sticky; top: 12px; }
}

/* Placement par table ou par ordre alphabétique (1.044.001) : body.seating-alpha-mode choisit l'affichage. */
.seating-mode-alpha,
.seating-mode-to-tables,
body.seating-alpha-mode .seating-mode-tables,
body.seating-alpha-mode .seating-mode-to-alpha { display: none; }
body.seating-alpha-mode .seating-mode-alpha { display: block; }
body.seating-alpha-mode .seating-mode-to-tables { display: inline; }
.seating-alpha-table { width: 100%; max-width: 640px; border-collapse: collapse; font-size: 0.9rem; }
.seating-alpha-table th { text-align: left; font-size: 0.8rem; color: var(--on-dark); background: var(--felt-green-dark); padding: 5px 8px; }
.seating-alpha-table td { padding: 3px 8px; border-bottom: 1px solid var(--c-frame-border); }
.seating-alpha-table tbody tr:nth-child(even) td { background: var(--paper); }
.seating-alpha-last { font-weight: 600; text-transform: uppercase; }
.seating-alpha-cols { display: none; }
.seating-fs .seating-alpha-cols { display: grid; gap: 1.5vh 2vw; align-items: start; }
.seating-fs .seating-alpha-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seating-fs .seating-alpha-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seating-fs .seating-alpha-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.seating-fs .seating-alpha-cols-1 .seating-alpha-table { margin: 0 auto; }
.seating-fs .seating-alpha-table { max-width: none; background: var(--surface); color: var(--ink); border-radius: 8px; font-size: .9em; }
.seating-fs .seating-alpha-table th { font-size: .75em; padding: .6vh .6vw; }
.seating-fs .seating-alpha-table td { padding: .4vh .6vw; }
@media (max-width: 899px) {
    .seating-fs .seating-alpha-cols { grid-template-columns: minmax(0, 1fr); }
}
/* Commandes des projecteurs (1.044.001) : une ligne par compte Projecteur, puis « Tous les projecteurs ». */
.seating-projector-list { border-collapse: collapse; margin: 4px 0 10px; }
.seating-projector-list th, .seating-projector-list td { padding: 4px 10px 4px 0; text-align: left; vertical-align: middle; }
.seating-projector-list th { font-weight: 600; white-space: nowrap; }
.seating-projector-list .seating-projector-all th { color: var(--muted); font-weight: normal; }
.seating-projector-actions { white-space: nowrap; }
@media (max-width: 600px) {
    .seating-projector-list tr { display: grid; grid-template-columns: 1fr; padding: 4px 0; border-bottom: 1px solid var(--c-frame-border); }
}

/* Classement d'une partie : chaque joueur sur une seule ligne (nom, place, points, bounty, actions) ; le tableau
   défile horizontalement sur un petit écran plutôt que de couper les lignes. */
.standings-table td { white-space: nowrap; vertical-align: middle; }
.standings-table td.admin-actions { display: table-cell; }
.standings-table td.admin-actions > form { display: inline-flex !important; align-items: center; gap: 4px; margin: 0 2px; vertical-align: middle; }
.standings-table td.admin-actions select { width: auto; display: inline-block; margin: 0; }
.standings-table td form[style*="display:flex"] { flex-wrap: nowrap; }
.standings-table td.admin-actions select { font-size: .85rem; padding: 4px 6px; height: auto; max-width: 140px; }
.standings-table td.admin-actions .btn-small { padding-left: 8px; padding-right: 8px; }
.standings-table td, .standings-table th { padding-left: 6px; padding-right: 6px; }

/* Journal des modifications : intégrations HelloAsso (fiches créées, champs avant / après). */
.log-subtitle { margin: 8px 0 4px; font-weight: 600; }
.log-member { margin: 4px 0 8px; }
.log-member > summary { cursor: pointer; }
.log-changes td:first-child { font-weight: 600; white-space: nowrap; }
.log-changes .log-before { color: var(--muted); text-decoration: line-through; }
.log-changes .log-after { color: var(--c-success); font-weight: 600; }

/* Bouton « Ajouter à mon calendrier » : menu des façons de s'abonner (partials/calendar_subscribe.php) */
.cal-subscribe {
    position: relative;
    display: inline-block;
}

.cal-subscribe > summary {
    list-style: none;
    cursor: pointer;
}

.cal-subscribe > summary::-webkit-details-marker {
    display: none;
}

.cal-subscribe-menu {
    position: absolute;
    left: 0;
    z-index: 50;
    width: min(360px, calc(100vw - 32px));
    margin-top: 6px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--c-frame-border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    text-align: left;
}

.cal-subscribe-menu > a {
    display: block;
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--ink);
    text-decoration: none;
}

.cal-subscribe-menu > a:hover,
.cal-subscribe-menu > a:focus {
    background: var(--c-grey-bg);
}

.cal-subscribe-menu > a span,
.cal-subscribe-copy > span {
    display: block;
    font-size: 0.82rem;
    color: var(--muted);
}

.cal-subscribe-copy {
    padding: 8px 10px;
    border-top: 1px solid var(--c-frame-border);
    margin-top: 4px;
}

/* Bandeau des évènements : bouton à droite, menu aligné à droite. */
.agenda-toolbar .cal-subscribe-menu {
    left: auto;
    right: 0;
}

/* Téléphone : menu sous le bouton, en pleine largeur (jamais coupé). */
@media (max-width: 600px) {
    .cal-subscribe {
        display: block;
    }

    .cal-subscribe-menu,
    .agenda-toolbar .cal-subscribe-menu {
        position: static;
        width: auto;
    }
}

.cal-subscribe-copy code {
    display: block;
    margin: 4px 0 6px;
    font-size: 0.8rem;
    overflow-wrap: anywhere;
}


/* ------------------------------------------------------------------ Sauvegardes automatiques (1.033.003) */
.alert-warning { background: var(--c-warning-bg); color: var(--c-warning-text); border: 1px solid var(--c-warning); }
.bk-quota { margin: 14px 0 4px; max-width: 820px; }
.bk-quota-critical .bk-quota-text strong { color: var(--card-red, var(--c-danger)); }
.bk-quota-warn .bk-quota-text strong { color: var(--c-warning-text); }
.bk-form .gc-rule { margin: 14px 0; }
.bk-form select { max-width: 280px; }
.bk-small { width: auto; }
.bk-keep { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 6px; }
.bk-keep label, .bk-gb { display: inline-flex; align-items: center; gap: 6px; font-weight: normal; flex-wrap: wrap; }
.bk-keep input, .bk-gb input { width: 5.5em; }
.bk-actions { margin: 0; flex-wrap: nowrap; }
.bk-actions form { margin: 0; }
/* Bandeau des administrateurs quand les sauvegardes ont un problème (comme « Profil incomplet ») */
.backup-alert-banner { background: var(--c-warning-bg); border-bottom: 1px solid var(--c-warning); }
.backup-alert-banner.is-critical { background: var(--c-danger-bg); border-bottom-color: var(--c-danger-border); }
.backup-alert-banner .container, .backup-alert-banner .backup-alert-inner { display: flex; align-items: center; justify-content: center; gap: 8px 14px; flex-wrap: wrap; padding: 8px 20px; }
.backup-alert-banner a { color: var(--c-warning-text); font-size: .88rem; font-weight: 600; text-align: center; }
.backup-alert-banner.is-critical a { color: var(--card-red, var(--c-danger)); }
.backup-alert-banner a:hover { text-decoration: underline; }
.backup-alert-banner form { margin: 0; }
.backup-alert-banner button { background: none; border: 0; padding: 0; font-size: .8rem; color: var(--muted); text-decoration: underline; cursor: pointer; }
.admin-body-inner > .backup-alert-banner { border: 1px solid var(--c-warning); border-radius: var(--radius); margin: 0 0 14px; }
.admin-body-inner > .backup-alert-banner.is-critical { border-color: var(--c-danger-border); }
@media (max-width: 600px) {
    .bk-actions { flex-wrap: wrap; }
}
.admin-table td.bk-file { white-space: normal; word-break: break-all; min-width: 180px; }

/* ------------------------------------------------------------------ Aide des pages d'administration (1.033.007) */
.admin-topbar h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-help-btn {
    width: 24px; height: 24px; flex: 0 0 24px; padding: 0; border-radius: 50%;
    border: 1.5px solid var(--felt-green-dark); background: var(--surface); color: var(--felt-green-dark);
    font: italic 700 0.85rem/1 Georgia, 'Times New Roman', serif; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.admin-help-btn:hover, .admin-help-btn[aria-expanded="true"] { background: var(--felt-green-dark); color: var(--surface); }
.admin-help-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.admin-help-panel {
    position: relative; margin: 16px 32px 0; max-width: 900px; padding: 14px 44px 4px 18px;
    background: var(--c-note-bg); color: var(--c-note-text); border: 1px solid var(--c-note-border); border-radius: var(--radius);
    font-size: 0.92rem; line-height: 1.5;
}
.admin-help-panel p { margin: 0 0 10px; }
.admin-help-panel ul { margin: 0 0 10px; padding-left: 20px; }
.admin-help-panel li { margin: 2px 0; }
.admin-help-close {
    position: absolute; top: 6px; right: 8px; width: 30px; height: 30px; padding: 0; border: 0; background: none;
    color: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer; border-radius: 50%;
}
.admin-help-close:hover { background: rgba(0, 0, 0, 0.06); }
@media (max-width: 700px) {
    .admin-help-panel { margin: 12px 12px 0; }
}

/* ------------------------------------------------------------------ Listes de l'administration : colonnes, tri, filtres (1.033.009) */
.at-toolbar [hidden], .admin-table tr.at-filter-row[hidden] { display: none !important; }
.at-toolbar { position: relative; display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin: 0 0 10px; }
.at-toolbar .at-search { flex: 1 1 220px; max-width: 340px; width: auto; padding: 7px 10px; font-size: 0.9rem; }
.at-count { font-size: 0.85rem; color: var(--muted); }
.at-status { font-size: 0.82rem; color: var(--c-success); }
.at-status.at-status-error { color: var(--card-red, var(--c-danger)); }
.at-paged { margin: 0; }
.at-panel {
    position: absolute; top: calc(100% + 4px); left: 0; z-index: 30; width: min(360px, calc(100vw - 32px));
    max-height: 70vh; overflow: auto; padding: 12px 14px; background: var(--surface);
    border: 1px solid var(--c-frame-border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.at-panel-title { margin: 0 0 8px; font-weight: 600; font-size: 0.9rem; }
.at-panel-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.at-panel-list li { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 6px; background: var(--surface); }
.at-panel-list li:hover { background: var(--c-grey-bg); }
.at-panel-list li.at-dragging { opacity: 0.5; }
.at-panel-list label { flex: 1; display: flex; align-items: center; gap: 6px; margin: 0; font-weight: normal; font-size: 0.9rem; cursor: pointer; }
.at-panel-list input { width: auto; margin: 0; }
.at-handle { cursor: grab; color: var(--muted); user-select: none; }
.at-move { width: 28px; height: 28px; padding: 0; border: 1px solid var(--c-frame-border); border-radius: 6px; background: var(--surface); color: inherit; cursor: pointer; }
.at-move:disabled { opacity: 0.35; cursor: default; }
.at-panel-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; }
.admin-table .at-col-hidden { display: none; }
.admin-table tr.at-row-hidden { display: none; }
.admin-table th.at-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.admin-table th.at-sortable::after { content: '↕'; margin-left: 6px; opacity: 0.35; font-size: 0.8em; }
.admin-table th.at-sortable.at-asc::after { content: '▲'; opacity: 0.9; }
.admin-table th.at-sortable.at-desc::after { content: '▼'; opacity: 0.9; }
.admin-table th.at-sortable:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.admin-table .at-filter-row th { padding: 6px 8px; background: var(--c-grey-bg); color: inherit; }
.admin-table .at-filter { width: 100%; min-width: 80px; padding: 5px 7px; font-size: 0.82rem; font-weight: normal; }
.admin-table tr.at-empty td { text-align: center; color: var(--muted); font-style: italic; }

/* Listes v2 (version 1.034.002) : une ligne par élément, défilement horizontal, largeurs réglables, icônes. */
.at-scroll { overflow-x: auto; max-width: 100%; margin-bottom: 20px; border-radius: var(--radius); box-shadow: var(--shadow); }
.at-scroll > .admin-table { box-shadow: none; margin: 0; }
.admin-table.at-table { display: table; overflow: visible; white-space: nowrap; }
.admin-table.at-table th, .admin-table.at-table td { white-space: nowrap; }
.admin-table.at-table td.bk-file { white-space: nowrap; word-break: normal; }
.admin-table.at-fixed { table-layout: fixed; }
.admin-table.at-fixed th, .admin-table.at-fixed td { overflow: hidden; text-overflow: ellipsis; }
.admin-table.at-fixed .at-filter { min-width: 0; }
.admin-table.at-table .admin-actions, .admin-table.at-table td.at-actions-cell { flex-wrap: nowrap; }
.admin-table.at-table td.at-actions-cell { display: table-cell; }
.admin-table td.at-actions-cell > *, .admin-table td.at-actions-cell form { display: inline-flex; vertical-align: middle; margin: 0 2px 0 0; }
.admin-table th.at-resizable { position: relative; }
.at-resize { position: absolute; top: 0; right: -4px; width: 9px; height: 100%; cursor: col-resize; z-index: 2; touch-action: none; }
.at-resize::after { content: ''; position: absolute; top: 25%; bottom: 25%; left: 4px; border-left: 1px solid currentColor; opacity: 0.25; }
.at-resize:hover::after, body.at-resizing .at-resize::after { opacity: 0.8; }
body.at-resizing, body.at-resizing * { cursor: col-resize !important; user-select: none; }
.btn.at-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; min-width: 30px; padding: 0; line-height: 1; }
.btn.at-icon-btn .at-icon { display: block; }
.btn.at-icon-btn[disabled] { opacity: 0.4; }
.admin-table tr.at-row-link { cursor: pointer; }
.admin-table tr.at-row-link:hover td { background: var(--c-grey-bg); }
.admin-table .drag-cell { width: 44px; text-align: center; padding-left: 6px; padding-right: 6px; }
.admin-table tr.is-dragging { background: var(--gold-light) !important; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18); position: relative; z-index: 2; }

/* Fiche en lecture seule (?lecture=1, admin-view.js) */
.readonly-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 18px; padding: 10px 14px; border-radius: var(--radius); background: var(--gold-light); border: 1px solid var(--gold); }
.readonly-banner-actions { display: flex; gap: 8px; }
.admin-readonly .admin-body-inner :is(input, select, textarea):disabled { opacity: 1; color: inherit; background: var(--c-grey-bg); cursor: default; }
.admin-readonly .admin-body-inner .form-actions, .admin-readonly .admin-body-inner .ql-toolbar { display: none; }
.admin-readonly .admin-body-inner button:disabled { cursor: default; }
@media (max-width: 600px) {
    .at-toolbar .at-search { flex-basis: 100%; max-width: none; }
}

/* ------------------------------------------------------------------ Projecteur et annonces de placement (1.034.001) */
.seating-projector { margin: 12px 0; }
.seating-projector p { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0; }
.seating-announcements { margin: 10px 0; padding: 10px 12px; border-radius: 8px; background: var(--c-warning-soft); border: 1px solid var(--c-warning); }
.seating-announcement { padding: 8px 0; border-top: 1px dashed var(--c-frame-border); }
.seating-announcement:first-of-type { border-top: 0; }
.seating-announcement ul { margin: 4px 0 6px; padding-left: 20px; }

/* Menu déroulant de l'administration (« Actions » de la page Adhérents, version 1.034.003) */
.admin-toolbar.admin-toolbar-start { justify-content: flex-start; }
.admin-dropdown { position: relative; display: inline-block; }
.admin-dropdown > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.admin-dropdown > summary::-webkit-details-marker { display: none; }
.admin-dropdown > summary::after { content: '▾'; font-size: 0.85em; }
.admin-dropdown-menu { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; min-width: 230px; padding: 6px; display: grid; gap: 2px;
    background: var(--surface); border: 1px solid var(--c-frame-border); border-radius: 8px; box-shadow: var(--shadow); }
.admin-dropdown-menu a { display: block; padding: 8px 10px; border-radius: 6px; color: inherit; text-decoration: none; white-space: nowrap; }
.admin-dropdown-menu a:hover, .admin-dropdown-menu a:focus-visible { background: var(--c-grey-bg); }
.users-selection { align-items: center; }
.users-selection-form, .list-selection-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.users-selection-form label, .list-selection-form label { margin: 0; font-weight: 600; }
.users-selection-form select, .list-selection-form select { width: auto; }
.users-selection form { margin: 0; }
.users-selection .form-hint, .list-selection .form-hint { margin: 0; }

/* Page d'administration affichée dans le site (lien du menu du site, ?vue=site, version 1.035.001) */
.admin-in-site { margin: 8px 0 32px; }
.admin-in-site-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 16px; }
.admin-in-site-head h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; }
.admin-in-site > .admin-help-panel { margin: 0 0 16px; }
.admin-in-site .admin-body-inner { padding: 0; }

/* Nombre de lignes listées (data-count-label), à droite au-dessus de la liste (version 1.035.002) */
.at-toolbar .at-count.at-count-always { margin-left: auto; order: 10; font-weight: 600; color: inherit; font-size: 0.9rem; }
.list-selection { align-items: center; }
.list-selection .selection-save, .users-selection .selection-save { margin: 0; }

/* Bandeau « Adhérents à valider » de l'accueil : une ligne par adhérent (version 1.035.003) */
.home-validate-table { width: 100%; border-collapse: collapse; margin: 4px 0 6px; font-size: 0.92rem; }
.home-validate-table th { background: transparent; text-align: left; font-size: 0.8rem; font-weight: 600; color: var(--muted); padding: 4px 8px; border-bottom: 1px solid var(--c-row-line); }
.home-validate-table td { padding: 6px 8px; border-bottom: 1px solid var(--c-row-line); white-space: nowrap; }
.home-validate-table td:last-child { text-align: right; width: 1%; }
.home-validate-table tr:last-child td { border-bottom: 0; }

/* Mon profil : sur toute la largeur du contenu, comme les autres pages (version 1.035.004) */
.form-card.form-card-wide { max-width: none; margin: 24px 0; }

/* ------------------------------------------------------------------ Réservation de repas (1.036.001) */
.live-standings-top-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.live-standings-top-actions .btn-secondary { color: var(--felt-green-dark); border-color: var(--felt-green-dark); background: var(--surface); }
.meal-builder [hidden], .meal-form [hidden], .meal-dialog [hidden] { display: none !important; }
.agenda-registration-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.agenda-meal-summary { margin: 8px 0 0; }
.agenda-meal-cell { white-space: nowrap; }
.meal-status { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 0.85rem; white-space: nowrap; }
.meal-status-yes { background: var(--c-success-bg); color: var(--c-success); border: 1px solid var(--c-success-border); }
.meal-status-no { background: var(--c-grey-bg); color: var(--muted); border: 1px solid var(--c-grey-border); }
.meal-status-none { background: var(--c-danger-bg); color: var(--c-danger); border: 1px solid var(--c-danger-bg); }
.meal-counts { margin: 8px 0 12px; }
.meal-downloads { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.meal-downloads .btn-secondary, .meal-copy-row .btn-secondary, .mb-add, .mb-tool { color: var(--felt-green-dark); border-color: var(--felt-green-dark); }
.meal-lines { margin: 0; padding-left: 16px; }
.meal-row-none td:first-child { font-style: italic; }

/* Fenêtre de dialogue (meal-form.js) */
body.meal-dialog-open { overflow: hidden; }
.meal-dialog-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(0, 0, 0, 0.55); display: flex; align-items: flex-start; justify-content: center; padding: 24px 12px; overflow-y: auto; }
.meal-dialog { background: var(--surface); color: var(--ink); border-radius: 10px; width: 100%; max-width: 640px; padding: 16px 18px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35); }
.meal-dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.meal-dialog-head h3 { margin: 0; }
.meal-dialog-close { background: none; border: 0; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--muted); }
.meal-dialog-body { margin: 12px 0; }
.meal-dialog-error { white-space: pre-line; margin-top: 10px; }
.meal-dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.meal-dialog-actions .btn-secondary { color: var(--felt-green-dark); border-color: var(--felt-green-dark); }

/* Formulaire de choix (adhérent et aperçu) */
.meal-form fieldset.meal-block { border: 1px solid var(--c-card-border); border-radius: 8px; padding: 8px 12px 10px; margin: 0 0 12px; }
.meal-form legend { font-weight: 700; padding: 0 4px; }
.meal-field { margin: 6px 0 10px; }
.meal-field-head { margin-bottom: 4px; }
.meal-options { display: flex; flex-direction: column; gap: 4px; padding-left: 4px; }
.meal-option { display: flex; align-items: center; gap: 6px; font-weight: normal; flex-wrap: wrap; }
.meal-option label { display: inline-flex; align-items: center; gap: 6px; font-weight: normal; }
.meal-option input[type="number"].meal-qty { width: 4.5em; }
.meal-qty-hint { margin: 2px 0 0; }
.meal-price { color: var(--felt-green); font-weight: 600; white-space: nowrap; }
.meal-choices { display: flex; flex-direction: column; gap: 6px; }
.meal-choice { border-radius: 6px; padding: 4px 6px; }
.meal-choice.is-chosen { background: var(--c-success-soft); }
.meal-choice-head, .meal-choice-none { display: flex; align-items: center; gap: 6px; font-weight: normal; }
.meal-choice-body { padding: 4px 0 4px 24px; }
.meal-observation textarea { width: 100%; }
.meal-total { text-align: right; font-size: 1.1rem; border-top: 1px solid var(--c-row-line); padding-top: 8px; }

/* Constructeur du menu (formulaire de l'évènement) */
.meal-copy-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.meal-copy-row select { flex: 1; min-width: 200px; }
.meal-builder { margin: 8px 0 16px; }
.mb-node { border: 1px solid var(--c-card-border); border-left: 4px solid var(--felt-green); border-radius: 6px; padding: 8px; margin: 0 0 8px; background: var(--surface); }
.mb-field { border-left-color: var(--gold); }
.mb-head, .mb-option, .mb-settings { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mb-settings { margin: 6px 0; font-size: 0.92rem; }
.mb-settings select { max-width: 100%; }
.mb-kind { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); min-width: 3.6em; }
.mb-head .mb-label, .mb-option .mb-label { flex: 1; min-width: 160px; }
.meal-builder input[type="text"].mb-price { width: 7em; flex: 0 0 7em; }
.meal-builder input[type="text"].mb-label { width: auto; }
.mb-tools { display: inline-flex; gap: 4px; }
.mb-tool { padding: 2px 8px; min-width: 2em; }
.mb-remove { color: var(--c-danger) !important; border-color: var(--c-danger) !important; }
.mb-check { display: inline-flex; align-items: center; gap: 4px; font-weight: normal; }
.mb-range { display: inline-flex; gap: 8px; align-items: center; }
.mb-range label { font-weight: normal; }
.meal-builder .mb-range input { width: 4.5em; }
.mb-children { margin: 6px 0 0 14px; }
.mb-options { margin: 4px 0 0 14px; display: flex; flex-direction: column; gap: 4px; }
.mb-adds { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.meal-preview { border: 1px dashed var(--c-card-border); border-radius: 8px; padding: 12px; background: var(--c-grey-bg); margin-bottom: 12px; }

/* Repas (suite) et invités des adhérents (1.037.001) */
.agenda-outline-btn { color: var(--felt-green-dark) !important; border-color: var(--felt-green-dark) !important; }
.meal-status-later { background: var(--c-warning-bg); color: var(--c-warning-text); border: 1px solid var(--c-warning); }
.meal-status-redo { background: var(--c-danger-bg); color: var(--c-danger); border: 1px solid var(--c-danger); font-weight: 600; }
.agenda-guest-self-remove { font-size: 0.8rem; }
.agenda-guest-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.agenda-guest-row input { flex: 1; min-width: 120px; }
.agenda-guest-num { min-width: 4.5em; color: var(--muted); font-size: 0.9rem; }
.meal-dialog-actions .btn { white-space: normal; text-align: center; }
.mb-node.is-disabled, .mb-option.is-disabled { opacity: 0.55; background: var(--c-grey-bg); }
.mb-node.is-disabled > .mb-head .mb-label, .mb-option.is-disabled .mb-label { text-decoration: line-through; }
.mb-disable.is-on { background: var(--c-danger-bg) !important; color: var(--c-danger) !important; border-color: var(--c-danger) !important; }
.mb-prices { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.meal-builder .mb-prices input[type="text"].mb-price { width: 7.4em; flex: 0 0 7.4em; }
.meal-free-types { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; margin: 6px 0 0 22px; }
.meal-free-types[hidden] { display: none; }
.meal-free-types label { font-weight: normal; }
.meal-free-types .form-hint { flex-basis: 100%; margin: 0; }
.meal-report-options fieldset { border: 1px solid var(--c-card-border); border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.meal-report-options legend { font-weight: 700; }
.meal-report-options label { font-weight: normal; display: inline-flex; gap: 6px; align-items: center; }
.meal-table-groups { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.meal-table-groups .form-hint { flex-basis: 100%; }
.meal-section-group { margin-bottom: 18px; }
.meal-group-total { margin: 6px 0; }

/* Alertes des adhérents sous le calendrier (1.038.001) */
.member-alerts-menu { position: relative; margin-left: auto; }
.member-alerts-menu > summary { list-style: none; cursor: pointer; }
.member-alerts-menu > summary::-webkit-details-marker { display: none; }
.member-alerts-count { display: inline-block; min-width: 1.4em; padding: 0 5px; border-radius: 10px; background: var(--card-red); color: var(--on-dark); font-size: 0.75rem; line-height: 1.4; text-align: center; }
.member-alerts-panel {
    position: absolute; right: 0; z-index: 50; width: min(440px, calc(100vw - 32px)); margin-top: 6px; padding: 8px 10px;
    background: var(--surface); color: var(--ink); border: 1px solid var(--c-frame-border); border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); text-align: left;
}
.member-alerts-panel ul { list-style: none; margin: 0; padding: 0; }
.member-alerts-item { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--c-row-line); font-size: 0.85rem; }
.member-alerts-item a { color: var(--ink); }
.member-alerts-item.is-hidden a { color: var(--muted); text-decoration: line-through; }
.member-alerts-item .member-alert-toggle { flex: 0 0 auto; color: var(--felt-green-dark); border-color: var(--felt-green-dark); }
.member-alerts { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.member-alert { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 6px; background: var(--surface); border-left: 4px solid var(--gold); font-size: 0.9rem; }
.member-alert[hidden] { display: none; }
.member-alert-meal { border-left-color: var(--card-red); }
.member-alert a { flex: 1; color: var(--ink); text-decoration: none; }
.member-alert a:hover, .member-alert a:focus { text-decoration: underline; }
.member-alert-icon { display: inline-block; width: 1.2em; text-align: center; }
.member-alert-hide { flex: 0 0 auto; border: 0; background: none; color: var(--muted); font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 4px; }
.member-alert-hide:hover, .member-alert-hide:focus { color: var(--ink); background: var(--c-grey-bg); }

/* Sélection des joueurs (1.038.001) */
.agenda-sel-cell { width: 2.2em; text-align: center; }
.agenda-sel-actions { margin: 6px 0 14px; }
.agenda-selection-status { margin: 8px 0 0; padding: 6px 10px; border-radius: 6px; background: var(--c-grey-bg); }
.agenda-selection-selected { background: var(--c-success-bg); color: var(--c-success); }
.agenda-selection-not_selected { background: var(--c-danger-bg); color: var(--c-danger); }

/* Liste d'attente (1.039.001) */
.agenda-waitlist-status { margin: 8px 0; padding: 6px 10px; border-radius: 6px; background: var(--c-warning-bg); color: var(--c-warning); }
.agenda-waitlist-pos {
    display: inline-block;
    min-width: 1.6em;
    padding: 0 5px;
    border-radius: 8px;
    background: var(--c-warning-bg);
    color: var(--c-warning);
    font-size: 0.8em;
    font-weight: 600;
    text-align: center;
}
.waitlist-toggle { display: block; margin-top: 8px; font-weight: normal; }
#waitlist-order-field { margin-top: 6px; }

/* Journal des emails : détail d'un email, blocage des emails (1.040.001) */
.email-block-card.is-blocked { border: 1px solid var(--c-warning); background: var(--c-warning-bg); }
.email-log-detail { max-width: 900px; }
.email-log-head { max-width: 900px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 14px; }
.email-log-head form { margin: 0; }
.email-log-fields { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 20px; }
.email-log-fields dt { font-weight: 600; color: var(--muted); }
.email-log-fields dd { margin: 0; overflow-wrap: anywhere; }
.email-log-tabs { display: flex; gap: 8px; margin: 0 0 8px; }
.email-log-frame { width: 100%; min-height: 480px; border: 1px solid var(--c-grey-border); border-radius: 8px; background: var(--surface); }
.email-log-text { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--paper-alt); border-radius: 8px; padding: 12px 14px; font-size: .9rem; margin: 0; }
@media (max-width: 600px) {
    .email-log-fields { grid-template-columns: 1fr; }
    .email-log-fields dt { margin-top: 6px; }
}

/* Informations de l'évènement en icônes (1.040.005) : icône, valeur en gros, libellé court dessous. */
.agenda-facts {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.agenda-facts .agenda-fact {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
}
.agenda-fact-icon {
    flex: 0 0 auto;
    color: var(--felt-green-dark);
}
.agenda-fact-icon.agenda-fact-inline {
    width: 16px;
    height: 16px;
    vertical-align: -2px;
    margin-right: 3px;
}
.agenda-fact-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.agenda-fact-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.25;
}
.agenda-fact-value strong {
    font-weight: 700;
}
.agenda-fact-nowrap {
    white-space: nowrap;
}
.agenda-fact-arrow {
    color: var(--muted);
    font-weight: 400;
}
.agenda-fact-label {
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.2;
}
.agenda-fact-bar {
    display: block;
    width: 100%;
    max-width: 90px;
    height: 4px;
    margin-top: 3px;
    border-radius: 2px;
    background: var(--c-grey-bg);
    overflow: hidden;
}
.agenda-fact-bar span {
    display: block;
    height: 100%;
    background: var(--felt-green-dark);
}
@media (max-width: 600px) {
    .agenda-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .agenda-modal-dates {
        float: none;
        text-align: left;
        margin: 4px 0 8px;
    }
}

/* Prizepool personnalisé (1.041.001) */
.agenda-prizepool { margin: 4px 0 16px; }
.agenda-prizepool h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 1.05rem; }
.agenda-prizes { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 4px; max-width: 420px; }
.agenda-prize { display: flex; gap: 12px; align-items: baseline; background: var(--paper-alt); border-radius: 6px; padding: 6px 12px; }
.agenda-prize[hidden] { display: none; }
.agenda-prize-place { min-width: 2.6em; font-weight: 700; color: var(--felt-green-dark); white-space: nowrap; }
.agenda-prize-gain { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.agenda-prize-toggle { color: var(--felt-green-dark); border-color: var(--felt-green-dark); }
.prizepool-rows { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; max-width: 560px; }
.prizepool-row { display: flex; align-items: center; gap: 10px; }
.prizepool-row { flex-wrap: wrap; }
.prizepool-from { flex: 0 0 5.5em; font-weight: 600; }
.prizepool-to-label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: normal; color: var(--muted); }
.prizepool-to-label input { width: 5em; }
.prizepool-gain { flex: 1; min-width: 8em; }
.agenda-prize-place { white-space: nowrap; }
.prizepool-actions { display: flex; gap: 8px; margin: 0; }

/* Repas : bloc facultatif (Oui / Non), 1.041.002 */
.meal-optional-question { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 2px 0 8px; font-weight: 600; }
.meal-optional-question label { font-weight: normal; display: inline-flex; gap: 4px; align-items: center; }
.meal-optional-body[hidden] { display: none; }

/* Questionnaire d'inscription (1.042.001) */
.agenda-questions-title { margin: 12px 0 6px; }
.agenda-question-label { display: block; font-weight: 600; margin-bottom: 4px; }
.agenda-required { color: var(--c-danger); }
.agenda-question-options { display: flex; flex-direction: column; gap: 4px; }
.agenda-question-option { font-weight: normal; display: flex; gap: 6px; align-items: center; }
.agenda-question textarea { width: 100%; }
.agenda-attention { border-color: var(--c-warning) !important; background: var(--c-warning-bg) !important; }
.questionnaire-table td { white-space: normal; min-width: 8em; }
.qb { display: grid; gap: 10px; margin-top: 8px; max-width: 760px; }
.qb-question { border: 1px solid var(--c-grey-border); border-radius: 8px; padding: 8px 10px; background: var(--surface); }
.qb-question.is-dragging { opacity: .5; }
.qb-question.is-drop-target { outline: 2px dashed var(--felt-green-dark); }
.qb-head { display: flex; align-items: center; gap: 6px; }
.qb-handle { cursor: grab; font-size: 1.2rem; color: var(--muted); padding: 0 4px; user-select: none; }
.qb-num { font-weight: 700; }
.qb-label { flex: 1; min-width: 0; }
.qb-settings { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 8px 0 0 30px; }
.qb-check { font-weight: normal; display: inline-flex; gap: 4px; align-items: center; margin: 0; }
.qb-options { display: grid; gap: 6px; margin: 8px 0 0 30px; }
.qb-option { display: flex; gap: 6px; align-items: center; }
.qb-option input { flex: 1; }
.qb-remove { color: var(--c-danger) !important; }
.qb-add { justify-self: start; }

/* Gestion détaillée (1.048.001) : bascule « Prénom Nom » / « Nom Prénom » dans le titre de la colonne Joueur. */
.name-order-toggle {
    margin-left: 6px;
    padding: 1px 8px;
    font-size: 0.75em;
    font-weight: 600;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: inherit;
    cursor: pointer;
    white-space: nowrap;
    vertical-align: middle;
}

.name-order-toggle:hover,
.name-order-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.3);
}

/* Timer de la gestion détaillée (1.048.002) : nom du tournoi en haut au centre, horloge et blinds centrées, logo du club
   estompé en fond, changements de table à droite (l'horloge se décale à gauche), bandeaux défilants des derniers
   sortants et du prizepool, plein écran. */
.desk-clock { position: relative; overflow: hidden; }
.desk-clock > *:not(.desk-clock-logo) { position: relative; z-index: 1; }
.desk-clock [hidden] { display: none !important; }
.desk-clock-logo { position: absolute; inset: 0; margin: auto; width: 80%; height: 80%; object-fit: contain; opacity: 0.09; pointer-events: none; z-index: 0; filter: grayscale(0.3); }
.desk-clock-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.desk-clock-head .desk-clock-status { justify-self: end; text-align: right; }
.desk-clock-title { text-align: center; font-size: 1.1rem; letter-spacing: 0.02em; }
.desk-clock-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: center; }
.desk-clock-body.has-moves { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.desk-clock-center { display: grid; gap: 6px; text-align: center; justify-items: center; }
.desk-clock-moves { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 8px; padding: 8px 10px; align-self: stretch; display: flex; flex-direction: column; min-height: 0; }
.desk-clock-moves h3 { margin: 0 0 6px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gold-light); }
.desk-clock-moves-view { overflow: hidden; max-height: 11rem; flex: 1 1 auto; }
.desk-move { margin: 0 0 6px; display: grid; font-size: 0.9rem; line-height: 1.25; }
.desk-move span { opacity: 0.9; }
.desk-clock-band { display: flex; align-items: center; gap: 10px; background: rgba(0, 0, 0, 0.22); border-radius: 6px; padding: 4px 10px; overflow: hidden; }
.desk-clock-band-label { flex: 0 0 auto; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold-light); }
.desk-clock-band-view { flex: 1 1 auto; overflow: hidden; min-width: 0; }
.desk-clock-band-track { display: flex; width: max-content; white-space: nowrap; }
.desk-scroll-part { display: flex; gap: 28px; padding-right: 28px; }
.desk-clock-moves-track .desk-scroll-part { display: block; padding: 0 0 8px; }
.desk-band-item b { color: var(--gold-light); margin-right: 4px; }
.desk-clock-band-track.is-scrolling { animation: desk-scroll-x var(--scroll-duration, 20s) linear infinite; }
.desk-clock-moves-track.is-scrolling { animation: desk-scroll-y var(--scroll-duration, 20s) linear infinite; }
@keyframes desk-scroll-x { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes desk-scroll-y { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@media (prefers-reduced-motion: reduce) {
    .desk-clock-band-track.is-scrolling, .desk-clock-moves-track.is-scrolling { animation-duration: calc(var(--scroll-duration, 20s) * 3); }
}
.desk-clock-fs-btn .i-fs-off, .desk-clock.is-fullscreen .desk-clock-fs-btn .i-fs-on { display: none; }
.desk-clock.is-fullscreen .desk-clock-fs-btn .i-fs-off { display: inline; }

/* Plein écran : l'horloge occupe tout l'écran (projecteur, télé). */
.desk-clock.is-fullscreen { position: fixed; inset: 0; z-index: 3000; border-radius: 0; padding: 2.5vh 3vw; grid-template-rows: auto minmax(0, 1fr) auto auto auto auto; gap: 1.6vh; }
.desk-clock.is-fullscreen .desk-clock-head { font-size: clamp(1rem, 2.2vw, 2.4rem); }
.desk-clock.is-fullscreen .desk-clock-title { font-size: clamp(1.4rem, 3.2vw, 3.6rem); }
.desk-clock.is-fullscreen .desk-clock-body { align-self: stretch; }
.desk-clock.is-fullscreen .desk-clock-time { font-size: clamp(5rem, 17vw, 24rem); }
.desk-clock.is-fullscreen .desk-clock-body.has-moves .desk-clock-time { font-size: clamp(4rem, 11vw, 16rem); }
.desk-clock.is-fullscreen .desk-clock-blinds { font-size: clamp(1.8rem, 5vw, 6rem); }
.desk-clock.is-fullscreen .desk-clock-next { font-size: clamp(1rem, 2vw, 2.4rem); }
.desk-clock.is-fullscreen .desk-clock-moves { max-height: 100%; }
.desk-clock.is-fullscreen .desk-clock-moves h3 { font-size: clamp(0.9rem, 1.6vw, 1.8rem); }
.desk-clock.is-fullscreen .desk-clock-moves-view { max-height: none; }
.desk-clock.is-fullscreen .desk-move { font-size: clamp(1rem, 1.9vw, 2.2rem); }
.desk-clock.is-fullscreen .desk-clock-stats dt { font-size: clamp(0.8rem, 1.2vw, 1.4rem); }
.desk-clock.is-fullscreen .desk-clock-stats dd { font-size: clamp(1.1rem, 2.4vw, 3rem); }
.desk-clock.is-fullscreen .desk-clock-band { font-size: clamp(1rem, 2vw, 2.4rem); padding: 0.6vh 1.2vw; }
.desk-clock.is-fullscreen .desk-clock-band-label { font-size: clamp(0.75rem, 1.2vw, 1.4rem); }
.desk-clock.is-fullscreen .desk-clock-buttons { justify-content: flex-end; opacity: 0.35; transition: opacity 0.2s; }
.desk-clock.is-fullscreen .desk-clock-buttons:hover, .desk-clock.is-fullscreen .desk-clock-buttons:focus-within { opacity: 1; }
body.desk-clock-fs-open { overflow: hidden; }

/* Séparation déplaçable entre la partie gauche et la liste (1.048.002) : largeur de gauche --desk-left (en %). */
@media (min-width: 1000px) {
    body.game-desk-body.event-wide .event-split { grid-template-columns: minmax(0, var(--desk-left, 41.67%)) minmax(0, 1fr); }
    .game-desk-body .event-split-list { position: sticky; }
    .desk-splitter { position: absolute; top: 0; left: -9px; width: 16px; height: max(100%, calc(100vh - 40px)); cursor: col-resize; touch-action: none; z-index: 5; }
    .desk-splitter::after { content: ""; position: absolute; top: 0; bottom: 0; left: 7px; width: 2px; background: transparent; transition: background 0.15s; }
    .desk-splitter:hover::after, .desk-splitter:focus-visible::after, body.desk-resizing .desk-splitter::after { background: var(--felt-green); }
    body.desk-resizing { cursor: col-resize; user-select: none; }
}
@media (max-width: 999px) { .desk-splitter { display: none; } }

/* Clic sur un bouton de l'horloge (1.048.003) : le bouton pulse et « envoi… » s'affiche jusqu'à la réponse du site. */
.desk-clock-btn.is-sending { animation: desk-sending 0.8s ease-in-out infinite alternate; cursor: progress; }
@keyframes desk-sending { from { box-shadow: 0 0 0 0 rgba(242, 216, 121, 0.7); } to { box-shadow: 0 0 0 6px rgba(242, 216, 121, 0); } }
.desk-clock.is-sending .desk-clock-main { opacity: 0.55; }
@media (prefers-reduced-motion: reduce) { .desk-clock-btn.is-sending { animation: none; outline: 2px solid var(--gold-light); } }

/* Timer (1.050.001) : « Table finale » à la place de l'horloge jusqu'à la reprise ; cases des bandeaux défilants. */
.desk-clock-final { font-size: clamp(2.2rem, 4.6vw, 3.4rem); font-weight: 800; line-height: 1.05; color: var(--gold-light); text-transform: uppercase; letter-spacing: 0.04em; }
.desk-clock.is-fullscreen .desk-clock-final { font-size: clamp(4rem, 12vw, 16rem); }
.desk-clock-options { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.85rem; opacity: 0.9; }
.desk-clock-options label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.desk-clock.is-fullscreen .desk-clock-options { display: none; }

/* Historique des déplacements (gestion détaillée, 1.050.001). */
.seating-history-list { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.seating-history-list > li { padding: 8px 0; border-bottom: 1px dashed var(--c-frame-border); }
.seating-history-list > li:last-child { border-bottom: 0; }
.seating-history-head { margin: 0 0 4px; }
.seating-history-list ul { margin: 0; padding-left: 18px; font-size: 0.92rem; }

/* Mode Projecteur du site (1.050.001) : page du compte Projecteur et projection plein écran. */
body.projector-body { min-height: 100vh; background: var(--felt-green-dark); }
.projector-header .top-bar { background: rgba(0, 0, 0, 0.25); color: var(--on-dark); }
.projector-top-bar { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding-top: 6px; padding-bottom: 6px; }
.projector-user { font-weight: 600; }
.projector-header .btn-secondary { color: inherit; border-color: currentColor; background: transparent; }
.projector-home { text-align: center; padding: 8vh 16px 10vh; color: var(--on-dark); }
.projector-home h1 { font-size: clamp(2.4rem, 8vw, 6rem); letter-spacing: 0.08em; margin: 0 0 6vh; color: var(--gold-light); }
.projector-start { font-size: clamp(1.3rem, 3.4vw, 2.6rem); padding: 0.9em 1.8em; border-radius: 14px; font-weight: 800; letter-spacing: 0.06em; }
.projector-hint { max-width: 640px; margin: 4vh auto 0; opacity: 0.8; }
.projection { position: fixed; inset: 0; z-index: 5000; background: var(--felt-green-dark); color: var(--on-dark); }
.projection[hidden], .projection [hidden] { display: none !important; }
body.projection-open { overflow: hidden; }
.projection .desk-clock.is-fullscreen { z-index: 1; }
.projection .projection-seating { z-index: 2; }
.projection-final-badge { text-align: center; font-size: clamp(1.4rem, 3vw, 3rem); font-weight: 800; color: var(--gold-light); text-transform: uppercase; margin: 0 0 1.5vh; }
.projection-wait { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2vh; text-align: center; }
.projection-wait img { width: min(40vw, 40vh); height: auto; opacity: 0.85; }
.projection-wait-club { font-size: clamp(1.6rem, 4vw, 4rem); font-weight: 800; margin: 0; color: var(--gold-light); }
.projection-wait-text { font-size: clamp(1rem, 2vw, 2rem); margin: 0; opacity: 0.8; }
.projection-exit { position: absolute; top: 2.5vh; right: 3vw; z-index: 10; color: var(--on-dark); }
.projection-seating { font-size: clamp(1rem, 1.7vw, 2.4rem); }

/* Timer (1.051.002) : « EN PAUSE » clignotant quand l'horloge est arrêtée ; « PAUSE » à la place des blinds pendant un
   niveau de pause de la structure. */
.desk-clock-paused { font-size: clamp(1.2rem, 2.6vw, 2rem); font-weight: 800; letter-spacing: 0.12em; color: var(--gold-light); animation: desk-paused-blink 1.2s steps(2, jump-none) infinite; }
.desk-clock.is-fullscreen .desk-clock-paused { font-size: clamp(2rem, 5vw, 6rem); }
@keyframes desk-paused-blink { 0% { opacity: 1; } 100% { opacity: 0.15; } }
@media (prefers-reduced-motion: reduce) { .desk-clock-paused { animation: none; } }
.desk-clock.is-break .desk-clock-blinds { color: var(--gold-light); letter-spacing: 0.08em; }

/* Timer (1.051.003) : heure actuelle et bouton plein écran / réduire en haut à droite (à la place de l'état) ; niveau
   plus grand ; « EN PAUSE » et « Table finale » sans décaler l'horloge (place réservée, superposition) ; en plein écran
   (hors projection) pas de boutons : un clic sur le temps fait lecture / pause. Tailles en plein écran bornées par la
   hauteur de l'écran pour que rien ne se chevauche. */
.desk-clock-head .desk-clock-right { justify-self: end; display: inline-flex; align-items: center; gap: 10px; }
.desk-clock-now { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 1.15rem; }
.desk-clock-fs-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 34px; padding: 0; border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.55); background: transparent; color: inherit; cursor: pointer; }
.desk-clock-fs-btn:hover, .desk-clock-fs-btn:focus-visible { background: rgba(255, 255, 255, 0.15); }
.desk-clock-level { font-size: 1.3rem; }
.desk-clock-level strong { font-size: 1.15em; }
.desk-clock-paused { visibility: hidden; }
.desk-clock.is-paused .desk-clock-paused { visibility: visible; }
.desk-clock-main { display: grid; }
.desk-clock-main > * { grid-area: 1 / 1; align-self: center; justify-self: center; }
.desk-clock.is-fullscreen { grid-template-rows: auto minmax(0, 1fr) auto auto auto auto; }
.desk-clock.is-fullscreen .desk-clock-body { min-height: 0; overflow: hidden; }
.desk-clock.is-fullscreen .desk-clock-head { font-size: min(2.2vw, 4.5vh); }
.desk-clock.is-fullscreen .desk-clock-level { font-size: min(3.2vw, 6vh); }
.desk-clock.is-fullscreen .desk-clock-title { font-size: min(3.2vw, 6vh); }
.desk-clock.is-fullscreen .desk-clock-now { font-size: min(3vw, 5.5vh); }
.desk-clock.is-fullscreen .desk-clock-fs-btn { width: min(4.5vw, 8vh); height: min(4vw, 7vh); }
.desk-clock.is-fullscreen .desk-clock-fs-btn svg { width: 60%; height: 60%; }
.desk-clock.is-fullscreen .desk-clock-paused { font-size: min(5vw, 7vh); }
.desk-clock.is-fullscreen .desk-clock-time { font-size: min(17vw, 30vh); }
.desk-clock.is-fullscreen .desk-clock-body.has-moves .desk-clock-time { font-size: min(11vw, 26vh); }
.desk-clock.is-fullscreen .desk-clock-final { font-size: min(11vw, 20vh); }
.desk-clock.is-fullscreen .desk-clock-blinds { font-size: min(5vw, 8vh); }
.desk-clock.is-fullscreen .desk-clock-next { font-size: min(2vw, 3.6vh); }
.desk-clock.is-fullscreen .desk-clock-stats dd { font-size: min(2.4vw, 4.5vh); }
.desk-clock.is-fullscreen .desk-clock-band { font-size: min(2vw, 3.6vh); }
.desk-clock.is-fullscreen:not(.is-projection) .desk-clock-buttons,
.desk-clock.is-fullscreen:not(.is-projection) .desk-clock-options { display: none; }
.desk-clock.is-fullscreen:not(.is-projection) .desk-clock-main { cursor: pointer; }

/* Timer (1.052.002) : « EN PAUSE » clignote par-dessus le temps (plus de ligne réservée : le temps remonte) ; en plein
   écran et sur la projection, les tailles du centre (temps, blinds, niveau suivant) suivent la hauteur réellement
   libre entre l'en-tête et les cadres du bas (unités cqh) : blinds et niveau suivant ne sont plus coupés, quels que
   soient l'écran, le format (16/9, 21/9…) et les bandeaux affichés. Boutons -1 / +1 minute. */
.desk-clock-main .desk-clock-paused { z-index: 2; padding: 0.05em 0.45em; border-radius: 0.2em; background: rgba(8, 30, 22, 0.82);
    box-shadow: 0 0 0 0.06em rgba(255, 255, 255, 0.3); pointer-events: none; }
.desk-clock.is-final-hold .desk-clock-paused { display: none; }
.desk-clock-minute { min-width: 48px; font-weight: 800; font-variant-numeric: tabular-nums; }
.desk-clock.is-fullscreen .desk-clock-body { container-type: size; align-items: start; }
.desk-clock.is-fullscreen .desk-clock-center { gap: 1.5cqh; padding-top: 1cqh; }
.desk-clock.is-fullscreen .desk-clock-time { font-size: min(17vw, 56cqh); }
.desk-clock.is-fullscreen .desk-clock-body.has-moves .desk-clock-time { font-size: min(11vw, 56cqh); }
.desk-clock.is-fullscreen .desk-clock-final { font-size: min(11vw, 40cqh); }
.desk-clock.is-fullscreen .desk-clock-paused { font-size: min(7vw, 15cqh); }
.desk-clock.is-fullscreen .desk-clock-blinds { font-size: min(5vw, 15cqh); line-height: 1.15; }
.desk-clock.is-fullscreen .desk-clock-next { font-size: min(2.2vw, 6.5cqh); line-height: 1.2; }
.desk-clock:not(.is-fullscreen) .desk-clock-main .desk-clock-paused { font-size: clamp(0.85rem, 1.5vw, 1.2rem); }

/* Structure de la partie (1.052.003) : niveaux à venir de la gestion détaillée, modifiables pour ce tournoi seulement. */
.desk-levels { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 4px; }
.desk-level { border: 1px solid var(--c-frame-border); border-radius: 6px; padding: 6px 8px; }
.desk-level.is-current { border-color: var(--gold); box-shadow: inset 3px 0 0 var(--gold); }
.desk-level.is-break { background: rgba(201, 162, 39, 0.08); }
.desk-level-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.desk-level-num { font-weight: 700; min-width: 4.2em; }
.desk-level-blinds { font-variant-numeric: tabular-nums; font-weight: 600; flex: 1 1 8em; }
.desk-level-duration { font-variant-numeric: tabular-nums; opacity: 0.8; }
.desk-level-actions { display: inline-flex; gap: 4px; margin-left: auto; }
.desk-level-actions form { margin: 0; }
.desk-level-now { font-size: 0.8rem; font-weight: 700; color: var(--c-warning-text); text-transform: uppercase; letter-spacing: 0.05em; }
.desk-level-edit, .desk-level-insert { margin-top: 6px; display: grid; gap: 8px; }
.desk-level-fields { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 6px; }
.desk-level-fields label { display: grid; gap: 2px; font-size: 0.82rem; }
.desk-level-fields input { width: 7em; }
.desk-level-fields input[name="break_label"] { width: 12em; }
.desk-level-insert form { border-top: 1px dashed var(--c-frame-border); padding-top: 6px; }
.desk-level-insert-title { margin: 0 0 4px; font-weight: 600; font-size: 0.9rem; }
.desk-level-add { display: block; margin: 4px 0 0; padding: 0; border: 0; background: none; color: var(--c-success); font-size: 0.82rem; cursor: pointer; text-decoration: underline; }
.desk-level-edit[hidden], .desk-level-insert[hidden] { display: none; }

/* Paramétrage de l'horloge (1.052.003) : image de fond téléversée (plus le favicon), transparence réglée dans la page
   (style de l'image) ; « recadrée » : tout l'écran. */
.desk-clock-logo.is-cover { width: 100%; height: 100%; object-fit: cover; filter: none; }

/* Disposition personnalisée (Administration > Horloge) : en plein écran et sur la projection, chaque information est un
   bloc placé dans l'écran (position, taille, couleurs écrites par ClockLayout::css). Les conteneurs de la disposition
   standard s'effacent (display: contents). Mêmes règles pour l'aperçu de l'éditeur (.ck-frame). Tailles en cqh : % de
   la hauteur de l'écran (ou du cadre de l'aperçu). */
.desk-clock.is-custom-layout.is-fullscreen { display: block; container-type: size; padding: 0; margin: 0; }
.desk-clock.is-custom-layout.is-fullscreen :is(.desk-clock-head, .desk-clock-right, .desk-clock-body, .desk-clock-center, .desk-clock-stats) { display: contents; }
.desk-clock.is-custom-layout.is-fullscreen .desk-clock-fs-btn { position: absolute; top: 1.5cqh; right: 1cqw; z-index: 6; }
.desk-clock.is-custom-layout.is-fullscreen .desk-clock-error { position: absolute; left: 2%; bottom: 1%; z-index: 6; }
.ck-frame { position: relative; container-type: size; overflow: hidden; color: var(--on-dark); }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .ck-block { position: absolute; box-sizing: border-box; display: flex; flex-direction: column;
    justify-content: center; overflow: hidden; margin: 0; padding: 0.3cqh 0.8cqh; border-radius: 0.8cqh; line-height: 1.15; z-index: 1; opacity: 1; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .ck-align-left { align-items: flex-start; text-align: left; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .ck-align-center { align-items: center; text-align: center; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .ck-align-right { align-items: flex-end; text-align: right; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .ck-block, :is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .ck-block :is(strong, b, dd) { font-weight: 400; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .ck-bold, :is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .ck-bold :is(strong, dd) { font-weight: 700; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-clock-level strong { font-size: 1em; font-weight: 700; }
/* Temps restant : « Table finale » et « EN PAUSE » par-dessus. */
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-clock-main { display: grid; place-items: center; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-clock-main.ck-align-left { justify-items: start; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-clock-main.ck-align-right { justify-items: end; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-clock-main > * { grid-area: 1 / 1; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-clock-time { font-size: 1em; line-height: 1; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-clock-final { font-size: 0.5em; line-height: 1; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-clock-paused { font-size: 0.32em; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) :is(.desk-clock-blinds, .desk-clock-next, .desk-clock-level, .desk-clock-title, .desk-clock-now) { opacity: 1; letter-spacing: normal; }
/* Cadres d'information : valeur sous le libellé, ou à côté (ck-inline). */
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-clock-stat { gap: 0.1em; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-clock-stat dt { font-size: 0.5em; opacity: 0.85; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-clock-stat dd { font-size: 1em; margin: 0; font-variant-numeric: tabular-nums; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-clock-stat.ck-inline { flex-direction: row; align-items: baseline; gap: 0.5em; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-clock-stat.ck-inline dt { font-size: 0.7em; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-clock-stat.ck-inline.ck-align-left { justify-content: flex-start; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-clock-stat.ck-inline.ck-align-center { justify-content: center; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-clock-stat.ck-inline.ck-align-right { justify-content: flex-end; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-clock-stat.ck-inline:not(.ck-align-left):not(.ck-align-center):not(.ck-align-right) { justify-content: flex-start; }
/* Bandeaux des sortants et du prizepool : en ligne (défilement horizontal) ou en colonne (de bas en haut). */
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-clock-band { flex-direction: row; align-items: center; gap: 0.6em; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-clock-band-label { font-size: 0.6em; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-clock-band-view { align-self: stretch; display: flex; align-items: center; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-clock-band.ck-column { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0.3em; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-clock-band.ck-column .desk-clock-band-view { flex: 1 1 auto; min-height: 0; display: block; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-clock-band.ck-column .desk-clock-band-track { display: block; width: auto; white-space: normal; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-clock-band.ck-column .desk-scroll-part { display: block; padding: 0 0 0.6em; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-clock-band.ck-column .desk-band-item { display: block; margin: 0 0 0.3em; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-clock-band.ck-column .desk-clock-band-track.is-scrolling { animation-name: desk-scroll-y; }
/* Changements de table : affichés seulement s'il y en a (attribut hidden), au-dessus des autres blocs. */
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-clock-moves { z-index: 3; justify-content: flex-start; border: 0; max-height: none; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-clock-moves h3 { font-size: 0.75em; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-clock-moves-view { flex: 1 1 auto; min-height: 0; max-height: none; width: 100%; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-move { font-size: 1em; }

/* Administration > Horloge (1.052.003) : choix de la disposition, image de fond, éditeur des blocs. */
.clock-modes { display: grid; gap: 8px; }
.clock-mode { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--c-frame-border); border-radius: var(--radius); cursor: pointer; }
.clock-mode strong { display: block; }
.clock-image-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.clock-image-current { display: grid; gap: 6px; }
.clock-image-current img { max-width: 260px; max-height: 160px; border-radius: 6px; border: 1px solid var(--c-frame-border); background: var(--felt-green-dark); }
.clock-image-fields { flex: 1 1 320px; }
.ck-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 10px 0; }
.ck-toolbar label { display: inline-flex; align-items: center; gap: 6px; }
.ck-editor { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .ck-editor { grid-template-columns: minmax(0, 1fr); } }
.ck-stage { background: var(--c-device-shell); padding: 10px; border-radius: var(--radius); }
.ck-frame { width: 100%; aspect-ratio: 16 / 9; border-radius: 4px; user-select: none; touch-action: none; }
.ck-dl { display: contents; }
.ck-bg { position: absolute; inset: 0; margin: auto; width: 80%; height: 80%; object-fit: contain; pointer-events: none; }
.ck-bg.is-cover { width: 100%; height: 100%; object-fit: cover; }
.ck-frame .ck-block { cursor: move; outline: 1px dashed rgba(255, 255, 255, 0.35); outline-offset: -1px; }
.ck-frame .ck-block.is-selected { outline: 2px solid var(--gold-light); z-index: 4; }
.ck-frame .ck-block.is-off { opacity: 0.25; outline-style: dotted; }
.ck-frame .ck-block:focus-visible { outline: 3px solid var(--gold-light); }
.ck-handle { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; background: var(--gold-light); cursor: nwse-resize; border-radius: 2px 0 2px 0; display: none; }
.ck-frame .ck-block.is-selected .ck-handle { display: block; }
.ck-panel { border: 1px solid var(--c-frame-border); border-radius: var(--radius); padding: 10px 12px; background: var(--surface); }
.ck-panel h3 { margin: 4px 0 8px; font-size: 1rem; }
.ck-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
.ck-list li { display: flex; align-items: center; gap: 4px; }
.ck-pick { border: 0; background: none; padding: 2px 4px; cursor: pointer; text-align: left; font: inherit; font-size: 0.88rem; color: inherit; border-radius: 4px; }
.ck-pick.is-active { background: var(--gold-light); color: var(--ink); font-weight: 600; }
.ck-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.ck-grid label { display: grid; gap: 2px; font-size: 0.82rem; }
.ck-grid input[type="number"], .ck-grid select { width: 100%; }
.ck-grid .ck-wide { grid-column: 1 / -1; }
.ck-grid .ck-check { display: flex; align-items: center; gap: 6px; }
.ck-grid [hidden] { display: none; }
.clock-mode span { font-weight: 400; } .clock-mode span strong { font-weight: 700; }
:is(.desk-clock.is-custom-layout.is-fullscreen, .ck-frame) .desk-clock-stat dt { font-weight: 400; }

/* Timer (1.052.006) : bloc central (temps restant, blinds, niveau suivant) plus grand, en vue réduite comme en plein
   écran et sur la projection ; en plein écran, toujours borné par la place libre (cqh) : rien ne déborde. */
.desk-clock-time { font-size: clamp(3rem, 6.5vw, 4.6rem); }
.desk-clock-blinds { font-size: 1.65rem; }
.desk-clock-next { font-size: 1.05rem; opacity: 0.9; }
.desk-clock.is-fullscreen .desk-clock-center { gap: 1cqh; padding-top: 0.5cqh; }
.desk-clock.is-fullscreen .desk-clock-time { font-size: min(21vw, 58cqh); }
.desk-clock.is-fullscreen .desk-clock-body.has-moves .desk-clock-time { font-size: min(13vw, 58cqh); }
.desk-clock.is-fullscreen .desk-clock-blinds { font-size: min(6.5vw, 17cqh); }
.desk-clock.is-fullscreen .desk-clock-next { font-size: min(3.2vw, 9cqh); }

/* Gestion du classement (vue simple, 1.053.002) : bloc Timer (horloge et blinds à gauche, boutons à droite) et bloc
   Projecteurs refermable (seuls les projecteurs utilisés listés). */
.standings-timer { border: 1px solid var(--c-frame-border); border-radius: var(--radius); background: var(--surface); padding: 8px 12px 10px; margin: 0 0 12px; }
.standings-timer-title { margin: 0 0 4px; }
.standings-timer-body { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.standings-timer-time { font-size: 2.1rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--felt-green-dark); white-space: nowrap; }
.standings-timer.is-break .standings-timer-time { color: var(--gold); }
.standings-timer-state { font-size: 0.85rem; font-weight: 600; color: var(--card-red); text-transform: uppercase; letter-spacing: 0.04em; vertical-align: middle; }
.standings-timer-level { font-size: 1.2rem; flex: 1 1 auto; white-space: nowrap; }
.standings-timer-level strong { font-variant-numeric: tabular-nums; }
.standings-timer-buttons { display: flex; flex-wrap: wrap; gap: 8px; flex: 0 1 auto; }
.standings-timer-play .i-pause, .standings-timer.is-running .standings-timer-play .i-play { display: none; }
.standings-timer.is-running .standings-timer-play .i-pause { display: inline; }
.standings-timer-buttons .desk-clock-btn.is-sending { animation: desk-sending 0.8s ease-in-out infinite alternate; cursor: progress; }
.standings-timer-error { color: var(--c-danger); margin: 6px 0 0; }
.standings-panel .seating-projector.desk-block { margin: 12px 0; }
.projector-summary { font-weight: normal; }
.seating-projector-list tr[hidden] { display: none; }
.projector-others-toggle { margin: 0 0 6px; }
.standings-timer .btn-secondary { background: transparent; color: var(--felt-green-dark); border-color: var(--felt-green-dark); }
.standings-floor-block .standings-floor { border: 0; padding: 0; margin: 0; }
@media (max-width: 480px) {
    /* Téléphone : les 6 boutons se partagent la largeur, sur une seule ligne. */
    .standings-timer-buttons { flex: 1 1 100%; flex-wrap: nowrap; gap: 5px; }
    .standings-timer-buttons .desk-clock-btn { flex: 1 1 0; min-width: 0; min-height: 40px; padding: 6px 2px; }
    .standings-timer-buttons .desk-clock-minute { font-size: 0.85rem; }
}

/* Site en maintenance (1.055.001) : page seule (bannière et texte), connexion seule, rappel pour les administrateurs. */
.maintenance-body { min-height: 100vh; }
.maintenance-main { max-width: 900px; margin: 0 auto; padding: 24px 16px 40px; }
.maintenance-banner img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.maintenance-text { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 32px; margin: 24px 0 0; }
.maintenance-text > :first-child { margin-top: 0; }
.maintenance-text > :last-child { margin-bottom: 0; }
.maintenance-text a { text-decoration: underline; font-weight: 600; }
.maintenance-main .alert { max-width: 480px; margin: 16px auto 0; }
.maintenance-notice { background: var(--card-red); color: var(--on-dark); text-align: center; padding: 6px 12px; font-size: 0.9rem; font-weight: 600; }
.maintenance-notice a { color: var(--on-dark); text-decoration: underline; margin-left: 6px; }
.maintenance-settings { border: 1px solid var(--c-frame-border); border-radius: var(--radius); padding: 12px 16px; }
.maintenance-settings legend { font-weight: 700; padding: 0 6px; }
@media (max-width: 600px) { .maintenance-text { padding: 20px 16px; } }

/* Formulaire d'un évènement (1.057.001, blocs refermables 1.057.003) : réglages des inscriptions et des repas sous leur
   case, bloc fermé « Gestion de la partie » (championnats, « Gestion du live »),
   ouverture et fermeture des inscriptions en jours avant l'évènement ou à une date fixe. */
.event-form-block { margin: 6px 0 22px; }
.event-form-block > summary { font-size: 1.15rem; }
.event-form-block h3 { margin: 14px 0 8px; font-size: 1rem; }
.event-form-block[hidden] { display: none; }
.event-form-subblock { margin: 10px 0 14px; }
.event-form-subblock > summary { font-size: 1rem; }
.event-block-summary { margin-left: 8px; font-weight: normal; font-size: 0.85rem; color: var(--muted); }
.slug-current { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.slug-current[hidden] { display: none; }
.registration-date-title { display: block; font-weight: 600; margin-bottom: 4px; }
.registration-date-modes { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 6px; }
.registration-date-modes label { display: inline-flex; align-items: center; gap: 6px; font-weight: normal; margin: 0; }
.registration-date-inputs { display: flex; flex-wrap: wrap; gap: 12px; }
.registration-date-inputs > div { flex: 0 1 220px; }
.registration-date-inputs[hidden] { display: none; }

/* Coche « Joueurs actifs » des listes d'ajout d'un joueur (1.058.001, 1.058.003). */
.player-filter { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 6px; font-weight: normal; font-size: 0.9rem; }

/* Recadrage de la photo de profil (photo-crop.js, 1.058.005) : cadre carré gardé, guide rond (affichage en rond sur le
   site), coins légèrement assombris. */
.photo-crop-overlay { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.6); }
.photo-crop-dialog { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; width: min(420px, 100%); max-height: 100%; overflow-y: auto; display: grid; gap: 12px; }
.photo-crop-dialog h2 { margin: 0; font-size: 1.2rem; }
.photo-crop-dialog .form-hint { margin: 0; }
.photo-crop-stage { position: relative; width: min(360px, 100%); aspect-ratio: 1 / 1; margin: 0 auto; overflow: hidden; border-radius: 6px; background: var(--ink); cursor: grab; touch-action: none; user-select: none; }
.photo-crop-stage:active { cursor: grabbing; }
.photo-crop-stage:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.photo-crop-image { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; }
.photo-crop-guide { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.35); outline: 2px dashed rgba(255, 255, 255, 0.85); outline-offset: -2px; pointer-events: none; }
.photo-crop-zoom { display: flex; align-items: center; gap: 10px; font-weight: normal; margin: 0; }
.photo-crop-zoom input { flex: 1; }
.photo-crop-actions { display: flex; justify-content: flex-end; gap: 8px; }
.photo-crop-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; font-size: 0.9rem; }
.photo-crop-preview img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.photo-crop-actions .btn-secondary,
.photo-crop-preview .btn-secondary { color: var(--felt-green-dark); border-color: var(--felt-green-dark); }
.photo-crop-preview[hidden] { display: none; }

/* Import des adhérents : type de fichier (Adhésions / Historique, 1.059.001). */
.import-mode { border: 1px solid var(--c-field-border); border-radius: 8px; padding: 10px 14px; }
.import-mode legend { font-weight: 600; padding: 0 6px; }
.import-mode-choice { display: flex; gap: 8px; align-items: flex-start; font-weight: normal; margin: 6px 0; }
.import-mode-choice input { margin-top: 4px; flex: none; }

/* Formulaire d'évènement : jetons, nombre total ou tapis de départ (1.062.001). */
.chips-mode { border: 1px solid var(--c-field-border); border-radius: 8px; padding: 10px 14px; }
.chips-mode legend { font-weight: 600; padding: 0 6px; }
.chips-mode-choices { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 8px; }
.chips-mode-choices label { font-weight: normal; display: flex; gap: 6px; align-items: center; }
.chips-mode-fields [data-chips-field][hidden] { display: none; }
.chips-mode-fields input { max-width: 200px; }
.chips-mode-result { margin: 6px 0 0; }

/* Option sous une case à cocher (1.075.001, ex. « Visible seulement par les administrateurs » sous « Publier »). */
.form-suboption {
    display: block;
    margin: 6px 0 0 26px;
}
.form-suboption[hidden] {
    display: none;
}
/* Case à cocher dans une ligne de formulaire (ex. « Gestion tables » des types d'évènements, 1.077.001). */
.inline-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-weight: normal;
}

/* Titre de page avec un bouton à droite sur la même ligne (pages Classement et Archives, 1.078.003). */
.page-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.page-title-row h1 {
    margin: 0;
}
/* Bouton sous le titre (pages Classement et Archives, 1.079.002). */
.page-title-row.page-title-stacked {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

/* Partie par équipes (1.079.005) : fenêtre « Éliminer » avec le choix du partenaire. */
.team-eliminate-dialog fieldset { max-height: min(55vh, 420px); overflow-y: auto; }
.team-eliminate-dialog label { display: flex; gap: 8px; align-items: center; font-weight: normal; margin: 0; cursor: pointer; }
.team-eliminate-dialog label.is-self, .team-eliminate-dialog label.is-filtered { display: none; }
.team-eliminate-dialog input[type="search"] { width: 100%; margin: 0 0 10px; padding: 6px 8px; }

/* Mot de passe (1.079.007) : bouton « œil » dans le champ pour afficher ou masquer ce qui est tapé (main.js). */
.password-field { position: relative; display: block; }
.password-field input { width: 100%; padding-right: 44px; box-sizing: border-box; }
.password-toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.password-toggle:hover, .password-toggle:focus-visible { color: var(--felt-green-dark); background: rgba(0, 0, 0, 0.05); }

/* Classements (1.079.008) : 2e ligne d'en-tête figée sous la 1re ; colonnes des parties de même largeur, titres tronqués
   (texte entier au survol) ; bouton « pleine largeur » en haut à droite de chaque tableau (main.js). */
.standings-table .standings-subhead th { top: var(--standings-head-h, 0px); }
.standings-table { --standings-ev-w: 4.4em; }
.standings-table .standings-ev { width: var(--standings-ev-w); min-width: var(--standings-ev-w); max-width: var(--standings-ev-w); overflow: hidden; text-overflow: ellipsis; }
.standings-table .standings-event-head { max-width: 0; }
.standings-event-label { display: block; width: 0; min-width: 100%; overflow: hidden; }
.standings-event-line { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.standings-frame { position: relative; }
.standings-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 0 0 4px; }
.standings-tools-title { display: none; flex: 1 1 auto; min-width: 0; font-family: var(--font-heading, inherit); font-size: 1.2rem; font-weight: 700; color: var(--felt-green-dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.standings-expand { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--c-frame-border); border-radius: 8px; background: var(--surface); color: var(--felt-green-dark); cursor: pointer; }
.standings-expand:hover, .standings-expand:focus-visible { background: var(--felt-green-dark); color: var(--on-dark); }
.standings-frame.is-expanded { position: fixed; inset: 0; z-index: 2500; display: flex; flex-direction: column; padding: 12px 16px; background: var(--paper); }
.standings-frame.is-expanded .standings-tools-title { display: block; }
.standings-frame.is-expanded .standings-wrapper { flex: 0 1 auto; min-height: 0; max-height: none; }
.standings-frame.is-expanded .standings-table tr.standings-extra { display: table-row; }
html.standings-expanded, html.standings-expanded body { overflow: hidden; }
html.standings-expanded .player-card, html.standings-expanded .gift-bubble { z-index: 2600; }
