/* ── AUREL Coach Sportif — Design moderne ────────────── */
:root {
    --primary: #E85D2C;
    --primary-dark: #C94A1E;
    --secondary: #1B2A4A;
    --bg: #F5F6FA;
    --card: #FFFFFF;
    --text: #2D3748;
    --text-light: #718096;
    --border: #E2E8F0;
    --success: #38A169;
    --warning: #D69E2E;
    --danger: #E53E3E;
    --radius: 12px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* ── Header ────────────────────────────────── */
.header {
    background: linear-gradient(135deg, var(--secondary), #2D3E60);
    color: white;
    padding: 2rem;
    text-align: center;
    position: relative;
}
.header h1 { font-size: 2rem; font-weight: 700; }
.header .subtitle { color: rgba(255,255,255,0.7); margin-top: 0.3rem; }
.header .logo { font-size: 2.5rem; margin-bottom: 0.5rem; }

/* ── Container ─────────────────────────────── */
.container { max-width: 720px; margin: 0 auto; padding: 2rem 1rem; }
.container-wide { max-width: 1200px; margin: 0 auto; padding: 2rem 1rem; }

/* ── Cards ─────────────────────────────────── */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.card h2 {
    color: var(--secondary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

/* ── Form elements ─────────────────────────── */
.form-group { margin-bottom: 1.5rem; }
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}
.form-group .hint {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
}
textarea { resize: vertical; min-height: 80px; }

/* Radio / Checkbox groups */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}
.option-item {
    position: relative;
}
.option-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.option-item label {
    display: block;
    padding: 0.7rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    font-weight: 500;
    transition: all 0.2s;
}
.option-item input[type="radio"]:checked + label {
    border-color: var(--primary);
    background: rgba(232, 93, 44, 0.08);
    color: var(--primary);
}
.option-item label:hover {
    border-color: var(--primary);
}

/* Motivation slider */
.motivation-slider {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.motivation-slider input[type="range"] {
    flex: 1;
    accent-color: var(--primary);
    height: 8px;
}
.motivation-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 3rem;
    text-align: center;
}

/* Question number */
.q-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    margin-right: 0.5rem;
}

/* ── Buttons ───────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-secondary {
    background: var(--secondary);
    color: white;
}
.btn-secondary:hover { opacity: 0.9; }
.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: white; }
.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; }
.btn-block { width: 100%; justify-content: center; }

/* ── Stats cards ───────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.2rem;
    text-align: center;
}
.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}
.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.3rem;
}

/* ── Table ─────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.75rem; text-align: left; border-bottom: 1px solid var(--border); }
th {
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
tr:hover { background: rgba(232, 93, 44, 0.03); }
tr { cursor: pointer; }

/* ── Badge ─────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-success { background: #C6F6D5; color: #22543D; }
.badge-warning { background: #FEFCBF; color: #744210; }
.badge-danger { background: #FED7D7; color: #742A2A; }
.badge-info { background: #BEE3F8; color: #2A4365; }

/* ── Tabs ──────────────────────────────────── */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.5rem;
}
.tab {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-light);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}
.tab:hover { color: var(--primary); }
.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Modal ─────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--card);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}
.modal h3 { margin-bottom: 1rem; color: var(--secondary); }
.modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* ── Login ─────────────────────────────────── */
.login-container {
    max-width: 400px;
    margin: 4rem auto;
    padding: 0 1rem;
}

/* ── Coach layout ──────────────────────────── */
.coach-header {
    background: linear-gradient(135deg, var(--secondary), #2D3E60);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.coach-header h1 { font-size: 1.3rem; }
.coach-nav { display: flex; gap: 0.5rem; align-items: center; }
.coach-nav .btn { font-size: 0.85rem; }

/* ── Detail panel ──────────────────────────── */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 768px) {
    .detail-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}
.info-row .label { color: var(--text-light); font-size: 0.9rem; }
.info-row .value { font-weight: 600; }

/* ── Search ────────────────────────────────── */
.search-bar {
    position: relative;
    margin-bottom: 1rem;
}
.search-bar input {
    padding-left: 2.5rem;
}
.search-bar::before {
    content: "🔍";
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
}

/* ── Progress bar ──────────────────────────── */
.progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.3rem;
}
.progress-bar .fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.3s;
}

/* ── Merci page ────────────────────────────── */
.merci-container {
    text-align: center;
    padding: 4rem 2rem;
}
.merci-container .icon { font-size: 4rem; margin-bottom: 1rem; }
.merci-container h2 { font-size: 1.8rem; color: var(--secondary); margin-bottom: 1rem; }
.merci-container p { color: var(--text-light); font-size: 1.1rem; max-width: 500px; margin: 0 auto 2rem; }

/* ── Animations ────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.card { animation: fadeIn 0.3s ease-out; }

/* ── Toast notifications ───────────────────── */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 2000;
    animation: fadeIn 0.3s;
}
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
