/* ==========================================================
   GRENOBLE POKER PONTOIS
   COMPOSANT : HERO

   Objectif :
   - Présenter l'association dès l'arrivée sur le site.
   - Mettre en avant les activités du club.
   - Proposer des actions de navigation claires.
   - Garantir un affichage responsive et accessible.

   Organisation :
   1. Conteneur principal
   2. Overlay
   3. Conteneur interne
   4. Contenu
   5. Accroche
   6. Titre principal
   7. Sous-titre
   8. Points forts
   9. Boutons d'action
   10. Responsive tablette
   11. Responsive mobile
   12. Responsive petits écrans
   13. Accessibilité

   Dépendances :
   - Variables CSS globales --gp-*
   - Bootstrap 3 (Glyphicons)
   ========================================================== */


/* ==========================================================
   1. CONTENEUR PRINCIPAL

   Le hero occupe toute la largeur disponible.

   L'image de fond est recouverte par un dégradé sombre
   afin de garantir la lisibilité du texte.
   ========================================================== */

.gp-hero {

    /* Variables locales du composant */

    --hero-red: var(--gp-red);
    --hero-white: #ffffff;

    /* Positionnement */

    position: relative;

    width: 100%;
    min-height: 340px;

    /* Alignement vertical du contenu */

    display: flex;
    align-items: center;

    /* Empêche les débordements visuels */

    overflow: hidden;

    /* Image de fond */

    background-color: #080b10;

    background-image: url("../../images/hero/hero-background.webp");

    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;

    /* Typographie */

    color: var(--hero-white);
    font-family: var(--gp-font-primary);
}


/* ==========================================================
   2. OVERLAY

   Dégradé sombre placé au-dessus de l'image.

   La partie gauche est davantage assombrie pour
   améliorer le contraste avec le texte.

   pointer-events: none permet de ne pas intercepter
   les interactions avec les éléments du hero.
   ========================================================== */

.gp-hero-overlay {

    position: absolute;
    inset: 0;

    z-index: 0;

    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.76) 0%,
        rgba(0, 0, 0, 0.52) 42%,
        rgba(0, 0, 0, 0.08) 75%,
        rgba(0, 0, 0, 0.12) 100%
    );

    pointer-events: none;
}


/* ==========================================================
   3. CONTENEUR INTERNE

   Définit la largeur maximale et les marges internes
   du contenu du hero.
   ========================================================== */

.gp-hero-container {

    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 1440px;

    padding: 32px 45px 35px;
}


/* ==========================================================
   4. CONTENU

   Regroupe :
   - L'accroche
   - Le titre principal
   - Le sous-titre
   - Les points forts
   - Les boutons d'action
   ========================================================== */

.gp-hero-content {

    position: relative;
    z-index: 2;

    max-width: 1050px;
}


/* ==========================================================
   5. ACCROCHE

   Petit texte situé au-dessus du titre principal.
   ========================================================== */

.gp-hero-eyebrow {

    margin: 0 0 8px;

    color: var(--hero-red);

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 2.5px;
}

.gp-hero-eyebrow span {
    padding: 0 4px;
}


/* ==========================================================
   6. TITRE PRINCIPAL

   Le titre est responsive grâce à clamp().

   Les éléments <span> permettent de mettre en évidence
   certaines parties du titre avec la couleur du club.
   ========================================================== */

.gp-hero-title {

    margin: 0;

    color: var(--hero-white);

    font-size: clamp(36px, 4.1vw, 58px);
    font-weight: 800;

    line-height: 1.1;
    letter-spacing: -1.5px;
}

.gp-hero-title span {
    color: var(--hero-red);
}


/* ==========================================================
   7. SOUS-TITRE

   Texte de présentation situé sous le titre principal.
   ========================================================== */

.gp-hero-subtitle {

    margin: 3px 0 24px;

    color: var(--hero-white);

    font-size: clamp(15px, 1.7vw, 21px);
    font-weight: 500;

    line-height: 1.4;
}


/* ==========================================================
   8. POINTS FORTS

   Présentation des principales activités du club.

   Les éléments sont affichés horizontalement sur
   ordinateur et verticalement sur mobile.
   ========================================================== */


/* ----------------------------------------------------------
   8.1. Liste des points forts
   ---------------------------------------------------------- */

.gp-hero-features {

    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 20px;

    margin-bottom: 25px;
}


/* ----------------------------------------------------------
   8.2. Élément individuel

   Chaque point fort est un lien cliquable.

   Flexbox permet d'aligner verticalement l'icône
   et le texte associé.
   ---------------------------------------------------------- */

.gp-hero-feature {

    display: flex;
    align-items: center;

    gap: 10px;

    color: var(--hero-white);

    font-size: 12px;
    font-weight: 500;

    line-height: 1.35;

    text-decoration: none;

    cursor: pointer;

    transition: color 0.2s ease;
}


/* ----------------------------------------------------------
   8.3. Survol
   ---------------------------------------------------------- */

.gp-hero-feature:hover {

    color: var(--hero-red);

    text-decoration: none;
}


/* ----------------------------------------------------------
   8.4. Navigation au clavier
   ---------------------------------------------------------- */

.gp-hero-feature:focus-visible {

    color: var(--hero-red);

    outline: 2px solid var(--hero-red);
    outline-offset: 5px;

    text-decoration: none;
}


/* ----------------------------------------------------------
   8.5. Icônes des points forts

   Bootstrap 3 applique top: 1px aux Glyphicons.

   Nous annulons ce décalage pour obtenir un alignement
   vertical cohérent avec le texte.

   flex-shrink: 0 empêche la réduction des icônes.
   ---------------------------------------------------------- */

.gp-hero-feature .glyphicon {

    position: relative;
    top: 0;

    flex-shrink: 0;

    color: var(--hero-red);

    font-size: 25px;
    line-height: 1;

    transition: transform 0.2s ease;
}


/* ----------------------------------------------------------
   8.6. Animation des icônes au survol
   ---------------------------------------------------------- */

.gp-hero-feature:hover .glyphicon {
    transform: translateY(-3px);
}


/* ----------------------------------------------------------
   8.7. Séparateurs entre les points forts

   Les séparateurs ne sont pas affichés sur mobile.
   ---------------------------------------------------------- */

.gp-hero-feature:not(:last-child) {

    padding-right: 17px;

    border-right: 1px solid rgba(255, 255, 255, 0.25);
}


/* ==========================================================
   9. BOUTONS D'ACTION

   Deux variantes :
   - Bouton principal rouge
   - Bouton secondaire transparent

   Les boutons utilisent Flexbox pour aligner
   horizontalement le texte et les icônes.
   ========================================================== */


/* ----------------------------------------------------------
   9.1. Conteneur des boutons
   ---------------------------------------------------------- */

.gp-hero-actions {

    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 15px;
}


/* ----------------------------------------------------------
   9.2. Style commun des boutons

   inline-flex permet de conserver le comportement
   d'un élément inline tout en utilisant Flexbox.

   align-items: center centre verticalement le contenu.
   ---------------------------------------------------------- */

.gp-hero-btn {

    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 10px;

    min-height: 46px;

    padding: 12px 22px;

    border: 2px solid transparent;
    border-radius: 6px;

    color: var(--hero-white);

    font-size: 14px;
    font-weight: 700;

    text-decoration: none;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}


/* ----------------------------------------------------------
   9.3. Alignement des icônes dans les boutons

   Correction du décalage vertical de Bootstrap 3.

   top: 0 :
   - Annule le décalage de 1px des Glyphicons.

   line-height: 1 :
   - Stabilise la hauteur de l'icône.

   flex-shrink: 0 :
   - Empêche l'icône de se comprimer.
   ---------------------------------------------------------- */

.gp-hero-btn .glyphicon {

    position: relative;
    top: 0;

    flex-shrink: 0;

    line-height: 1;
}

/* ----------------------------------------------------------
   Alignement optique de l'icône du bouton secondaire

   Le Glyphicon représentant un utilisateur paraît
   légèrement plus bas que le texte.

   On remonte uniquement cette icône de 2px, sans
   modifier l'alignement des autres boutons.
   ---------------------------------------------------------- */

.gp-hero-btn-secondary .glyphicon {
    transform: translateY(-2px);
}



/* ----------------------------------------------------------
   9.4. Survol et focus

   Les boutons remontent légèrement au survol.
   ---------------------------------------------------------- */

.gp-hero-btn:hover,
.gp-hero-btn:focus {

    color: var(--hero-white);

    text-decoration: none;

    transform: translateY(-4px);
}


/* ----------------------------------------------------------
   9.5. Indicateur de focus clavier
   ---------------------------------------------------------- */

.gp-hero-btn:focus-visible {

    outline: 2px solid var(--hero-white);
    outline-offset: 3px;
}


/* ----------------------------------------------------------
   9.6. Bouton principal

   Fond rouge correspondant à l'identité visuelle du club.
   ---------------------------------------------------------- */

.gp-hero-btn-primary {

    background-color: var(--hero-red);
    border-color: var(--hero-red);
}

.gp-hero-btn-primary:hover,
.gp-hero-btn-primary:focus {

    background-color: #c90026;
    border-color: #c90026;
}


/* ----------------------------------------------------------
   9.7. Bouton secondaire

   Fond transparent avec bordure blanche.
   ---------------------------------------------------------- */

.gp-hero-btn-secondary {

    background-color: rgba(0, 0, 0, 0.3);

    border-color: rgba(255, 255, 255, 0.85);
}

.gp-hero-btn-secondary:hover,
.gp-hero-btn-secondary:focus {

    background-color: rgba(255, 255, 255, 0.12);

    border-color: var(--hero-white);
}


/* ==========================================================
   10. RESPONSIVE — TABLETTE

   Écrans de largeur inférieure ou égale à 991px.

   Ajustements :
   - Hauteur du hero
   - Position de l'image
   - Espacements
   - Typographie
   ========================================================== */

@media (max-width: 991px) {

    .gp-hero {

        min-height: 370px;

        background-position: 60% center;
    }

    .gp-hero-container {
        padding: 35px 25px;
    }

    .gp-hero-title {
        font-size: 40px;
    }

    .gp-hero-content {
        max-width: 680px;
    }

    .gp-hero-features {
        gap: 14px;
    }

    .gp-hero-feature {
        font-size: 11px;
    }
}


/* ==========================================================
   11. RESPONSIVE — MOBILE

   Écrans de largeur inférieure ou égale à 767px.

   Ajustements :
   - Image de fond
   - Overlay plus sombre
   - Taille des textes
   - Points forts empilés
   - Espacement des boutons
   ========================================================== */

@media (max-width: 767px) {

    /* ------------------------------------------------------
       Hero
       ------------------------------------------------------ */

    .gp-hero {

        min-height: auto;

        background-position: 65% center;
    }


    /* ------------------------------------------------------
       Overlay

       Renforcement du contraste sur mobile.
       ------------------------------------------------------ */

    .gp-hero-overlay {

        background: linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.88),
            rgba(0, 0, 0, 0.65)
        );
    }


    /* ------------------------------------------------------
       Conteneur
       ------------------------------------------------------ */

    .gp-hero-container {
        padding: 45px 20px;
    }


    /* ------------------------------------------------------
       Accroche
       ------------------------------------------------------ */

    .gp-hero-eyebrow {

        font-size: 10px;

        letter-spacing: 1.5px;
    }


    /* ------------------------------------------------------
       Titre
       ------------------------------------------------------ */

    .gp-hero-title {

        font-size: clamp(30px, 7vw, 40px);

        letter-spacing: -0.5px;
    }


    /* ------------------------------------------------------
       Sous-titre
       ------------------------------------------------------ */

    .gp-hero-subtitle {

        margin: 12px 0 25px;

        font-size: 16px;
    }


    /* ------------------------------------------------------
       Points forts

       Passage d'une disposition horizontale à une
       disposition verticale.
       ------------------------------------------------------ */

    .gp-hero-features {

        display: grid;

        grid-template-columns: 1fr;

        gap: 15px;

        margin-bottom: 28px;
    }


    /* ------------------------------------------------------
       Liens des points forts

       Suppression des séparateurs sur mobile.
       ------------------------------------------------------ */

    .gp-hero-feature {

        padding: 0 !important;

        border: none !important;

        font-size: 11px;
    }


    /* ------------------------------------------------------
       Icônes des points forts
       ------------------------------------------------------ */

    .gp-hero-feature .glyphicon {
        font-size: 22px;
    }


    /* ------------------------------------------------------
       Conteneur des boutons
       ------------------------------------------------------ */

    .gp-hero-actions {
        gap: 12px;
    }


    /* ------------------------------------------------------
       Boutons
       ------------------------------------------------------ */

    .gp-hero-btn {

        font-size: 13px;

        padding: 12px 16px;
    }
}


/* ==========================================================
   12. RESPONSIVE — PETITS ÉCRANS

   Écrans de largeur inférieure ou égale à 480px.

   Les boutons sont empilés verticalement et occupent
   toute la largeur disponible.
   ========================================================== */

@media (max-width: 480px) {

    .gp-hero-actions {

        flex-direction: column;

        align-items: stretch;
    }

    .gp-hero-btn {
        width: 100%;
    }
}


/* ==========================================================
   13. ACCESSIBILITÉ — RÉDUCTION DES ANIMATIONS

   Respect de la préférence système :
   prefers-reduced-motion: reduce

   Les animations et déplacements au survol sont
   désactivés pour les utilisateurs concernés.
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

    /* Désactivation des transitions */

    .gp-hero-btn,
    .gp-hero-feature,
    .gp-hero-feature .glyphicon {
        transition: none;
    }


    /* Désactivation des déplacements */

    .gp-hero-btn:hover,
    .gp-hero-btn:focus,
    .gp-hero-feature:hover .glyphicon {
        transform: none;
    }
}
