/* Mise en page commune. Les couleurs viennent de /theme.css (paramètres du club). */

/* Lien d'évitement : invisible jusqu'à ce qu'il reçoive le focus clavier. */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 1080;
  padding: .5rem 1rem;
  background: var(--pfc-accent);
  color: var(--pfc-accent-text);
  font-weight: 600;
  border-radius: 0 0 .375rem .375rem;
}
.skip-link:focus { top: 0; }

main:focus { outline: none; }

/* Focus clavier toujours visible. */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.form-control:focus-visible {
  outline: 3px solid var(--pfc-accent);
  outline-offset: 2px;
}

/* Sans JavaScript, le menu replié ne pourrait pas s'ouvrir : on l'affiche déplié. */
.no-js .navbar-collapse { display: block !important; }
.no-js .navbar-toggler { display: none; }

.navbar-club .nav-link.active { font-weight: 600; }
.navbar-club .btn-link.nav-link { text-decoration: none; }
.navbar-club form { margin: 0; }
.brand-logo { object-fit: contain; }

/* Bouton clair/sombre : n'affiche que l'icône du mode vers lequel on bascule. */
[data-bs-theme="light"] .theme-icon-light,
[data-bs-theme="dark"] .theme-icon-dark { display: none; }

.site-footer {
  background-color: var(--pfc-primary);
  color: var(--pfc-primary-text);
}
.site-footer a { color: var(--pfc-accent-on-primary); }
.site-footer hr { border-color: currentColor; opacity: .25; }
.social-links a { text-decoration: none; }

/* Pages d'authentification et formulaires simples. */
.auth-card { max-width: 32rem; }

/* Pages d'erreur. */
.error-code {
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 800;
  line-height: 1;
  color: var(--pfc-link);
}

/* Accueil : bannières. Dégradé sombre sous le texte, lisible quelle que soit la photo. */
.hero-image { height: clamp(18rem, 55vh, 35rem); object-fit: cover; }
.hero-caption {
  left: 0;
  right: 0;
  bottom: 0;
  padding: 4rem 10% 3rem;
  color: #FFFFFF;
  background: linear-gradient(to top, rgba(0, 0, 0, .8), rgba(0, 0, 0, 0));
}
.hero-caption .lead { color: #FFFFFF; }

/* height: auto : sinon l'attribut height de <img> fixe une hauteur en pixels, la proportion
   est ignorée et l'image est rognée sur les côtés dans les cartes étroites. */
.article-cover { aspect-ratio: 16 / 9; object-fit: cover; height: auto; }
.club-logo, .trophy-image { object-fit: contain; }
.player-thumb, .person-photo { object-fit: cover; }
.partner-logos img { max-width: 10rem; object-fit: contain; }
.card-link-club { color: inherit; transition: transform .15s ease-in-out; }
.card-link-club:hover, .card-link-club:focus-visible { transform: translateY(-2px); }
.page-article { max-width: 48rem; }
.key-figures dt { color: var(--bs-secondary-color); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Matchs et classements. */
.match-row-date { min-width: 11rem; }
.match-minute { min-width: 3rem; }
.lineup-number { display: inline-block; min-width: 1.75rem; }
.match-team { max-width: 12rem; }
.player-card-photo { aspect-ratio: 1; object-fit: cover; height: auto; }
.player-placeholder { aspect-ratio: 3 / 4; background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); }
.card-yellow, .card-second_yellow { color: #E0A800; }
.card-red { color: #C1121F; }
/* Actualités et médias. */
.article-body { font-size: 1.0625rem; line-height: 1.7; }
.article-body h2 { font-size: 1.5rem; margin-top: 2rem; }
.article-body h3 { font-size: 1.25rem; margin-top: 1.5rem; }
.article-body blockquote { border-left: 4px solid var(--pfc-accent); padding-left: 1rem; font-style: italic; }
.video-placeholder { aspect-ratio: 16 / 9; background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); }
.photo-grid img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; height: auto; }
.lightbox-image { max-height: 80vh; }
.workflow-row { gap: .5rem; flex-wrap: wrap; align-items: center; }

/* Forme : couleurs avec contraste suffisant pour le texte blanc ou noir. */
.form-V { background-color: #146C43; color: #FFFFFF; }
.form-N { background-color: #6C757D; color: #FFFFFF; }
.form-D { background-color: #B02A37; color: #FFFFFF; }

/* --- Tableau de bord (/gestion/) ------------------------------------------------ */
.dashboard-section { margin-bottom: 2.5rem; }
.kpi .kpi-label { font-size: 0.875rem; color: var(--bs-secondary-color); }
.kpi .kpi-value { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.kpi-warning { border-left: 4px solid var(--bs-warning); }
.chart-box { position: relative; height: 18rem; }
.chart-box-square { height: 14rem; }
.legend-dot { display: inline-block; width: 0.75rem; height: 0.75rem; border-radius: 50%; margin-right: 0.4rem; vertical-align: middle; }
.legend-1 { background-color: var(--pfc-link); }
.legend-2 { background-color: var(--pfc-accent); }
.col-fill { min-width: 9rem; }
.fill-meter { width: 100%; height: 0.75rem; }
.score-input { max-width: 5rem; text-align: center; font-weight: 700; }
[data-bs-theme="dark"] .legend-2 { background-color: var(--pfc-light); }
