/* public/css/_rider-groups.css — Styles pour les groupes de cavaliers (V5.8.b) */

/* ─── Palette des 8 couleurs ──────────────────────────────── */
.group-bg-blue    { background-color: rgba( 52,152,219,0.10); }
.group-bg-teal    { background-color: rgba( 22,160,133,0.10); }
.group-bg-purple  { background-color: rgba(142, 68,173,0.10); }
.group-bg-amber   { background-color: rgba(243,156, 18,0.10); }
.group-bg-red     { background-color: rgba(231, 76, 60,0.10); }
.group-bg-green   { background-color: rgba( 39,174, 96,0.10); }
.group-bg-pink    { background-color: rgba(233, 30, 99,0.10); }
.group-bg-gray    { background-color: rgba(127,140,141,0.10); }

/* Couleurs pleines pour les "dots" et badges */
.group-color-blue    .group-color-dot { background-color: #3498db; }
.group-color-teal    .group-color-dot { background-color: #16a085; }
.group-color-purple  .group-color-dot { background-color: #8e44ad; }
.group-color-amber   .group-color-dot { background-color: #f39c12; }
.group-color-red     .group-color-dot { background-color: #e74c3c; }
.group-color-green   .group-color-dot { background-color: #27ae60; }
.group-color-pink    .group-color-dot { background-color: #e91e63; }
.group-color-gray    .group-color-dot { background-color: #7f8c8d; }

.group-color-dot {
    display: inline-block;
    width: 12px; height: 12px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

/* ─── Section "Groupes" : grid de cards ───────────────────── */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    padding: 0 16px 8px;
}
.groups-empty {
    grid-column: 1 / -1;
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.group-card {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 12px;
    background: #fff;
    position: relative;
    transition: box-shadow 0.15s;
}
.group-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.group-card.group-color-blue   { border-left: 4px solid #3498db; }
.group-card.group-color-teal   { border-left: 4px solid #16a085; }
.group-card.group-color-purple { border-left: 4px solid #8e44ad; }
.group-card.group-color-amber  { border-left: 4px solid #f39c12; }
.group-card.group-color-red    { border-left: 4px solid #e74c3c; }
.group-card.group-color-green  { border-left: 4px solid #27ae60; }
.group-card.group-color-pink   { border-left: 4px solid #e91e63; }
.group-card.group-color-gray   { border-left: 4px solid #7f8c8d; }

.group-card-header { display: flex; align-items: center; margin-bottom: 6px; }
.group-card-name   { font-size: 14px; color: #2c3e50; }
.group-card-stats  { font-size: 12px; color: #666; margin-bottom: 4px; }
.group-card-notes  { font-size: 11px; color: #999; margin-bottom: 8px; cursor: help; }
.group-card-actions { display: flex; gap: 6px; }

/* ─── Tableau : colonne checkbox ──────────────────────────── */
.col-checkbox {
    width: 32px;
    text-align: center;
    background: #f8f9fa;
}
.col-checkbox input[type=checkbox] {
    cursor: pointer;
}

/* ─── Ligne d'en-tête de groupe dans le tableau ───────────── */
.group-header-row {
    font-weight: 600;
    border-top: 2px solid rgba(0,0,0,0.15);
    border-bottom: 1px solid rgba(0,0,0,0.10);
}
.group-header-cell {
    padding: 8px 10px;
    background: rgba(0,0,0,0.03);
}
.group-header-cell small { color: #666; font-weight: 400; margin-left: 6px; }
.group-notes-icon {
    color: #888;
    margin-left: 10px;
    cursor: help;
}
.group-total-cell {
    background: rgba(0,0,0,0.03);
    font-weight: 600;
}

/* ─── Lignes cavaliers d'un groupe : surbrillance discrète ─ */
.rider-row.rider-in-group {
    /* Background est déjà appliqué via .group-bg-{color} sur la <tr> */
}

/* ─── Divider sous le dernier cavalier de chaque groupe ───── */
.rider-row.rider-group-last td {
    border-bottom: 2px solid rgba(0,0,0,0.20);
}

/* ─── Barre d'actions flottante ────────────────────────────── */
.action-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #2c3e50;
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    display: flex;
    gap: 8px;
    align-items: center;
    z-index: 1000;
    flex-wrap: wrap;
}
.action-bar.hidden { display: none; }
.action-bar-count {
    font-weight: 700;
    margin-right: 8px;
    padding: 4px 10px;
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
}
.action-bar .btn { font-size: 12px; }

/* ─── Modale ────────────────────────────────────────────────── */
.group-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.group-modal.hidden { display: none; }
.group-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}
.group-modal-content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    padding: 20px 24px;
    max-width: 560px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.group-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.group-modal-header h4 { margin: 0; font-size: 16px; color: #2c3e50; }
.group-modal-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #999;
}
.group-modal-close:hover { color: #2c3e50; }

/* ─── Color picker dans la modale ──────────────────────────── */
.color-picker {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 6px;
}
.color-option {
    padding: 8px;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    font-size: 12px;
    transition: border-color 0.15s;
}
.color-option:has(input:checked) {
    border-color: #2c3e50;
    font-weight: 600;
}
.color-option input { display: none; }
.color-name { display: block; }

/* ─── Liste des cavaliers sélectionnés ────────────────────── */
.group-selected-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
}
.selected-rider-chip {
    background: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    border: 1px solid #ddd;
}
.group-selected-list .empty-state {
    color: #999;
    font-style: italic;
    margin: 0;
}

/* ─── Liste des groupes pour le picker "Ajouter à" ────────── */
.group-list-pick {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 14px 0;
}
.group-pick-btn {
    text-align: left;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.15s;
}
.group-pick-btn:hover { background: #f8f9fa; }
.group-pick-btn small { margin-left: auto; color: #888; }
/* ─── V5.9.q.6 : group-card-actions compactes ────────────────
   Force des boutons "Modifier" / corbeille petits et alignés.
   Bonus : la corbeille devient un bouton-icône carré.
*/
.group-card-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.group-card-actions .btn {
    padding: 4px 10px !important;
    font-size: 11px !important;
    border-radius: 4px !important;
    line-height: 1.3 !important;
    height: auto !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.group-card-actions .btn .fa {
    font-size: 11px;
    margin: 0;
}

/* Bouton corbeille = icône seule, carré */
.group-card-actions .btn-delete-group {
    padding: 4px 8px !important;
    width: 28px;
    justify-content: center;
}

.group-card-actions .btn-delete-group .fa {
    margin: 0;
}
/* ═══════════════ V5.x : Modale ajout cavalier manuel ═══════════════ */
.me-steps {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}
.me-step-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #aaa;
}
.me-step-pill.active { color: #2c3e50; }
.me-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e0e4e9;
    color: #888;
    font-size: 12px;
}
.me-step-pill.active .me-step-num {
    background: #3498db;
    color: #fff;
}
.me-step-pill.done .me-step-num {
    background: #27ae60;
    color: #fff;
}
.me-step-sep {
    flex: 1;
    height: 2px;
    background: #e0e4e9;
    border-radius: 1px;
}
.me-error {
    background: #fdecea;
    border: 1px solid #f5c6cb;
    color: #b94a48;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 13px;
    margin-top: 8px;
}
.me-week {
    border: 1px solid #e0e4e9;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
    background: #fafbfc;
}
.me-week-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 13px;
}
.me-week-title small { color: #888; font-weight: 400; margin-left: 6px; }
.me-horse-row { display: flex; gap: 6px; margin-bottom: 6px; align-items: center; }
.me-nch-wrap {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555;
}