/* =====================================================================================================================
   FSG Montreux — socle commun (site public, administration et page de connexion)
   ---------------------------------------------------------------------------------------------------------------------
   Identité « Montreux Gymnastique, since 1867 », reprise du logo : bleu marine et rouge en aplats, lettrage collège
   (Graduate), étoiles rouges. Pas de dégradé, angles nets.

   Feuilles de style du projet (chargées après Bootstrap 4) :
     base.css   ce fichier : couleurs, typographie, liens, boutons, cartes, sélection de texte ;
     site.css   le site public (chargé après base.css) ;
     admin.css  l'administration et la page de connexion (chargé après base.css).
   ===================================================================================================================== */

/* ---- Couleurs et polices ------------------------------------------------------------------------------------------ */
:root {
    --navy: #262261;        /* bleu du logo */
    --navy-dark: #1A1747;   /* pied de page, panneaux sur fond marine */
    --red: #D7141C;         /* rouge du logo, à peine plus foncé pour rester lisible avec du texte blanc */
    --red-dark: #B01017;
    --red-tint: #FBE7E8;
    --ink: #24233A;         /* texte courant */
    --muted: #5F5F70;
    --line: #DCDCE4;
    --paper: #FFFFFF;
    --paper-alt: #F4F4F6;
    --font-display: 'Graduate', 'Rockwell', serif;
    --font-text: 'Barlow', system-ui, sans-serif;
    --font-label: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;
    --ease: cubic-bezier(.2, .8, .2, 1); /* proche d'un ressort sans rebond : départ vif, arrivée douce */
    /* Sélection de texte : rouge du club ; en bleu marine sur les textes déjà rouges. */
    --selection: #D7141C;
    --selection-alt: #262261;
}

/* ---- Typographie ---------------------------------------------------------------------------------------------- */
body {
    font-family: var(--font-text);
    font-size: 1rem;
    color: var(--ink);
    background-color: var(--paper);
}
h1, .h1 { font-family: var(--font-display); font-weight: 400; letter-spacing: .01em; line-height: 1.1; }
h2, h3, h4, h5, h6, .card-title { font-family: var(--font-text); font-weight: 700; letter-spacing: -.005em; }

/* ---- Couleurs utilitaires de Bootstrap, aux couleurs du club ----------------------------------------------------- */
.bg-primary, .bg-blue { background-color: var(--navy) !important; }
.text-primary { color: var(--navy) !important; }

/* ---- Liens ------------------------------------------------------------------------------------------------------- */
a { color: var(--red); transition: color .15s ease; }
a:hover, a:focus { color: var(--red-dark); text-decoration: underline; }
a, button, .pill { -webkit-tap-highlight-color: transparent; }

/* ---- Boutons : rectangles nets, lettrage condensé ------------------------------------------------------------------ */
.btn {
    font-family: var(--font-label);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    border-radius: 3px !important;
    padding: 12px 26px;
    box-shadow: none !important;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn:hover, .btn:focus { text-decoration: none; }
.btn:focus-visible { outline: 3px solid rgba(215, 20, 28, .35); outline-offset: 2px; }

/* Bouton principal (btn-info : boutons « Enregistrer » générés par les formulaires de l'admin) */
.btn-primary, .btn-info, input[type="submit"].btn-primary {
    background-color: var(--red) !important;
    border: 2px solid var(--red) !important;
    color: #fff !important;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active,
.btn-info:hover, .btn-info:focus, .btn-info:active {
    background-color: var(--navy) !important;
    border-color: var(--navy) !important;
    color: #fff !important;
}

.btn-outline-light, .btn-outline-primary {
    background: transparent !important;
    border: 2px solid !important;
    padding: 12px 24px;
}
.btn-outline-light { border-color: rgba(255, 255, 255, .7) !important; color: #fff !important; }
.btn-outline-light:hover, .btn-outline-light:focus, .btn-outline-light:active {
    background: #fff !important; border-color: #fff !important; color: var(--navy) !important;
}
.btn-outline-primary { border-color: var(--navy) !important; color: var(--navy) !important; }
.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
    background: var(--navy) !important; color: #fff !important;
}

/* ---- Cartes ------------------------------------------------------------------------------------------------------ */
.card {
    background-color: #fff;
    border: 1px solid var(--line) !important;
    border-radius: 6px !important;
    box-shadow: none;
    overflow: hidden;
}
.bg-white { background-color: #fff; }

/* ---- Menus déroulants : lignes d'au moins 44 px, faciles à toucher --------------------------------------------------- */
.dropdown-item { min-height: 44px; display: flex; align-items: center; }

/* ---- Lien « Aller au contenu » : invisible, il apparaît au premier appui sur Tab ------------------------------------ */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 3000; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 3px; font-weight: 700; }
.skip-link:focus { top: 12px; color: #fff; }

/* ---- Icône « burger » (menu du site sur téléphone, menu de l'admin) : trois traits qui deviennent une croix -------- */
.navbar-toggler-icon-custom {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 16px;
}
.navbar-toggler-icon-custom span {
    display: block;
    height: 2px;
    width: 100%;
    background: #fff;
    transition: transform .25s ease, opacity .2s ease;
    transform-origin: center;
}
[aria-expanded="true"] > .navbar-toggler-icon-custom span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
[aria-expanded="true"] > .navbar-toggler-icon-custom span:nth-child(2) { opacity: 0; }
[aria-expanded="true"] > .navbar-toggler-icon-custom span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Sélection de texte aux couleurs du club ------------------------------------------------------------------------
   Texte rouge → surlignement bleu marine ; texte bleu marine → surlignement rouge ; sur un fond rouge → bleu marine foncé.
   selection.js lit la couleur réelle de chaque texte et pose la classe correspondante. Sans script : rouge partout. */
::selection { background: var(--selection); color: #fff; text-shadow: none; }
.sel-red::selection { background: var(--selection) !important; color: #fff !important; }
.sel-navy::selection { background: var(--selection-alt) !important; color: #fff !important; }
.sel-deep::selection { background: #262261 !important; color: #fff !important; }
.sel-light::selection { background: #6A66CC !important; color: #fff !important; } /* texte rouge sur fond marine */
