/* Charte du Budo Club d'Asnières – s'appuie sur les variables Bootstrap 5 */
:root {
  --club-yellow: #ffcc00;
  --club-black: #000;
  --club-red: #f00;
}

/* ---- En-tête ----
   Mobile : logo + titre sur une ligne, menu pleine largeur en dessous.
   Desktop : logo compact à gauche, titre puis menu empilés à droite, collés en haut. */
.site-header {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "logo title" "nav nav";
  align-items: center;
  gap: .5rem 1rem;
}
.site-logo { grid-area: logo; display: block; line-height: 0; }
.site-logo img { width: 72px; height: auto; }
.site-heading { grid-area: title; line-height: 1.1; }
.site-header .site-nav { grid-area: nav; }
@media (min-width: 768px) {
  .site-header { grid-template-areas: "logo title" "logo nav"; grid-template-rows: auto 1fr; align-items: start; gap: .35rem 1.25rem; }
  .site-logo img { width: 130px; }
}

.site-title {
  font-family: "Times New Roman", Times, serif;
  font-weight: 700;
  font-size: calc(1.15rem + 1.2vw);
  color: var(--club-black);
  text-decoration: none;
}
.site-title span { color: var(--club-red); }
@media (min-width: 1200px) { .site-title { font-size: 2.1rem; } }

.site-nav { background: var(--club-black); border-radius: var(--bs-border-radius); padding: .25rem .5rem; }
.site-nav .navbar-brand { color: var(--club-yellow); font-weight: 700; }
.site-nav .nav-link {
  color: var(--club-yellow);
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: .5rem 1rem;
  border-radius: var(--bs-border-radius);
}
.site-nav .nav-link:hover { color: #fff; }
.site-nav .nav-link.active { background: var(--club-yellow); color: var(--club-black); }

/* ---- Titres et bandeaux ---- */
.page-title {
  background: var(--club-yellow);
  border: 1px solid var(--club-black);
  border-radius: var(--bs-border-radius);
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  padding: 1rem .5rem;
  margin-bottom: 1.5rem;
}
.box-yellow {
  background: var(--club-yellow);
  border-radius: var(--bs-border-radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
}
/* Encadré « Informations / Actualités » de la page d'accueil : titre + contenu réunis, plus discret */
.news-box {
  background: #fffbe6;
  border: 1px solid var(--club-yellow);
  border-left: 5px solid var(--club-yellow);
  border-radius: var(--bs-border-radius);
  padding: .75rem 1.25rem;
  margin-bottom: 1.5rem;
}
.news-title {
  font-size: .9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--bs-secondary-color);
  margin-bottom: .4rem;
}
.news-box ul { padding-left: 1.2rem; }
.news-box li { font-weight: 600; }
.section-title { font-size: 1.75rem; font-weight: 700; color: var(--bs-danger); margin: 1.5rem 0 1rem; }
.subsection-title { font-size: 1.25rem; font-weight: 700; margin-top: 1.5rem; }
.highlight { font-weight: 700; color: var(--bs-danger); }
.social-text { font-weight: 700; font-style: italic; color: var(--bs-warning-text-emphasis); }

/* ---- Navigation secondaire et boutons ---- */
.subnav .nav-link { background: var(--club-black); color: var(--club-yellow); font-weight: 700; }
.subnav .nav-link.active { background: var(--club-yellow); color: var(--club-black); }
.btn-site { background: var(--club-black); color: var(--club-yellow); font-weight: 700; }
.btn-site:hover { background: #222; color: #fff; }

/* ---- Images ---- */
.photo { max-width: 100%; height: auto; border-radius: var(--bs-border-radius); }
.photo-shadow { box-shadow: var(--bs-box-shadow); }
.photo-full { width: 100%; }
.caption { font-size: .875rem; font-style: italic; margin-top: .5rem; }

/* ---- Cartes ---- */
.head-dark { background: var(--club-black); color: var(--club-yellow); font-weight: 700; }
.head-yellow { background: var(--club-yellow); font-weight: 700; }
.card-dark { border-color: var(--club-black); }
.card-yellow { border-color: var(--club-yellow); }
.article { scroll-margin-top: 1rem; }
.video { max-width: 720px; margin: 0 auto; }
/* Aperçu de vidéo YouTube (le lecteur se charge au clic) */
.yt-lite { display: block; background: #000; border-radius: var(--bs-border-radius); overflow: hidden; cursor: pointer; }
.yt-lite img { object-fit: cover; opacity: .9; transition: opacity .2s; }
.yt-lite:hover img, .yt-lite:focus-visible img { opacity: 1; }
.yt-lite > .yt-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 68px; height: 48px; border-radius: 12px; background: rgba(0, 0, 0, .75);
  transition: background .2s;
}
.yt-play::after {
  content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-35%, -50%);
  border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff;
}
.yt-lite:hover .yt-play, .yt-lite:focus-visible .yt-play { background: #f00; }
.video .ratio { border-radius: var(--bs-border-radius); overflow: hidden; }
.cancelled { color: var(--bs-danger); }

/* ---- Actualités : articles + galerie ----
   Structure d'un article (voir le mode d'emploi en tête de actualites.htm) :
   <article class="news-card"> <header><h2>…</h2><p class="date">…</p></header>
     <div class="news-card-body"> <div class="text">…</div> <div class="gallery">…</div> </div> </article> */
.news-card {
  background: #fff;
  border: 1px solid var(--bs-border-color);
  border-top: 4px solid var(--club-yellow);
  border-radius: var(--bs-border-radius);
  box-shadow: var(--bs-box-shadow-sm);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  scroll-margin-top: 1rem;
}
.news-card > header, .news-card-head { border-bottom: 1px solid var(--bs-border-color); padding-bottom: .6rem; margin-bottom: 1rem; }
.news-card > header h2, .news-card-title { font-size: 1.3rem; font-weight: 700; margin: 0; }
.news-card .date, .news-card-date { font-size: .875rem; color: var(--bs-secondary-color); margin: .2rem 0 0; }
.news-card .text > :last-child, .news-card-text > :last-child { margin-bottom: 0; }
/* Texte à gauche (7/12), photos à droite (5/12) sur grand écran ; l'un sous l'autre sur mobile */
.news-card-body { display: grid; gap: 1.5rem; }
@media (min-width: 992px) {
  .news-card-body { grid-template-columns: 7fr 5fr; }
  .news-card-body > :only-child { grid-column: 1 / -1; }
}

/* Miniatures toutes au même format (4:3) sur 2 colonnes ; si le nombre est impair, la 1re prend toute la largeur */
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; align-items: start; }
.gallery figure { margin: 0; }
.gallery > :first-child:nth-last-child(odd) { grid-column: 1 / -1; }
.gallery a { display: block; overflow: hidden; border-radius: var(--bs-border-radius); cursor: zoom-in; background: var(--bs-tertiary-bg); }
.gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 30%; transition: transform .25s ease; }
.gallery a:hover img, .gallery a:focus-visible img { transform: scale(1.04); }
.gallery a:focus-visible { outline: 3px solid var(--club-yellow); outline-offset: 2px; }
.gallery figcaption { margin-top: .3rem; font-size: .8rem; font-style: italic; line-height: 1.3; }
/* Variante 3 colonnes (2 sur mobile), sans élargissement de la 1re miniature */
.gallery-3 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .gallery-3 { grid-template-columns: repeat(3, 1fr); } }
.gallery-3 > :first-child:nth-last-child(odd) { grid-column: auto; }

/* ---- Portraits de kenshi ---- */
.kenshi-card { padding: 1rem 1.25rem; font-size: .9rem; margin-bottom: 0; }
.news-card > .kenshi-head { display: flex; align-items: center; gap: 1rem; border-bottom: 1px solid var(--bs-border-color); padding-bottom: .75rem; margin-bottom: .75rem; }
.kenshi-photos { grid-template-columns: repeat(2, 64px); gap: .4rem; flex-shrink: 0; }
.kenshi-photos img { aspect-ratio: 3 / 4; object-position: center 20%; }
.kenshi-card .news-card-title { font-size: 1.15rem; }
.kenshi-grade { color: var(--bs-danger); font-weight: 700; margin: .1rem 0 0; }
.kenshi-infos { list-style: none; padding: 0; margin: 0; }
.kenshi-infos li { margin-bottom: .25rem; }
.kenshi-quote {
  margin: .75rem 0 0; padding: .4rem .75rem;
  border-left: 3px solid var(--club-yellow); background: #fffbe6;
  font-style: italic; font-size: .875rem;
}

/* ---- Stages : cartes compactes regroupées par saison ---- */
.season-title {
  font-size: .95rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--bs-secondary-color);
  border-bottom: 2px solid var(--club-yellow);
  padding-bottom: .3rem; margin: 1.5rem 0 1rem;
}
.stage-card { padding: 1rem 1.25rem; font-size: .925rem; margin-bottom: 0; }
.stage-card .news-card-head { margin-bottom: .6rem; padding-bottom: .5rem; }
.stage-card .news-card-title { font-size: 1.1rem; }
.stage-card.is-cancelled { border-top-color: var(--bs-border-color); background: var(--bs-tertiary-bg); }
.stage-card .cancelled { font-size: .875rem; margin-top: .4rem; }
.news-card-link { margin-top: .6rem; font-size: .875rem; font-weight: 600; }
.news-card-link a { text-decoration: none; }
.news-card-link a:hover { text-decoration: underline; }

/* Popup d'agrandissement des photos */
.lb-content { background: #111; color: #fff; border: 0; }
.lb-img { max-width: 100%; max-height: 78vh; object-fit: contain; }
.lb-count { color: #bbb; }
.lb-cap { font-size: .9rem; font-style: italic; text-align: center; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 2rem; line-height: 1;
}
.lb-nav:hover, .lb-nav:focus-visible { background: var(--club-yellow); color: var(--club-black); }
.lb-prev { left: .75rem; }
.lb-next { right: .75rem; }

/* ---- Pied de page ---- */
.site-footer { text-align: center; font-size: .875rem; color: var(--bs-secondary-color); padding: 1.5rem 0; border-top: 1px solid var(--bs-border-color); }
