/*
 * Montserrat (police du site du club, licence OFL), copiée ici plutôt que chargée depuis Google Fonts, qui
 * recevrait l'adresse IP des visiteurs. Police variable : un fichier par style et par jeu de caractères, de 400 à 900.
 */
@font-face {
    font-family: "Montserrat";
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url("../fonts/montserrat-latin-ext-YvxiiXN.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Montserrat";
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url("../fonts/montserrat-latin-VBwFsq9.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Montserrat";
    font-style: italic;
    font-weight: 400 900;
    font-display: swap;
    src: url("../fonts/montserrat-italic-latin-ext-RLjs-JL.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Montserrat";
    font-style: italic;
    font-weight: 400 900;
    font-display: swap;
    src: url("../fonts/montserrat-italic-latin-r8E6632.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* le site du club fixe l'interlignage du body à 22px : un titre sur deux lignes se chevauchait */
h1, h2, h3, h4 {
    line-height: 1.2;
}

/* Ordinaux en exposant (filtre Twig « exposants ») sans écarter les lignes */
sup {
    font-size: .7em;
    line-height: 0;
    vertical-align: super;
}

/*
 * Alertes de l'admin (messages flash d'EasyAdmin compris) : fond blanc comme les cartes des pages, encadrées d'un
 * bord de la couleur de l'alerte (4 px, 10 px à gauche), angles droits ; liens, icônes et titre dans cette couleur.
 * Limité à l'admin (body.ea) : les pages du site ont leurs propres messages.
 */
body.ea .alert {
    --alerte: var(--bs-secondary);
    --alerte-texte: var(--bs-secondary-text-emphasis);
    --bs-alert-bg: var(--bs-body-bg);
    --bs-alert-color: var(--bs-body-color);
    --bs-alert-border-color: var(--alerte);
    --bs-alert-link-color: var(--alerte-texte);
    border: 4px solid var(--alerte);
    border-left-width: 10px;
    border-radius: 0;
    padding: 1rem;
    margin-bottom: 1rem;
}
body.ea .alert-primary { --alerte: var(--bs-primary); --alerte-texte: var(--bs-primary-text-emphasis); }
body.ea .alert-info { --alerte: var(--bs-info); --alerte-texte: var(--bs-info-text-emphasis); }
body.ea .alert-success { --alerte: var(--bs-success); --alerte-texte: var(--bs-success-text-emphasis); }
body.ea .alert-warning { --alerte: var(--bs-warning); --alerte-texte: var(--bs-warning-text-emphasis); }
body.ea .alert-danger,
body.ea .alert-error { --alerte: var(--bs-danger); --alerte-texte: var(--bs-danger-text-emphasis); }
body.ea .alert a:not(.btn) { color: var(--alerte-texte); font-weight: 600; }
body.ea .alert > svg, body.ea .alert .alert-icon { color: var(--alerte-texte); }
/* titre dans la couleur vive, sauf le jaune, illisible sur blanc */
body.ea .alert .alert-titre { color: var(--alerte); }
body.ea .alert-warning .alert-titre { color: var(--alerte-texte); }
body.ea .alert .alert-titre { margin: 0 0 .5rem; }
body.ea .alert ul:last-child, body.ea .alert p:last-child { margin-bottom: 0; }
/* une carte d'alerte du tableau de bord (préparation de la saison) : même liseré épais à gauche */
body.ea .card.lisere-gauche { border-width: 4px; border-left-width: 10px; border-radius: 0; }
/* messages flash placés au-dessus du titre (layout.html.twig) : sur toute la largeur de l'en-tête */
body.ea .content-header { flex-wrap: wrap; }
body.ea .content-header #flash-messages { position: static; flex: 0 0 100%; margin-top: 0; }
body.ea .content-header #flash-messages .alert:last-child { margin-bottom: 2rem; }
body.ea .alert-dismissible { padding-right: 3rem; }

/* « Voir les nouveaux grades » : un trait plus épais entre deux ceintures, un peu moins entre deux nombres de barrettes */
.nouveaux-grades-admin tr.nouveaux-grades-barrettes > td { border-top: 2px solid var(--gray-400, #adb5bd); }
.nouveaux-grades-admin tr.nouveaux-grades-ceinture > td { border-top: 3px solid var(--gray-700, #495057); }

/* ---------- Admin : poignée pour réordonner les lignes d'un tableau (contrôleur ordre) ---------- */
.ordre-poignee { cursor: grab; font-size: 1.3rem; line-height: 1; color: var(--bs-secondary, #6c757d); user-select: none; }
.ordre-poignee:active { cursor: grabbing; }
.sortable-ghost { opacity: .4; }

/* ---------- Site public : contenus (filtre Twig contenu), visionneuse, aperçu ---------- */
.contenu figure img { display: block; max-width: 100%; height: auto; }
.image-une { display: block; margin: 0 0 1rem; }
.contenu figcaption { margin-top: 6px; font-size: 14px; font-style: italic; color: var(--GRAY3, #555); }
.contenu .galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 0 0 20px; }
.contenu .galerie figure { margin: 0; }
.contenu .galerie img { width: 100%; height: 160px; object-fit: cover; }
.contenu .video { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 0 0 20px; }
.contenu .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.contenu .bloc { min-width: 0; margin: 0 0 20px; }
/* blocs placés sur une grille de 12 colonnes (spec #164) : `div.blocs` > `div.blocs-ligne` > `div.bloc`, la largeur et le
   rang sur téléphone sont dans le `style` de chaque bloc (grid-column: span N; order: R) */
.contenu .blocs { margin: 0 0 20px; }
.contenu .blocs-ligne { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.5rem; align-items: start; margin: 0 0 20px; }
.contenu .blocs-ligne:last-child { margin-bottom: 0; }
.contenu .blocs .bloc { margin: 0; }
@media (max-width: 899px) {
  .contenu .blocs { display: flex; flex-direction: column; gap: 1.5rem; }
  .contenu .blocs-ligne { display: contents; }
  .contenu .blocs .bloc-vide { display: none; }
}
/* colonnes (spec #164, section 2 bis) : `div.colonnes` > `div.colonne` (grid-column: span N) ; sous 900 px les colonnes
   disparaissent (`display: contents`) et chaque élément prend son rang `--ordre` dans la pile de la rangée */
.contenu .colonnes { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.5rem; align-items: start; margin: 0 0 20px; }
.contenu .colonne { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
.contenu .colonne > * { margin: 0; }
.contenu .colonne .blocs-ligne { margin: 0; }
@media (max-width: 899px) {
  .contenu .colonnes { display: flex; flex-direction: column; align-items: stretch; }
  .contenu .colonne, .contenu .colonne .blocs { display: contents; }
  .contenu .colonnes [style*="--ordre"] { order: var(--ordre); }
}
.contenu .bloc-absent { padding: 10px 20px; background: #f1f3f5; color: #495057; border: 2px dashed #adb5bd; font-style: italic; }
/* deux encadrés qui se suivent (aperçu) ne se touchent pas */
.contenu .bloc-absent + .bloc-absent { margin-top: .75rem; }
.apercu-bandeau { margin: 0 0 20px; padding: 10px 20px; background: #fff3cd; color: #664d03; border-left: 6px solid #ffc107; font-weight: 600; text-align: left; }
dialog.visionneuse { max-width: 96vw; max-height: 96vh; padding: 0; border: 0; background: #000; color: #fff; }
dialog.visionneuse::backdrop { background: rgba(0, 0, 0, .85); }
dialog.visionneuse img { display: block; max-width: 96vw; max-height: 86vh; margin: 0 auto; }
.visionneuse-legende { margin: 0; padding: 8px 16px; text-align: center; font-size: 14px; }
.visionneuse-fermer { position: absolute; top: 4px; right: 8px; font-size: 32px; line-height: 1; color: #fff; background: none; border: 0; cursor: pointer; }

/* lien « Modifier » à droite du titre d'un article ou d'une page, pour qui a le droit de le modifier (#163) */
.titre-contenu { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; column-gap: 1rem; }
.titre-contenu h1 { flex: 1 1 auto; }
.lien-modifier { display: inline-flex; align-items: center; flex: none; font-size: 0.85rem; color: #17253f; text-decoration: none; }
.lien-modifier svg { margin-right: 0.3rem; }
.lien-modifier:hover, .lien-modifier:focus-visible { text-decoration: underline; }
@media (max-width: 600px) {
    .titre-contenu { display: block; }
    .lien-modifier { display: inline-block; margin: -0.75rem 0 1rem; }
}
