/* ==============================================
   Coaches Module Styles
   ============================================== */

.coaches-page {
    padding: 20px 32px;
}

/* Global SVG sizing for coaches module */
.coaches-page svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    flex-shrink: 0;
}

.coaches-page .btn svg {
    width: 16px;
    height: 16px;
}

.coaches-page .btn-icon svg {
    width: 14px;
    height: 14px;
}

.coaches-page .search-box svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-tertiary);
}

.coaches-page .empty-state svg {
    width: 48px;
    height: 48px;
    stroke: var(--text-tertiary);
}

/* SVG in slide panel for coaches */
.coach-form svg,
.coach-detail svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* Override for avatar SVGs - keep larger size */
.coaches-page .coach-avatar svg {
    width: 30px;
    height: 30px;
    stroke-width: 1.5;
}

.coach-detail-avatar svg {
    width: 40px;
    height: 40px;
    stroke-width: 1.5;
}

/* Toolbar */
.coaches-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.coaches-toolbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.coaches-toolbar-left h1 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.coaches-stats-inline {
    display: flex;
    align-items: center;
    gap: 16px;
}

.coaches-page .stat-inline {
    font-size: 12px;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.coaches-page .stat-inline strong {
    font-size: 14px;
    font-weight: 700;
}

.coaches-page .stat-inline.total strong { color: #818cf8; }
.coaches-page .stat-inline.actif strong { color: #34d399; }
.coaches-page .stat-inline.prospect strong { color: #fbbf24; }

/* Filter Bar */
.coaches-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

/* Search Box */
.coaches-page .search-box {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 0 220px;
    margin-bottom: 0;
}

.coaches-page .search-box svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-tertiary);
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    pointer-events: none;
    z-index: 1;
}

.coaches-page .search-box input {
    width: 100%;
    padding: 10px 12px 10px 38px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-primary);
    font-family: inherit;
    transition: all 0.15s ease;
}

.coaches-page .search-box input::placeholder {
    color: var(--text-tertiary);
}

.coaches-page .search-box input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-card);
}

/* Filter Tabs */
.coaches-filter-bar .filter-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-input);
    padding: 4px;
    border-radius: 8px;
}

.coaches-filter-bar .filter-tab {
    padding: 8px 14px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.coaches-filter-bar .filter-tab:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.coaches-filter-bar .filter-tab.active {
    background: var(--accent);
    color: white;
}

/* Select Small */
.coaches-page .form-select-sm {
    padding: 8px 32px 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-primary);
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    background-image: 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='%23888' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: all 0.15s ease;
}

.coaches-page .form-select-sm:focus {
    outline: none;
    border-color: var(--accent);
}

/* Cards Grid */
.coaches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* Coach Card */
.coach-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.coach-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.coach-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 16px 16px 0;
}

.coach-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.coach-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.coach-avatar svg {
    width: 30px;
    height: 30px;
    stroke: var(--text-tertiary);
    fill: none;
    stroke-width: 1.5;
}

.coach-status {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
}

.coach-status.status-actif {
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
}

.coach-status.status-prospect {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.coach-status.status-inactif {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
}

[data-theme="light"] .coach-status.status-actif { color: #059669; }
[data-theme="light"] .coach-status.status-prospect { color: #d97706; }
[data-theme="light"] .coach-status.status-inactif { color: #64748b; }

.coach-card-body {
    padding: 12px 16px;
}

.coach-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.coach-club {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 8px;
}

.coach-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.coach-meta .meta-item {
    font-size: 11px;
    color: var(--text-tertiary);
    background: var(--bg-secondary);
    padding: 3px 8px;
    border-radius: 4px;
}

.coach-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.coach-date {
    font-size: 11px;
    color: var(--text-tertiary);
}

.coach-actions {
    display: flex;
    gap: 4px;
}

.coach-actions .btn-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-tertiary);
    transition: all 0.15s;
}

.coach-actions .btn-icon svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.coach-actions .btn-icon:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.coach-actions .btn-icon.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Detail Panel */
.coach-detail-header {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.coach-detail-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.coach-detail-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.coach-detail-avatar svg {
    width: 40px;
    height: 40px;
    stroke: var(--text-tertiary);
    fill: none;
    stroke-width: 1.5;
}

.coach-detail-info h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--text-primary);
}

.coach-detail-info .club {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 8px;
}

.coach-detail-info .status-badge {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
}

.coach-detail-section {
    margin-bottom: 20px;
}

.coach-detail-section h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-item .label {
    font-size: 11px;
    color: var(--text-tertiary);
}

.info-item .value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.notes-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Form */
.coach-form .form-section {
    margin-bottom: 24px;
}

.coach-form .form-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.coach-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.coach-form .form-group {
    margin-bottom: 12px;
}

.coach-form .form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

/* Responsive */
@media (max-width: 768px) {
    .coaches-page {
        padding: 16px;
    }

    .coaches-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .coaches-toolbar-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .coaches-filter-bar {
        flex-wrap: wrap;
    }

    .coaches-filter-bar .search-box {
        flex: 1 1 100%;
    }

    .coaches-grid {
        grid-template-columns: 1fr;
    }

    .coach-form .form-row {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}
