/* ====================================================
   Elouan Tennis – Suivi Joueur : Front CSS v2
   ==================================================== */

:root {
    --esj-green:   #16a34a;
    --esj-green-l: #dcfce7;
    --esj-green-b: #f0fdf4;
    --esj-border:  #e5e7eb;
    --esj-text:    #1f2937;
    --esj-muted:   #6b7280;
    --esj-radius:  10px;
}

.esj-fiche {
    font-family: 'Segoe UI', system-ui, sans-serif;
    max-width: 900px; margin: 0 auto 48px;
    color: var(--esj-text); line-height: 1.6;
}
.esj-message {
    padding:16px 20px; border-radius:8px; font-size:15px;
    max-width:580px; margin:24px auto;
}
.esj-warning { background:#fff3cd; border-left:4px solid #f59e0b; color:#92400e; }
.esj-info    { background:#dbeafe; border-left:4px solid #3b82f6; color:#1e40af; }

/* ── En-tête ──────────────────────────────────── */
.esj-header {
    display:flex; align-items:center; gap:20px;
    background: linear-gradient(135deg, #14532d 0%, #22c55e 100%);
    color:#fff; border-radius:var(--esj-radius) var(--esj-radius) 0 0;
    padding:28px 32px;
}
.esj-header-avatar { font-size:56px; line-height:1; filter:drop-shadow(0 2px 6px rgba(0,0,0,.3)); }
.esj-player-name   { margin:0 0 8px; font-size:26px; font-weight:800; letter-spacing:-.3px; }
.esj-badges        { display:flex; flex-wrap:wrap; gap:8px; }
.esj-badge {
    background:rgba(255,255,255,.18); border:1px solid rgba(255,255,255,.35);
    border-radius:20px; padding:3px 12px; font-size:13px; font-weight:500;
}

/* ── Navigation ───────────────────────────────── */
.esj-nav {
    display:flex; border:1px solid var(--esj-border); border-top:none;
    background:#fff; overflow:hidden;
}
.esj-nav-item {
    flex:1; display:flex; flex-direction:column; align-items:center;
    padding:14px 10px; text-decoration:none; color:var(--esj-text);
    border-right:1px solid var(--esj-border); transition:background .15s;
    gap:3px;
}
.esj-nav-item:last-child { border-right:none; }
.esj-nav-item:hover { background:var(--esj-green-b); }
.esj-nav-promo { background:#fffbeb; }
.esj-nav-promo:hover { background:#fef9c3; }
.esj-nav-icon  { font-size:20px; }
.esj-nav-label { font-size:13px; font-weight:600; }
.esj-nav-count { font-size:11px; color:var(--esj-muted); }

/* ── Sections ─────────────────────────────────── */
.esj-section {
    background:#fff; border:1px solid var(--esj-border);
    border-top:none; padding:28px 30px;
}
.esj-section-title {
    font-size:18px; font-weight:700; color:#14532d;
    margin:0 0 20px; padding-bottom:12px;
    border-bottom:2px solid var(--esj-green-l);
}
.esj-sub-title {
    font-size:15px; font-weight:700; color:var(--esj-text);
    margin:28px 0 14px;
}
.esj-empty { color:var(--esj-muted); font-style:italic; }

/* ── Grille de stages ─────────────────────────── */
.esj-stages-grid {
    display:grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap:12px; margin-bottom:12px;
}
.esj-stage-card {
    border-radius:8px; padding:14px 16px;
    border:1px solid var(--esj-border); background:#fafafa;
}
.esj-stage-passe { border-left:4px solid #86efac; }
.esj-stage-avenir { border-left:4px solid #fbbf24; background:#fffef0; }

.esj-stage-card-top {
    display:flex; align-items:center; gap:8px;
    margin-bottom:8px; font-size:14px;
}
.esj-stage-statut-dot {
    width:10px; height:10px; border-radius:50%; flex-shrink:0;
}
.esj-stage-statut-dot.passe  { background:#22c55e; }
.esj-stage-statut-dot.avenir { background:#f59e0b; }

.esj-stage-detail { font-size:13px; color:var(--esj-muted); margin-top:4px; }
.esj-stage-desc   { font-size:13px; color:#374151; margin-top:8px;
                     padding-top:8px; border-top:1px solid var(--esj-border); }

.esj-stage-footer {
    display:flex; align-items:center; justify-content:space-between;
    margin-top:12px; padding-top:10px; border-top:1px solid var(--esj-border);
}
.esj-stage-prix { font-size:14px; font-weight:700; color:#16a34a; }
.esj-btn-inscrire {
    background:#16a34a; color:#fff !important;
    padding:6px 14px; border-radius:20px;
    font-size:13px; font-weight:600; text-decoration:none;
    transition:background .15s;
}
.esj-btn-inscrire:hover { background:#15803d; }

/* Section à venir */
.esj-avenir-wrap {
    margin-top:24px; padding-top:20px;
    border-top:2px dashed #fcd34d;
}
.esj-avenir-header { margin-bottom:14px; }
.esj-avenir-header h3 { font-size:16px; font-weight:700; margin:0 0 4px; color:#92400e; }
.esj-avenir-header p  { font-size:13px; color:var(--esj-muted); margin:0; }

/* ── Snapshot ─────────────────────────────────── */
.esj-snapshot {
    background:var(--esj-green-b); border:1px solid #86efac;
    border-radius:8px; padding:18px 20px; margin-bottom:24px;
}
.esj-snapshot-title {
    display:flex; align-items:center; gap:12px;
    font-size:14px; margin-bottom:14px;
}
.esj-snapshot-date { color:var(--esj-muted); font-size:12px; }
.esj-snapshot-grid {
    display:grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap:10px;
}
.esj-snap-item { display:flex; align-items:center; gap:8px; }
.esj-snap-label { font-size:12px; font-weight:600; width:105px; flex-shrink:0; }
.esj-snap-bar-wrap {
    flex:1; height:8px; background:#d1fae5;
    border-radius:100px; overflow:hidden;
}
.esj-snap-bar { height:100%; border-radius:100px; transition:width .5s ease; }
.esj-snap-score { font-size:12px; font-weight:700; width:28px; text-align:right; }

/* ── Sessions (accordion) ─────────────────────── */
.esj-sessions-list { display:flex; flex-direction:column; gap:8px; }

.esj-session-item {
    border:1px solid var(--esj-border);
    border-radius:8px; overflow:hidden;
    background:#fff;
}
.esj-session-summary {
    display:flex; align-items:center; justify-content:space-between;
    padding:12px 16px; cursor:pointer;
    background:#f9fafb; list-style:none;
    font-size:14px;
}
.esj-session-summary::-webkit-details-marker { display:none; }
.esj-session-summary:hover { background:#f0fdf4; }
.esj-session-summary-left { display:flex; align-items:center; gap:10px; }
.esj-session-dot {
    width:10px; height:10px; border-radius:50%;
    background:var(--esj-green); flex-shrink:0;
}
.esj-session-date { font-size:12px; color:var(--esj-muted); }

.esj-session-content { padding:16px 20px; }

/* ── Grille évaluations ───────────────────────── */
.esj-evals-grid {
    display:grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap:12px; margin-bottom:16px;
}
.esj-eval-card {
    background:#f9fafb; border:1px solid var(--esj-border);
    border-radius:8px; padding:12px 14px;
    transition:box-shadow .2s;
}
.esj-eval-card:hover { box-shadow:0 2px 10px rgba(0,0,0,.07); }
.esj-eval-head {
    display:flex; justify-content:space-between; align-items:center;
    margin-bottom:7px;
}
.esj-eval-label  { font-size:13px; font-weight:600; }
.esj-eval-score  { font-size:14px; font-weight:700; }
.esj-progress-wrap {
    height:8px; background:#e5e7eb; border-radius:100px;
    overflow:hidden; margin-bottom:5px;
}
.esj-progress-bar { height:100%; border-radius:100px; }
.esj-eval-level  { font-size:11px; font-weight:700; margin-bottom:7px; }
.esj-eval-comment {
    font-size:12px; color:var(--esj-muted);
    border-top:1px solid var(--esj-border);
    padding-top:7px; margin-top:4px;
}

/* Bilan de session */
.esj-session-bilan {
    background:#fffbeb; border:1px solid #fcd34d;
    border-radius:6px; padding:12px 16px;
    font-size:14px; color:#374151; font-style:italic;
    margin-top:4px;
}

/* ── Séances ──────────────────────────────────── */
.esj-seance-card {
    background:#f9fafb; border:1px solid var(--esj-border);
    border-left:4px solid var(--esj-green); border-radius:8px;
    padding:14px 16px;
}
.esj-seance-card-head {
    display:flex; justify-content:space-between; align-items:flex-start;
    gap:12px; flex-wrap:wrap; margin-bottom:8px;
}
.esj-seance-date { font-size:12px; color:var(--esj-muted); }
.esj-seance-meta { display:flex; gap:12px; font-size:12px; color:var(--esj-muted); margin-bottom:6px; }
.esj-seance-objectif { font-size:13px; color:#374151; font-style:italic; margin-bottom:8px; }

.esj-seance-detail-wrap { margin-top:8px; }
.esj-seance-detail-btn {
    font-size:12px; font-weight:600; cursor:pointer;
    color:var(--esj-green); list-style:none;
}
.esj-seance-detail-btn::-webkit-details-marker { display:none; }
.esj-seance-programme { margin-top:10px; display:flex; flex-direction:column; gap:8px; }
.esj-seance-ex {
    background:#fff; border:1px solid var(--esj-border);
    border-radius:6px; padding:10px 12px;
}
.esj-seance-ex-head {
    display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:4px;
}
.esj-seance-ex-cat { font-size:11px; color:var(--esj-muted); }
.esj-seance-ex-detail { font-size:12px; color:#6b7280; margin:4px 0 0; }

/* ── Footer ───────────────────────────────────── */
.esj-footer {
    background:#f3f4f6; border:1px solid var(--esj-border);
    border-top:2px solid var(--esj-green);
    border-radius:0 0 var(--esj-radius) var(--esj-radius);
    display:flex; justify-content:space-between; flex-wrap:wrap;
    padding:12px 24px; font-size:12px; color:#9ca3af; gap:8px;
}

/* ── Responsive ───────────────────────────────── */
@media (max-width:640px) {
    .esj-header     { flex-direction:column; text-align:center; padding:20px 16px; }
    .esj-badges     { justify-content:center; }
    .esj-nav        { flex-direction:column; }
    .esj-nav-item   { flex-direction:row; justify-content:flex-start; border-right:none;
                      border-bottom:1px solid var(--esj-border); }
    .esj-stages-grid, .esj-evals-grid,
    .esj-snapshot-grid { grid-template-columns:1fr; }
    .esj-section    { padding:18px 16px; }
    .esj-footer     { justify-content:center; text-align:center; }
}
