/* ============================================================
   HandballPlus - Feuille de style principale
   ============================================================ */

/* Variables */
:root {
    --hp-orange: #fb6305;
    --hp-green: #009639;
    --hp-white: #FFFFFF;
    --hp-dark: #1a1a2e;

    /* Surfaces de theme (mode jour par defaut) */
    --hp-bg: #f4f6f9;        /* fond de page */
    --hp-surface: #ffffff;   /* cartes / panneaux */
    --hp-surface-2: #f1f3f5; /* surfaces secondaires */
    --hp-text: #212529;      /* texte principal */
    --hp-muted: #6c757d;     /* texte attenue */
    --hp-border: #dee2e6;    /* bordures */
}

/* Mode nuit : surcharge des variables (Bootstrap gere ses propres composants
   via data-bs-theme="dark") */
[data-bs-theme="dark"] {
    --hp-dark: #12121f;
    --hp-bg: #121218;
    --hp-surface: #1e1e2b;
    --hp-surface-2: #2a2a3a;
    --hp-text: #e8e8ec;
    --hp-muted: #9aa1ac;
    --hp-border: #2f2f40;
}

/* Base */
body {
    background-color: var(--hp-bg);
    color: var(--hp-text);
    font-family: 'NEW TIMES ROMAIN', sans-serif;
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* Bouton bascule jour/nuit dans la navbar */
.theme-toggle {
    background: transparent;
    border: none;
    color: var(--hp-white);
    font-size: 1.15rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
}
.theme-toggle:hover { color: var(--hp-green); }

/* Navbar */
/*.navbar-hp {
    background: linear-gradient(135deg, var(--hp-orange), #451e04);
}*/
.navbar-hp {
    background:  var(--hp-orange);
}
.navbar-hp .navbar-brand, .navbar-hp .nav-link {
    color: var(--hp-white) !important;
    font-weight: 600;
}
.navbar-hp .nav-link:hover { color: var(--hp-green) !important; }
.navbar-hp .nav-link.active { border-bottom: 3px solid var(--hp-white); }

/* Hero section */
/* ============================
   HERO SECTION
   ============================ */
.hero-section {
    background: linear-gradient(135deg, var(--hp-dark), #16213e);
    color: white;
    padding: 3rem 0;
}
/* Cards */
.card-hp { border: none; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); transition: transform 0.2s; }
.card-hp:hover { transform: translateY(-4px); }

/* Badges statut */
.badge-en_cours { background-color: var(--hp-green); }
.badge-termine { background-color: #6c757d; }
.badge-programme { background-color: var(--hp-orange); }
.badge-a_venir { background-color: #0d6efd; }

/* Stats */
.stat-card { text-align: center; padding: 1.5rem; }
.stat-card .stat-value { font-size: 2rem; font-weight: 700; color: var(--hp-orange); }
.stat-card .stat-label { font-size: 0.85rem; color: #6c757d; }
.match-score {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;      /* Centre verticalement */
    justify-content: center;  /* Centre horizontalement (optionnel) */
}
/* Tableau classement */
.table-classement th { background-color: var(--hp-dark); color: white; }

/* Footer */
.footer-hp { background-color: var(--hp-dark); color: #adb5bd; padding: 2rem 0; }

/* Boutons */
.btn-hp { 
    background-color: var(--hp-orange);
     border: none; 
     color: white;
     
    
    }


.btn-hp:hover { 
    background-color: #e65c00; 
    color: white; 
    
}

/* Timeline evenements */
.event-timeline { border-left: 3px solid var(--hp-orange); padding-left: 1rem; }
.event-timeline .event-item { margin-bottom: 0.8rem; position: relative; }
.event-timeline .event-item::before {
    content: '';
    width: 12px; height: 12px;
    background: var(--hp-orange);
    border-radius: 50%;
    position: absolute;
    left: -1.45rem;
    top: 4px;
}

/* ============================================================
   Composants specifiques aux pages
   ============================================================ */

/* Breadcrumb dans les sections hero (fond sombre) */
.breadcrumb-hero {
    --bs-breadcrumb-divider-color: #adb5bd;
    --bs-breadcrumb-item-active-color: white;
}

/* Avatars et images */
.img-avatar-80 { width: 80px; height: 80px; object-fit: cover; }
.img-avatar-70 { width: 70px; height: 70px; object-fit: cover; }
.img-avatar-55 { width: 55px; height: 55px; object-fit: cover; }
.img-avatar-30 { width: 30px; height: 30px; object-fit: cover; }

/* Placeholders avatar (sans photo) */
.placeholder-80 { width: 80px; height: 80px; }
.placeholder-55 { width: 55px; height: 55px; }

/* Valeur statistique taille reduite (dans les fiches match) */
.stat-value-sm { font-size: 1.3rem; font-weight: 700; color: var(--hp-orange); }

/* Colonne rang dans le tableau de classement */
.th-rank { width: 50px; }

/* Navigation par statut de match */
.nav-link-en_cours { color: var(--hp-green); }
.nav-link-en_cours.active { background-color: var(--hp-green) !important; color: white !important; }
.nav-link-programme { color: var(--hp-orange); }
.nav-link-programme.active { background-color: var(--hp-orange) !important; color: white !important; }
.nav-link-termine { color: #6c757d; }
.nav-link-termine.active { background-color: #6c757d !important; color: white !important; }

/* ============================================================
   Pages d'authentification (connexion / inscription / reset)
   ============================================================ */
.auth-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}
.auth-card:hover { transform: none; }   /* annule le hover des .card-hp */

.auth-title {
    font-weight: 700;
    color: var(--hp-dark);
}

/* Champs : style coherent meme sans classe form-control (ex. reset email) */
.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="date"],
.auth-card input[type="tel"] {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid #ced4da;
    border-radius: 8px;
}
.auth-card input:focus {
    border-color: var(--hp-orange);
    box-shadow: 0 0 0 0.2rem rgba(251, 99, 5, 0.15);
    outline: none;
}

.auth-field-label {
    font-weight: 600;
    color: var(--hp-dark);
}

/* Bascule a onglets (e-mail / telephone) */
.auth-tabs {
    display: flex;
    gap: 6px;
    background: #e9ecef;
    border-radius: 10px;
    padding: 5px;
}
.auth-tab {
    flex: 1;
    border: none;
    background: transparent;
    color: #495057;
    font-weight: 600;
    padding: 0.7rem 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.auth-tab.active {
    background: var(--hp-dark);
    color: #fff;
}

/* Mot de passe avec icone oeil */
.auth-password { position: relative; }
.auth-password .auth-eye {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #6c757d;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

/* Liens (mot de passe oublie, inscription) */
.auth-link {
    color: var(--hp-dark);
    text-decoration: underline;
}
.auth-link:hover { color: var(--hp-orange); }

/* Separateur "... via :" */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
}
.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #dee2e6;
}
.auth-divider span { padding: 0 12px; }

/* Boutons de connexion sociale */
.auth-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f1f3f5;
    color: var(--hp-dark);
    font-size: 1.3rem;
    transition: all 0.2s;
}
.auth-social-btn:hover {
    background: var(--hp-orange);
    color: #fff;
}

/* ============================================================
   Auth v2 — layout deux colonnes (branding + formulaire)
   ============================================================ */
.auth-wrapper {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background:
        radial-gradient(1200px 500px at 10% -10%, rgba(251,99,5,0.10), transparent),
        radial-gradient(900px 500px at 110% 110%, rgba(0,150,57,0.10), transparent);
}
.auth-shell {
    width: 100%;
    max-width: 960px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}
@media (max-width: 768px) {
    .auth-shell { grid-template-columns: 1fr; max-width: 460px; }
    .auth-brand { display: none !important; }
}

/* --- Panneau branding (gauche) --- */
.auth-brand {
    position: relative;
    /* Degrade sombre (lisibilite du texte) par-dessus l'illustration handball */
    background:
        linear-gradient(150deg,
            rgba(26, 26, 46, 0.90) 0%,
            rgba(22, 33, 62, 0.82) 55%,
            rgba(58, 28, 6, 0.82) 100%),
        url('../img/handball-hero.jpg') right bottom / cover no-repeat,
        var(--hp-dark);
    color: #fff;
    padding: 2.6rem 2.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}
.auth-brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.3px;
}
.auth-brand-logo i { color: var(--hp-orange); }
.auth-brand h2 {
    font-weight: 800;
    font-size: 1.7rem;
    line-height: 1.2;
    margin: 1.6rem 0 0.6rem;
}
.auth-brand h2 span { color: var(--hp-orange); }
.auth-brand .lead { color: #c7cede; font-size: 0.92rem; margin-bottom: 1.4rem; }
.auth-feature-list { list-style: none; padding: 0; margin: 0; position: relative; z-index: 1; }
.auth-feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    font-size: 0.9rem;
    color: #e8ecf5;
}
.auth-feature-list i {
    color: var(--hp-orange);
    background: rgba(251, 99, 5, 0.15);
    width: 30px; height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* --- Panneau formulaire (droite) --- */
.auth-form-side { padding: 2.6rem 2.4rem; }
@media (max-width: 768px) { .auth-form-side { padding: 2rem 1.6rem; } }
.auth-form-side .auth-title { font-size: 1.5rem; margin-bottom: 0.25rem; }
.auth-subtitle { color: #6c757d; font-size: 0.9rem; margin-bottom: 1.6rem; }

/* Champ avec icône en tête */
.auth-input-group { position: relative; }
.auth-input-group > i.auth-ico {
    position: absolute;
    top: 50%; left: 14px;
    transform: translateY(-50%);
    color: #9aa1ac;
    font-size: 1.05rem;
    pointer-events: none;
}
.auth-input-group .form-control { padding-left: 42px; height: 48px; border-radius: 10px; }
.auth-input-group .auth-eye {
    position: absolute;
    top: 50%; right: 12px;
    transform: translateY(-50%);
    border: none; background: transparent;
    color: #6c757d; font-size: 1.1rem;
    cursor: pointer; padding: 0; line-height: 1;
}
.auth-input-group .form-control.has-eye { padding-right: 42px; }

/* Indicateur de robustesse du mot de passe */
.pw-meter { display: flex; gap: 5px; margin-top: 8px; }
.pw-meter span {
    flex: 1; height: 5px; border-radius: 3px;
    background: #e9ecef; transition: background 0.25s;
}
.pw-hint { font-size: 0.78rem; margin-top: 5px; min-height: 1em; color: #6c757d; }
.pw-s1 { background: #dc3545 !important; }
.pw-s2 { background: #fd7e14 !important; }
.pw-s3 { background: #ffc107 !important; }
.pw-s4 { background: var(--hp-green) !important; }

/* ============================================================
   Surcharges du mode nuit
   ============================================================ */
[data-bs-theme="dark"] .card-hp {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}
[data-bs-theme="dark"] .stat-card .stat-label { color: var(--hp-muted); }

/* Pages d'authentification */
[data-bs-theme="dark"] .auth-card,
[data-bs-theme="dark"] .auth-shell {
    background: var(--hp-surface);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}
[data-bs-theme="dark"] .auth-title,
[data-bs-theme="dark"] .auth-field-label { color: var(--hp-text); }
[data-bs-theme="dark"] .auth-card input[type="text"],
[data-bs-theme="dark"] .auth-card input[type="email"],
[data-bs-theme="dark"] .auth-card input[type="password"],
[data-bs-theme="dark"] .auth-card input[type="date"],
[data-bs-theme="dark"] .auth-card input[type="tel"] {
    background: var(--hp-surface-2);
    border-color: var(--hp-border);
    color: var(--hp-text);
}
[data-bs-theme="dark"] .auth-tabs { background: var(--hp-surface-2); }
[data-bs-theme="dark"] .auth-tab { color: var(--hp-muted); }
[data-bs-theme="dark"] .auth-social-btn {
    background: var(--hp-surface-2);
    color: var(--hp-text);
}
[data-bs-theme="dark"] .auth-social-btn:hover {
    background: var(--hp-orange);
    color: #fff;
}
[data-bs-theme="dark"] .auth-divider::before,
[data-bs-theme="dark"] .auth-divider::after { background: var(--hp-border); }
[data-bs-theme="dark"] .auth-link { color: #c7cede; }
[data-bs-theme="dark"] .auth-link:hover { color: var(--hp-orange); }
[data-bs-theme="dark"] .pw-meter span { background: var(--hp-surface-2); }

/* Le panneau de branding et le hero restent volontairement sombres
   (deja un degrade fonce) dans les deux modes. */

/* ============================================================
   Fond de la page profil (illustration handball)
   ============================================================ */
.profile-bg {
    min-height: calc(100vh - 70px);
    padding: 3rem 0;
    /* Voile leger : l'illustration reste bien visible dans les marges,
       la carte (blanche, opaque) garde sa lisibilite par-dessus */
    background:
        linear-gradient(180deg, rgba(244, 246, 249, 0.45), rgba(244, 246, 249, 0.55)),
        url('../img/handball-hero.jpg') left center / 45% auto no-repeat,
        var(--hp-bg);
}
[data-bs-theme="dark"] .profile-bg {
    background:
        linear-gradient(180deg, rgba(18, 18, 24, 0.55), rgba(18, 18, 24, 0.65)),
        url('../img/handball-hero.jpg') left center / 45% auto no-repeat,
        var(--hp-bg);
}
