/*
Theme Name: Ajc Jazz
Theme URI: 
Author: Damien Richard
Author URI: 
Description: 
Requires at least: 6.9
Tested up to: 6.9
Requires PHP: 8.0
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: twentytwentyfive
Text Domain: ajc-jazz
Tags: 
*/

:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper), 
:root :where(.wp-block-search .wp-element-button,.wp-block-search .wp-block-button__link) {
    border:none;
    color:var(--wp--preset--color--primary);
}


.wp-block-search__inside-wrapper input::placeholder {
    color: var(--wp--preset--color--primary);
}

:root :where(.wp-block-search .wp-block-search__input) {
    padding-left: 0.3rem;
}

.img-100 img {
    min-width:100%;
}

.accueil-projets-list .desc {
    position: relative;
    height: 0;
    margin: 0;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity .3s ease, transform .3s ease;
    pointer-events: none;
}

.accueil-projets-list:hover .desc {
    height: auto;
    opacity: 1;
    transform: translateY(0);
    color: var(--wp--preset--color--secondary)!important;
}

.accueil-projets-list .titre a {
    color: #fff!important;
    font-family: var(--wp--preset--font-family--barlow-condensed);
    font-size: clamp(2.2rem, 5vw, 4.5rem);
    font-weight: 900;
    line-height:1;
    -webkit-text-stroke: 1px var(--wp--preset--color--primary);
    transition: all .3s ease;
    text-decoration: none;
    letter-spacing:3px;
}

.accueil-projets-list:hover .titre a {
    color: var(--wp--preset--color--secondary)!important;
    -webkit-text-stroke: 1px var(--wp--preset--color--secondary);;
}

.wp-element-button::after,
.wp-block-button__link::after,
button.wp-element-button::after,
.wp-block-post-excerpt__more-link::after {
    content: "";
    display: inline-block;
    width: 0.9em;
    height: 0.9em;
    margin-left: 0.4em;
    background-color: currentColor;
    -webkit-mask-image: url("./assets/images/icon-fleche.svg");
    mask-image: url("./assets/images/icon-fleche.svg");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-position: center;
    mask-position: center;
}

.wp-block-search__button.wp-element-button::after,
.wp-block-search__button.wp-block-button__link::after,
.wp-block-search__button::after {
    content: none;
}

.wp-element-button,
.wp-block-button__link,
button.wp-element-button,
.wp-block-post-excerpt__more-link {
    display: inline-flex;
    align-items: center;
    text-transform:uppercase;
    font-weight:700;
    font-family: var(--wp--preset--font-family--barlow-condensed);
    text-decoration:none;

}

.wp-block-button .wp-block-button__link:hover,
.wp-block-button .wp-element-button:hover {
    color: var(--wp--preset--color--secondary);
}

.wp-block-button .wp-block-button__link,
.wp-block-button .wp-element-button{
    transition:color .3s ease;
}

.wp-block-button.is-style-light .wp-block-button__link,
.wp-element-button.is-style-light,
button.wp-element-button.is-style-light,
.wp-block-button .wp-block-button__link.is-style-light,
.wp-block-button .wp-element-button.is-style-light {
    background: transparent;
    border: none;
    box-shadow: none;
    color: var(--wp--preset--color--primary);
    padding:0px;
}

.wp-block-query img, .ajc-cpt-card__image img {
    filter: grayscale(1) contrast(1) sepia(0) hue-rotate(0) saturate(0);
    transition: filter 0.3s ease;
}

.wp-block-query .wp-block-post-featured-image,
.wp-block-query .wp-block-post-featured-image a,
.wp-block-query .wp-block-post-featured-image img {
    display: block;
}

.wp-block-query .wp-block-post-featured-image a {
    position: relative;
}

.wp-block-query .wp-block-post-featured-image a::after,
.ajc-cpt-card__image::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: var(--wp--preset--color--primary);
    mix-blend-mode: screen;
    opacity: 1;
    transform: scale(1.02);
    transition: opacity 0.3s ease, transform 0.45s ease;
    pointer-events: none;
}

.wp-block-query .wp-block-post-featured-image a:hover::after,
.wp-block-post:hover .wp-block-post-featured-image a::after,
.ajc-cpt-card:hover .ajc-cpt-card__image::after {
    opacity: 0;
    transform: scale(1);
}

.wp-block-query a:hover img,
.wp-block-query img:hover,
.wp-block-post:hover .wp-block-post-featured-image img,
.ajc-cpt-card:hover .ajc-cpt-card__image img {
    filter: none;
}


.wp-block-post .wp-block-post-title,
.wp-block-post .wp-block-post-excerpt,
.wp-block-post .wp-block-post-date,
.wp-block-post .wp-block-post-terms {
    color: var(--wp--preset--color--primary);
    transition: color .3s ease;
}

.wp-block-post-featured-image {
    max-width: 100%;
}

.gform_wrapper input[type="submit"].gform_button {
    border:solid 1px #fff;
    text-transform:uppercase;
    font-family: var(--wp--preset--font-family--barlow-condensed);
    font-weight:700;
    font-size:1.5rem;
    letter-spacing:1px;
    padding-right: 2.2em;
    background-image: url("./assets/images/icon-fleche.svg");
    background-repeat: no-repeat;
    background-size: 0.9em 0.9em;
    background-position: right 0.8em center;
    padding-top:.8rem;
    padding-bottom:.8rem;
}

strong {
    font-weight:700;
    color:var(--wp--preset--color--primary);
}

/* Dans un bloc à fond (groupe, colonne...), le strong reprend la couleur
   de texte du bloc : le bleu primary serait illisible ou hors charte. */
.has-background strong {
    color: inherit;
}

/* Page réseau */

@media(min-width:1046px) {
    .grid-reseau {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0px;
    }
}

.reseau-conseil-administration> .wp-block-group> div {
    width:48%;
}

.reseau-conseil-administration .fonction {
    font-size:13px;
    line-height:16px;
}

@media(max-width:1045px)  {
    .grid-reseau {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0px;
    }
}

.grid-reseau> :is(*, div) {
    min-height:150px;
}

.ajc-adherents-map {
    min-height: 60dvh;
    width: 100%;
    background: #f9f9fb;
    border-radius: 0px;
    overflow: hidden;
}

.ajc-adherents-map .leaflet-container {
    border-radius: inherit;
}

/* Marqueur rendu via L.divIcon : pastille aux couleurs de la charte,
   sans dépendre des images par défaut de Leaflet. */
.ajc-map-marker__dot {
    display: block;
    width: 18px;
    height: 18px;
    margin: 2px;
    border-radius: 50%;
    background: var(--wp--preset--color--primary);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgb(0 0 0 / 35%);
    transition: transform 0.15s ease;
}

.ajc-map-marker:hover .ajc-map-marker__dot,
.ajc-map-marker:focus-visible .ajc-map-marker__dot {
    transform: scale(1.15);
    background: var(--wp--preset--color--secondary);
}

/* Leaflet applique sa propre typographie et ses marges à la popup :
   on les neutralise pour retrouver le rendu de la charte.
   La largeur, elle, se règle via les options minWidth/maxWidth de
   bindPopup() : Leaflet la calcule en inline et s'en sert pour positionner
   la bulle — la surcharger en CSS désaligne la pointe. */
.leaflet-popup-content {
    margin: 0.75rem 1rem;
    font-family: var(--wp--preset--font-family--instrument-sans);
}

.ajc-adherent-info-window {
    font-family: var(--wp--preset--font-family--instrument-sans);
    font-size: 0.9rem;
    line-height: 1.3;
}

.ajc-adherent-info-window strong {
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

/* Surcharge `.leaflet-popup-content p { margin: 18px 0 }` de leaflet.css. */
.leaflet-popup-content .ajc-adherent-info-window p,
.ajc-adherent-info-window p {
    margin: 0;
}

.leaflet-popup-content .ajc-adherent-info-window a,
.ajc-adherent-info-window a {
    display: inline-block;
    margin-top: 0.4rem;
    font-weight: 600;
    color: var(--wp--preset--color--primary);
    text-decoration: underline;
}

/* L'attribution est obligatoire (ODbL / conditions Carto) : on l'harmonise
   avec la charte, sans jamais la masquer. */
.leaflet-container .leaflet-control-attribution {
    font-family: var(--wp--preset--font-family--instrument-sans);
    font-size: 0.7rem;
    background: rgb(255 255 255 / 80%);
}

.leaflet-container .leaflet-control-attribution a {
    color: var(--wp--preset--color--primary);
}

.ajc-cpt-filter {
    margin: 1rem auto 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    text-align: left;
}

.ajc-cpt-filter > label,
.ajc-cpt-filter__heading {
    color: var(--wp--preset--color--primary);
    margin: 0;
    font-family: var(--wp--preset--font-family--barlow-condensed);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 2rem;
    line-height: 2rem;
}

.ajc-cpt-filter select {
    width: 100%;
    color:var(--wp--preset--color--primary);
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--wp--preset--color--primary);
    background: var(--wp--preset--color--white);
    font-family: var(--wp--preset--font-family--barlow-condensed);
    text-transform:uppercase;
    font-size: 1rem;
    font-weight:bold;
}

.ajc-cpt-filter select option:disabled {
    color: rgba(60, 60, 61, 0.5);
}

.ajc-cpt-filter__radio-group {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 0.45rem;
    margin-top: 1rem;
}

.ajc-cpt-filter--adherents .ajc-cpt-filter__radio-group {
    flex-direction: column;
}

.ajc-cpt-filter__radio-option {
    position: relative;
}

.ajc-cpt-filter__radio-option input[type="radio"] {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

.ajc-cpt-filter__radio-option-label {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    padding: 0.3rem var(--wp--preset--spacing--space-s-plus, 1rem);
    border-radius: 999px;
    color: var(--wp--preset--color--primary);
    font-family: var(--wp--preset--font-family--barlow-condensed);
    font-size: var(--wp--preset--font-size--lg);
    font-weight: normal;
    text-transform: uppercase;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.ajc-cpt-filter__radio-option-label:hover,
.ajc-cpt-filter__radio-option input[type="radio"]:checked + .ajc-cpt-filter__radio-option-label {
    background: var(--wp--preset--color--light);
    font-weight: 700;
}

.ajc-cpt-filter__radio-option input[type="radio"]:disabled + .ajc-cpt-filter__radio-option-label {
    opacity: 0.45;
    cursor: not-allowed;
}

.ajc-cpt-filter__radio-option input[type="radio"]:focus-visible + .ajc-cpt-filter__radio-option-label {
    outline: 2px solid var(--wp--preset--color--secondary);
    outline-offset: 2px;
}

.ajc-cpt-query {
    margin-top: var(--wp--preset--spacing--space-lg);
    display: flex;
    flex-direction: column;
}

.ajc-cpt-query.ajc-cpt-query--loading {
    opacity: 0.6;
}

/* Barre recherche + compteur ([ajc_adherents_search]) — rendue en frère du
   conteneur de résultats, jamais dedans : #ajc-cpt-query est écrasé par
   innerHTML à chaque réponse AJAX. */
.ajc-cpt-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--wp--preset--spacing--space-md);
    margin-bottom: var(--wp--preset--spacing--space-md);
}

.ajc-cpt-toolbar__search {
    flex: 1 1 auto;
    max-width: 320px;
}

.ajc-cpt-search__input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--wp--preset--color--light);
    border-radius: 0;
    background-color: #fff;
    color: var(--wp--preset--color--dark);
    font-family: var(--wp--preset--font-family--instrument-sans, inherit);
    font-size: 0.9rem;
    line-height: 1.4;
}

.ajc-cpt-search__input:focus {
    outline: 2px solid var(--wp--preset--color--primary);
    outline-offset: -1px;
}

.ajc-cpt-toolbar__count {
    flex: 0 0 auto;
    margin: 0;
    font-family: var(--wp--preset--font-family--barlow-condensed, inherit);
    font-weight: 700;
    text-transform: uppercase;
    color: var(--wp--preset--color--primary);
    white-space: nowrap;
}

@media (max-width: 600px) {
    .ajc-cpt-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: var(--wp--preset--spacing--space-xs);
    }

    .ajc-cpt-toolbar__search {
        max-width: none;
    }

    .ajc-cpt-toolbar__count {
        text-align: right;
    }
}

.ajc-cpt-load-more {
    margin-top: var(--wp--preset--spacing--space-lg);
    text-align: center;
}

.ajc-cpt-load-more__button[disabled] {
    opacity: 0.55;
    cursor: progress;
}

.ajc-cpt-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--wp--preset--spacing--space-lg);
}

/* Actualités : 3 colonnes (projets hérite des 4 col par défaut).
   Grille reguliere : chaque ligne s'aligne sur la carte la plus haute.
   `stretch` (defaut CSS Grid) est explicite car un `align-items: start`
   herite ou reintroduit suffirait a recasser l'egalite des hauteurs. */

.ajc-cpt-query--actualites .ajc-cpt-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
}

@media (max-width: 1440px) {
    .ajc-cpt-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .ajc-cpt-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .ajc-cpt-grid {
        grid-template-columns: 1fr;
    }
}

.ajc-cpt-card--actualites.ajc-cpt-card {
    padding: 0 0 2rem;
    border-width: 0 0 1px 0;
}

.ajc-cpt-card--actualites .ajc-cpt-card__image {
    padding-bottom: 66.6667%; /* 3:2 */
}

.ajc-cpt-card--actualites .ajc-cpt-card__image img {
    object-fit: cover;
}


.ajc-cpt-card {
    border: 1px solid var(--wp--preset--color--primary);
    padding: var(--wp--preset--spacing--space-sm);
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ajc-cpt-card__image {
    display: block;
    block-size: 0;
    padding-bottom: 100%;
    overflow: hidden;
    position: relative;
}

.ajc-cpt-card__image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    aspect-ratio: 1/1;
}

/* `flex-start` annule le `space-between` de la regle generique
   `.ajc-cpt-card__body` ci-dessous, qui s'applique aussi a ces cartes : sur une
   carte etiree a la hauteur de sa ligne, il ecarterait date, titre et extrait
   les uns des autres. Le seul element a pousser en bas est le bouton. */

.ajc-cpt-card--actualites .ajc-cpt-card__body {
    justify-content: flex-start;
    gap:1rem;
    padding-top:1rem;
}

/* Le bouton est pousse en bas du corps de carte : combine a l'egalite des
   hauteurs de ligne, les boutons s'alignent entre eux sur une meme ligne.
   La marge auto prime sur le `justify-content` du conteneur. */

.ajc-cpt-card--actualites .ajc-cpt-card__body .wp-block-button {
    margin-top: auto;
}

.ajc-cpt-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 0;
}

.ajc-cpt-card__title {
    font-family: var(--wp--preset--font-family--barlow-condensed);
    font-size: 1.5rem;
    line-height: 1.2;
    text-transform: uppercase;
    margin: 0;
    font-weight:700;
}

.ajc-cpt-card__date {
    margin: 0;
    font-family: var(--wp--preset--font-family--barlow-condensed);
    font-size: 1.2rem;
    line-height: 1.2;
    color: var(--wp--preset--color--primary);
}

.ajc-cpt-card__excerpt {
    margin: 0;
    font-family: var(--wp--preset--font-family--instrument-sans);
    font-size: 1.05rem;
    line-height: 1.35;
    color: var(--wp--preset--color--primary);
}


.ajc-cpt-no-results {
    margin-top: var(--wp--preset--spacing--space-md);
    text-align: center;
    font-weight: 600;
}

.header-page figure, .header-page img {
    height:100%;
    object-fit:cover;
}

h1.wp-block-heading.is-style-text-subtitle--4,
h2.wp-block-heading.is-style-text-subtitle--4,
h3.wp-block-heading.is-style-text-subtitle--4,
h4.wp-block-heading.is-style-text-subtitle--4,
h5.wp-block-heading.is-style-text-subtitle--4,
h6.wp-block-heading.is-style-text-subtitle--4,
p.is-style-text-subtitle--4 {
    font-family: var(--wp--preset--font-family--barlow-condensed);
    font-weight: 700;
    text-transform: uppercase;
    color: var(--wp--preset--color--primary);
}

/* Lien(s) de telechargement PDF sur le single projet (sous le logo) */
.ajc-projet-pdf {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: var(--wp--preset--spacing--space-md, 1.5rem);
}

.ajc-projet-pdf__link {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--wp--preset--color--light);
    color: var(--wp--preset--color--primary);
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.ajc-projet-pdf__link:hover,
.ajc-projet-pdf__link:focus-visible {
    background-color: var(--wp--preset--color--secondary);
    border-color: var(--wp--preset--color--secondary);
}

.ajc-projet-pdf__icon {
    flex: 0 0 auto;
    display: block;
    width: 2rem;
    height: 2rem;
    color: currentColor;
}

.ajc-projet-pdf__icon svg {
    width: 100%;
    height: 100%;
}

.ajc-projet-pdf__label {
    font-family: var(--wp--preset--font-family--barlow-condensed);
    font-size: var(--wp--preset--font-size--sm);
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.2;
}


/* Colonne laterale du single adherent : bloc contact + liens externes */

.ajc-adherents-contact {
    margin-top: var(--wp--preset--spacing--space-md);
    color: var(--wp--preset--color--primary);
}

.ajc-adherents-contact__body > :first-child {
    margin-top: 0;
}

.ajc-adherents-contact__body > :last-child {
    margin-bottom: 0;
}

.ajc-adherents-liens {
    display: flex;
    margin-block-end:-1px !important;
    flex-wrap: wrap;
    gap: var(--wp--preset--spacing--space-sm);
    margin-top: var(--wp--preset--spacing--space-md);
    justify-content: center;
    border-top: 1px solid var(--wp--preset--color--primary);
    border-bottom: 1px solid var(--wp--preset--color--primary);
    padding-top: var(--wp--preset--spacing--space-md);
    padding-bottom: var(--wp--preset--spacing--space-md);
}

.ajc-adherents-liens__link {
    display: inline-flex;
    align-items: center;
    gap: var(--wp--preset--spacing--space-xs);
    color: var(--wp--preset--color--primary);
    text-decoration: none;
    transition: color .3s ease;
}

.ajc-adherents-liens__link:hover,
.ajc-adherents-liens__link:focus-visible {
    color: var(--wp--preset--color--secondary);
}

.ajc-adherents-liens__icon {
    display: inline-flex;
    width: 1.5rem;
    height: 1.5rem;
}

/* currentColor : les SVG suivent la couleur du lien, hover compris. */
.ajc-adherents-liens__icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Tant qu'une icone est presente, le label reste accessible sans occuper
   d'espace visuel. Sans icone (fichier SVG absent), le label reprend sa
   place : le lien reste lisible au lieu de disparaitre. */
.ajc-adherents-liens__icon + .ajc-adherents-liens__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* --- Blocs Programmation / Equipe (single adherent) --- */

.ajc-adherents-blocs {
    color: var(--wp--preset--color--primary);
}

/* Filet vertical entre les deux colonnes. Pose sur la 2e colonne plutot
   qu'en border-right de la 1re : le filet disparait ainsi de lui-meme
   quand les colonnes s'empilent (une seule colonne = pas de bordure gauche). */
.ajc-adherents-blocs > .wp-block-column + .wp-block-column {
    border-left: 1px solid var(--wp--preset--color--primary);
    padding-left: var(--wp--preset--spacing--space-lg);
}

.ajc-adherents-bloc__heading {
    margin: 0 0 var(--wp--preset--spacing--space-xs);
    font-family: var(--wp--preset--font-family--barlow-condensed);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ajc-adherents-bloc__body > :first-child {
    margin-top: 0;
}

.ajc-adherents-bloc__body > :last-child {
    margin-bottom: 0;
}

@media (max-width: 781px) {
    .ajc-adherents-blocs > .wp-block-column + .wp-block-column {
        border-left: 0;
        padding-left: 0;
    }
}

/* Containers réduits
   À appliquer via « Avancé > Classe(s) CSS additionnelle(s) » sur un bloc
   en pleine largeur ou en largeur de contenu. */

.container-narrow,
.container-tight {
    margin-inline: 0 auto;
}

.container-narrow {
    max-width: 900px;
}

.container-tight {
    max-width: 650px;
}

/* Neutralise la largeur imposée par le layout WordPress quand la classe
   est posée sur un bloc déclaré en pleine largeur ou en largeur large. */
.wp-site-blocks .container-narrow.alignfull,
.wp-site-blocks .container-narrow.alignwide,
.wp-site-blocks .container-tight.alignfull,
.wp-site-blocks .container-tight.alignwide {
    max-width: min(900px, 100%);
}

.wp-site-blocks .container-tight.alignfull,
.wp-site-blocks .container-tight.alignwide {
    max-width: min(650px, 100%);
}

/* Liste des offres d'emploi (repeater ACF options, colonne actualites) */
.ajc-offres-emploi {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ajc-offres-emploi__item + .ajc-offres-emploi__item {
    margin-top: var(--wp--preset--spacing--space-xs, 1rem);
}

.ajc-offres-emploi__item {
    padding-bottom: var(--wp--preset--spacing--space-xs, 1rem);
    border-bottom: 1px solid var(--wp--preset--color--primary);
    font-size: 1.2rem;
    line-height: 1.4rem;
    color: var(--wp--preset--color--primary);
}

.ajc-offres-emploi__link {
    display: block;
    color: var(--wp--preset--color--primary);
    font-family: var(--wp--preset--font-family--barlow-condensed);
    font-size: var(--wp--preset--font-size--md);
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.2;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size:14px;
}

.ajc-offres-emploi__link:hover,
.ajc-offres-emploi__link:focus-visible {
    color: var(--wp--preset--color--secondary);
}

.ajc-offres-emploi__more {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--wp--preset--color--primary);
    font-family: var(--wp--preset--font-family--barlow-condensed);
    font-size: var(--wp--preset--font-size--sm);
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.2;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.ajc-offres-emploi__more:hover,
.ajc-offres-emploi__more:focus-visible {
    color: var(--wp--preset--color--secondary);
}

/* Actualites liees a un adherent — shortcode [ajc_actus_adherent].
   Reprend le rendu de l'ancien bloc wp:query : titre a gauche, date a droite,
   items separes par une bordure basse. */
.ajc-actus-adherent {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ajc-actus-adherent__item {
	border-bottom: 1px solid var(--wp--preset--color--accent-6, var(--wp--preset--color--light));
}

.ajc-actus-adherent__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--space-s, 1rem);
	padding-block: var(--wp--preset--spacing--30, 1rem);
	text-decoration: none;
	color: inherit;
}

.ajc-actus-adherent__link:hover .ajc-actus-adherent__title,
.ajc-actus-adherent__link:focus-visible .ajc-actus-adherent__title {
	text-decoration: underline;
}

.ajc-actus-adherent__title {
	font-size: var(--wp--preset--font-size--md, 1.125rem);
	font-weight: 400;
    color:var(--wp--preset--color--primary);
    letter-spacing:0.1px;
}

.ajc-actus-adherent__date {
	flex-shrink: 0;
	text-align: right;
    color:var(--wp--preset--color--primary);
}

/* Message affiche quand un adherent n'a aucune actualite liee. Rendu seulement
   si l'attribut empty_text du shortcode est renseigne : sans lui, la section
   entiere (titre et bordures compris) est absente du front. */
.ajc-actus-adherent__empty {
	margin: 0;
	color: var(--wp--preset--color--primary);
}

/* Header mobile / tablette : burger a droite, recherche masquee, logo reduit.
   Regles regroupees plus bas dans la media query max-width: 991px, qui remonte
   la bascule burger au-dessus du breakpoint 782px du core. */

/* Header — zone intermediaire 782px -> 1259px
   Au-dessus de 781px le core WP sort le menu de l'overlay burger et le rend
   en ligne. Le bloc Navigation n'a pas de layout declare : il herite du
   defaut du core, flex-wrap: wrap. Entre 782px et ~1260px, logo 200px +
   7 entrees (dont "Le Reseau AJC" et "Vie du reseau") + recherche ne tiennent
   plus sur une ligne : le menu enroule sur deux lignes au lieu de rester
   horizontal. Le FSE n'expose ni le nowrap sur un bloc Navigation lie par
   ref, ni le breakpoint burger (781px, code en dur dans le core). */
@media (min-width: 992px) and (max-width: 1259px) {
    /* Interdit le retour a la ligne : le menu reste sur une ligne et c'est la
       largeur du logo et des espacements qui absorbe la contrainte. */
    header.wp-block-template-part .wp-block-navigation__container {
        flex-wrap: nowrap;
        gap: 0.75rem;
    }

    header.wp-block-template-part .wp-block-navigation {
        font-size: 1rem;
    }

    /* Le bloc Site Logo pose width: 200px en inline sur .wp-block-site-logo :
       surcharger le conteneur ET l'image, sinon l'image garde sa largeur
       intrinseque. Meme raison que dans la regle max-width: 781px. */
    header.wp-block-template-part .wp-block-site-logo {
        width: 140px;
    }

    header.wp-block-template-part .wp-block-site-logo img {
        width: 100%;
        height: auto;
    }

}

/* Sous 1024px, la tranche a 1rem devient trop serree : palier typo a 0.85rem.
   Regle posee apres le bloc 782-1259px, meme specificite : c'est l'ordre du
   fichier qui la fait gagner sur le font-size: 1rem au-dessus. */
@media (min-width: 992px) and (max-width: 1023px) {
    header.wp-block-template-part .wp-block-navigation {
        font-size: 0.85rem;
    }
}

/* Bascule burger remontee de 600px (defaut du core) a 991px
   Verifie dans wp-includes/blocks/navigation/style.min.css : les deux regles
   qui sortent le menu de l'overlay sont dans @media (min-width: 600px), pas
   782px. Le 782px de ce meme fichier gouverne le positionnement des sous-menus
   de second niveau et la marge de l'admin bar — pas la bascule burger.
   Le core n'expose ce breakpoint nulle part dans le FSE : on rejoue donc ses
   deux regles sur la tranche 600-991px, en reprenant ses gardes a l'identique.
   :not(.is-menu-open) — sans lui, l'overlay serait masque au moment meme ou
   l'utilisateur clique sur le burger.
   :not(.hidden-by-default) / :not(.always-shown) — marquent un menu regle sur
   overlayMenu "always" (overlay permanent). Ce menu-ci est en mode "mobile"
   (defaut, aucun overlayMenu declare dans header.html), mais sans ces gardes
   un futur changement de reglage dans l'editeur serait silencieusement annule
   au-dessus de 992px. */
@media (max-width: 991px) {
    header.wp-block-template-part .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
        display: none;
    }

    header.wp-block-template-part .wp-block-navigation__responsive-container-open:not(.always-shown) {
        display: flex;
    }

    /* Sans la recherche, le space-between du header ne repartit plus que deux
       enfants : le bloc Navigation se cale a droite. Le margin-left: auto
       verrouille ce comportement si un troisieme enfant revenait dans le
       header. */
    header.wp-block-template-part .wp-block-search {
        display: none;
    }

    header.wp-block-template-part .wp-block-navigation {
        margin-left: auto;
        width:100%;
    }

    /* Le bloc Navigation n'a pas de layout declare (aucun justifyContent dans
       header.html) : il herite du defaut du core, flex-start. Le bouton burger
       resterait donc colle a gauche a l'interieur du bloc, meme le bloc cale a
       droite. On aligne le contenu du bloc a droite. */
    header.wp-block-template-part .wp-block-navigation__responsive-container-open {
        margin-left: auto;
    }

    /* Burger 50% plus gros : le core pose height/width: 24px en dur sur le SVG
       (regle groupee avec la croix de fermeture, que l'on ne touche pas ici). */
    header.wp-block-template-part .wp-block-navigation__responsive-container-open svg {
        width: 36px;
        height: 36px;
    }

    header.wp-block-template-part .wp-block-site-logo {
        width: auto;
        max-width: 33vw;
    }

    header.wp-block-template-part .wp-block-site-logo img {
        width: auto;
        max-width: 100%;
        height: auto;
    }
}

/* Centrage du menu dans l'overlay
   Le core ne lit pas une propriete directe mais une variable :
   .wp-block-navigation__responsive-container-content { align-items:
   var(--navigation-layout-justification-setting, inherit) }, et la meme
   variable sur .wp-block-navigation__container. Sa valeur par defaut est
   flex-start (declaree sur .wp-block-navigation), d'ou le menu aligne sur un
   bord. On surcharge la variable plutot que l'align-items : c'est le point
   d'entree prevu, et il couvre d'un coup le conteneur, les items et les
   sous-menus.
   Le justify-content: flex-start pose par le core sur .wp-block-navigation__
   container n'a aucun effet ici : le conteneur est en flex-direction column,
   c'est align-items qui gouverne l'axe horizontal. */
header.wp-block-template-part .wp-block-navigation__responsive-container.is-menu-open {
    --navigation-layout-justification-setting: center;
}

/* Le margin-left: auto qui cale le burger a droite dans le header s'applique
   aussi au bloc quand l'overlay est ouvert : sans cette remise a zero, tout le
   contenu de l'overlay reste pousse contre le bord droit. */
header.wp-block-template-part .wp-block-navigation__responsive-container.is-menu-open,
header.wp-block-template-part .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
    margin-left: 0;
    margin-right: 0;
}

/* Correctif galerie logo footer */

.footer-logos .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image){
    width:calc(10% - var(--wp--style--unstable-gallery-gap, 16px)/2);
     margin-bottom:0;
}

.footer-logos  .wp-block-gallery.has-nested-images figure.wp-block-image img {
    max-width:100px !important;
}

/*correction grille actualités */
@media (max-width:991px){
    .ajc-cpt-query--actualites .ajc-cpt-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
}
    .footer-menu {
        flex-wrap: wrap;
        flex-basis:100%;
    }
}
