/*
 * nouvey-custom.css
 * ------------------------------------------------------------------
 * Feuille de style additionnelle du theme Nouvey.
 *
 * Pourquoi un fichier separe de css/app.css :
 * app.css est un artefact de build Tailwind (source ./resources/css/
 * absente du serveur, donc non regenerable ici). Toute modification
 * directe y serait perdue au prochain build. Ce fichier est ecrit a la
 * main, charge apres app.css, et survit a une recompilation Tailwind.
 *
 * Palette : charte graphique Nouvey (TESIS_NOUVEY_CHARTE_GRAPHIQUE_271025)
 * Voir aussi Nouvey/design-system/tokens.css
 * ------------------------------------------------------------------
 */

:root {
    --nouvey-navy-dark:  #171C49;
    --nouvey-navy:       #213070;
    --nouvey-coral:      #EA4E74;
    --nouvey-sky:        #75C9DB;
    /* Corail assombri : le corail charte (#EA4E74) plafonne a 3,6:1 sur blanc,
       insuffisant pour du texte (WCAG AA = 4,5:1). Celui-ci atteint 5,5:1. */
    --nouvey-coral-dark: #C22E52;
    --nouvey-grey-light: #F2F2F2;

    /* Bleu "primary" historique du theme, conserve pour coherence */
    --nouvey-primary:    #000090;

    /* Gris de texte secondaire, 7,8:1 sur blanc */
    --nouvey-grey-text:  #4A5077;
    --nouvey-border:     #C9CBD8;
}

/* ==================================================================
   Bandeau bleu ciel
   Reprend .radial-gradient du theme (le fond de "Nous contacter"),
   en bandeau delimite plutot qu'en fond de page entiere.
   ================================================================== */

.block-bandeau-ciel {
    padding-top: 3rem;
    padding-bottom: 3.5rem;
}

.block-bandeau-ciel > .block-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding-left: 1rem;
    padding-right: 1rem;
    text-align: center;
}

/* Typographie calee sur celle des autres bandeaux du site
   (.block-cyber-secu-service-sante, cf. page "Se sensibiliser") :
   meme echelle, meme graisse, meme couleur. */
.block-bandeau-ciel .bandeau-titre {
    margin-bottom: 2rem;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1em;
    color: var(--nouvey-primary);
}

.block-bandeau-ciel .bandeau-intro {
    margin-bottom: 0;
    font-weight: 500;
    color: var(--nouvey-navy-dark);
}

.block-bandeau-ciel .bandeau-cta { margin-top: 1.5rem; margin-bottom: 0; }

/* Animation au defilement, identique aux pictogrammes des autres bandeaux :
   --scroll est mis a jour sur <body> par js/app.js du theme (valeur de
   depart -.02, d'ou une inclinaison douce des le chargement). */
.block-bandeau-ciel .bandeau-visuel figure {
    margin: 0;
    transform: rotateX(calc(var(--scroll) * 100deg))
               rotateY(calc(var(--scroll) * 125deg))
               translateY(calc(var(--scroll) * 50px));
    transform-style: preserve-3d;
}

.block-bandeau-ciel .bandeau-visuel img {
    display: block;
    width: 100%;
    max-width: 20rem;
    height: auto;
    margin: 0 auto;
}

@media (prefers-reduced-motion: reduce) {
    .block-bandeau-ciel .bandeau-visuel figure { transform: none; }
}

@media (min-width: 1024px) {
    .block-bandeau-ciel {
        padding-top: 4.5rem;
        padding-bottom: 5rem;
    }

    .block-bandeau-ciel > .block-wrapper {
        padding-left: 0;
        padding-right: 0;
        gap: 4rem;
        text-align: left;
    }

    .block-bandeau-ciel.avec-visuel > .block-wrapper { flex-direction: row; align-items: center; }
    .block-bandeau-ciel.avec-visuel .bandeau-texte  { width: 55%; }
    .block-bandeau-ciel.avec-visuel .bandeau-visuel { width: 45%; }

    /* Sans visuel, le texte reste centre et lisible */
    .block-bandeau-ciel:not(.avec-visuel) > .block-wrapper { text-align: center; }
    .block-bandeau-ciel:not(.avec-visuel) .bandeau-texte   { max-width: 46rem; margin: 0 auto; }

    .block-bandeau-ciel .bandeau-titre { font-size: 2.5rem; line-height: 1; }
    .block-bandeau-ciel .bandeau-visuel img { max-width: 24rem; }
}

/* ==================================================================
   Encart (carte blanche autonome)
   ================================================================== */

.block-encart {
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.block-encart .encart {
    padding: 2rem 1.5rem;
    background-color: #fff;
    border-radius: 2rem;
    box-shadow: 0 8px 32px rgba(23, 28, 73, .10);
}

.block-encart .encart-titre {
    margin-bottom: .75rem;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--nouvey-primary);
}

.block-encart .encart-chapo {
    margin-bottom: 1.25rem;
    padding-left: 1rem;
    border-left: 4px solid var(--nouvey-sky);
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--nouvey-navy);
}

.block-encart .encart-texte {
    font-weight: 500;
    line-height: 1.6;
    color: var(--nouvey-navy-dark);
}

.block-encart .encart-texte p { margin-bottom: 1rem; }
.block-encart .encart-texte p:last-child { margin-bottom: 0; }

/* Reprend la puce "+" des autres blocs du theme */
.block-encart .encart-texte ul {
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding-left: 0 !important;
}

.block-encart .encart-texte ul li {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-top: .5rem;
    margin-bottom: .5rem;
    font-weight: 500;
    list-style: none !important;
}

.block-encart .encart-texte ul li:before {
    content: "";
    display: inline-block;
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    margin-top: 4px;
    margin-right: .75rem;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16.726' height='16.726'%3E%3Cpath d='M5.507 0v5.508H0v5.711h5.507v5.507h5.711v-5.507h5.509V5.508h-5.508V0Z' fill='%2300009c'/%3E%3C/svg%3E");
    background-size: contain;
    background-position: 50%;
    background-repeat: no-repeat;
}

/* Pastilles d'informations pratiques */
.block-encart .encart-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 1.5rem 0 0;
    padding-left: 0 !important;
    list-style: none !important;
}

.block-encart .encart-meta li {
    display: flex;
    align-items: center;
    gap: .625rem;
    list-style: none !important;
}

/* La pastille est portee par le <span>, pas par le <li> : le "+" qui separe
   deux informations reste ainsi visuellement hors de la pastille. */
.block-encart .encart-meta li > span {
    padding: .375rem .875rem;
    border-radius: 999px;
    background-color: var(--nouvey-grey-light);
    font-size: .8125rem;
    font-weight: 700;
    color: var(--nouvey-navy);
}

.block-encart .encart-meta li + li:before {
    content: "+";
    font-size: 1.375rem;
    font-weight: 800;
    line-height: 1;
    color: var(--nouvey-navy-dark);
}

.block-encart .encart-cta { margin: 1.75rem 0 0; }

@media (min-width: 1024px) {
    .block-encart { margin-top: 4rem; margin-bottom: 4rem; }
    .block-encart .encart { padding: 3rem; }
    .block-encart .encart-titre { font-size: 2rem; }
}

/* ==================================================================
   Bloc "Webinaires"
   ================================================================== */

.block-webinaires {
    padding-top: 4rem;
    padding-bottom: 4rem;
    background-color: var(--nouvey-grey-light);
}

.block-webinaires .block-header {
    margin-bottom: 2.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
    text-align: center;
}

.block-webinaires h2 {
    margin-bottom: 1rem;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1em;
    color: var(--nouvey-primary);
}

.block-webinaires .block-header .sous-titre {
    max-width: 46rem;
    margin-left: auto;
    margin-right: auto;
    font-weight: 500;
    color: var(--nouvey-navy-dark);
}

@media (min-width: 1024px) {
    .block-webinaires { padding-top: 5rem; padding-bottom: 5rem; }
    .block-webinaires .block-header { padding-left: 0; padding-right: 0; }
    .block-webinaires h2 { font-size: 2.5rem; line-height: 1; }
}

/* ---- Grille de cartes ------------------------------------------- */

.block-webinaires .liste-webinaires {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.75rem;
    padding-left: 1rem;
    padding-right: 1rem;
    list-style: none !important;
    margin: 0;
}

@media (min-width: 768px) {
    .block-webinaires .liste-webinaires { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .block-webinaires .liste-webinaires {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        padding-left: 0;
        padding-right: 0;
    }
}

/* Neutralise les puces heritees de .entry-content ul */
.entry-content .block-webinaires .liste-webinaires { padding-left: 1rem; padding-right: 1rem; }
.entry-content .block-webinaires .liste-webinaires > li { list-style: none !important; }

@media (min-width: 1024px) {
    .entry-content .block-webinaires .liste-webinaires { padding-left: 0; }
}

/* ---- Carte ------------------------------------------------------- */

.webinaire-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.75rem 1.5rem 1.5rem;
    background-color: #fff;
    border-radius: 1.25rem;
    box-shadow: 0 4px 16px rgba(23, 28, 73, .08);
    transition: transform .2s ease, box-shadow .2s ease;
}

.webinaire-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(23, 28, 73, .13);
}

.webinaire-card.is-past {
    box-shadow: none;
    background-color: #FAFAFB;
}

.webinaire-card.is-past:hover { transform: none; }

/* Etat / badge */
.webinaire-card .statut {
    display: inline-block;
    margin-bottom: .75rem;
    padding: .25rem .75rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    background-color: var(--nouvey-sky);
    color: var(--nouvey-navy-dark);
}

.webinaire-card.is-past .statut {
    background-color: #E5E5E8;
    color: var(--nouvey-grey-text);
}

/* Date */
.webinaire-card .date {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .5rem;
    font-size: .9375rem;
    font-weight: 700;
    color: var(--nouvey-navy);
}

.webinaire-card .date svg { flex: 0 0 auto; width: 1rem; height: 1rem; }

/* Titre */
.webinaire-card h3 {
    margin-bottom: .625rem;
    font-size: 1.125rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--nouvey-primary);
}

/* Description */
.webinaire-card .description {
    margin-bottom: 1rem;
    font-size: .9375rem;
    font-weight: 500;
    line-height: 1.55;
    color: var(--nouvey-navy-dark);
}

/* Metadonnees (duree, format) */
.webinaire-card .meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    margin: 0 0 1.25rem;
    padding-left: 0 !important;
    list-style: none !important;
}

.webinaire-card .meta li {
    display: flex;
    align-items: center;
    gap: .375rem;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--nouvey-grey-text);
    list-style: none !important;
}

.webinaire-card .meta svg { flex: 0 0 auto; width: .875rem; height: .875rem; }

/* Pied de carte : le CTA reste colle en bas quelle que soit la hauteur */
.webinaire-card .cta { margin-top: auto; }

.webinaire-card .cta .btn { width: 100%; }

.webinaire-card .cta .termine {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    width: 100%;
    /* Meme hauteur que le bouton des cartes a venir : les deux se cotoient
       dans la meme rangee. */
    min-height: 44px;
    justify-content: center;
    padding: .625rem 1rem;
    border: 1px dashed var(--nouvey-border);
    border-radius: 1.5rem;
    font-size: .875rem;
    font-weight: 700;
    color: var(--nouvey-grey-text);
}

/* ---- Etat vide --------------------------------------------------- */

.block-webinaires .aucun-webinaire {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    max-width: 34rem;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    background-color: #fff;
    border: 2px dashed var(--nouvey-border);
    border-radius: 1.25rem;
    text-align: center;
}

.block-webinaires .aucun-webinaire svg { width: 2.5rem; height: 2.5rem; color: var(--nouvey-sky); }

.block-webinaires .aucun-webinaire p {
    margin: 0;
    font-weight: 700;
    color: var(--nouvey-navy-dark);
}

.block-webinaires .aucun-webinaire .precision {
    font-weight: 500;
    font-size: .9375rem;
    color: var(--nouvey-grey-text);
}



/* ==================================================================
   Encart : variantes avec visuel
   ================================================================== */

.block-encart .encart-visuel { margin: 0; }

.block-encart .encart-visuel img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 1rem;
}

/* Visuel en bandeau, au-dessus du texte */
.block-encart .visuel-haut .encart-visuel {
    margin: -2rem -1.5rem 1.75rem;
}

.block-encart .visuel-haut .encart-visuel img {
    border-radius: 2rem 2rem 0 0;
}

/* Visuel a cote du texte : empile en mobile, deux colonnes au-dela */
.block-encart .visuel-droite,
.block-encart .visuel-gauche {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.block-encart .visuel-droite .encart-corps,
.block-encart .visuel-gauche .encart-corps { flex: 1 1 auto; }

@media (min-width: 768px) {
    .block-encart .visuel-droite,
    .block-encart .visuel-gauche {
        flex-direction: row;
        align-items: center;
        gap: 2.5rem;
    }

    .block-encart .visuel-gauche { flex-direction: row-reverse; }

    .block-encart .visuel-droite .encart-visuel,
    .block-encart .visuel-gauche .encart-visuel { flex: 0 0 34%; }
}

@media (min-width: 1024px) {
    .block-encart .visuel-haut .encart-visuel { margin: -3rem -3rem 2.25rem; }
}

/* Mascotte : pas de cadre, elle est detouree */
.block-encart.encart-mascotte .encart-visuel img {
    border-radius: 0;
    max-width: 18rem;
    margin: 0 auto;
}

/* Une rangee de cartes qui suit immediatement un encart le complete : elle
   developpe son propos plutot que d'ouvrir un nouveau sujet. L'espacement
   doit donc les rattacher, pas les separer.

   Sans cela, la marge basse de l'encart et le retrait haut des cartes
   s'additionnent (4rem + 4rem = 128 px sur grand ecran) : les cartes
   paraissent appartenir a une autre section.

   :has() n'est pas connu des navigateurs anterieurs a 2023 ; le cas echeant
   seul le retrait des cartes est annule, ce qui reste acceptable. */
.entry-content .block-encart + .block-cartes { padding-top: 0; }

.entry-content .block-encart:has(+ .block-cartes) { margin-bottom: 2rem; }

/* ==================================================================
   Bloc "Cartes"
   ================================================================== */

.block-cartes {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.block-cartes.fond-gris { background-color: var(--nouvey-grey-light); }

.block-cartes .block-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

/* Une section pleine largeur sort du conteneur du thème : elle doit porter
   sa propre marge laterale, alignee sur celle du conteneur (1rem). Une
   section normale herite deja de cette marge ; en ajouter une seconde
   decalerait les cartes par rapport au reste de la page. */
.block-cartes.full-width .block-header,
.entry-content .block-cartes.full-width .liste-cartes {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* .entry-content ul { padding-left: 2rem } du theme est plus specifique que
   .block-cartes .liste-cartes : il faut le neutraliser explicitement. */
.entry-content .block-cartes .liste-cartes { padding-left: 0; padding-right: 0; }

.block-cartes h2 {
    margin-bottom: 1rem;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1em;
    color: var(--nouvey-primary);
}

.block-cartes .block-header .sous-titre {
    max-width: 46rem;
    margin-left: auto;
    margin-right: auto;
    font-weight: 500;
    color: var(--nouvey-navy-dark);
}

@media (min-width: 1024px) {
    .block-cartes { padding-top: 4rem; padding-bottom: 4rem; }
    .block-cartes h2 { font-size: 2.5rem; line-height: 1; }
}

/* ---- Grille ------------------------------------------------------ */

.block-cartes .liste-cartes {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
    list-style: none !important;
}

.entry-content .block-cartes .liste-cartes > li { list-style: none !important; }

@media (min-width: 768px) {
    .block-cartes.colonnes-2 .liste-cartes,
    .block-cartes.colonnes-3 .liste-cartes,
    .block-cartes.colonnes-4 .liste-cartes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .block-cartes.full-width .block-header,
    .entry-content .block-cartes.full-width .liste-cartes { padding-left: 0; padding-right: 0; }
    .block-cartes.colonnes-3 .liste-cartes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .block-cartes.colonnes-4 .liste-cartes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---- Carte ------------------------------------------------------- */

.block-cartes .carte {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.75rem 1.5rem 1.5rem;
    background-color: #fff;
    border-radius: 1.25rem;
    box-shadow: 0 4px 16px rgba(23, 28, 73, .08);
    transition: transform .2s ease, box-shadow .2s ease;
}

.block-cartes .carte:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(23, 28, 73, .13);
}

/* Sur fond blanc, la carte a besoin d'un contour plutot que d'une ombre */
.block-cartes:not(.fond-gris):not(.fond-ciel) .carte {
    border: 1px solid rgba(23, 28, 73, .08);
}

.block-cartes .carte-visuel {
    margin: 0 0 1rem;
}

.block-cartes .carte-visuel img {
    display: block;
    width: auto;
    max-width: 100%;
    height: 5rem;
    margin: 0;
}

.block-cartes .carte-badge {
    display: inline-block;
    align-self: flex-start;
    margin-bottom: .75rem;
    padding: .25rem .75rem;
    border-radius: 999px;
    background-color: var(--nouvey-sky);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--nouvey-navy-dark);
}

.block-cartes .carte h3 {
    margin-bottom: .625rem;
    font-size: 1.125rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--nouvey-primary);
}

.block-cartes .carte-texte {
    font-size: .9375rem;
    font-weight: 500;
    line-height: 1.55;
    color: var(--nouvey-navy-dark);
}

.block-cartes .carte-texte p { margin-bottom: .75rem; }
.block-cartes .carte-texte p:last-child { margin-bottom: 0; }

.block-cartes .carte-texte ul {
    margin: .75rem 0;
    padding-left: 0 !important;
}

.block-cartes .carte-texte ul li {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin: .375rem 0;
    list-style: none !important;
}

.block-cartes .carte-texte ul li:before {
    content: "";
    display: inline-block;
    flex: 0 0 auto;
    width: .875rem;
    height: .875rem;
    margin-top: 4px;
    margin-right: .625rem;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16.726' height='16.726'%3E%3Cpath d='M5.507 0v5.508H0v5.711h5.507v5.507h5.711v-5.507h5.509V5.508h-5.508V0Z' fill='%2300009c'/%3E%3C/svg%3E");
    background-size: contain;
    background-position: 50%;
    background-repeat: no-repeat;
}

/* Le bouton reste colle en bas quelle que soit la hauteur du texte */
.block-cartes .carte-cta {
    margin: 1.25rem 0 0;
    padding-top: 0;
}

.block-cartes .carte .carte-cta { margin-top: auto; padding-top: 1.25rem; }

.block-cartes .carte-cta .btn { width: 100%; }

/* ==================================================================
   Bloc "Galerie" — cartes extensibles
   ==================================================================
   Les images sont posees cote a cote. Celle qui est selectionnee prend
   toute la place disponible et laisse apparaitre son intitule ; les
   autres se replient en bande de 60 px, ou seul leur numero reste
   lisible.

   Le ressort du procede est le flex-grow : 1 au repos, 10000 pour la
   carte active. Comme flex-grow est un nombre, il s'anime ; c'est ce
   qui donne le glissement, sans calcul de largeur en JavaScript.

   Toutes les cartes sont rendues cote serveur : le JavaScript ne fait
   que deplacer la classe .est-active. Sans lui, le <noscript> du
   gabarit remet les cartes en grille.

   La courbe cubic-bezier(.05, .61, .41, .95) et les 500 ms sont celles
   du modele : un demarrage franc, une fin amortie. */

.block-galerie {
    padding-top: 1rem;
    padding-bottom: 3rem;
}

.block-galerie .block-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.block-galerie h2 {
    margin-bottom: 1rem;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1em;
    color: var(--nouvey-primary);
}

.block-galerie .block-header .sous-titre {
    max-width: 46rem;
    margin-left: auto;
    margin-right: auto;
    font-weight: 500;
    color: var(--nouvey-navy-dark);
}

@media (min-width: 1024px) {
    .block-galerie h2 { font-size: 2rem; }
}

.block-galerie .galerie { width: 100%; }

/* ---- Rangee de cartes -------------------------------------------- */

/* .entry-content ul { padding-left: 2rem } du theme est plus specifique que
   .block-galerie .galerie-cartes : il faut le neutraliser explicitement. */
.block-galerie .galerie-cartes,
.entry-content .block-galerie .galerie-cartes {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    height: 25rem;
    margin: 0;
    padding: 0;
    overflow: hidden;
    list-style: none !important;
}

.entry-content .block-galerie .galerie-cartes > li { list-style: none !important; }

.block-galerie .galerie-carte {
    position: relative;
    flex-grow: 1;
    min-width: 3.75rem;
    margin: .625rem;
    border-radius: 1.875rem;
    overflow: hidden;
    background-color: var(--nouvey-grey-light);
    transition:
        flex-grow .5s cubic-bezier(.05, .61, .41, .95),
        max-width .5s cubic-bezier(.05, .61, .41, .95),
        margin .5s cubic-bezier(.05, .61, .41, .95),
        border-radius .5s cubic-bezier(.05, .61, .41, .95);
}

/* Le modele plafonne la carte active a 600 px parce que sa rangee ne depasse
   pas 900 px. Ici le conteneur du theme fait 1024 px : plafonner l'active
   laisserait le reste aux cartes repliees, qui atteindraient 212 px et ne se
   liraient plus comme des bandes. On borne donc les repliees, et l'active
   prend tout ce qui reste — les proportions du modele sont conservees quels
   que soient la largeur disponible et le nombre d'images. */
.block-galerie .galerie-carte:not(.est-active) { max-width: 5rem; }

/* 10000 plutot qu'un grand nombre raisonnable : l'ecart doit etre tel que
   les cartes repliees soient ramenees a leur largeur minimale, quel que soit
   leur nombre. */
.block-galerie .galerie-carte.est-active {
    flex-grow: 10000;
    margin: 0;
    border-radius: 2.5rem;
}

/* ---- Le declencheur occupe toute la carte ------------------------- */

.block-galerie .galerie-declencheur {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    text-align: left;
    cursor: pointer;
}

.block-galerie .galerie-image {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
    /* Repliee, la carte montre une portion agrandie de la photo ; ouverte,
       elle la montre en entier. Le modele obtient le meme effet en jouant
       sur background-size. */
    transform: scale(1.12);
    transition: transform .5s cubic-bezier(.05, .61, .41, .95);
}

.block-galerie .galerie-carte.est-active .galerie-image { transform: none; }

/* ---- Voile sombre sous l'etiquette -------------------------------- */

/* Le modele obtient ce voile par une ombre portee interieure a etalement
   negatif. Un degrade fait la meme chose sans le liseré horizontal que
   laisse le bord haut de l'element quand l'ombre n'y est pas tout a fait
   eteinte. Repliee, la carte n'a pas de voile : sa pastille blanche se
   suffit a elle-meme. */
.block-galerie .galerie-ombre {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 9rem;
    background-image: linear-gradient(to top, rgba(23, 28, 73, .88), rgba(23, 28, 73, 0));
    opacity: 0;
    transition: opacity .5s cubic-bezier(.05, .61, .41, .95);
}

.block-galerie .galerie-carte.est-active .galerie-ombre { opacity: 1; }

/* ---- Etiquette ---------------------------------------------------- */

.block-galerie .galerie-etiquette {
    display: flex;
    position: absolute;
    right: 0;
    bottom: .625rem;
    left: .625rem;
    height: 2.5rem;
    transition: bottom .5s cubic-bezier(.05, .61, .41, .95), left .5s cubic-bezier(.05, .61, .41, .95);
}

.block-galerie .galerie-carte.est-active .galerie-etiquette {
    bottom: 1.25rem;
    left: 1.25rem;
}

.block-galerie .galerie-pastille {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    background-color: #fff;
    color: var(--nouvey-primary);
    font-size: .8125rem;
    font-weight: 800;
    letter-spacing: .02em;
}

.block-galerie .galerie-infos {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-left: .625rem;
    color: #fff;
    white-space: nowrap;
}

/* Les deux lignes glissent depuis la droite et se decouvrent : c'est ce qui
   fait lire l'ouverture comme un depliage, et non comme un simple
   changement de largeur. */
.block-galerie .galerie-infos > span {
    position: relative;
    left: 1.25rem;
    opacity: 0;
    transition:
        left .5s cubic-bezier(.05, .61, .41, .95),
        opacity .5s ease-out;
}

.block-galerie .galerie-carte.est-active .galerie-infos > span {
    left: 0;
    opacity: 1;
}

.block-galerie .galerie-intitule {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
}

.block-galerie .galerie-detail {
    font-size: .875rem;
    font-weight: 500;
    line-height: 1.4;
    transition-delay: .1s;
}

/* ---- Focus clavier ------------------------------------------------ */

.block-galerie .galerie-declencheur:focus-visible {
    outline: 3px solid var(--nouvey-coral);
    outline-offset: -5px;
}

/* ---- Ecrans intermediaires ---------------------------------------- */

@media (max-width: 1023px) {
    .block-galerie .galerie-cartes,
    .entry-content .block-galerie .galerie-cartes { height: 21rem; }
}

/* ---- Mobile : la rangee devient une pile -------------------------- */

/* En dessous de 768 px, une rangee de trois cartes ne laisse plus assez de
   largeur : les cartes repliees deviennent des traits. Le modele d'origine
   escamote les cartes surnumeraires ; ici on prefere basculer la rangee a
   la verticale, pour qu'aucune photo ne disparaisse. */
@media (max-width: 767px) {
    .block-galerie .galerie-cartes,
    .entry-content .block-galerie .galerie-cartes {
        flex-direction: column;
        height: 30rem;
    }

    .block-galerie .galerie-carte,
    .block-galerie .galerie-carte:not(.est-active) {
        min-width: 0;
        max-width: none;
        min-height: 3.75rem;
        margin: .5rem 0;
    }

    .block-galerie .galerie-carte.est-active { margin: 0; }

    .block-galerie .galerie-intitule { font-size: 1rem; }

    .block-galerie .galerie-infos {
        white-space: normal;
        overflow: hidden;
    }
}

@media (prefers-reduced-motion: reduce) {
    .block-galerie .galerie-carte,
    .block-galerie .galerie-image,
    .block-galerie .galerie-ombre,
    .block-galerie .galerie-etiquette,
    .block-galerie .galerie-infos > span {
        transition: none;
    }
    .block-galerie .galerie-image { transform: none; }
}

/* ==================================================================
   Boutons dont le libelle peut passer a la ligne
   ==================================================================
   Le theme fixe line-height:44px sur .btn : la valeur EST la hauteur du
   bouton, ce qui suppose un libelle tenant sur une seule ligne. Des qu'il
   passe a la ligne, l'interligne double la hauteur du bouton et creuse un
   grand vide entre les deux lignes.

   Dans les cartes, etroites par nature, on repasse sur un interligne normal
   et c'est le remplissage qui donne la hauteur, avec un minimum de 44 px
   pour rester une cible tactile confortable. */

.block-cartes .carte-cta .btn,
.block-encart .encart-cta .btn,
.webinaire-card .cta .btn {
    min-height: 44px;
    padding-top: .5rem;
    padding-bottom: .5rem;
    line-height: 1.3;
    text-align: center;
}

/* En quatre colonnes, la carte ne fait que 238 px : le remplissage lateral
   de .btn-primary (20 px de chaque cote) prive le libelle d'une dizaine de
   pixels et le fait passer a la ligne. On les lui rend, dans la carte comme
   dans le bouton. Le correctif d'interligne ci-dessus reste le filet si un
   libelle plus long revient a la ligne. */
.block-cartes.colonnes-4 .carte {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.block-cartes.colonnes-4 .carte-cta .btn {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* ==================================================================
   Sections de formulaire
   Formulaire pose directement sur le degrade bleu ciel, champs blancs
   en deux colonnes, libelles au-dessus.

   .section-formulaire   : le bandeau qui accueille le formulaire
   .formulaire-nouvey    : le corps du formulaire lui-meme

   Ces deux classes sont communes a tous les formulaires du site ; les
   classes .cf7-inscription-webinaire et .cf7-demande-devis ne portent
   plus que ce qui leur est propre.
   ================================================================== */

.section-formulaire {
    scroll-margin-top: 6rem;
    /* Bandeau pleine largeur (width:100vw) : sans marge laterale, les champs
       collent aux bords de l'ecran sur mobile. 1rem = la marge du conteneur
       du theme, pour que tout s'aligne verticalement. */
    padding: 3rem 1rem;
}

.section-formulaire > .wp-block-group__inner-container,
.section-formulaire > * {
    max-width: 44rem;
    margin-left: auto;
    margin-right: auto;
}

.section-formulaire > h1,
.section-formulaire > h2 {
    margin-bottom: .5rem;
    text-align: center;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1em;
    color: var(--nouvey-primary);
}

.section-formulaire .intro-formulaire {
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 500;
    color: var(--nouvey-navy-dark);
}

@media (min-width: 1024px) {
    .section-formulaire { padding: 4rem 1rem; }

    .section-formulaire > h1,
    .section-formulaire > h2 { font-size: 2rem; }
}

/* ---- Grille de champs -------------------------------------------- */

.formulaire-nouvey .champs-grille {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.125rem;
}

@media (min-width: 768px) {
    .formulaire-nouvey .champs-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .formulaire-nouvey .champ-large   { grid-column: 1 / -1; }
}

.formulaire-nouvey .champ > p { margin: 0; }

/* CF7 insere un <br> entre le libelle et le champ (wpcf7_autop) : le libelle
   est deja en display:block, ce retour a la ligne ajoute un blanc parasite. */
.formulaire-nouvey .champ br { display: none; }

.formulaire-nouvey label,
.formulaire-nouvey .etiquette-groupe {
    display: block;
    margin-bottom: .375rem;
    font-size: .875rem;
    font-weight: 700;
    color: var(--nouvey-navy-dark);
}

/* Un intitule de groupe (cases a cocher, boutons radio) ne pointe vers aucun
   champ unique : un <label for> serait un lien mort. D'ou un paragraphe. */
.formulaire-nouvey .etiquette-groupe { margin-top: 0; }

.formulaire-nouvey label .obligatoire,
.formulaire-nouvey .etiquette-groupe .obligatoire { color: var(--nouvey-coral-dark); }

.formulaire-nouvey label .facultatif {
    font-weight: 500;
    color: var(--nouvey-grey-text);
}

.formulaire-nouvey .wpcf7-form-control-wrap { display: block; }

/* Le theme borde les champs en blanc (pense pour un fond bleu) : sur le
   degrade, une bordure douce donne du relief sans casser la charte. */
.wpcf7-form .formulaire-nouvey input[type="text"],
.wpcf7-form .formulaire-nouvey input[type="email"],
.wpcf7-form .formulaire-nouvey input[type="tel"],
.wpcf7-form .formulaire-nouvey input[type="number"],
.wpcf7-form .formulaire-nouvey select,
.wpcf7-form .formulaire-nouvey textarea {
    background-color: #fff;
    border-color: rgba(23, 28, 73, .12);
    border-radius: .75rem;
    padding: .75rem 1rem;
    font-weight: 500;
    color: var(--nouvey-navy-dark);
    box-shadow: 0 1px 2px rgba(23, 28, 73, .04);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.wpcf7-form .formulaire-nouvey input:focus,
.wpcf7-form .formulaire-nouvey select:focus,
.wpcf7-form .formulaire-nouvey textarea:focus {
    outline: none;
    border-color: var(--nouvey-navy);
    box-shadow: 0 0 0 3px rgba(117, 201, 219, .55);
}

.wpcf7-form .formulaire-nouvey textarea { min-height: 7rem; }

/* Boutons radio en ligne */
.formulaire-nouvey .wpcf7-radio {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
}

.formulaire-nouvey .wpcf7-radio .wpcf7-list-item { margin: 0; }

.formulaire-nouvey .wpcf7-radio label {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0;
    font-weight: 500;
    cursor: pointer;
}

.formulaire-nouvey .wpcf7-radio input[type="radio"] { accent-color: var(--nouvey-primary); }

/* ---- Envoi -------------------------------------------------------- */

.formulaire-nouvey .champ-envoi {
    margin: 1.75rem 0 0;
    text-align: center;
}

.wpcf7-form .formulaire-nouvey input[type="submit"] {
    min-width: 16rem;
    justify-content: center;
    padding: .75rem 2rem;
}

.wpcf7-form .formulaire-nouvey input[type="submit"]:disabled {
    /* Gris bleute : les composants desactives sont exemptes du critere de
       contraste WCAG, mais rester lisible (4,6:1 sur blanc) evite de donner
       l'impression que le bouton est casse. */
    background-color: #6E7396;
    cursor: not-allowed;
}

.wpcf7-form .formulaire-nouvey input[type="submit"]:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Le theme reserve 5rem de padding bas a tous les formulaires ; inutile
   ici, la section porte deja son propre rythme. */
.section-formulaire .wpcf7-form { padding-bottom: 0; }

/* ==================================================================
   Choix mis en evidence (cases a cocher presentees en cartes)
   Utilise pour "Format souhaite" : l'information decisive de la demande,
   remontee en tete de formulaire et rendue cliquable en grand.
   ================================================================== */

.formulaire-nouvey .champ-choix {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 1.25rem;
    background-color: #fff;
    box-shadow: 0 8px 32px rgba(23, 28, 73, .10);
}

.formulaire-nouvey .champ-choix > .etiquette-groupe {
    margin-bottom: .25rem;
    font-size: 1.0625rem;
    font-weight: 800;
    color: var(--nouvey-primary);
}

.formulaire-nouvey .champ-choix .aide {
    margin: 0 0 1rem;
    font-size: .875rem;
    font-weight: 500;
    color: var(--nouvey-grey-text);
}

.formulaire-nouvey .champ-choix .wpcf7-checkbox {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: .75rem;
}

@media (min-width: 768px) {
    .formulaire-nouvey .champ-choix .wpcf7-checkbox { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.formulaire-nouvey .champ-choix .wpcf7-list-item { margin: 0; }

.formulaire-nouvey .champ-choix .wpcf7-list-item > label {
    display: block;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

/* La case reste dans le flux pour rester atteignable au clavier ; seule sa
   representation visuelle est remplacee par la carte. */
.formulaire-nouvey .champ-choix input[type="checkbox"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.formulaire-nouvey .champ-choix .wpcf7-list-item-label {
    display: flex;
    align-items: flex-start;
    gap: .625rem;
    height: 100%;
    padding: 1rem;
    border: 2px solid var(--nouvey-border);
    border-radius: 1rem;
    background-color: #fff;
    font-size: .9375rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--nouvey-navy-dark);
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

/* Pastille de selection */
.formulaire-nouvey .champ-choix .wpcf7-list-item-label:before {
    content: "";
    flex: 0 0 auto;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 1px;
    border: 2px solid var(--nouvey-border);
    border-radius: .375rem;
    background-color: #fff;
    background-position: 50%;
    background-repeat: no-repeat;
    background-size: .75rem;
    transition: border-color .15s ease, background-color .15s ease;
}

.formulaire-nouvey .champ-choix .wpcf7-list-item-label:hover {
    border-color: var(--nouvey-sky);
}

.formulaire-nouvey .champ-choix input:checked + .wpcf7-list-item-label {
    border-color: var(--nouvey-primary);
    background-color: #F3F6FF;
}

.formulaire-nouvey .champ-choix input:checked + .wpcf7-list-item-label:before {
    border-color: var(--nouvey-primary);
    background-color: var(--nouvey-primary);
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M1.5 6.5 4.5 9.5 10.5 2.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* La case native etant masquee, c'est la carte qui doit montrer le focus. */
.formulaire-nouvey .champ-choix input:focus-visible + .wpcf7-list-item-label {
    border-color: var(--nouvey-navy);
    box-shadow: 0 0 0 3px rgba(117, 201, 219, .55);
}

.formulaire-nouvey .champ-choix .wpcf7-not-valid-tip {
    margin-top: .75rem;
    padding-left: 0;
}

/* ==================================================================
   Specifique a l'inscription aux webinaires
   ================================================================== */

/* Rappel du webinaire choisi, alimente par js/nouvey-custom.js.
   Toujours visible : tant qu'aucun webinaire n'est choisi, il porte la
   consigne qui explique quoi faire. */
.bloc-inscription-webinaire .rappel-webinaire {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    margin-bottom: 1.5rem;
    padding: .875rem 1.125rem;
    border-radius: .75rem;
    background-color: #fff;
    font-weight: 500;
    color: var(--nouvey-navy-dark);
}

.bloc-inscription-webinaire .rappel-webinaire strong {
    font-weight: 800;
    color: var(--nouvey-primary);
}

/* Etat "aucun webinaire choisi" : consigne, sans le libelle "Vous vous
   inscrivez au webinaire". */
.bloc-inscription-webinaire .rappel-webinaire .libelle-choix { display: none; }

.bloc-inscription-webinaire .rappel-webinaire.a-choisir { color: var(--nouvey-grey-text); }

.bloc-inscription-webinaire .rappel-webinaire.a-choisir .libelle-choix { display: inline; }

.bloc-inscription-webinaire .rappel-webinaire.a-choisir .libelle-inscrit,
.bloc-inscription-webinaire .rappel-webinaire.a-choisir strong { display: none; }

/* Le serveur a refuse la soumission faute de choix : le champ fautif etant
   invisible par nature, c'est le bloc de rappel qui porte l'alerte. */
.bloc-inscription-webinaire .rappel-webinaire.erreur {
    box-shadow: 0 0 0 2px var(--nouvey-coral-dark);
    color: var(--nouvey-coral-dark);
}

/* Aucune session ouverte : message a la place du formulaire */
.section-formulaire .inscription-indisponible {
    margin: 0;
    padding: 1.25rem 1.5rem;
    border: 2px dashed var(--nouvey-border);
    border-radius: .75rem;
    background-color: #fff;
    text-align: center;
    font-weight: 700;
    color: var(--nouvey-navy-dark);
}

/* ==================================================================
   Bloc "Téléchargements"
   Deux presentations d'une meme liste de fichiers : une grille qui
   montre l'apercu des visuels, une liste pour les documents dont la
   premiere page n'apprend rien.
   ================================================================== */

.block-telechargements {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.block-telechargements.fond-gris { background-color: var(--nouvey-grey-light); }

.block-telechargements .block-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

/* Meme raison que pour le bloc "Cartes" : une section pleine largeur sort
   du conteneur du theme et doit porter sa propre marge laterale. */
.block-telechargements.full-width .block-header,
.entry-content .block-telechargements.full-width .liste-telechargements {
    padding-left: 1rem;
    padding-right: 1rem;
}

.entry-content .block-telechargements .liste-telechargements {
    padding-left: 0;
    padding-right: 0;
}

.block-telechargements h2 {
    margin-bottom: 1rem;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1em;
    color: var(--nouvey-primary);
}

.block-telechargements .block-header .sous-titre {
    max-width: 46rem;
    margin-left: auto;
    margin-right: auto;
    font-weight: 500;
    color: var(--nouvey-navy-dark);
}

@media (min-width: 1024px) {
    .block-telechargements { padding-top: 4rem; padding-bottom: 4rem; }
    .block-telechargements h2 { font-size: 2.5rem; line-height: 1; }
}

/* ---- Grille commune ---------------------------------------------- */

.block-telechargements .liste-telechargements {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
    margin: 0;
    list-style: none !important;
}

.entry-content .block-telechargements .liste-telechargements > li {
    list-style: none !important;
    margin: 0;
}

@media (min-width: 768px) {
    .block-telechargements .liste-telechargements {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .block-telechargements.presentation-grille .liste-telechargements {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .block-telechargements.full-width .block-header,
    .entry-content .block-telechargements.full-width .liste-telechargements {
        padding-left: 0;
        padding-right: 0;
    }
}

/* ---- La carte ----------------------------------------------------- */

.block-telechargements .telechargement {
    display: flex;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    border-radius: 1.25rem;
    background-color: #fff;
    transition: transform .2s ease, box-shadow .2s ease;
}

.block-telechargements:not(.fond-gris):not(.fond-ciel) .telechargement {
    border: 1px solid var(--nouvey-border);
}

.block-telechargements .telechargement:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgb(23 28 73 / .16);
}

.block-telechargements .telechargement-apercu {
    margin: 0;
    line-height: 0; /* supprime l'espace sous l'image, qui reste une inline-box */
}

/* L'apercu epouse le haut de la carte : meme rayon que la carte sur les deux
   coins hauts, et « cover » plutot que « contain » pour qu'aucune bande de
   fond n'apparaisse si le fichier s'ecarte du 16:9.
   Le rayon est repete ici plutot que laisse au seul overflow:hidden de la
   carte : le rognage d'un enfant droit par un parent arrondi laisse un
   lisere sur plusieurs navigateurs. */
.block-telechargements .telechargement-apercu img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 1.25rem 1.25rem 0 0;
}

.block-telechargements .telechargement-corps {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 1.5rem;
}

.block-telechargements .telechargement-titre {
    margin: 0 0 .5rem;
    font-size: 1.125rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--nouvey-navy-dark);
}

.block-telechargements .telechargement-desc {
    margin: 0 0 .75rem;
    font-size: .9375rem;
    line-height: 1.5;
    color: var(--nouvey-grey-text);
}

/* Format et poids : discrets, mais lisibles avant le clic. */
.block-telechargements .telechargement-meta {
    margin: 0;
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--nouvey-grey-text);
}

/* Le bouton est pousse en bas : les cartes d'une meme rangee alignent leur
   bouton quelle que soit la longueur du texte au-dessus. */
.block-telechargements .telechargement-cta {
    margin: 1.25rem 0 0;
    padding-top: .25rem;
    margin-top: auto;
    text-align: center;
}

/* En grille, la carte se lit d'un coup d'oeil sous son apercu : tout est
   centre sur le meme axe. */
.block-telechargements.presentation-grille .telechargement-corps {
    text-align: center;
}

/* En liste, le titre et la description restent alignes a gauche (ce sont des
   phrases, qui se lisent mal centrees), mais le format, le poids et le bouton
   se centrent pour retrouver l'axe des cartes en grille. */
.block-telechargements.presentation-liste .telechargement-meta {
    text-align: center;
}

/* Mention de droits de la boite a outils : une note de bas de page, pas un
   paragraphe de contenu. Discrete, mais au-dessus du seuil de contraste. */
.entry-content p.mention-droits {
    max-width: 46rem;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    font-size: .875rem;
    font-style: italic;
    line-height: 1.5;
    color: var(--nouvey-grey-text);
}

/* Illustration de fin de grille : occupe la case vide de la derniere rangee.
   Masquee en une colonne, ou aucune case ne reste a combler. */
.block-telechargements .telechargement-illustration {
    display: none;
}

@media (min-width: 768px) {
    .block-telechargements .telechargement-illustration {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 1rem;
    }

    .block-telechargements .telechargement-illustration img {
        display: block;
        width: 100%;
        max-width: 15rem;
        height: auto;
    }
}

/* Dans le fil d'un article, le bloc suit un paragraphe qui l'annonce : la
   respiration d'une section de page (3 a 4rem) y ferait un trou. Classe posee
   a la main sur le bloc (champ « Classe CSS additionnelle »). */
.block-telechargements.dans-article {
    padding-top: .5rem;
    padding-bottom: 1rem;
}

/* La colonne d'un article ne fait que 744px : en trois colonnes, 1.5rem de
   marge interieure laisserait trop peu de place au titre. */
.block-telechargements.dans-article .telechargement-corps { padding: 1.25rem 1rem; }

/* ==================================================================
   Bloc "Lots" — dotations d'un jeu, un encart par territoire
   ================================================================== */

.block-lots {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* .entry-content ul { padding-left: 2rem } du theme est plus specifique :
   il faut le neutraliser explicitement, comme pour le bloc "Cartes". */
.entry-content .block-lots .lots-grille,
.entry-content .block-lots ol {
    margin: 0;
    padding-left: 0;
    list-style: none !important;
}

.entry-content .block-lots li { list-style: none !important; }

.block-lots .lots-grille {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .block-lots:not(.encart-unique) .lots-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Texte reserve aux lecteurs d'ecran : le theme n'a pas de classe sr-only. */
.block-lots .lots-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---- Encart d'un territoire --------------------------------------- */

.block-lots .lots-carte {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.75rem 1.5rem 1.5rem;
    background-color: #fff;
    border: 1px solid rgba(23, 28, 73, .08);
    border-top: 6px solid var(--nouvey-sky);
    border-radius: 1.25rem;
    box-shadow: 0 8px 32px rgba(23, 28, 73, .10);
}

.block-lots .lots-carte.accent-corail { border-top-color: var(--nouvey-coral); }

/* Le territoire et l'intitule forment un seul titre, empiles. */
.block-lots .lots-carte h3,
.entry-single .block-lots .lots-carte h3 {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .75rem;
    margin: 0 0 1.25rem;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--nouvey-primary);
}

/* Bleu nuit sur rose : 4,9:1. Le blanc sur rose plafonnerait a 3,6:1. */
.block-lots .lots-badge {
    display: inline-block;
    padding: .25rem .75rem;
    border-radius: 999px;
    background-color: var(--nouvey-sky);
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--nouvey-navy-dark);
}

.block-lots .accent-corail .lots-badge { background-color: var(--nouvey-coral); }

/* ---- Podium -------------------------------------------------------- */

.block-lots .lots-podium > li {
    display: flex;
    align-items: center;
    gap: .875rem;
    padding: .75rem 0;
    border-top: 1px solid rgba(23, 28, 73, .08);
}

.block-lots .lots-podium > li:first-child { border-top: 0; padding-top: 0; }

.block-lots .lots-rang {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    background-color: var(--nouvey-grey-light);
    font-size: .9375rem;
    font-weight: 800;
    line-height: 1;
    color: var(--nouvey-navy-dark);
}

.block-lots .lots-rang sup { margin-left: 1px; font-size: .625rem; }

.block-lots .lots-podium > li:first-child .lots-rang {
    width: 3.25rem;
    height: 3.25rem;
    background-color: var(--nouvey-primary);
    font-size: 1.0625rem;
    color: #fff;
}

.block-lots .lots-lot {
    font-weight: 700;
    line-height: 1.35;
    color: var(--nouvey-navy-dark);
}

.block-lots .lots-podium > li:first-child .lots-lot { font-size: 1.1875rem; font-weight: 800; }

.block-lots .lots-lot small {
    display: block;
    margin-top: .125rem;
    font-size: .8125rem;
    font-weight: 500;
    color: var(--nouvey-grey-text);
}

/* ---- Liste secondaire (tirage au sort), en petit corps ------------- */

.block-lots .lots-tirage {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 2px dashed rgba(23, 28, 73, .15);
}

.block-lots .lots-tirage h4,
.entry-single .block-lots .lots-tirage h4 {
    margin: 0 0 .625rem;
    font-size: .8125rem;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--nouvey-navy);
}

.block-lots .lots-liste { counter-reset: lot; }

.block-lots .lots-liste > li {
    counter-increment: lot;
    display: flex;
    align-items: baseline;
    gap: .5rem;
    padding: .3125rem 0;
    font-size: .8125rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--nouvey-grey-text);
}

.block-lots .lots-liste > li:before {
    content: counter(lot) ".";
    flex: 0 0 1.25rem;
    font-weight: 700;
    color: var(--nouvey-navy);
}

.block-lots .lots-libelle { flex: 1 1 auto; }

.block-lots .lots-valeur {
    flex: 0 0 auto;
    font-weight: 700;
    white-space: nowrap;
    color: var(--nouvey-navy-dark);
}

/* ==========================================================================
   Encart e-NOV 2026 (article Cybermois, 21/09/2026)
   Bloc « HTML personnalise » pose sous le lien d'inscription a e-NOV. Repris
   du bloc de tesis.fr, redessine pour la colonne de l'article : la mise en
   page suit la largeur de l'emplacement (container queries), pas l'ecran.
   Couleurs de l'evenement : navy #0d2765, corail #ff4438. A retirer avec le
   bloc apres le 13 novembre 2026.
   ========================================================================== */

.enov-wrap {
    container-type: inline-size;
    margin: 2rem 0;
}

.enov-band,
.enov-band * { box-sizing: border-box; }

.enov-band {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
    background: #fff;
    border-radius: 1.25rem;
    box-shadow: 0 0 14px rgba(0, 0, 0, .16);
    color: #3c3c3b;
    text-align: left;
}

/* Le theme donne des marges et une couleur aux paragraphes, images et liens
   de l'article : on les neutralise dans l'encart. */
.enov-band p {
    margin: 0 !important;
    padding: 0;
    color: #3c3c3b;
}

.enov-band img {
    margin: 0 !important;
    max-width: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.enov-band__visual {
    display: block;
    flex-shrink: 0;
    width: 100%;
    height: auto;
}

.enov-band__content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem 1.25rem;
    padding: 1.25rem 1.5rem 1.5rem;
}

.enov-band__text {
    display: flex;
    flex-direction: column;
    gap: .375rem;
    min-width: 0;
}

.enov-edition {
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.25rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #0d2765;
}

.enov-band p.enov-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.875rem;
    color: #0d2765;
}

.enov-band p.enov-date {
    font-size: 1rem;
    line-height: 1.5rem;
}

.enov-date strong { font-weight: 700; }

.enov-band p.enov-formats {
    font-size: .875rem;
    line-height: 1.375rem;
}

.enov-band__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.enov-band a.enov-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .5rem 1.125rem;
    border: 1px solid transparent;
    border-radius: 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5rem;
    text-decoration: none;
    white-space: nowrap;
    transition: all .2s ease-in;
}

.enov-band a.enov-btn--primary {
    background: #ff4438;
    border-color: #ff4438;
    color: #fff;
}

.enov-band a.enov-btn--primary:hover,
.enov-band a.enov-btn--primary:focus-visible {
    background: #fff;
    color: #ff4438;
}

.enov-band a.enov-btn--outline {
    background: transparent;
    border-color: #0d2765;
    color: #0d2765;
}

.enov-band a.enov-btn--outline:hover,
.enov-band a.enov-btn--outline:focus-visible {
    background: #0d2765;
    color: #fff;
}

/* QR code : inutile sur l'ecran que l'on tient en main */
.enov-qr { display: none; }

.enov-qr img {
    width: 6.5rem;
    height: 6.5rem;
    padding: .3125rem;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: .625rem;
    image-rendering: pixelated;
}

.enov-qr span {
    max-width: 7rem;
    font-size: .6875rem;
    line-height: 1rem;
    text-align: center;
    color: #3c3c3b;
}

/* A partir de 560 px d'emplacement : visuel a gauche, texte et boutons a droite */
@container (min-width: 560px) {
    .enov-band {
        flex-direction: row;
        align-items: center;
    }

    .enov-band__visual { width: 38%; }

    .enov-band__content {
        flex: 1 1 auto;
        padding: 1.5rem 1.5rem 1.5rem .25rem;
    }
}

/* A partir de 700 px d'emplacement, hors telephone et tablette : QR code */
@media (min-width: 1024px) {
    @container (min-width: 700px) {
        .enov-band__content { grid-template-columns: 1fr auto; }

        .enov-band__actions { grid-column: 1 / -1; }

        .enov-qr {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: .25rem;
        }
    }
}

/* ==========================================================================
   Bouton d'appel a l'action dans le fil d'un article (21/09/2026)
   Bouton du theme pose par nouvey_bouton() : « JE JOUE » dans l'article
   Cybermois. Le theme colore les liens de l'article : on rend au bouton la
   couleur de son libelle.
   ========================================================================== */

.entry-content .article-cta {
    margin: 1.5rem 0 2rem;
    text-align: center;
}

.entry-content .article-cta a.btn-primary,
.entry-content .article-cta a.btn-primary:hover { color: #fff; }
