/* ==========================================================
   CS DÉCINES BASKET — STYLE UNIQUE DU SITE
   Accueil • équipes • FFBB • résultats • arbitrage • responsive
   ========================================================== */

:root {
    --rouge: #d71920;
    --rouge-clair: #ff4148;
    --noir: #0b0b0d;
    --panneau: rgba(15, 15, 18, 0.90);
    --panneau-clair: rgba(28, 28, 32, 0.94);
    --texte: #ffffff;
    --texte-doux: #d7d7dc;
    --bordure: rgba(255,255,255,.12);
    --ombre: 0 12px 32px rgba(0,0,0,.42);
    --rayon: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--texte);
    background:
        linear-gradient(rgba(0,0,0,.58), rgba(0,0,0,.82)),
        url("../images/terrain-basket.png") center / cover fixed no-repeat;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
button, input { font: inherit; }

/* ---------- En-tête commun ---------- */
.site-topbar {
    width: min(1240px, 94%);
    margin: 14px auto 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}
.logo-page, .logo-site {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex: 0 0 auto;
}
.logo-page img, .logo-site img {
    width: 82px;
    height: 82px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.18);
    box-shadow: 0 0 0 3px rgba(215,25,32,.22);
    transition: transform .25s ease, filter .25s ease;
}
.logo-page:hover img, .logo-site:hover img {
    transform: scale(1.06);
    filter: drop-shadow(0 0 10px rgba(255,65,72,.8));
}
.live-clock {
    text-align: right;
    background: rgba(0,0,0,.62);
    border: 1px solid var(--bordure);
    border-left: 3px solid var(--rouge);
    border-radius: 12px;
    padding: 8px 12px;
    min-width: 185px;
    box-shadow: var(--ombre);
}
.live-clock-date { display: block; color: var(--texte-doux); font-size: 13px; }
.live-clock-time { display: block; margin-top: 2px; font-size: 22px; font-weight: 800; letter-spacing: 1px; }

header.site-hero, body > header {
    text-align: center;
    padding: 12px 20px 24px;
}
header.site-hero h1, body > header h1 {
    margin: 0;
    font-size: clamp(28px, 5vw, 50px);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 3px 5px #000, 0 0 15px rgba(255,0,0,.62);
}
header.site-hero p, body > header p {
    margin: 9px 0 0;
    color: var(--rouge-clair);
    font-weight: 700;
    letter-spacing: 1.5px;
}

/* ---------- Bandeau FFBB permanent ---------- */
.bandeau-matchs {
    width: 100%;
    overflow: hidden;
    background: rgba(0,0,0,.94);
    border-top: 2px solid var(--rouge);
    border-bottom: 2px solid var(--rouge);
    box-shadow: 0 5px 20px rgba(0,0,0,.55);
    margin: 0 0 24px;
}
.bandeau-titre {
    padding: 7px 15px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(90deg, rgba(180,0,0,.64), rgba(60,0,0,.2), transparent);
}
.matchs-defilants { width: 100%; overflow: hidden; white-space: nowrap; padding: 10px 0; }
.matchs-track {
    display: flex;
    width: max-content;
    min-width: max-content;
    align-items: center;
    will-change: transform;
}
.matchs-track.ticker-actif { animation: tickerContinu 58s linear infinite; }
.ticker-group { display: flex; align-items: center; flex: 0 0 auto; }
.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    margin-right: 48px;
    font-size: 15px;
    line-height: 1.35;
    white-space: nowrap;
}
.ticker-item strong { color: var(--rouge-clair); }
.ticker-coupe { color: #ffd76a; font-weight: 700; }
.ticker-resultat { color: #f3f3f3; }
@keyframes tickerContinu { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Conteneurs / cartes ---------- */
main, .page-contenu, .presentation-club, .effectif-equipe, .categorie-equipe, .calendrier-equipe {
    width: min(1180px, 92%);
    margin-left: auto;
    margin-right: auto;
}
.page-contenu, .presentation-club, .effectif-equipe, .categorie-equipe {
    background: var(--panneau);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
    padding: clamp(20px, 4vw, 38px);
    margin-bottom: 28px;
}
h1 { text-align: center; text-transform: uppercase; font-size: clamp(28px, 4vw, 40px); margin: 24px 0; }
h2 { line-height: 1.25; }
p { line-height: 1.65; }
.slogan { text-align: center; color: var(--rouge-clair); font-weight: 800; }

/* ---------- Menu accueil ---------- */
.menu-images {
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 22px;
    width: min(1250px, 94%);
    margin: 10px auto 36px;
    padding: 10px;
}
.menu-card {
    width: 176px;
    text-align: center;
    text-decoration: none;
    color: white;
    background: rgba(15,15,15,.9);
    border: 2px solid var(--rouge);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--ombre);
    transition: transform .25s ease, box-shadow .25s ease;
}
.menu-card:hover { transform: translateY(-5px); box-shadow: 0 14px 34px rgba(215,25,32,.24); }
.menu-card img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.menu-card span { display: block; padding: 12px 8px 14px; font-weight: 800; text-transform: uppercase; font-size: 14px; }
.intro { text-align: center; background: var(--panneau); border-radius: var(--rayon); padding: 26px; box-shadow: var(--ombre); }

/* ---------- Grille équipes ---------- */
.grille-categories, .joueurs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    width: min(1180px, 92%);
    margin: 24px auto 36px;
}
.equipe-card, .joueur-card {
    display: block;
    background: var(--panneau-clair);
    border: 1px solid var(--bordure);
    border-bottom: 3px solid var(--rouge);
    border-radius: 14px;
    overflow: hidden;
    text-align: center;
    text-decoration: none;
    box-shadow: var(--ombre);
}
.equipe-card { padding: 18px 12px; font-weight: 800; }
.equipe-card:hover { background: rgba(45,45,50,.96); }
.joueur-card { padding: 14px; }
.joueur-card img, .photo-equipe img { border-radius: 12px; }
.numero-joueur { color: var(--rouge-clair); font-weight: 900; font-size: 22px; }
.nom-joueur { font-weight: 800; }
.photo-equipe { width: min(900px, 92%); margin: 20px auto; text-align: center; }

/* ---------- FFBB équipes ---------- */
#ffbb-resultats, #ffbb-global-results { width: min(1250px, 94%); margin: 28px auto; }
.ffbb-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 24px; align-items: start; }
.ffbb-calendrier, .ffbb-classement-zone, .ffbb-section {
    min-width: 0;
    background: rgba(10,10,12,.90);
    border: 1px solid var(--bordure);
    border-radius: 16px;
    padding: 18px;
    box-shadow: var(--ombre);
}
.ffbb-calendrier h2, .ffbb-classement-zone h2, .ffbb-section h2 { text-align: center; color: var(--rouge-clair); margin: 2px 0 16px; }
.table-scroll { width: 100%; overflow-x: auto; border-radius: 12px; }
.ffbb-tableau, .ffbb-classement { width: 100%; min-width: 660px; border-collapse: collapse; background: #17171a; }
.ffbb-classement { min-width: 340px; }
.ffbb-tableau th, .ffbb-classement th { background: var(--rouge); color: #fff; padding: 11px 8px; text-transform: uppercase; font-size: 13px; }
.ffbb-tableau td, .ffbb-classement td { padding: 11px 8px; text-align: center; border-bottom: 1px solid #35353a; }
.ffbb-tableau tbody tr:hover, .ffbb-classement tbody tr:hover { background: #25252a; }
.ffbb-attente { text-align: center; color: var(--texte-doux); padding: 22px; background: rgba(255,255,255,.04); border-radius: 12px; }
.match-lieu { font-size: 18px; margin-right: 4px; }
.match-coupe td:first-child { color: #ffd76a; font-weight: 700; }
.match-victoire { box-shadow: inset 4px 0 0 #49b86e; }
.match-defaite { box-shadow: inset 4px 0 0 #d75050; }
.match-avenir { box-shadow: inset 4px 0 0 #6f8ec9; }
.club-csd { font-weight: 900; }
.ffbb-competition { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- Résultats globaux ---------- */
.resultats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.resultat-card {
    border: 1px solid var(--bordure);
    border-radius: 13px;
    padding: 14px 16px;
    margin-bottom: 10px;
    background: rgba(255,255,255,.045);
}
.resultat-meta { color: var(--texte-doux); font-size: 13px; margin-bottom: 6px; }
.resultat-score { font-size: 17px; font-weight: 800; }

/* ---------- Partenaires ---------- */
.partenaires { width: min(1050px, 92%); margin: 36px auto 28px; text-align: center; }
.partenaires h2 { text-transform: uppercase; letter-spacing: 1px; }
.partenaires-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 18px;
}
.partenaires-logos img {
    width: 145px;
    max-height: 90px;
    object-fit: contain;
    background: rgba(255,255,255,.94);
    border-radius: 12px;
    padding: 8px;
}

/* ---------- Arbitrage ---------- */
.arbitrage-card {
    width: min(900px, 92%);
    margin: 22px auto 32px;
    background: var(--panneau);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    padding: clamp(20px, 4vw, 34px);
    box-shadow: var(--ombre);
}
.arbitrage-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 20px; }
.btn-csd {
    display: inline-block;
    padding: 11px 16px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: var(--rouge);
    text-decoration: none;
    font-weight: 800;
    cursor: pointer;
}
.btn-csd:hover { filter: brightness(1.1); }
.form-csd { display: grid; gap: 12px; max-width: 560px; margin: 20px auto; }
.form-csd input[type="password"], .form-csd input[type="file"] {
    width: 100%; padding: 12px; border-radius: 10px; border: 1px solid #555; background: #17171a; color: white;
}
.message-ok, .message-erreur { padding: 12px; border-radius: 10px; text-align: center; }
.message-ok { background: rgba(73,184,110,.18); border: 1px solid rgba(73,184,110,.5); }
.message-erreur { background: rgba(215,80,80,.18); border: 1px solid rgba(215,80,80,.5); }
.planning-table { width: 100%; border-collapse: collapse; min-width: 700px; }
.planning-table th { background: var(--rouge); padding: 10px; }
.planning-table td { padding: 10px; border-bottom: 1px solid #37373b; text-align: center; }

/* ---------- Accessibilité ---------- */
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 850px) {
    .ffbb-layout, .resultats-grid { grid-template-columns: 1fr; }
    .menu-card { width: 158px; }
}
@media (max-width: 600px) {
    body { background-attachment: scroll; }
    .site-topbar { width: 94%; margin-top: 10px; }
    .logo-page img, .logo-site img { width: 66px; height: 66px; }
    .live-clock { min-width: 145px; padding: 7px 9px; }
    .live-clock-date { font-size: 11px; }
    .live-clock-time { font-size: 18px; }
    .bandeau-titre { font-size: 12px; }
    .ticker-item { font-size: 13px; margin-right: 32px; }
    .menu-images { gap: 14px; }
    .menu-card { width: min(44vw, 165px); }
    .grille-categories, .joueurs-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .partenaires-logos img { width: 110px; max-height: 72px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .matchs-track.ticker-actif { animation-duration: 115s; }
    *, *::before, *::after { transition-duration: .01ms !important; }
}

/* ---------- Navigation retour ---------- */
.navigation-retour {
    width: min(1240px, 94%);
    margin: 14px auto 8px;
}
.btn-retour {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,.16);
    border-left: 3px solid var(--rouge);
    border-radius: 10px;
    background: rgba(10,10,12,.82);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
}
.btn-retour:hover { background: rgba(40,40,44,.94); }

/* ---------- Effectifs joueurs / joueuses ---------- */
.effectif-equipe > h2 { text-align: center; color: var(--rouge-clair); }
.joueurs-grid[data-effectif] { width: 100%; margin-bottom: 0; }
.joueur-card img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    background: #111;
    margin-bottom: 12px;
}
.joueur-photo-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 4 / 5;
    font-size: 62px;
    background: rgba(255,255,255,.04);
    border-radius: 12px;
    margin-bottom: 12px;
}
.poste-joueur { margin: 7px 0; color: var(--texte-doux); }
.presentation-joueur { margin: 8px 0 0; font-size: 14px; color: var(--texte-doux); }

/* ---------- Événements du club ---------- */
.evenements-accueil {
    margin: 28px auto 0;
    background: var(--panneau);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    padding: 24px;
    box-shadow: var(--ombre);
    text-align: center;
}
.evenements-accueil h2 { color: var(--rouge-clair); }
.evenements-liste {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px,1fr));
    gap: 16px;
    margin: 18px 0;
}
.evenement-card {
    background: rgba(255,255,255,.045);
    border: 1px solid var(--bordure);
    border-bottom: 3px solid var(--rouge);
    border-radius: 13px;
    padding: 16px;
    text-align: left;
}
.evenement-card h2, .evenement-card h3 { margin: 8px 0; color: #fff; }
.evenement-date { color: #ffd76a; font-weight: 800; }
.evenement-actions { text-align: center; margin-top: 18px; }
.ticker-evenement { color: #ffe9a8; }
.ticker-evenement strong { color: #ffd76a; }

/* ---------- Formulaires ---------- */
.form-csd label { display: grid; gap: 6px; font-weight: 700; }
.form-csd input[type="text"], .form-csd input[type="date"], .form-csd input[type="time"],
.form-csd input[type="url"], .form-csd textarea {
    width: 100%; padding: 12px; border-radius: 10px; border: 1px solid #555; background: #17171a; color: white;
}
.form-csd textarea { resize: vertical; }
.form-check-line { display: flex !important; grid-template-columns: none; align-items: center; gap: 10px !important; }

/* ---------- Pied de page ---------- */
.footer-site {
    margin-top: 42px;
    border-top: 2px solid var(--rouge);
    background: rgba(0,0,0,.92);
    color: var(--texte-doux);
}
.footer-inner {
    width: min(1180px, 92%);
    margin: 0 auto;
    padding: 22px 0;
    text-align: center;
}
.footer-inner p { margin: 5px 0; line-height: 1.45; }
.footer-inner a { color: #fff; }

@media (max-width: 600px) {
    .navigation-retour { width: 94%; }
    .btn-retour { width: 100%; justify-content: center; }
    .joueurs-grid[data-effectif] { grid-template-columns: 1fr 1fr; }
}
