/* ============================================================
   TCV Noscours — Palette sobre : navy + ambre chaud
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
    --navy:       #1e3a5f;
    --navy-dk:    #142a47;
    --navy-lt:    #eef2f7;
    --amber:      #b45309;
    --amber-lt:   #fef3c7;
    --text:       #1a1a2e;
    --text-soft:  #4a5568;
    --muted:      #9aa3b0;
    --border:     #e4e7ec;
    --bg:         #f7f8fa;
    --white:      #ffffff;
    --radius:     10px;
    --shadow:     0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.05);
    --shadow-lg:  0 4px 6px rgba(0,0,0,.06), 0 10px 28px rgba(0,0,0,.09);
    --orange-dk:  #92400e;
    --slate:      #475569;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { overflow-y: auto; }

body {
    font-family: 'Poppins', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    font-size: 14px;
}

/* Shell fixe (page publique uniquement — hors modales) */
#page-shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Zone scrollable : grille + footer uniquement */
#scroll-area {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ── Message d'accueil ─────────────────────────────────────── */

.welcome-message {
    margin: 1.2rem 1rem .25rem;
    padding: .85rem 1.5rem;
    background: var(--amber-lt);
    border-left: 4px solid var(--amber);
    border-radius: var(--radius);
    color: var(--text);
    font-size: .88rem;
    line-height: 1.6;
}

/* ── Bandeau préinscriptions fermées ───────────────────────── */

.preinscr-banner {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin: 1rem 1rem .25rem;
    padding: 1rem 1.4rem;
    background: var(--navy-lt);
    border-left: 4px solid var(--navy);
    border-radius: var(--radius);
    color: var(--text);
    font-size: .88rem;
    line-height: 1.6;
}

.preinscr-banner__icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    color: var(--navy);
    opacity: .75;
}

.preinscr-banner__text strong {
    font-weight: 700;
    color: var(--navy);
}

/* ── Header compact ────────────────────────────────────────── */

.site-header {
    background: var(--navy);
    padding: .7rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-header__brand {
    font-size: .95rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.01em;
    display: flex;
    align-items: center;
    gap: .6rem;
}

.site-header__logo {
    height: 36px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}

.site-header__brand em {
    font-style: normal;
    color: #a8c4e0;
    font-weight: 500;
}

.site-header__season {
    font-size: .72rem;
    color: #a8c4e0;
    font-weight: 500;
    white-space: nowrap;
}

/* ── Barre de filtres ──────────────────────────────────────── */


/* ── Filtre activité ───────────────────────────────────────── */

.filter-bar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: .5rem 1.5rem;
}

.filter-bar__inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: .6rem;
}

.filter-select {
    -webkit-appearance: none;
    appearance: none;
    background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right .55rem center;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .3rem 1.8rem .3rem .65rem;
    font-family: 'Poppins', sans-serif;
    font-size: .8rem;
    font-weight: 500;
    color: var(--text-soft);
    cursor: pointer;
    transition: border-color .14s;
}
.filter-select:focus { outline: none; border-color: var(--navy); }
.filter-select:hover  { border-color: #9ca3af; }

.filter-clear {
    font-size: .78rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    padding: .15rem .35rem;
}
.filter-clear:hover { color: var(--navy); }

/* ── Grille ────────────────────────────────────────────────── */

.groups-grid {
    max-width: 1100px;
    margin: 1.25rem auto;
    padding: 0 1.5rem 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: .9rem;
}

/* ── Carte ─────────────────────────────────────────────────── */

.group-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: transform .16s, box-shadow .16s;
    overflow: hidden;
}
.group-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Trait coloré en haut — couleur dynamique via CSS custom property */
.group-card::before {
    content: '';
    display: block;
    height: 3px;
    background: var(--act-color, var(--navy));
    flex-shrink: 0;
}

.group-card__head {
    padding: .9rem 1rem .5rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .5rem;
}

.group-card__body {
    padding: 0 1rem .75rem;
    flex: 1;
}

.group-card__name {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.group-card__teacher {
    font-size: .9rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: .25rem;
}

.group-card__sub {
    font-size: .72rem;
    color: var(--muted);
    margin-top: .2rem;
    font-weight: 500;
}

.group-card__line1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding-top: .85rem;
    padding-bottom: .28rem;
}

.group-card__schedule {
    font-size: .82rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.group-card__acts {
    display: flex;
    gap: .28rem;
    align-items: center;
    flex-shrink: 0;
}

.act-pill {
    font-size: .62rem;
    font-weight: 700;
    padding: .12rem .42rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}

.group-card__line2 {
    font-size: .73rem;
    color: var(--text-soft);
    font-weight: 500;
    padding-bottom: .28rem;
}

.group-card__meta {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-soft);
    margin-top: .55rem;
}

.group-card__desc {
    font-size: .73rem;
    color: var(--muted);
    margin-top: .35rem;
    line-height: 1.5;
}

.group-card__footer {
    padding: .75rem 1rem .9rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.group-card__spots-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .73rem;
    font-weight: 600;
    margin-bottom: .4rem;
    gap: .5rem;
}

/* Jauge */
.spots-bar {
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    overflow: hidden;
    margin-bottom: .75rem;
}
.spots-bar__fill { height: 100%; border-radius: 2px; transition: width .3s; }
.spots-bar__fill--ok     { background: var(--navy); }
.spots-bar__fill--almost { background: var(--amber); }
.spots-bar__fill--full   { background: #dc2626; }

/* ── Admin drag-and-drop ────────────────────────────────────── */

.admin-dnd-handle {
    cursor: grab;
    color: #c0c8d4;
    font-size: 1.2rem;
    line-height: 1;
    user-select: none;
    display: inline-block;
}
.admin-dnd-handle:active { cursor: grabbing; }

tr.dnd-dragging { opacity: .35; background: var(--navy-lt); }

.card-drop-zone.drag-over {
    background: #f0fdf4;
    outline: 2px dashed #0d6e3f;
    outline-offset: -2px;
    border-radius: 0 0 14px 14px;
}
.card-drop-zone.drag-over .drop-zone-placeholder {
    color: #0d6e3f;
}
.card-drop-zone.drag-forbidden {
    background: #fef2f2;
    outline: 2px dashed #ef4444;
    outline-offset: -2px;
    border-radius: 0 0 14px 14px;
    cursor: not-allowed;
}

.drag-handle:active { cursor: grabbing; }

/* ── Badges ────────────────────────────────────────────────── */

.badge {
    display: inline-block;
    font-size: .63rem;
    font-weight: 700;
    padding: .18rem .5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.badge-tennis { background: var(--navy-lt);  color: var(--navy); }
.badge-padel  { background: var(--amber-lt); color: var(--amber); }

.badge-cat   { background: var(--bg); color: var(--text-soft); border: 1px solid var(--border); }
.badge-genre { border: 1px solid transparent; }
.badge-genre--homme { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.badge-genre--femme { background: #fdf2f8; color: #be185d; border-color: #fbcfe8; }
.badge-genre--mixte { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }

.level-badge {
    display: inline-block;
    font-size: .63rem;
    font-weight: 700;
    padding: .18rem .5rem;
    border-radius: 4px;
    letter-spacing: .03em;
    background: var(--navy-lt);
    color: var(--text-soft);
    border: 1px solid var(--border);
}

/* ── Boutons inscription ───────────────────────────────────── */

.btn-register {
    display: block;
    width: 100%;
    text-align: center;
    padding: .42rem 1rem;
    border-radius: 7px;
    font-family: 'Poppins', sans-serif;
    font-size: .8rem;
    font-weight: 600;
    color: var(--navy);
    text-decoration: none;
    transition: all .14s;
    border: none;
    cursor: pointer;
    letter-spacing: .01em;
}
.btn-register:not(.btn-register--full):not(.btn-register--selected) {
    background: transparent;
    color: var(--navy);
    border: 1.5px solid var(--navy);
}
.btn-register:not(.btn-register--full):not(.btn-register--selected):hover {
    background: var(--navy);
    color: #fff;
    box-shadow: 0 2px 8px rgba(30,58,95,.15);
}
.btn-register--full   {
    background: var(--bg);
    color: var(--muted);
    border: 1px solid var(--border);
    font-weight: 600;
}

#modal-submit {
    background: var(--navy);
    color: #fff;
    border: none;
}
#modal-submit:hover {
    background: var(--navy-dk);
    box-shadow: 0 2px 8px rgba(30,58,95,.2);
}

/* ── Modal inscription ─────────────────────────────────────── */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-box {
    background: var(--white);
    border-radius: 14px;
    box-shadow: 0 8px 40px rgba(0,0,0,.18);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .65rem;
}

.modal-badges { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: .95rem;
    color: var(--muted);
    line-height: 1;
    padding: .2rem .4rem;
    border-radius: 4px;
    flex-shrink: 0;
}
.modal-close:hover { background: var(--bg); color: var(--text); }

.modal-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: .15rem;
}

.modal-schedule {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-soft);
    margin-bottom: .9rem;
}

.modal-notice {
    padding: .55rem .8rem;
    border-radius: 7px;
    font-size: .78rem;
    font-weight: 500;
    margin-bottom: .9rem;
    line-height: 1.4;
}
.modal-notice--wait  { background: var(--amber-lt); color: var(--amber); border: 1px solid #fde68a; }
.modal-notice--error { background: #fff1f1; color: #b91c1c; border: 1px solid #fecaca; }

.modal-success {
    text-align: center;
    padding: 1.25rem .5rem;
    font-size: .88rem;
    color: #166534;
    font-weight: 600;
    line-height: 1.5;
    background: #f0fdf4;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
    margin-bottom: .9rem;
}

.modal-fields { display: flex; flex-direction: column; gap: .7rem; margin-bottom: .9rem; }

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .6rem;
}

.field-group { display: flex; flex-direction: column; gap: .28rem; }

.field-group label {
    font-size: .72rem;
    font-weight: 600;
    color: var(--text-soft);
}
.req { color: #ef4444; }

.field-group input {
    padding: .42rem .65rem;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-family: 'Poppins', sans-serif;
    font-size: .82rem;
    color: var(--text);
    background: var(--white);
    transition: border-color .12s, box-shadow .12s;
}
.field-group input:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(30,58,95,.08);
}

.modal-actions {
    display: flex;
    gap: .65rem;
    align-items: center;
}

.modal-cancel {
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: .8rem;
    color: var(--muted);
    font-weight: 500;
}
.modal-cancel:hover { color: var(--text); }

/* ── Modal d'accueil ───────────────────────────────────────── */

.welcome-modal-body {
    padding: 1rem 1.5rem 1.5rem;
    font-size: .88rem;
    line-height: 1.7;
    color: var(--text);
}

.welcome-modal-footer {
    padding: 0 1.5rem 1.5rem;
    text-align: right;
}

@media (max-width: 480px) {
    .field-row { grid-template-columns: 1fr; }
    .modal-box { padding: 1.25rem; max-height: 95vh; }

    #welcome-modal .modal-box { width: 95% !important; padding: 1rem; }
    .welcome-modal-body   { padding: .6rem .75rem 1rem; font-size: .8rem; line-height: 1.6; }
    .welcome-modal-footer { padding: 0 .75rem .75rem; }
}

/* ── Admin (style vert inchangé) ───────────────────────────── */

.admin-nav-bg  { background: #094f2d; }
.tcv-header-bg { background: linear-gradient(135deg, #0d6e3f 0%, #094f2d 100%); }

/* ── Admin nav links ────────────────────────────────────────── */
.admin-nav-links {
    display: flex;
    align-items: center;
    gap: .25rem;
    font-size: .875rem;
}

/* ── Admin hamburger (masqué sur desktop) ───────────────────── */
.admin-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: rgba(255,255,255,.15);
    border: 1.5px solid rgba(255,255,255,.3);
    border-radius: 7px;
    padding: .35rem .5rem;
    cursor: pointer;
}
.admin-hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}
.admin-hamburger:hover { background: rgba(255,255,255,.25); }

/* ── Admin drawer ───────────────────────────────────────────── */
.admin-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 260px;
    background: #094f2d;
    z-index: 1200;
    transform: translateX(100%);
    transition: transform .25s ease;
    display: flex;
    flex-direction: column;
}
.admin-drawer--open { transform: translateX(0); }

.admin-drawer__inner {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: .4rem;
    flex: 1;
    overflow-y: auto;
}

.admin-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    margin-bottom: .5rem;
}

.admin-drawer__close {
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    font-size: 1rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    line-height: 30px;
    text-align: center;
}
.admin-drawer__close:hover { background: rgba(255,255,255,.28); }

.admin-drawer__item {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: rgba(255,255,255,.85);
    text-decoration: none;
    font-size: .875rem;
    font-weight: 500;
    padding: .65rem .85rem;
    border-radius: 8px;
    transition: background .15s;
}
.admin-drawer__item:hover           { background: rgba(255,255,255,.12); color: #fff; }
.admin-drawer__item--active         { background: rgba(255,255,255,.2); color: #fff; font-weight: 600; }
.admin-drawer__item--danger         { color: #fca5a5; }
.admin-drawer__item--danger:hover   { background: rgba(239,68,68,.2); color: #fca5a5; }

.admin-drawer__sub-item {
    display: flex;
    align-items: center;
    color: rgba(255,255,255,.65);
    text-decoration: none;
    font-size: .8rem;
    font-weight: 400;
    padding: .4rem .85rem .4rem 2.1rem;
    border-radius: 6px;
    transition: background .15s;
}
.admin-drawer__sub-item::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255,255,255,.4);
    margin-right: .55rem;
    flex-shrink: 0;
}
.admin-drawer__sub-item:hover           { background: rgba(255,255,255,.08); color: #fff; }
.admin-drawer__sub-item--active         { color: #fff; font-weight: 600; }
.admin-drawer__sub-item--active::before { background: #fff; }

.admin-drawer__badge {
    margin-left: auto;
    background: #ef4444;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: .05rem .35rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.admin-drawer__sep {
    height: 1px;
    background: rgba(255,255,255,.15);
    margin: .4rem 0;
}

.admin-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1199;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}
.admin-overlay--show { opacity: 1; pointer-events: auto; }

@media (max-width: 1024px) {
    .admin-nav-links  { display: none !important; }
    .admin-nav-extra  { display: none !important; }
    .admin-nav-logout { display: none !important; }
    .admin-hamburger  { display: flex !important; }
}

.admin-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
}

.focus\:border-tcv:focus { border-color: #0d6e3f; }
.focus\:ring-tcv\/30:focus { --tw-ring-color: rgba(13,110,63,.3); }

.status-badge {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: 4px;
    font-size: .72rem;
    font-weight: 700;
}
.pref-badge {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    font-size: .65rem;
    font-weight: 700;
    padding: .12rem .42rem;
    border-radius: 4px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    white-space: nowrap;
}

.status-pending   { background: #fef9c3; color: #854d0e; }
.status-confirmed { background: #dbeafe; color: #1e40af; }
.status-waitlist  { background: #fff7ed; color: #c2410c; }
.status-cancelled { background: #f1f5f9; color: #64748b; }

[x-cloak] { display: none !important; }

/* ── Multi-sélection ───────────────────────────────────────── */

.group-card--selected {
    border-color: var(--amber);
    box-shadow: 0 0 0 2px var(--amber), var(--shadow);
}

.btn-register--selected {
    background: var(--amber-lt) !important;
    color: var(--amber) !important;
    border: 2px solid var(--amber) !important;
    font-weight: 700 !important;
}
.btn-register--locked {
    background: #e8f4ee;
    color: #2d7a4f;
    border: 1.5px solid #a3cfb8;
    font-weight: 600;
    cursor: default;
    opacity: .85;
}

.selection-bar {
    max-width: 550px;
    margin: .9rem auto 0;
    padding: .65rem 1.5rem;
    background: #ddeeff;
    border: 1.5px solid var(--navy);
    border-radius: var(--radius);
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(30,58,95,.10);
}

.selection-bar__info { flex: 1; min-width: 0; }

.selection-bar__count {
    font-size: .85rem;
    font-weight: 700;
}

.selection-bar__names {
    font-size: .72rem;
    color: var(--text-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: .1rem;
}

.selection-bar__actions {
    display: flex;
    gap: .55rem;
    align-items: center;
    flex-shrink: 0;
}

.btn-selection-clear {
    background: none;
    border: 1px solid var(--navy);
    color: var(--navy);
    padding: .38rem .85rem;
    border-radius: 7px;
    font-family: 'Poppins', sans-serif;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .14s;
    white-space: nowrap;
}
.btn-selection-clear:hover { background: rgba(30,58,95,.08); }

.btn-selection-submit {
    background: var(--navy);
    color: #fff;
    padding: .42rem 1.1rem;
    border-radius: 7px;
    font-family: 'Poppins', sans-serif;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all .14s;
    white-space: nowrap;
}
.btn-selection-submit:hover { background: var(--navy-dk); }

/* Liste des créneaux dans le modal */

.modal-drag-hint {
    font-size: .72rem;
    color: var(--muted);
    font-weight: 500;
    margin-bottom: .45rem;
    display: flex;
    align-items: center;
    gap: .35rem;
    line-height: 1.4;
}

.modal-groups-list {
    margin-bottom: .9rem;
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

.modal-group-item {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .45rem .65rem;
    background: var(--bg);
    border-radius: 7px;
    border: 1px solid var(--border);
    transition: border-color .12s, background .12s, opacity .15s;
    user-select: none;
}

.modal-group-item[draggable="true"] { cursor: grab; }
.modal-group-item[draggable="true"]:active { cursor: grabbing; }
.modal-group-item.dragging { opacity: .35; }
.modal-group-item.drag-over-top    { border-top: 2px solid var(--navy); }
.modal-group-item.drag-over-bottom { border-bottom: 2px solid var(--navy); }

.group-drag-handle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .22rem;
    flex-shrink: 0;
    color: var(--muted);
    width: 1.5rem;
}

.group-pos-badge {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: var(--navy-lt);
    color: var(--navy);
    font-size: .65rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-group-item__name {
    font-size: .82rem;
    font-weight: 700;
    color: var(--text);
}

.modal-group-item__schedule {
    font-size: .72rem;
    color: var(--muted);
    font-weight: 500;
    margin-top: .08rem;
}

.modal-item__line1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.modal-item__schedule {
    font-size: .82rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.modal-item__acts {
    display: flex;
    gap: .22rem;
    align-items: center;
    flex-shrink: 0;
}

.modal-item__line2 {
    font-size: .72rem;
    color: var(--text-soft);
    font-weight: 500;
    margin-top: .18rem;
}

.modal-item__desc {
    font-size: .7rem;
    color: var(--muted);
    margin-top: .12rem;
    line-height: 1.4;
}

.modal-group-item__full {
    font-size: .65rem;
    font-weight: 700;
    color: #ef4444;
    background: #fff1f1;
    border: 1px solid #fecaca;
    padding: .1rem .4rem;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Textarea dans le formulaire */

.field-group textarea {
    padding: .42rem .65rem;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-family: 'Poppins', sans-serif;
    font-size: .82rem;
    color: var(--text);
    background: var(--white);
    transition: border-color .12s, box-shadow .12s;
    resize: vertical;
    min-height: 68px;
    line-height: 1.5;
}
.field-group textarea:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(30,58,95,.08);
}
.field-group textarea::placeholder { color: var(--muted); font-weight: 400; }

/* ── Icônes info / commentaire (inscriptions admin) ────────── */
.info-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 15px; height: 15px; padding: 0; border: none; background: none;
    cursor: pointer; color: #9ca3af; transition: color .15s; vertical-align: middle; flex-shrink: 0;
}
.info-icon-btn:hover { color: #3b82f6; }

.comment-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 15px; height: 15px; padding: 0; border: none; background: none;
    cursor: pointer; color: #f59e0b; transition: color .15s; vertical-align: middle; flex-shrink: 0;
}
.comment-icon-btn:hover { color: #d97706; }

.info-copy-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; padding: 0; border: none; background: none;
    cursor: pointer; color: #9ca3af; transition: color .15s; flex-shrink: 0;
    border-radius: 3px;
}
.info-copy-btn:hover { color: #3b82f6; }

/* ── Pages publiques secondaires (modify / message) ────────── */

.page-main {
    max-width: 680px;
    margin: 2rem auto;
    padding: 0 1.25rem 3rem;
}

.page-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.page-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: .3rem;
}

.page-subtitle {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-soft);
    display: flex;
    align-items: center;
    gap: .55rem;
    flex-wrap: wrap;
}

.page-subtitle__email {
    font-weight: 400;
    color: var(--muted);
    font-size: .78rem;
}

.page-section-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--navy);
    margin-bottom: .5rem;
}

.page-help {
    font-size: .78rem;
    color: var(--muted);
    margin-bottom: .75rem;
}

.page-back-link {
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
}
.page-back-link:hover { color: var(--navy); }

.page-notice {
    padding: .7rem 1rem;
    border-radius: var(--radius);
    font-size: .82rem;
    font-weight: 500;
    margin-bottom: 1rem;
    line-height: 1.5;
}
.page-notice--ok  { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.page-notice--err { background: #fff1f1; color: #b91c1c; border: 1px solid #fecaca; }

/* ── Barre fixe en bas (modify.php) ─────────────────────── */

.modify-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: .75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    box-shadow: 0 -2px 12px rgba(0,0,0,.07);
    z-index: 100;
}

.modify-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.modify-btn-submit {
    background: var(--navy);
    color: #fff;
    border: none;
    padding: .55rem 1.25rem;
    border-radius: 7px;
    font-family: 'Poppins', sans-serif;
    font-size: .85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .14s;
}
.modify-btn-submit:hover { background: var(--navy-dk); }

.modify-btn-msg {
    color: var(--navy);
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    padding: .55rem 1rem;
    border: 1.5px solid var(--navy);
    border-radius: 7px;
    transition: background .14s;
}
.modify-btn-msg:hover { background: var(--navy-lt); }

/* ── Messages envoyés (message.php) ─────────────────────── */

.past-messages { display: flex; flex-direction: column; gap: .75rem; }

.past-message {
    padding: .7rem .85rem;
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    border-left: 3px solid var(--border);
}
.past-message--admin {
    background: #ecfdf5;
    border-color: #a3cfb8;
    border-left-color: #2d7a4f;
}

.past-message__from {
    font-size: .7rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .15rem;
}
.past-message--admin .past-message__from {
    color: #2d7a4f;
}

.past-message__date {
    font-size: .7rem;
    color: var(--muted);
    font-weight: 500;
    margin-bottom: .35rem;
}

.past-message__content {
    font-size: .82rem;
    color: var(--text);
    line-height: 1.55;
}

/* ── Icône message (admin inscriptions) ─────────────────── */

.msg-icon-btn {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    color: #9ca3af;
    text-decoration: none;
    transition: color .15s;
    vertical-align: middle;
    flex-shrink: 0;
}
.msg-icon-btn:hover { color: #6b7280; }
.msg-icon-btn--active { color: #7c3aed; }
.msg-icon-btn--active:hover { color: #6d28d9; }
.msg-icon-btn--unread { color: #7c3aed; }
.msg-icon-btn--unread:hover { color: #6d28d9; }

.msg-icon-btn__badge {
    font-size: .62rem;
    font-weight: 700;
    background: #7c3aed;
    color: #fff;
    border-radius: 10px;
    padding: 0 .3rem;
    min-width: 14px;
    text-align: center;
    line-height: 1.4;
}

.note-icon-btn {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    color: #9ca3af;
    transition: color .15s;
    vertical-align: middle;
    flex-shrink: 0;
}
.note-icon-btn:hover { color: #6b7280; }
.note-icon-btn--has-notes { color: #ef4444; }
.note-icon-btn--has-notes:hover { color: #dc2626; }

/* ── Collapse créneau ───────────────────────────────────────── */
.card-collapse-chevron {
    transition: transform .2s ease;
}
.card-collapse-chevron.collapsed {
    transform: rotate(180deg);
}

/* ── Boutons header ─────────────────────────────────────────── */
.header-btn {
    background: rgba(255,255,255,.18);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,.45);
    padding: .35rem 1rem;
    border-radius: 50px;
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}
.header-btn:hover { background: rgba(255,255,255,.3); }

.site-header__meta {
    display: flex;
    gap: .5rem;
    align-items: center;
}

/* ── Hamburger (masqué sur desktop) ─────────────────────────── */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: rgba(255,255,255,.18);
    border: 1.5px solid rgba(255,255,255,.45);
    border-radius: 8px;
    padding: .4rem .55rem;
    cursor: pointer;
    flex-shrink: 0;
}
.nav-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: background .15s;
}
.nav-hamburger:hover { background: rgba(255,255,255,.3); }

/* ── Drawer slide-in ────────────────────────────────────────── */
.nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 260px;
    background: var(--navy);
    z-index: 1100;
    transform: translateX(100%);
    transition: transform .25s ease;
    display: flex;
    flex-direction: column;
}
.nav-drawer--open { transform: translateX(0); }

.nav-drawer__inner {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: .75rem;
    flex: 1;
    overflow-y: auto;
}

.nav-drawer__close {
    align-self: flex-end;
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    font-size: 1.1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    line-height: 32px;
    text-align: center;
    margin-bottom: .25rem;
}
.nav-drawer__close:hover { background: rgba(255,255,255,.3); }

.nav-drawer__item {
    background: rgba(255,255,255,.12);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,.3);
    border-radius: 10px;
    padding: .75rem 1rem;
    font-size: .85rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    line-height: 1.4;
    transition: background .15s;
}
.nav-drawer__item:hover { background: rgba(255,255,255,.22); }

.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 1099;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}
.nav-overlay--show { opacity: 1; pointer-events: auto; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 600px) {
    .site-header { padding: .6rem 1rem; }
    .filter-bar  { padding: .5rem 1rem; }
    .groups-grid { padding: 0 1rem 2rem; gap: .75rem; }
    .filter-sep  { display: none; }
    .selection-bar { flex-wrap: wrap; gap: .5rem; padding: .55rem 1rem; margin: .5rem 1rem 0; }
    .selection-bar__actions { width: 100%; justify-content: flex-end; }

    /* Masquer boutons header, afficher hamburger */
    .site-header__meta { display: none !important; }
    .nav-hamburger     { display: flex; }
}
