/* ==========================================================
   GRENOBLE POKER PONTOIS
   COMPONENT — FEATURED CONTENT

   Organisation :
   1. Conteneur principal
   2. En-tête
   3. Liste des actualités
   4. Éléments
   5. Miniatures
   6. Contenu et badges
   7. Titres
   8. Descriptions
   9. Dates
   10. Responsive — tablette
   11. Responsive — mobile

   Objectifs :
   - Afficher les actualités à la une sur tous les écrans.
   - Conserver une disposition horizontale des éléments.
   - Adapter les dimensions aux petits écrans.
   - Ne masquer aucun contenu sur mobile.

   Compatible :
   - Symfony 4.4
   - CSS Flexbox

   Aucune dépendance à la grille Bootstrap.
   ========================================================== */


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

.gp-featured-content {
    width: 100%;
    min-width: 0;

    margin-bottom: 25px;
    padding: 18px;

    background-color: var(--gp-section-home-bg);
    border-radius: 4px;

    font-family: var(--gp-font-primary);
}


/* ==========================================================
   2. EN-TÊTE
   ========================================================== */

.gp-featured-header {
    display: flex;

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

    gap: 12px;

    margin-bottom: 12px;
    padding-bottom: 12px;

    border-bottom: 1px solid var(--gp-red);
}

.gp-featured-title {
    display: flex;

    align-items: center;
    gap: 12px;

    min-width: 0;
    margin: 0;

    color: var(--gp-text);

    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
}

.gp-featured-title .glyphicon {
    color: var(--gp-red);
    font-size: 25px;
}


/* ==========================================================
   3. LISTE DES ACTUALITÉS

   Les actualités sont empilées verticalement.
   Aucun élément n'est masqué selon la largeur de l'écran.
   ========================================================== */

.gp-featured-list {
    display: flex;

    flex-direction: column;

    min-width: 0;
}


/* ==========================================================
   4. ÉLÉMENTS

   Chaque actualité contient :
   - Une miniature ou une icône
   - Une catégorie
   - Un titre
   - Une description
   - Une date
   - Un lien vers le contenu complet
   ========================================================== */

.gp-featured-item {
    display: flex;

    align-items: flex-start;
    gap: 15px;

    min-width: 0;

    padding: 13px 0;

    border-bottom: 1px solid var(--gp-border);
}


/* ----------------------------------------------------------
   4.1. PREMIER ÉLÉMENT
   ---------------------------------------------------------- */

.gp-featured-item:first-child {
    padding-top: 0;
}


/* ----------------------------------------------------------
   4.2. DERNIER ÉLÉMENT
   ---------------------------------------------------------- */

.gp-featured-item:last-child {
    padding-bottom: 0;

    border-bottom: none;
}


/* ==========================================================
   5. MINIATURES
   ========================================================== */

.gp-featured-thumbnail {
    display: flex;

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

    width: 95px;
    height: 80px;

    flex: 0 0 95px;

    overflow: hidden;

    background-color: #edf2f7;
    border-radius: 6px;

    color: var(--gp-red);
    text-decoration: none;
}


/* ----------------------------------------------------------
   5.1. IMAGES
   ---------------------------------------------------------- */

.gp-featured-thumbnail img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* ----------------------------------------------------------
   5.2. ICÔNES
   ---------------------------------------------------------- */

.gp-featured-thumbnail > .glyphicon {
    font-size: 30px;
}


/* ----------------------------------------------------------
   5.3. INTERACTIONS
   ---------------------------------------------------------- */

.gp-featured-thumbnail:hover,
.gp-featured-thumbnail:focus {
    color: var(--gp-red-hover);

    text-decoration: none;
}


/* ==========================================================
   6. CONTENU ET BADGES
   ========================================================== */

.gp-featured-item-content {
    flex: 1;

    min-width: 0;
}


/* ----------------------------------------------------------
   6.1. BADGE DE CATÉGORIE
   ---------------------------------------------------------- */

.gp-featured-badge {
    display: inline-block;

    padding: 3px 8px;
    margin-bottom: 6px;

    background-color: #e9eef4;
    border-radius: 4px;

    color: #34445c;

    font-size: 10px;
    font-weight: 700;
    line-height: 1.3;
}


/* ----------------------------------------------------------
   6.2. BADGE DES ÉVÉNEMENTS
   ---------------------------------------------------------- */

.gp-featured-item--event .gp-featured-badge {
    background-color: var(--gp-red);

    color: #ffffff;
}


/* ==========================================================
   7. TITRES
   ========================================================== */

.gp-featured-item-title {
    margin: 0 0 5px;

    color: var(--gp-text);

    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;

    overflow-wrap: anywhere;
}


/* ----------------------------------------------------------
   7.1. LIENS
   ---------------------------------------------------------- */

.gp-featured-item-title a {
    color: inherit;

    text-decoration: none;
}


/* ----------------------------------------------------------
   7.2. INTERACTIONS
   ---------------------------------------------------------- */

.gp-featured-item-title a:hover,
.gp-featured-item-title a:focus {
    color: var(--gp-red);

    text-decoration: none;
}


/* ==========================================================
   8. DESCRIPTIONS

   Les descriptions restent visibles sur tous les écrans.

   Limitation visuelle à deux lignes pour conserver
   une hauteur raisonnable des éléments.
   ========================================================== */

.gp-featured-description {
    display: -webkit-box;

    margin: 0 0 5px;

    color: #64748b;

    font-size: 12px;
    line-height: 1.4;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;

    overflow: hidden;
}


/* ==========================================================
   9. DATES
   ========================================================== */

.gp-featured-date {
    display: block;

    color: #8492a6;

    font-size: 11px;
    line-height: 1.4;
}


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

   Largeur : 768px à 1199px

   Objectifs :
   - Réduire légèrement les espacements.
   - Adapter les miniatures.
   - Conserver toutes les actualités.
   ========================================================== */

@media (min-width: 768px) and (max-width: 1199px) {

    /* ------------------------------------------------------
       10.1. CONTENEUR
       ------------------------------------------------------ */

    .gp-featured-content {
        padding: 15px;
    }


    /* ------------------------------------------------------
       10.2. TITRE DE SECTION
       ------------------------------------------------------ */

    .gp-featured-title {
        font-size: 20px;
    }


    /* ------------------------------------------------------
       10.3. MINIATURES
       ------------------------------------------------------ */

    .gp-featured-thumbnail {
        width: 85px;
        height: 75px;

        flex-basis: 85px;
    }


    /* ------------------------------------------------------
       10.4. ÉLÉMENTS
       ------------------------------------------------------ */

    .gp-featured-item {
        gap: 12px;
    }

}


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

   Largeur : jusqu'à 767px

   Objectifs :
   - Afficher toutes les actualités.
   - Conserver les descriptions.
   - Réduire les miniatures et les espacements.
   - Maintenir une bonne lisibilité.

   Aucune règle display: none sur les actualités.
   ========================================================== */

@media (max-width: 767px) {

    /* ------------------------------------------------------
       11.1. CONTENEUR
       ------------------------------------------------------ */

    .gp-featured-content {
        padding: 14px;
    }


    /* ------------------------------------------------------
       11.2. TITRE DE SECTION
       ------------------------------------------------------ */

    .gp-featured-title {
        font-size: 17px;
    }

    .gp-featured-title .glyphicon {
        font-size: 20px;
    }


    /* ------------------------------------------------------
       11.3. ÉLÉMENTS
       ------------------------------------------------------ */

    .gp-featured-item {
        gap: 10px;

        padding: 12px 0;
    }


    /* ------------------------------------------------------
       11.4. MINIATURES
       ------------------------------------------------------ */

    .gp-featured-thumbnail {
        width: 75px;
        height: 65px;

        flex-basis: 75px;
    }

    .gp-featured-thumbnail > .glyphicon {
        font-size: 25px;
    }


    /* ------------------------------------------------------
       11.5. BADGES
       ------------------------------------------------------ */

    .gp-featured-badge {
        font-size: 10px;
    }


    /* ------------------------------------------------------
       11.6. TITRES
       ------------------------------------------------------ */

    .gp-featured-item-title {
        font-size: 13px;
    }


    /* ------------------------------------------------------
       11.7. DESCRIPTIONS

       Contrairement à l'ancienne version, les descriptions
       restent visibles sur mobile.
       ------------------------------------------------------ */

    .gp-featured-description {
        font-size: 12px;
        line-height: 1.4;
    }


    /* ------------------------------------------------------
       11.8. DATES
       ------------------------------------------------------ */

    .gp-featured-date {
        font-size: 11px;
    }

}
