/*
Theme Name: La Valette Handball
Theme URI: https://lavalette-handball.fr
Author: La Mama Studio
Author URI: https://lamama.fr
Description: Thème WordPress sur-mesure pour le Club de Handball de La Valette du Var. Compatible avec l'extension WP Club Manager pour la gestion des matchs, joueurs et classements.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
Tested up to: 6.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: lavalette-handball
*/

/* =========================================================
   1. TOKENS
   ========================================================= */
:root{
  --navy: #101A2E;
  --navy-card: #182645;
  --parquet: #C68A4E;
  --orange: #F26419;
  --green: #2E7D5B;
  --chalk: #F4EFE4;
  --white: #FFFFFF;
  --slate: #5B6472;
  --ink: #101A2E;
  --radius-arc: 120px;
  --wrap-width: 1180px;
}

/* =========================================================
   2. RESET
   ========================================================= */
*, *::before, *::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family:'Work Sans', sans-serif;
  color: var(--ink);
  background: var(--chalk);
  -webkit-font-smoothing: antialiased;
}
img{ max-width:100%; height:auto; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ list-style:none; margin:0; padding:0; }
button{ font-family:inherit; cursor:pointer; }
.screen-reader-text{
  position:absolute !important;
  clip: rect(1px,1px,1px,1px);
  width:1px; height:1px; overflow:hidden;
}
:focus-visible{ outline: 3px solid var(--orange); outline-offset: 3px; }

h1,h2,h3{
  font-family:'Anton', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.95;
  font-weight: 400;
  margin: 0 0 .5em;
}
p{ margin: 0 0 1em; }

.wrap{
  max-width: var(--wrap-width);
  margin: 0 auto;
  padding: 0 32px;
}
.eyebrow{
  font-family:'JetBrains Mono', monospace;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  display:flex;
  align-items:center;
  gap:10px;
}
.eyebrow::before{
  content:"";
  width: 22px;
  height: 2px;
  background: currentColor;
  display:inline-block;
}
.mono{ font-family:'JetBrains Mono', monospace; }

/* Arc motif (zone des 6 mètres) — signature graphique du thème */
.arc-corner{ border-radius: 4px var(--radius-arc) 4px 4px; }

/* =========================================================
   3. BUTTONS
   ========================================================= */
.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: 3px 14px 3px 3px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  white-space:nowrap;
  border: none;
}
.btn-primary{ background: var(--orange); color: var(--white); }
.btn-primary:hover{ transform: translateY(-2px); box-shadow: 0 10px 24px rgba(242,100,25,0.35); color:var(--white); }
.btn-ghost{ border: 1.5px solid rgba(255,255,255,0.3); color: var(--white); background:transparent; }
.btn-ghost:hover{ border-color: var(--white); }

/* =========================================================
   4. HEADER / NAV
   ========================================================= */
#masthead{
  position: sticky;
  top:0;
  z-index: 50;
  background: rgba(16,26,46,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  height: 78px;
  gap: 24px;
}
.site-branding{ display:flex; align-items:center; gap:12px; color: var(--white); }
.site-branding img.custom-logo{ max-height:40px; width:auto; }
.logo-mark{
  width: 40px; height:40px;
  border-radius: 3px 16px 3px 3px;
  background: linear-gradient(135deg, var(--orange), #d94e10);
  display:flex; align-items:center; justify-content:center;
  font-family:'Anton', sans-serif;
  font-size: 17px;
  color: var(--navy);
  flex-shrink:0;
}
.site-branding .site-title{
  font-family:'Anton', sans-serif;
  font-size: 18px;
  letter-spacing: 0.02em;
  line-height:1.05;
  color: var(--white);
}
.site-branding .site-title span{
  display:block;
  font-family:'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--parquet);
  font-weight:500;
  margin-top:2px;
  text-transform: uppercase;
}
.nav-links{ display:flex; align-items:center; gap:34px; }
#primary-menu{ display:flex; gap: 34px; }
#primary-menu a{
  color: rgba(255,255,255,0.78);
  font-size: 14.5px;
  font-weight: 500;
  transition: color .15s ease;
}
#primary-menu a:hover, #primary-menu .current-menu-item > a{ color: var(--white); }
.menu-toggle{
  display:none;
  background:none; border:none; color:var(--white);
  width:40px; height:40px;
  align-items:center; justify-content:center;
}

/* =========================================================
   5. HERO
   ========================================================= */
.hero{
  background: var(--navy);
  color: var(--white);
  position: relative;
  overflow:hidden;
  padding: 88px 0 0;
}
.hero-arcs{ position:absolute; inset:0; pointer-events:none; opacity:.5; }
.hero-grid{
  display:grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items:center;
  position:relative;
  z-index:2;
  padding-bottom: 76px;
}
.hero h1{ font-size: clamp(46px, 6vw, 84px); margin: 22px 0 24px; }
.hero h1 .accent{ color: var(--orange); }
.hero-sub{ font-size: 17px; line-height:1.6; color: rgba(255,255,255,0.72); max-width: 480px; margin-bottom: 34px; }
.hero-ctas{ display:flex; gap:14px; flex-wrap:wrap; }

.matchcard{
  background: var(--navy-card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px var(--radius-arc) 6px 6px;
  padding: 28px 28px 24px;
  position:relative;
}
.matchcard-tag{
  font-family:'JetBrains Mono', monospace;
  font-size: 11.5px;
  letter-spacing:0.12em;
  color: var(--orange);
  display:flex; align-items:center; gap:8px;
  margin-bottom:22px;
  text-transform: uppercase;
}
.matchcard-tag .dot{
  width:7px; height:7px; border-radius:50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(242,100,25,0.2);
}
.matchup{ display:flex; align-items:center; justify-content:space-between; margin-bottom: 22px; }
.team{ display:flex; flex-direction:column; align-items:center; gap:10px; width: 40%; }
.crest{
  width:58px; height:58px;
  border-radius: 3px 14px 3px 3px;
  display:flex; align-items:center; justify-content:center;
  font-family:'Anton', sans-serif;
  font-size:18px;
  overflow:hidden;
}
.crest.home{ background: var(--orange); color:var(--white); }
.crest.away{ background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7); border:1px solid rgba(255,255,255,0.15); }
.crest img{ width:100%; height:100%; object-fit:cover; }
.team-name{ font-size:12.5px; font-weight:600; text-align:center; letter-spacing:0.02em; }
.vs{ font-family:'JetBrains Mono', monospace; color: rgba(255,255,255,0.35); font-size: 13px; }
.match-meta{ border-top: 1px dashed rgba(255,255,255,0.15); padding-top:18px; display:flex; flex-direction:column; gap:9px; }
.match-meta-row{ display:flex; align-items:center; gap:10px; font-size: 13.5px; color: rgba(255,255,255,0.75); }
.match-meta-row .mono{ color: var(--white); font-weight:500; }
.match-meta-empty{ font-size:13.5px; color:rgba(255,255,255,0.55); }

.stat-strip{
  background: var(--navy-card);
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position:relative; z-index:2;
}
.stat-strip .wrap{ display:flex; justify-content:space-between; padding: 26px 32px; flex-wrap:wrap; gap: 20px; }
.stat{ text-align:left; }
.stat b{ display:block; font-family:'Anton', sans-serif; font-size: 30px; color: var(--white); }
.stat span{ font-family:'JetBrains Mono', monospace; font-size: 11px; letter-spacing:0.1em; text-transform:uppercase; color: rgba(255,255,255,0.5); }

/* =========================================================
   6. SECTIONS GENERIC
   ========================================================= */
.section{ padding: 92px 0; }
.section-head{ display:flex; justify-content:space-between; align-items:flex-end; margin-bottom: 46px; gap: 24px; flex-wrap:wrap; }
.section-head h2{ font-size: clamp(30px,4vw,44px); }
.section-head .eyebrow{ color: var(--orange); margin-bottom:14px; }
.section-head p{ color: var(--slate); max-width: 340px; font-size:14.5px; line-height:1.6; margin:0; }

/* =========================================================
   7. ACTUALITES
   ========================================================= */
.news-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.news-card{
  background: var(--white);
  border-radius: 4px var(--radius-arc) 4px 4px;
  overflow:hidden;
  border: 1px solid rgba(16,26,46,0.08);
  transition: transform .18s ease, box-shadow .18s ease;
}
.news-card:hover{ transform: translateY(-4px); box-shadow: 0 18px 32px rgba(16,26,46,0.1); }
.news-thumb{
  height: 160px;
  background: radial-gradient(circle at 75% 30%, rgba(242,100,25,0.5), transparent 55%), linear-gradient(135deg, var(--navy), #223a63);
  position:relative;
  background-size: cover;
  background-position: center;
}
.news-tag{
  position:absolute; top:14px; left:14px;
  background: rgba(16,26,46,0.55);
  color: var(--white);
  font-family:'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing:0.1em;
  text-transform:uppercase;
  padding: 5px 10px;
  border-radius: 3px;
}
.news-body{ padding: 22px 22px 26px; }
.news-date{ font-family:'JetBrains Mono', monospace; font-size: 11.5px; color: var(--slate); letter-spacing:0.06em; margin-bottom: 10px; display:block; }
.news-body h3{ font-family:'Work Sans', sans-serif; text-transform:none; font-weight: 700; font-size: 18px; line-height:1.35; margin-bottom: 12px; }
.news-body h3 a:hover{ color: var(--orange); }
.news-link{ font-size: 13px; font-weight:700; color: var(--orange); }
.no-news{ color: var(--slate); font-size:14px; }

/* =========================================================
   8. EQUIPES
   ========================================================= */
.section-teams{ background: var(--navy); color: var(--white); }
.section-teams .section-head p{ color: rgba(255,255,255,0.55); }
.team-grid{ display:grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.team-card{
  background: var(--navy-card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px var(--radius-arc) 4px 4px;
  padding: 22px 20px 24px;
  transition: border-color .15s ease, transform .15s ease;
  display:block;
}
.team-card:hover{ border-color: rgba(242,100,25,0.5); transform: translateY(-3px); }
.team-photo{
  height:120px;
  border-radius: 3px 60px 3px 3px;
  background: linear-gradient(135deg, #22345c, #101A2E);
  margin-bottom: 18px;
  background-size: cover;
  background-position: center;
}
.team-card h3{ font-family:'Work Sans', sans-serif; text-transform:none; font-weight:700; font-size: 16.5px; margin-bottom: 6px; }
.team-card .cat{ font-family:'JetBrains Mono', monospace; font-size:10.5px; color: var(--parquet); letter-spacing:0.1em; text-transform:uppercase; margin-bottom: 14px; display:block; }
.team-card .team-link{ font-size:12.5px; font-weight:700; color: var(--orange); }

/* =========================================================
   9. RESULTATS (fallback natif + habillage des shortcodes WPCM)
   ========================================================= */
.results-table{ background: var(--white); border-radius: 4px; border:1px solid rgba(16,26,46,0.08); overflow:hidden; }
.results-head-row, .result-row{
  display:grid; grid-template-columns: 110px 1fr 1fr 90px 90px;
  align-items:center; gap: 14px; padding: 16px 24px;
}
.results-head-row{ font-family:'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing:0.08em; text-transform:uppercase; color: var(--slate); background: var(--chalk); }
.result-row{ border-top: 1px solid rgba(16,26,46,0.06); font-size: 14px; }
.result-row .mono{ font-size:13px; color:var(--slate); }
.score{ font-family:'JetBrains Mono', monospace; font-weight:700; font-size: 15px; }
.badge{ font-family:'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing:0.06em; padding: 4px 9px; border-radius: 3px; text-align:center; width:fit-content; }
.badge.win{ background: rgba(46,125,91,0.12); color: var(--green); }
.badge.loss{ background: rgba(91,100,114,0.12); color: var(--slate); }
.badge.upcoming{ background: rgba(242,100,25,0.12); color: var(--orange); }

/* Habillage minimal des tableaux/listes générés par WP Club Manager,
   pour que les shortcodes [wpcm_matches], [wpcm_table] etc. héritent du style du thème.
   À ajuster selon les classes réellement produites par la version du plugin installée. */
.wpcm, .wpclubmanager{ font-family:'Work Sans', sans-serif; }
.wpcm table, .wpclubmanager table{ width:100%; border-collapse:collapse; background:var(--white); }
.wpcm table th, .wpclubmanager table th{
  font-family:'JetBrains Mono', monospace; font-size:10.5px; letter-spacing:.08em; text-transform:uppercase;
  color:var(--slate); background:var(--chalk); text-align:left; padding:14px 16px;
}
.wpcm table td, .wpclubmanager table td{ padding:14px 16px; border-top:1px solid rgba(16,26,46,0.06); font-size:14px; }
.wpcm a, .wpclubmanager a{ color: var(--orange); font-weight:600; }

/* =========================================================
   10. PARTENAIRES
   ========================================================= */
.partners-strip{ display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap: 40px; padding-top: 10px; }
.partner-slot{
  height: 60px; width: 150px;
  background: rgba(16,26,46,0.04);
  border-radius: 4px;
  display:flex; align-items:center; justify-content:center;
  padding: 10px;
}
.partner-slot img{ max-height:100%; width:auto; filter:grayscale(1); opacity:.75; transition:filter .15s ease, opacity .15s ease; }
.partner-slot:hover img{ filter:none; opacity:1; }

/* =========================================================
   11. CTA BAND
   ========================================================= */
.cta-band{ background: linear-gradient(120deg, var(--orange), #d94e10); color: var(--white); text-align:center; padding: 70px 0; }
.cta-band h2{ font-size: clamp(28px,4.2vw,46px); margin-bottom:18px; }
.cta-band p{ opacity:0.92; max-width:480px; margin:0 auto 30px; font-size:15px; }
.cta-band .btn-ghost{ border-color: rgba(255,255,255,0.55); }

/* =========================================================
   12. FOOTER
   ========================================================= */
#colophon{ background: var(--navy); color: rgba(255,255,255,0.65); padding-top: 64px; }
.footer-grid{ display:grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 50px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-grid h4{ font-family:'JetBrains Mono', monospace; font-size: 11px; letter-spacing:0.1em; text-transform:uppercase; color: var(--white); margin-bottom: 18px; }
.footer-grid ul li{ margin-bottom:10px; font-size: 13.5px; }
.footer-grid ul a:hover{ color: var(--white); }
.footer-bottom{ display:flex; justify-content:space-between; align-items:center; padding: 26px 0; font-size: 12.5px; color: rgba(255,255,255,0.4); flex-wrap:wrap; gap:12px; }
.socials{ display:flex; gap:12px; }
.socials a{ width:34px; height:34px; border:1px solid rgba(255,255,255,0.15); border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:11px; }
.socials a:hover{ border-color: var(--orange); color: var(--orange); }

/* =========================================================
   13. PAGES / ARTICLES GENERIQUES
   ========================================================= */
.page-header-band{ background:var(--navy); color:var(--white); padding: 64px 0 48px; }
.page-header-band .eyebrow{ color:var(--orange); margin-bottom:14px; }
.page-header-band h1{ font-size: clamp(34px,5vw,56px); }
.content-single{ padding: 64px 0; max-width: 760px; margin:0 auto; }
.content-single .entry-meta{ font-family:'JetBrains Mono', monospace; font-size:12px; color:var(--slate); margin-bottom:18px; text-transform:uppercase; letter-spacing:.06em; }
.content-single .entry-content{ font-size:16px; line-height:1.75; }
.content-single .entry-content h2{ text-transform:none; font-family:'Work Sans',sans-serif; font-weight:800; font-size:24px; margin-top:1.6em; }
.content-single .entry-content img{ border-radius: 4px var(--radius-arc) 4px 4px; margin: 24px 0; }
.content-single .entry-content a{ color:var(--orange); text-decoration:underline; }

.roster-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(160px,1fr)); gap:20px; padding: 0 0 64px; }
.roster-card{ background:var(--white); border:1px solid rgba(16,26,46,0.08); border-radius:4px 40px 4px 4px; padding:16px; text-align:center; }
.roster-photo{ height:120px; border-radius:3px 30px 3px 3px; background:linear-gradient(135deg,#22345c,#101A2E); margin-bottom:12px; background-size:cover; background-position:center; }
.roster-card .name{ font-weight:700; font-size:14px; }
.roster-card .role{ font-family:'JetBrains Mono', monospace; font-size:10.5px; color:var(--slate); text-transform:uppercase; letter-spacing:.06em; }

/* =========================================================
   14. RESPONSIVE
   ========================================================= */
@media (max-width: 900px){
  .nav-links{ position:fixed; top:78px; left:0; right:0; background:var(--navy); flex-direction:column; align-items:flex-start; padding:24px 32px; gap:20px; border-bottom:1px solid rgba(255,255,255,0.08); transform:translateY(-8px); opacity:0; pointer-events:none; transition:opacity .15s ease, transform .15s ease; }
  .nav-links.is-open{ opacity:1; transform:translateY(0); pointer-events:auto; }
  #primary-menu{ flex-direction:column; gap:16px; }
  .menu-toggle{ display:flex; }
  .hero-grid{ grid-template-columns: 1fr; }
  .news-grid{ grid-template-columns: 1fr 1fr; }
  .team-grid{ grid-template-columns: 1fr 1fr; }
  .footer-grid{ grid-template-columns: 1fr 1fr; }
  .results-head-row, .result-row{ grid-template-columns: 80px 1fr 1fr 70px; }
  .results-head-row span:nth-child(5), .result-row span:nth-child(5){ display:none; }
}
@media (max-width: 600px){
  .wrap{ padding: 0 20px; }
  .news-grid{ grid-template-columns: 1fr; }
  .team-grid{ grid-template-columns: 1fr; }
  .footer-grid{ grid-template-columns: 1fr 1fr; }
  .stat-strip .wrap{ justify-content:flex-start; gap: 34px; }
  .hero{ padding-top: 70px; }
  .section{ padding: 64px 0; }
}
