/* =====================================================================
   TECHINTERLAB – Page d'accueil (index.tpl)
   Sections dans l'ordre de la page : image de titre (sa hauteur sur
   l'accueil), Nos produits, bandeau Resah, nouveautés, présentation de
   la société, promotions. Les événements sont sur la page Actualités
   (5-pages.css).
   Les styles qui étaient écrits dans index.tpl (bloc <style> et attributs
   style="…") sont désormais ici. Les identifiants des sections (#news,
   #promotion…) suffisent à départager les règles : plus de « #page »
   devant les sélecteurs. Chaque « !important » restant est commenté : il bat
   une règle elle-même !important, nommée dans le commentaire.
   ===================================================================== */


/* ---------------------------------------------------------------------
   ACCUEIL, REPRIS DU THÈME D'ORIGINE
   Mise en page de départ des sections de l'accueil.
   Les sections suivantes l'adaptent au nouveau design : à force égale,
   elles l'emportent.
   --------------------------------------------------------------------- */

.promotion-entry {
    box-shadow: 4px 4px 8px rgba(var(--encre-rgb), 0.26);
    background: var(--fond-doux);
}

.promotion-entry .promotion-img {
    height: 250px;
    display: block;
    position: relative;
    background-size: cover;
    box-shadow: inset 0px -20px 26px -30px var(--encre);
}

.promotion-entry .promotion-img .meta {
    line-height: 1.4;
    text-transform: uppercase;
    position: absolute;
    top: 0;
    left: 1em;
    text-align: center;
}

.promotion-entry .promotion-img .meta span {
    display: block;
    font-weight: 700;
}

.promotion-entry .promotion-img .meta .date-1 {
    font-size: var(--taille-24);
    position: relative;
    padding: 5px 10px;
    color: var(--blanc);
    background: linear-gradient(45deg, var(--bleu) 0%, var(--violet) 100%);
}

.promotion-entry .promotion-img .meta .date-2 {
    font-size: var(--taille-15);
    font-weight: 500;
    padding: 5px 10px;
    color: var(--texte);
    background: var(--blanc);
}

@media screen and (max-width: 768px) {
    .promotion-entry .promotion-img {
        height: 400px;
    }
}

@media screen and (max-width: 480px) {
    .promotion-entry .promotion-img {
        height: 270px;
    }
}

.promotion-entry .desc {
    padding: 1.0em;
    margin-bottom: 20px;
    position: relative;
}

.promotion-entry .desc h2 {
    font-size: 1.3em;
}

.promotion-entry .desc h2 a {
    color: var(--noir);
}

#presentation-intro {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    height: 100%;
    width: 100%;
    background-size: cover;
    background-blend-mode: darken;
}

#modalite {
    height: 100%;
    color: black;
    width: 100%;
}

.anim_slide_bottom1 {
    animation: slide-bottom 0.6s forwards 1;
}

.anim_slide_bottom2 {
    animation: slide-bottom 1s forwards 1;
}

.anim_slide_bottom3 {
    animation: slide-bottom 1.4s forwards 1;
}

@keyframes slide-bottom {
    0% { opacity: 0; transform: translateY(50px); }
    100% { opacity: 100%; transform: translateY(0); }
}


/* ---------------------------------------------------------------------
   IMAGE DE TITRE DE L'ACCUEIL (body.page-accueil, base.layout.tpl)
   Sa hauteur s'adapte à l'écran : elle prend ce qui reste du premier
   écran une fois gardée la place des catégories, pour que celles-ci
   soient visibles dès l'arrivée, sans se poser sur la photo.
   --------------------------------------------------------------------- */

:root {
    --accueil-bandeau: 78px;          /* hauteur du menu */
    --accueil-place-produits: 452px;  /* place gardée sous l'image pour les catégories */
    --accueil-titre-min: 200px;       /* hauteur de l'image : jamais moins… */
    --accueil-titre-max: 520px;       /* …ni plus */
}

.page-accueil #slider .flexslider .slides li,
.page-accueil #slider .flexslider .slider-text {
    min-height: 0;
    height: clamp(var(--accueil-titre-min), calc(100vh - var(--accueil-bandeau) - var(--accueil-place-produits)), var(--accueil-titre-max));
    /* svh : hauteur d'écran sans les barres du navigateur mobile (navigateurs récents) */
    height: clamp(var(--accueil-titre-min), calc(100svh - var(--accueil-bandeau) - var(--accueil-place-produits)), var(--accueil-titre-max));
}

/* La phrase, centrée en hauteur ; à partir de la tablette, alignée sur le
   logo et les cartes (et non plus décalée d'une colonne) */
.page-accueil #slider .flexslider .slider-text-absolute {
    top: 50%;
    transform: translateY(-50%);
}

@media (min-width: 768px) {
    .page-accueil #slider .flexslider .slider-text-absolute {
        left: max(15px, calc((100% - var(--largeur-contenu)) / 2 + 15px));
        width: min(720px, calc(100% - 30px));
        margin: 0;
    }
}

/* Tablette : cartes en 2 × 2, plus de place à garder dessous */
@media (min-width: 768px) and (max-width: 991.98px) {
    :root {
        --accueil-place-produits: 702px;
    }
}

@media (max-width: 767.98px) {
    :root {
        --accueil-bandeau: 65px;
        --accueil-place-produits: 545px;
        --accueil-titre-min: 170px;
        --accueil-titre-max: 320px;
    }
}


/* ---------------------------------------------------------------------
   NOS PRODUITS : les catégories en cartes (index.tpl, #accueil-produits)
   --------------------------------------------------------------------- */

.accueil-produits {
    clear: both;                       /* l'image de titre (#slider) est flottante */
    padding: 32px 0 56px;
    background: var(--fond-doux);
}

.accueil-produits > .container {
    max-width: var(--largeur-contenu);   /* même largeur que le menu */
}

.accueil-produits__titre {
    margin: 0 0 24px;
    text-align: center;
    font-size: var(--taille-28);
    line-height: 1.3;
    font-weight: 700;
    color: var(--encre);
}

.accueil-produits__titre::after {
    content: "";
    display: block;
    width: 48px;
    height: 3px;
    margin: 10px auto 0;
    border-radius: 2px;
    background: var(--degrade);
}

.accueil-produits__grille {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

/* Carte : toute la carte est le lien */
.carte-categorie {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--bordure);
    border-radius: var(--arrondi);
    background: var(--blanc);
    box-shadow: 0 4px 14px rgba(var(--encre-rgb), 0.06);
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.carte-categorie__image {
    display: block;
    aspect-ratio: 3 / 2;
    overflow: hidden;                  /* sinon une photo haute agrandirait le cadre */
    background: var(--bordure);         /* visible tant que la photo charge */
}

.carte-categorie__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

/* Photo de la gamme Resah, très bleu-violet : couleurs atténuées */
.carte-categorie[href$="category/16#1"] .carte-categorie__image img {
    filter: saturate(0.45) brightness(1.05);
}

.carte-categorie__corps {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 20px 20px;
}

.carte-categorie__titre {
    font-size: var(--taille-17);
    line-height: 1.35;
    font-weight: 700;
    color: var(--encre);
    transition: color 0.2s ease;
}

.carte-categorie__lien {
    margin-top: auto;
    font-size: var(--taille-15);
    font-weight: 500;
    color: var(--bleu-texte);
}

.carte-categorie__lien::after {
    content: " →";
}

/* Survol : la carte se soulève, la photo zoome, le titre passe en bleu */
.carte-categorie:hover,
.carte-categorie:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(var(--encre-rgb), 0.12);
    text-decoration: none;
}

.carte-categorie:hover .carte-categorie__image img {
    transform: scale(1.05);
}

.carte-categorie:hover .carte-categorie__titre {
    color: var(--bleu-texte);
}

/* Tablette : 2 × 2, photos plus basses */
@media (max-width: 991.98px) {
    .accueil-produits__grille {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .carte-categorie__image {
        aspect-ratio: 2 / 1;
    }
}

/* Téléphone : 2 × 2 compact, les 4 cartes visibles dès l'arrivée */
@media (max-width: 767.98px) {
    .accueil-produits {
        padding: 20px 0 40px;
    }

    .accueil-produits__titre {
        margin-bottom: 16px;
        font-size: var(--taille-22);
    }

    .accueil-produits__grille {
        gap: 12px;
    }

    .carte-categorie {
        border-radius: var(--arrondi);
    }

    .carte-categorie__image {
        aspect-ratio: 16 / 10;
    }

    .carte-categorie__corps {
        gap: 8px;
        padding: 10px 12px 12px;
    }

    .carte-categorie__titre {
        font-size: var(--taille-14);
        line-height: 1.3;
    }

    .carte-categorie__lien {
        font-size: var(--taille-13);
    }
}

@media (prefers-reduced-motion: reduce) {
    .carte-categorie,
    .carte-categorie__image img {
        transition: none;
    }

    .carte-categorie:hover,
    .carte-categorie:hover .carte-categorie__image img {
        transform: none;
    }
}


/* ---------------------------------------------------------------------
   BANDEAU RESAH : une bande claire, entièrement cliquable
   Fond : léger dégradé bleu → violet, rappel discret de la charte (le
   réglage des deux teintes est dans --resah-fond).
   --------------------------------------------------------------------- */

.bandeau-resah {
    --resah-fond: linear-gradient(100deg, rgba(var(--bleu-rgb), 0.10) 0%, rgba(var(--violet-rgb), 0.10) 100%);
    position: relative;                /* support du lien étendu */
    background: var(--resah-fond);
    transition: filter 0.2s ease;
}

.bandeau-resah:hover {
    filter: brightness(0.985);
}

.bandeau-resah__contenu {
    max-width: var(--largeur-contenu);   /* même largeur que le menu */
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 56px;
    align-items: center;
    padding-top: 64px;
    padding-bottom: 64px;
}

.bandeau-resah__surtitre {
    margin: 0 0 12px;
    font-size: var(--taille-12);
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--texte-moyen);
}

.bandeau-resah__titre {
    margin: 0 0 14px;
    font-size: var(--taille-30);
    line-height: 1.3;
    font-weight: 700;
    color: var(--encre);
}

.bandeau-resah__titre span {
    font-weight: 300;
}

.bandeau-resah__texte {
    margin: 0 0 22px;
    font-size: var(--taille-16);
    line-height: 1.7;
    color: var(--texte);
}

.bandeau-resah__bouton {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border: 1px solid var(--bleu);
    border-radius: var(--arrondi);
    background: var(--blanc);
    font-size: var(--taille-15);
    font-weight: 600;
    color: var(--encre);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.bandeau-resah__bouton svg {
    color: var(--bleu-texte);
}

/* Le lien couvre toute la bande */
.bandeau-resah__bouton::after {
    content: "";
    position: absolute;
    inset: 0;
}

.bandeau-resah:hover .bandeau-resah__bouton,
.bandeau-resah__bouton:focus-visible {
    background: var(--bleu);
    color: var(--blanc);
    text-decoration: none;
}

.bandeau-resah:hover .bandeau-resah__bouton svg,
.bandeau-resah__bouton:focus-visible svg {
    color: var(--blanc);
}

.bandeau-resah__avantages {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
}

.bandeau-resah__avantage {
    padding: 4px 24px;
    border-left: 1px solid var(--lisere);
}

.bandeau-resah__avantage:first-child {
    padding-left: 0;
    border-left: none;
}

.bandeau-resah__avantage svg {
    width: 28px;
    height: 28px;
    margin-bottom: 10px;
    fill: none;
    stroke: var(--bleu-texte);
    stroke-width: 1.7;
}

.bandeau-resah__avantage h3 {
    margin: 0 0 8px;
    font-size: var(--taille-16);
    line-height: 1.35;
    font-weight: 700;
    color: var(--encre);
}

.bandeau-resah__avantage p {
    margin: 0;
    font-size: var(--taille-14);
    line-height: 1.55;
    color: var(--texte-moyen);
}

@media (max-width: 991.98px) {
    .bandeau-resah__contenu {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
        padding-top: 48px;
        padding-bottom: 48px;
    }
}

/* Téléphone : avantages en liste, bouton en bas sur toute la largeur */
@media (max-width: 767.98px) {
    .bandeau-resah__contenu {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding-top: 40px;
        padding-bottom: 44px;
    }

    .bandeau-resah__intro {
        display: contents;             /* le bouton peut passer sous les avantages */
    }

    .bandeau-resah__titre {
        font-size: var(--taille-22);
    }

    .bandeau-resah__texte {
        font-size: var(--taille-15);
        margin-bottom: 20px;
    }

    .bandeau-resah__bouton {
        order: 1;
        justify-content: center;
        margin-top: 22px;
    }

    .bandeau-resah__avantages {
        grid-template-columns: minmax(0, 1fr);
    }

    .bandeau-resah__avantage,
    .bandeau-resah__avantage:first-child {
        display: grid;
        grid-template-columns: 24px minmax(0, 1fr);
        column-gap: 14px;
        padding: 14px 0;
        border-left: none;
        border-top: 1px solid var(--lisere);
    }

    .bandeau-resah__avantage:last-child {
        border-bottom: 1px solid var(--lisere);
    }

    .bandeau-resah__avantage svg {
        grid-row: span 2;
        width: 24px;
        height: 24px;
        margin: 0;
    }

    .bandeau-resah__avantage h3 {
        margin-bottom: 4px;
        font-size: var(--taille-15);
    }

    .bandeau-resah__avantage p {
        font-size: var(--taille-13);
    }
}


/* ---------------------------------------------------------------------
   ACTUALITÉS / NOUVEAUTÉS (index.tpl) – en carrousel
   Cartes blanches de la même famille que celles des produits : image,
   titre, sur-titre, texte (3 lignes), puis le bouton en bas de la carte.
   Les cartes défilent (flèches et barre de progression ajoutées par
   web/js/accueil/actualites.js, ou au doigt).
   --------------------------------------------------------------------- */

/* Trait dégradé sous le titre */
#news .heading h2::after {
    content: "";
    display: block;
    width: 48px;
    height: 2px;
    margin: 14px auto 0;
    background: var(--degrade);
}

#news {
    background: var(--blanc);   /* fond blanc, à la place de l’ancien dégradé bleu-violet */
    padding: 72px 24px;
}

#news > .row {
    max-width: var(--largeur-contenu);
    margin-left: auto;
    margin-right: auto;
}

/* Titre de la section : même style que « Nos produits » */
#news .heading h2 {
    font-family: Poppins, sans-serif;
    font-size: var(--taille-28);
    font-weight: 600;
    line-height: 1.25;
    text-transform: none;
    color: var(--encre);
    margin: 0 0 40px;
}


/* Rangée des cartes : défilement horizontal, uniquement des cartes entières
   (3 sur ordinateur, 2 sur tablette, 1 sur téléphone). Pas de marge
   intérieure à gauche ni à droite : elle laisserait voir un bout des cartes
   voisines. */
#news > .row.actu-rail {
    --actu-ecart: 24px;               /* espace entre deux cartes */
    --actu-par-ecran: 3;              /* cartes visibles à la fois */
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: var(--actu-ecart);
    width: min(var(--largeur-contenu), calc(100% - 30px));
    max-width: none;
    margin: -16px auto -20px;
    padding: 16px 0 36px;             /* place pour l'ombre des cartes, en haut et en bas */
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;            /* barre de défilement masquée : les flèches suffisent */
}

#news > .row.actu-rail::-webkit-scrollbar {
    display: none;
}

/* Contour clavier (touche Tab) du carrousel */
#news > .row.actu-rail:focus-visible {
    outline: 2px solid var(--bleu);
    outline-offset: -2px;
    border-radius: var(--arrondi);
}

#news .row > [class*="col-md-3"] {
    display: flex;
    /* largeur exacte pour que N cartes et leurs N - 1 espaces remplissent la rangée */
    flex: 0 0 calc((100% - (var(--actu-par-ecran) - 1) * var(--actu-ecart)) / var(--actu-par-ecran));
    max-width: none;
    margin: 0;
    padding: 0;
    scroll-snap-align: start;
}

#news .row > [class*="col-md-3"] .news-entry {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Carte en cours (la plus à gauche) : légèrement surélevée */
#news .actu-rail > .est-courante .news-entry {
    transform: translateY(-4px);
    box-shadow: 0 10px 22px rgba(var(--encre-rgb), 0.11);
}

@media (max-width: 991.98px) {
    #news > .row.actu-rail {
        --actu-par-ecran: 2;
    }
}

@media (max-width: 767.98px) {
    #news > .row.actu-rail {
        --actu-par-ecran: 1;
    }
}

/* Flèches, centrées sous les cartes */
#news .actu-commandes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 22px;
}

#news .actu-commandes[hidden] {
    display: none;
}

#news .actu-fleche {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--bleu);
    border-radius: 50%;
    background: var(--blanc);
    color: var(--bleu);
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

#news .actu-fleche:hover:not(:disabled) {
    background: var(--bleu-clair);
}

#news .actu-fleche:disabled {
    border-color: var(--lisere);
    color: var(--gris-pale);
    cursor: default;
}

#news .actu-fleche:focus-visible {
    outline: 2px solid var(--bleu);
    outline-offset: 2px;
}

/* Carte */
#news .news-entry {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0;
    padding: 24px;
    border-radius: var(--arrondi);
    border: 1px solid var(--bordure);
    background: var(--blanc);
    box-shadow: 0 4px 14px rgba(var(--encre-rgb), 0.06);
}

#news .news-entry > .container-fluid {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 0;
}

#news .news-entry > .container-fluid > .row {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    flex: 1;
    margin: 0;
    padding-bottom: 0;
}

/* La première colonne s'efface pour pouvoir ranger son contenu :
   en-tête (date, titre, sur-titre) en haut, texte, puis bouton en bas */
#news .news-entry .row > .col-md-12 {
    display: contents;
}

#news .news-entry .desc {
    position: static;
    order: 1;
    margin: 0 0 16px;
    padding: 0;
    border: 0;
}

#news .news-entry .row > .col {
    order: 2;
    flex: 0 0 auto;
    padding: 0;
}

#news .news-entry .row > .col-md-12 > div:not(.desc) {
    order: 3;
    margin-top: auto;      /* bouton en bas de la carte */
    padding: 20px 0 0;
    text-align: left;
}

/* Image de couverture (première image du texte, placée en haut par web/js/accueil/actualites.js) */
/* Même format pour toutes les images : cadre 4/3, image entière (non recadrée)
   centrée dedans. Fond blanc, comme celui des photos de produits. */
#news .news-entry .actu-couverture {
    aspect-ratio: 3 / 2;
    overflow: hidden;                 /* le cadre garde sa taille, quelle que soit l'image */
    margin: -24px -24px 20px;
    padding: 16px;
    background: var(--blanc);
    border-bottom: 1px solid var(--bordure);
}

#news .news-entry .actu-couverture img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--arrondi);
}

/* En-tête : le titre, puis le sur-titre */
#news .news-entry .desc .meta {
    position: static;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    max-width: 100%;
    padding: 0;
    line-height: 1.4;
    text-transform: none;
}

#news .news-entry .desc .meta br {
    display: none;
}

#news .news-entry .desc .meta .date-2 {
    display: none;         /* date retirée des cartes */
    order: 1;
    flex: none;
    padding: 3px 9px;
    border-radius: var(--arrondi);
    background: var(--bleu-clair);
    -webkit-background-clip: border-box;
    background-clip: border-box;
    color: var(--bleu);
    -webkit-text-fill-color: var(--bleu);
    font-size: var(--taille-12);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#news .news-entry .organizer {
    order: 2;
    flex: 0 0 100%;
    min-width: 0;
}

#news .news-entry .organizer,
#news .news-entry .organizer p {
    margin: 0;
    font-size: var(--taille-12);
    line-height: 1.4;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--texte-doux);
}

#news .news-entry .organizer p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

#news .news-entry h2 {
    order: 1;
    flex: 0 0 100%;
    margin: 0;
    font-family: Poppins, sans-serif;
    font-size: var(--taille-18);
    font-weight: 600;
    line-height: 1.35;
    text-transform: none;
    color: var(--encre);
}

#news .news-entry .news-text {
    padding: 0;
    font-size: var(--taille-15);
    line-height: 1.6;
    color: var(--texte-moyen);
    font-family: Poppins, sans-serif;
    font-weight: 400;
    /* Texte limité à 3 lignes dans le carrousel */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

/* L'éditeur de l'administration ajoute parfois sa propre police, taille,
   épaisseur ou couleur : tout est ramené au même style dans chaque carte */

#news .news-entry .news-text * {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    letter-spacing: normal;
}

#news .news-entry .news-text *:not(strong):not(b) {
    font-weight: inherit;
}

#news .news-entry .news-text strong,
#news .news-entry .news-text b {
    font-weight: 600;
}

#news .news-entry .news-text *:not(a) {
    color: inherit;
    background-color: transparent;
}

#news .news-entry .news-text p {
    margin: 0 0 10px;
}

#news .news-entry .news-text ul {
    padding-left: 1.2em;
    margin: 0 0 10px;
}

#news .news-entry .news-text img {
    max-width: 100%;
    height: auto;
    border-radius: var(--arrondi);
}

#news .news-entry .news-text a {
    color: var(--bleu);
}


#news .news-entry .news-text p:last-child,
#news .news-entry .news-text ul:last-child {
    margin-bottom: 0;
}

/* Bouton : discret, contour bleu fin sur fond blanc */
#news .news-entry .btn-colored {
    display: inline-block;            /* rendu réel : inline-flex n'a jamais été appliqué (style en ligne) */
    margin: 0 auto;
    align-items: center;
    min-height: 40px;
    padding: 8px 20px;                /* comme tous les boutons .btn-md (0-base.css) */
    border: 1px solid var(--bleu);
    border-radius: var(--arrondi);
    background: var(--blanc);
    color: var(--bleu);
    font-size: var(--taille-15);
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
    box-shadow: none;
    transition: background-color 0.2s, color 0.2s;
}

/* Survol des boutons */
#news .news-entry .btn-colored:hover,
#news .news-entry .btn-colored:focus {
    transform: none;
    background: var(--bleu-clair);
    color: var(--bleu-fonce);
}

@media (max-width: 767.98px) {
    #news {
        padding: 48px 16px;
    }

    #news .heading h2 {
        font-size: var(--taille-24);
        margin-bottom: 28px;
    }

    #news .news-entry {
        padding: 20px;
    }

    #news .news-entry .actu-couverture {
        margin: -20px -20px 18px;
    }

    #news > .row.actu-rail {
        --actu-ecart: 16px;
    }
}


/* ---------------------------------------------------------------------
   PRÉSENTATION DE LA SOCIÉTÉ (index.tpl)
   Deux blocs texte + photo, les pictogrammes, puis la vidéo.
   --------------------------------------------------------------------- */

/* Le second bloc s'appelait lui aussi #presentation-intro (identifiant en
   double). Devenu #presentation-gammes, il reprend ici les réglages que
   le thème d'origine (en tête de ce fichier) donne à #presentation-intro (la marge intérieure est fixée
   plus bas pour les deux blocs). Les règles communes visent les deux blocs
   avec :is(#presentation-intro, #presentation-gammes). */
#presentation-gammes {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-blend-mode: darken;
    height: 100%;
    width: 100%;
}

/* Blocs texte + photo : hauteur plus compacte, texte centré verticalement */
:is(#presentation-intro, #presentation-gammes) {
    padding: 72px 0;
}

/* Contenu large (1940 px) dans les deux blocs, malgré la classe .container */
:is(#presentation-intro, #presentation-gammes) > .container {
    max-width: 1940px;
}

/* Premier bloc : la forme en V reste collée en haut */
#presentation-intro.background1 {
    padding-top: 0;
}

:is(#presentation-intro, #presentation-gammes) .row {
    align-items: center;
    min-height: 380px;
}

:is(#presentation-intro, #presentation-gammes) .col-sm {
    text-shadow: none;     /* ancien halo blanc flou */
    margin-top: 0;
}

/* Titres : même style que « Nos produits », alignés à gauche */
:is(#presentation-intro, #presentation-gammes) .titre-intro,
:is(#presentation-intro, #presentation-gammes) .col-sm > p:first-child {
    font-family: Poppins, sans-serif;
    font-size: var(--taille-28);
    font-weight: 600;
    line-height: 1.25;
    color: var(--encre);
    text-align: left;
    margin: 0 0 24px;
}

:is(#presentation-intro, #presentation-gammes) .titre-intro::after,
:is(#presentation-intro, #presentation-gammes) .col-sm > p:first-child::after {
    content: "";
    display: block;
    width: 48px;
    height: 2px;
    margin: 14px 0 0;
    background: var(--degrade);
}

/* Textes : taille de lecture normale, sans gras, alignés à gauche.
   C'est le bloc de texte qui est centré dans la zone blanche. */
:is(#presentation-intro, #presentation-gammes) .titre-intro-col p,
:is(#presentation-intro, #presentation-gammes) .col-sm p {
    font-size: var(--taille-16);
    font-weight: 400;
    line-height: 1.65;
    color: var(--texte-moyen);
    text-align: left;
    margin-bottom: 14px;
}

/* Le texte du 2e bloc est saisi dans l'administration (« texte partie un »),
   où l'éditeur écrit parfois une taille dans le contenu (style="font-size:
   18px"). Elle est ignorée : les deux blocs gardent la même taille, même
   après une modification dans l'administration.
   !important : seul moyen de passer devant un style écrit dans le contenu. */
:is(#presentation-intro, #presentation-gammes) .col-sm p * {
    font-size: inherit !important;
    line-height: inherit !important;
}

/* Photos de fond : comportement d'origine conservé (photo fixe pendant le
   défilement, plein cadre). Le texte occupe la moitié blanche de la photo et
   y est centré (ordinateur et tablette). */
@media (min-width: 768px) {
    :is(#presentation-intro, #presentation-gammes) .container {
        margin-left: auto;
        margin-right: auto;
    }

    :is(#presentation-intro, #presentation-gammes) .row > .col-sm {
        left: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    :is(#presentation-intro, #presentation-gammes) .row > .col-sm > * {
        width: 100%;
        max-width: 580px;
    }

    /* Espacement que donnaient, dans cette colonne flex, les deux paragraphes
       vides qui encadraient le texte dans l'ancien gabarit */
    :is(#presentation-intro, #presentation-gammes) .titre-intro-col > p {
        margin-top: 14px;
        margin-bottom: 28px;
    }
}

/* Mobile : les deux colonnes s'empilent et le texte passerait par-dessus
   la photo. Fond blanc uni et texte sur toute la largeur. */
@media (max-width: 767.98px) {
    :is(#presentation-intro, #presentation-gammes) {
        background-image: none !important;  /* bat le style en ligne du gabarit (image de fond) */
        background-color: var(--blanc);
        padding: 48px 0;
    }

    #presentation-intro.background1 .row > .col-sm:last-child,
    #presentation-gammes .row > .col-sm:first-child {
        display: none;                /* colonne vide (place de la photo) */
    }

    :is(#presentation-intro, #presentation-gammes) .row > .col-sm {
        left: 0;
    }
}

/* Même taille pour tout le texte, même s'il a été mis en forme dans l'administration */
:is(#presentation-intro, #presentation-gammes) .col-sm p * {
    font-size: inherit;
    font-family: inherit;
    line-height: inherit;
}

:is(#presentation-intro, #presentation-gammes) a {
    color: var(--bleu);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Pictogrammes : bande épurée, icône dans un cercle au liseré dégradé,
   séparateurs verticaux fins comme dans le menu */
#modalite {
    background: var(--fond-doux);
    margin: 0;
    padding: 56px 24px;
}

#modalite .row {
    max-width: 1100px;
    margin: 0 auto;
    justify-content: center;
    flex-wrap: nowrap;
}

/* Masqués jusqu'à leur apparition au défilement (web/js/accueil/pictogrammes.js),
   seulement si JavaScript fonctionne : sans script, ils restent visibles */
.js #modalite [id^="anim_picto"] {
    opacity: 0;
}

#modalite [id^="anim_picto"] {
    position: relative;
    flex: 1 1 0;
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 8px 24px;
    text-align: center;
}

/* Trait vertical gris entre deux pictogrammes */
#modalite [id^="anim_picto"] + [id^="anim_picto"]::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 1px;
    height: 64px;
    margin-top: -32px;
    background: var(--lisere);
}

#modalite [id^="anim_picto"] img {
    box-sizing: content-box;
    width: 36px;
    height: 36px;
    padding: 18px;
    object-fit: contain;
    border-radius: 50%;
    border: 2px solid transparent;
    background:
        linear-gradient(var(--blanc), var(--blanc)) padding-box,
        linear-gradient(135deg, var(--bleu) 0%, var(--violet) 100%) border-box;
}

#modalite [id^="anim_picto"] h5 {
    margin: 0;
    font-family: Poppins, sans-serif;
    font-size: var(--taille-16);
    font-weight: 500;
    line-height: 1.4;
    color: var(--encre);
}

/* Tablette et mobile */
@media (max-width: 767.98px) {
    
    :is(#presentation-intro, #presentation-gammes) .row {
        min-height: 0;
    }

    :is(#presentation-intro, #presentation-gammes) .titre-intro,
    :is(#presentation-intro, #presentation-gammes) .col-sm > p:first-child {
        font-size: var(--taille-24);
    }

    #modalite .row {
        flex-direction: column;
        align-items: stretch;
    }

    #modalite [id^="anim_picto"] {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        padding: 16px 8px;
    }

    /* Sur mobile, les traits deviennent horizontaux */
    #modalite [id^="anim_picto"] + [id^="anim_picto"]::before {
        top: 0;
        left: 8px;
        right: 8px;
        width: auto;
        height: 1px;
        margin-top: 0;
    }

    #modalite [id^="anim_picto"] img {
        width: 28px;
        height: 28px;
        padding: 12px;
    }

}


/* ---------------------------------------------------------------------
   PROMOTIONS (index.tpl)
   --------------------------------------------------------------------- */

.promotion-entry .desc > .row {
    margin-top: 3vh;
}

.promotion-entry .desc > .row > .btn {
    margin: auto;                     /* bouton centré */
}
