/*!
 * Charte graphique — Ligue de Football des Pays de la Loire
 * Appliquée au-dessus de app.css (système partagé avec GUW), chargée après lui.
 *
 * Source : « Charte graphique LFPL », sections 02 (typographies), 03 (couleurs)
 * et 04 (éléments graphiques).
 *
 * Aucune couleur en dur hors du bloc :root, comme dans app.css.
 */

/* ==========================================================================
   1. POLICES DE LA CHARTE — auto-hébergées
   Anton pour les titres, Heebo pour le texte. Les deux figurent au § 02 de la
   charte. Aucune requête vers Google : les fichiers sont dans public/fonts/.
   ========================================================================== */

@font-face { font-family: 'Anton'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/anton-400.woff2') format('woff2'); }
@font-face { font-family: 'Heebo'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/heebo-400.woff2') format('woff2'); }
@font-face { font-family: 'Heebo'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/heebo-700.woff2') format('woff2'); }
@font-face { font-family: 'Heebo'; font-style: normal; font-weight: 900; font-display: swap; src: url('../fonts/heebo-900.woff2') format('woff2'); }

/* ==========================================================================
   2. JETONS — les sept couleurs de la charte, § 03
   ========================================================================== */

:root {
  --lfpl-marine:      #2D427B;  /* Bleu foncé  — 9,1:1 sur blanc */
  --lfpl-bleu:        #325491;  /* Bleu        — 7,5:1 sur blanc */
  --lfpl-bleu-clair:  #416EA9;  /* Bleu        — 5,2:1, blanc dessus */
  --lfpl-bleu-vif:    #5271FF;  /* Bleu        — réservé aux accents, jamais en texte */
  --lfpl-rouge:       #D8171C;  /* Rouge       — 5,1:1 texte blanc */
  --lfpl-or:          #C19A2A;  /* Doré        — filets et bordures uniquement */
  --lfpl-noir:        #000000;
  --lfpl-blanc:       #FFFFFF;

  /* Dérivés nécessaires : le doré de la charte ne passe pas le contraste AA
     en texte sur blanc (2,9:1). Version assombrie pour les libellés. */
  --lfpl-or-encre:    #7A5F13;  /* 5,4:1 sur blanc */
  --lfpl-or-voile:    #FBF4E2;
  --lfpl-marine-voile:#EDF0F7;

  /* La feuille partagée app.css est réalignée sur la charte : tous les
     composants existants (cartes, tuiles, étiquettes) suivent sans retouche. */
  --guw-bleu:          var(--lfpl-bleu);
  --guw-bleu-survol:   var(--lfpl-bleu-clair);
  --guw-bleu-profond:  var(--lfpl-marine);
  --guw-bleu-nuit:     #1B2A4E;
  --guw-bleu-voile:    var(--lfpl-marine-voile);
  --guw-rouge:         var(--lfpl-rouge);
  --guw-rouge-survol:  #B01115;
  --guw-radius:        12px;
  --guw-radius-s:      8px;
  --guw-radius-carte:  14px;

  /* Hachures diagonales et triangle : les deux motifs récurrents du § 04. */
  --lfpl-hachures: repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, .10) 0 1px,
      transparent 1px 9px);
}

/* ==========================================================================
   3. TYPOGRAPHIE
   La charte réserve Anton aux titres. Il n'a qu'une graisse et pas de bas de
   casse dessiné pour du texte courant : capitales uniquement, et Heebo partout
   ailleurs.
   ========================================================================== */

body {
  font-family: 'Heebo', 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background-color: #F4F6FA;
  color: #172033;
}

::selection { background: var(--lfpl-bleu); color: var(--lfpl-blanc); }

h1, h2, h3, .lfpl-titre {
  font-family: 'Anton', 'Heebo', 'Barlow Condensed', sans-serif;
  font-weight: 400;
  letter-spacing: .012em;
  text-transform: uppercase;
  color: var(--lfpl-marine);
}

h1 { font-size: 2.1rem; line-height: 1.04; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

/* Surtitre : Heebo 900 très espacé, comme les mentions du § 02. */
.lfpl-surtitre {
  font-family: 'Heebo', sans-serif;
  font-weight: 900;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .17em;
}

/* ==========================================================================
   4. BANDEAU DE TITRE
   Aplat marine, hachures diagonales, amorces triangulaires en angle, et le
   filet bleu / rouge qui ferme les pages de la charte.
   ========================================================================== */

.lfpl-bandeau {
  position: relative;
  overflow: hidden;
  background: linear-gradient(115deg, var(--lfpl-marine) 0%, var(--lfpl-bleu) 62%, var(--lfpl-bleu-clair) 100%);
  color: var(--lfpl-blanc);
  padding: 30px 32px 34px;
  margin-bottom: 30px;
  border-radius: 18px;
  box-shadow: 0 18px 42px -28px rgba(16, 28, 51, .7);
}

.lfpl-bandeau::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--lfpl-hachures);
  pointer-events: none;
}

/* Filet de pied : bleu puis rouge, repris de la couverture de la charte. */
.lfpl-bandeau::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: linear-gradient(90deg,
              var(--lfpl-bleu-clair) 0 62%,
              var(--lfpl-rouge) 62% 100%);
}

/* Éclats triangulaires du § 04, posés en angle. Purement décoratifs. */
.lfpl-eclats {
  position: absolute;
  top: -18px;
  right: -10px;
  width: 260px;
  height: 150px;
  pointer-events: none;
  opacity: .9;
}

.lfpl-eclats span {
  position: absolute;
  display: block;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.lfpl-eclats span:nth-child(1) { width: 74px; height: 74px; top: 30px;  right: 96px; background: rgba(255, 255, 255, .13); transform: rotate(-14deg); }
.lfpl-eclats span:nth-child(2) { width: 48px; height: 48px; top: 74px;  right: 44px; background: var(--lfpl-rouge); opacity: .82; transform: rotate(9deg); }
.lfpl-eclats span:nth-child(3) { width: 96px; height: 96px; top: 6px;   right: 8px;  background: rgba(82, 113, 255, .30); transform: rotate(-4deg); }
.lfpl-eclats span:nth-child(4) { width: 34px; height: 34px; top: 104px; right: 138px; background: rgba(255, 255, 255, .20); transform: rotate(24deg); }

.lfpl-bandeau > .lfpl-contenu { position: relative; z-index: 1; }

.lfpl-bandeau h1 { color: var(--lfpl-blanc); margin: 4px 0 0; }
.lfpl-bandeau .lfpl-surtitre { color: rgba(255, 255, 255, .74); }
.lfpl-bandeau .lfpl-blason { height: 62px; width: auto; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .38)); }

/* Compteur : Anton, aligné sur le titre. */
.lfpl-compteur {
  font-family: 'Anton', sans-serif;
  font-size: 2.4rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--lfpl-blanc);
}
.lfpl-compteur small {
  display: block;
  font-family: 'Heebo', sans-serif;
  font-weight: 900;
  font-size: .64rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .7);
  margin-top: 4px;
}

/* ==========================================================================
   5. TRIANGLE DE SECTION
   Le « play » rouge du § 04, en marqueur devant les titres de bloc.
   ========================================================================== */

.lfpl-jalon {
  display: inline-block;
  width: 11px;
  height: 13px;
  margin-right: 10px;
  background: var(--lfpl-rouge);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  flex: none;
}

/* ==========================================================================
   6. TABLEAUX
   En-tête marine pleine, capitales espacées. Remplace le bleu pâle d'app.css.
   ========================================================================== */

.table thead th,
.guw-card .table thead th {
  background: var(--lfpl-marine);
  color: var(--lfpl-blanc);
  font-family: 'Heebo', sans-serif;
  font-weight: 900;
  font-size: .68rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  border-bottom: none;
  vertical-align: middle;
}

.table thead th a,
.table thead th .th-inner { color: var(--lfpl-blanc); }

.guw-card { border-radius: var(--guw-radius-carte); }

.guw-card-tete {
  align-items: center;
  border-bottom: 2px solid var(--lfpl-marine-voile);
}
.guw-card-tete h2 { display: flex; align-items: center; font-size: 1.05rem; }

/* ==========================================================================
   7. BOUTONS
   ========================================================================== */

.btn { border-radius: 9px; font-family: 'Heebo', sans-serif; font-weight: 700; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; }

.btn-primary { background-color: var(--lfpl-bleu); border-color: var(--lfpl-bleu); }
.btn-primary:hover, .btn-primary:focus { background-color: var(--lfpl-bleu-clair); border-color: var(--lfpl-bleu-clair); }

.btn-danger { background-color: var(--lfpl-rouge); border-color: var(--lfpl-rouge); }
.btn-danger:hover, .btn-danger:focus { background-color: #B01115; border-color: #B01115; }

/* Réinitialisation d'un mot de passe : geste exceptionnel, seul usage du doré
   de la charte dans l'interface. Le libellé prend la version assombrie, le
   doré pur reste sur la bordure — il ne passe pas AA en texte. */
.btn-lfpl-or {
  color: var(--lfpl-or-encre);
  border: 1px solid var(--lfpl-or);
  background: var(--lfpl-blanc);
}
.btn-lfpl-or:hover, .btn-lfpl-or:focus {
  background: var(--lfpl-or-voile);
  color: var(--lfpl-or-encre);
  border-color: var(--lfpl-or);
}

/* ==========================================================================
   8. BANDEAU DE MOT DE PASSE
   Le moment fort de la page : aplat marine hachuré, valeur en Anton, filet
   doré. Il doit se lire d'un coup d'œil et se dicter au téléphone.
   ========================================================================== */

.lfpl-mdp {
  position: relative;
  overflow: hidden;
  background: linear-gradient(115deg, var(--lfpl-marine), var(--lfpl-bleu));
  color: var(--lfpl-blanc);
  border: none;
  border-top: 1px solid var(--lfpl-or);
  border-radius: var(--guw-radius-carte);
  padding: 20px 24px;
  margin-bottom: 22px;
}

.lfpl-mdp::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--lfpl-hachures);
  pointer-events: none;
}

.lfpl-mdp > * { position: relative; z-index: 1; }

.lfpl-mdp .lfpl-surtitre { color: var(--lfpl-or); }
.lfpl-mdp .lfpl-pour { font-weight: 700; font-size: 1.05rem; margin: 2px 0 2px; }
.lfpl-mdp .lfpl-note { color: rgba(255, 255, 255, .78); font-size: .88rem; }

.lfpl-valeur {
  font-family: 'Anton', monospace;
  font-size: 2.15rem;
  line-height: 1;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
  color: var(--lfpl-blanc);
  background: rgba(0, 0, 0, .26);
  border: 1px solid rgba(193, 154, 42, .55);
  border-radius: 4px;
  padding: 10px 18px;
  user-select: all;
  white-space: nowrap;
}

.lfpl-mdp .btn {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .4);
  color: var(--lfpl-blanc);
}
.lfpl-mdp .btn:hover, .lfpl-mdp .btn:focus { background: rgba(255, 255, 255, .22); color: var(--lfpl-blanc); }

/* ==========================================================================
   9. FOCUS CLAVIER
   Anneau visible sur les deux fonds, y compris sur l'aplat marine.
   ========================================================================== */

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible {
  outline: 3px solid var(--lfpl-bleu-vif);
  outline-offset: 2px;
}

.lfpl-bandeau a:focus-visible,
.lfpl-mdp button:focus-visible { outline-color: var(--lfpl-blanc); }

@media (max-width: 640px) {
  .lfpl-bandeau { padding: 20px 18px 24px; }
  h1 { font-size: 1.6rem; }
  .lfpl-eclats { display: none; }
  .lfpl-valeur { font-size: 1.6rem; white-space: normal; word-break: break-all; }
}

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

/* ==========================================================================
   10. PANNEAUX DE FORMULAIRE
   Remplace le `style="color: #325491; font-weight: bolder;"` qui était répété
   dans neuf gabarits : même carte blanche que les tableaux, et des libellés
   traités comme des surtitres de la charte.
   ========================================================================== */

.lfpl-panneau {
  background: var(--lfpl-blanc);
  border: 0;
  border-radius: var(--guw-radius-carte);
  box-shadow: 0 18px 42px -32px rgba(16, 28, 51, .45);
  padding: 28px 30px 30px;
}

.lfpl-panneau label,
.lfpl-panneau .form-label {
  font-family: 'Heebo', sans-serif;
  font-weight: 700;
  font-size: .74rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--lfpl-bleu);
  margin-bottom: .3rem;
}

.lfpl-panneau h4,
.lfpl-panneau h5 { color: var(--lfpl-marine); }

/* Champs désactivés : ce sont des valeurs à lire, pas des saisies grisées. */
.lfpl-panneau input[disabled],
.lfpl-panneau .form-control[disabled] {
  background: #F7F9FD;
  color: var(--lfpl-marine);
  font-weight: 500;
  opacity: 1;
}

/* ==========================================================================
   11. TUILES D'ACCUEIL
   Les raccourcis de la page d'accueil, en aplats de la charte plutôt qu'en
   rangée de boutons bleus identiques.
   ========================================================================== */

.lfpl-tuiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: 16px;
}

.lfpl-tuile {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px;
  background: var(--lfpl-blanc);
  border: 0;
  border-radius: var(--guw-radius-carte);
  color: var(--lfpl-marine);
  text-decoration: none;
  box-shadow: 0 14px 36px -30px rgba(16, 28, 51, .55);
  transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s ease, background-color .22s ease;
}

.lfpl-tuile:hover,
.lfpl-tuile:focus-visible {
  transform: translateY(-2px);
  background: var(--lfpl-marine-voile);
  box-shadow: 0 22px 46px -30px rgba(16, 28, 51, .55);
  color: var(--lfpl-marine);
  text-decoration: none;
}

/* Le triangle de la charte, révélé au survol. */
.lfpl-tuile::after {
  content: '';
  position: absolute;
  right: 18px;
  width: 9px;
  height: 11px;
  background: var(--lfpl-rouge);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .14s ease, transform .14s ease;
}

.lfpl-tuile:hover::after,
.lfpl-tuile:focus-visible::after { opacity: 1; transform: translateX(0); }

.lfpl-tuile i {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 1.25rem;
  color: var(--lfpl-blanc);
  background: var(--lfpl-bleu);
  flex: none;
}

.lfpl-tuile b {
  display: block;
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  font-size: 1.02rem;
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: 1.15;
}

.lfpl-tuile span {
  display: block;
  font-size: .84rem;
  color: #4A5567;
  margin-top: 2px;
}


/* ==========================================================================
   12. MENU LATÉRAL
   Ces règles vivaient dans un <style> à l'intérieur de nav.html.twig, donc
   dans le <body> : elles gagnaient la cascade sur cette feuille. Remontées
   ici, conformément à la règle de maintenance d'app.css.
   ========================================================================== */

.sidebar {
  height: 100%;
  width: min(340px, calc(100vw - 24px));
  position: fixed;
  z-index: 1050;
  top: 0;
  left: 0;
  background: linear-gradient(180deg, var(--lfpl-blue-dark) 0%, var(--lfpl-blue) 100%);
  overflow: auto;
  transform: translateX(-104%);
  transition: transform .32s cubic-bezier(.2,.8,.2,1);
  padding: 76px 18px 22px;
  box-shadow: 18px 0 50px -24px rgba(8, 18, 40, .72);
}

.nav-open .sidebar { transform: translateX(0); }
.nav-open { overflow: hidden; }

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1040;
  background: rgba(10, 20, 43, .58);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.nav-open .nav-backdrop { opacity: 1; visibility: visible; }

.sidebar .menu {
  margin: 5px 0;
  padding: 12px 14px;
  text-decoration: none;
  font-size: 16px;
  font-family: 'Heebo', sans-serif;
  font-weight: 700;
  color: #dce6f7;
  display: block;
  border-radius: 10px;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}

.sidebar .menu:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.12);
  transform: translateX(2px);
}

.sidebar .menu i {
  width: 22px;
  text-align: center;
  margin-right: 6px;
}

.sidebar .closebtn {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 20px;
  color: #dce6f7;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  background: rgba(255,255,255,.08);
  text-align: center;
}

.sidebar .closebtn:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

.sidebar-brand {
  text-decoration: none;
  display: block;
  padding: 0 10px 22px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar-brand img {
  max-height: 76px;
  border-radius: 12px;
}

.sidebar-brand .role {
  color: #a9c2e8;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 6px;
}

.sidebar-brand .name {
  color: #ffffff;
  font-weight: 600;
  word-wrap: break-word;
}

.openbtn {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 1030;
  font-size: 22px;
  cursor: pointer;
  background-color: var(--lfpl-blue);
  color: white;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(34, 61, 110, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.openbtn:hover {
  background-color: var(--lfpl-blue-light);
  transform: translateY(-1px);
}

/* On smaller screens, where height is less than 450px, change the style of the sidenav (less padding and a smaller font size) */
@media screen and (max-height: 450px) {
  .sidebar {padding-top: 15px;}
  .sidebar a {font-size: 18px;}
}

.btn-menu {
  background-color: rgba(255, 255, 255, 0.08);
}

.sidebar-footer { margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.14); }
.sidebar-logout { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; border-radius: 10px; color: var(--lfpl-blanc); background: var(--lfpl-rouge); text-decoration: none; font-weight: 700; }
.sidebar-logout:hover { color: var(--lfpl-blanc); background: #B01115; }

@media (max-width: 640px) {
  main.container { padding-top: 5rem !important; }
  .lfpl-bandeau { padding: 24px 20px 28px; border-radius: 14px; }
  .lfpl-tuiles { grid-template-columns: 1fr; }
  .lfpl-panneau { padding: 22px 18px; }
}
