/* ================================================================
   HOME PAGE — Bio et Local
   Couleurs : Rose FRAB #D2097A | Vert FRAB #009C50 | Jaune #FFDB16
   Seules les règles que Bootstrap ne couvre pas sont ici.
   ================================================================ */

/* ── Google Font ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Boogaloo&display=swap');

/* ── Variables ───────────────────────────────────────────────── */
:root {
    --rose-frab: #D2097A;
    --vert-frab: #009C50;
    --jaune: #FFDB16;
    --font-title: 'Boogaloo', 'Arial Rounded MT Bold', sans-serif;
    --font-body: system-ui, -apple-system, 'Segoe UI', sans-serif;
    /* Alias pour agenda.css (filtre événements) */
    --ev-primary:    #D2097A;
    --ev-primary-dk: #a5076a;
}

/* ══════════════════════════════════════════════════════════════
   SECTION 1 — "À LA UNE"
   ══════════════════════════════════════════════════════════════ */
.home-une-visual {
    position: relative;
    height: 300px;
    padding : 50px 0;
    background-color: #222;
    background-size: cover;
    background-position: center;
}

/* Badge — déborde volontairement sur le bord gauche (mobile) */
.home-une-badge-wrap {
    z-index: 2;
}

@media (max-width: 576px) {
    .home-une-badge-wrap { 
        position: relative;
        left: -30px;
    }
}

.home-une-badge {
    display: inline-block;
    background: #fff;
    border-radius: 40px;
    padding: 8px 28px;
    font-family: var(--font-title);
    font-size: 36px;
    color: var(--rose-frab);
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 3px 14px rgba(0,0,0,0.22);
}

.home-une-excerpt {
    font-family: var(--font-title) !important;
    position: absolute;
    bottom: -10px;
    right: 20px;
    font-size: 20px;
    font-weight: 500;
    color: #fff;
    margin: 20px;
    line-height: 1.45;
    font-family: var(--font-body);
    z-index: 2;
}

.home-une-empty p { color: #888; }

/* Responsive tablette */
@media (min-width: 768px) {
    .home-une-visual  { height: 400px; }
    .home-une-badge   { font-size: 42px; padding: 10px 34px; }
    .home-une-excerpt { font-size: 22px; right: 32px; bottom: 28px; }
}

/* Responsive desktop — badge aligné sur le container Bootstrap */
@media (min-width: 992px) {
    .home-une-visual  { height: 500px; background-position: center center; }

    .home-une-badge      { font-size: 52px; padding: 12px 40px; }

    .home-une-excerpt {
        top: 148px;
        bottom: auto;
        right: auto;
        max-width: 55%;
        font-size: 32px;
    }
}

/* ══════════════════════════════════════════════════════════════
   SECTION 2 — ÉVÉNEMENTS
   ══════════════════════════════════════════════════════════════ */

/* Titre de section "pill" — déborde à gauche */
.home-section {
    padding: 50px 0 50px 0;
}
.home-section-title-wrap {
    margin-bottom: 12px;
}

@media (max-width: 576px) {
    .home-section-title-wrap { 
        position: relative;
        left: -50px;
    }
}

.home-section-pill {
    background: var(--rose-frab);
    border-radius: 40px;
    padding: 8px 24px 8px 44px;
}

.home-section-pill h2 {
    font-family: var(--font-title);
    font-size: 32px;
    color: #fff;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.1;
    font-weight: 400;
}

.home-more-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--vert-frab);
    text-decoration: none;
    border-bottom: 1px solid var(--vert-frab);
    padding-bottom: 1px;
    margin-right: 4rem;
}

/* Bouton "Plus de filtres" — style lien souligné vert ────────── */
.ev-filter-container .ev-btn-filtres {
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--vert-frab);
    border-radius: 0;
    padding: 0 0 2px;
    color: var(--vert-frab);
    font-size: 16px;
    font-weight: 600;
    gap: 8px;
    cursor: pointer;
}
.ev-filter-container .ev-btn-filtres:hover {
    background: transparent;
    opacity: 0.75;
}

.ev-filter-container .ev-btn-filtres-icon {
    padding-right: 4px;
}


/* ══════════════════════════════════════════════════════════════
   SECTION ÉDITORIALE — Titre édition + dates + description + affiche
   ══════════════════════════════════════════════════════════════ */
.ev-arc-title {
    font-family: var(--font-title);
    font-size: 30px;
    color: var(--rose-frab);
    text-align: center;
    text-transform: uppercase;
    margin: 0 0 10px;
    line-height: 1.05;
    font-weight: 400;
}

.ev-arc-subtitle {
    font-family: var(--font-title);
    font-size: 24px;
    color: var(--vert-frab);
    margin: 0 0 14px;
    line-height: 1.15;
    font-weight: 400;
}

.ev-arc-intro {
    display: block;
    margin-bottom: 30px;
}

.ev-arc-affiche-wrap {
    margin: 12px auto 0;
}

@media (min-width: 900px) {
    .ev-arc-intro {
        display: flex;
        align-items: flex-start;
        gap: 12px;
    }

    .ev-arc-affiche-wrap {
        margin: 0;
    }
}

.ev-arc-description {
    flex: 1;
    font-family: var(--font-body);
    font-size: 14px;
    color: #000;
    line-height: 1.6;
    margin: 0;
    min-width: 0;
}

.ev-arc-description strong,
.ev-arc-description b {
    color: var(--rose-frab);
    font-weight: 700;
}

.ev-arc-description h2 {
    font-family: var(--font-title);
    color: var(--rose-frab);
    font-size: 1.5rem;
    margin-bottom: 0.5em;
    text-transform: uppercase;
}

/* Images WYSIWYG dans texte_de_presentation
   — wp_kses_post supprime style="float:right" inline,
     on ré-applique le float via class="alignright/alignleft"   */
.ev-arc-description img.alignright,
.ev-arc-description p img.alignright,
.ev-arc-description img[align="right"],
.ev-arc-description p img[align="right"],
.ev-arc-description figure.alignright {
    float: right;
    margin: 0 0 16px 24px;
    max-width: 45%;
    height: auto;
    border-radius: 6px;
}

.ev-arc-description img.alignleft,
.ev-arc-description p img.alignleft,
.ev-arc-description img[align="left"],
.ev-arc-description p img[align="left"],
.ev-arc-description figure.alignleft {
    float: left;
    margin: 0 24px 16px 0;
    max-width: 45%;
    height: auto;
    border-radius: 6px;
}

.ev-arc-description figure img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}

.ev-arc-description::after {
    content: '';
    display: table;
    clear: both;
}

.ev-arc-affiche-wrap {
    flex-shrink: 0;
    width: 135px;
}

.ev-arc-affiche {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

@media (min-width: 900px) {
    .ev-arc-title       { font-size: 50px; }
    .ev-arc-subtitle    { font-size: 36px; }
    .ev-arc-description { font-size: 16px; }
}

/* ══════════════════════════════════════════════════════════════
   SECTION 3 — BLOCS NAVIGATION
   ══════════════════════════════════════════════════════════════ */

/* Section de base (chaque bloc = sa propre section container-fluid) */
.home-nav-bloc {
    padding: 32px 0;
}

.home-nav-bloc-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.home-nav-bloc-header {
    flex: 1;
}

.home-nav-bloc-title {
    font-family: var(--font-title);
    font-size: 26px;
    text-transform: uppercase;
    font-weight: 400;
    line-height: 1.1;
    margin: 0 0 10px;
}

.home-nav-bloc-intro {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    padding: 0 30px;
}

.home-nav-bloc-intro p            { margin: 0 0 6px; }
.home-nav-bloc-intro p:last-child { margin-bottom: 0; }
.home-nav-bloc-intro ul           { padding-left: 18px; margin: 4px 0 6px; }

/* ── Impaire (fond blanc) ────────────────────────────────────── */
.home-nav-bloc--impair .home-nav-bloc-title { color: var(--rose-frab); }
.home-nav-bloc--impair .home-nav-bloc-intro { color: #333; }
.home-nav-bloc--impair .home-nav-bloc-intro strong,
.home-nav-bloc--impair .home-nav-bloc-intro b {
    color: var(--rose-frab);
    font-weight: 700;
}

/* ── Paire (fond vert pleine largeur) ────────────────────────── */
.home-nav-bloc--pair { background: var(--vert-frab); }
.home-nav-bloc--pair .home-nav-bloc-title { color: #fff; }
.home-nav-bloc--pair .home-nav-bloc-intro { color: #fff; }
.home-nav-bloc--pair .home-nav-bloc-intro strong,
.home-nav-bloc--pair .home-nav-bloc-intro b {
    color: var(--jaune);
    font-weight: 700;
}

/* ── Desktop : header à gauche, bouton à droite, padding ++ ──── */
@media (min-width: 768px) {
    .home-nav-bloc { padding: 52px 0; }

    .home-nav-bloc-inner {
        align-items: center;
        gap: 48px;
    }

    .home-nav-bloc-title { font-size: 36px; }
    .home-nav-bloc-intro { font-size: 15px; }

    .home-nav-block { flex-shrink: 0; }
}

/* ── Desktop : header à gauche, bouton à droite, padding ++ ──── */
@media (min-width: 900px) {

    .home-nav-bloc-inner {
        flex-direction: row;
    }
}

.home-nav-block {
    position: relative;
    min-height: 100px;
    margin: 0 30px;
    max-width: max-content;
}

.home-nav-block-box {
    flex: 1;
    border: 2px dashed var(--rose-frab);
    border-radius: 10px;
    background: rgb(255, 255, 255);
    box-shadow: 0 0 15px rgba(0,0,0,0.25);
    padding: 14px 14px 14px 70px;
    min-height: 79px;
}

.home-nav-block-icon {
    position: absolute;
    left: -4px;
    z-index: 1;
}

.home-nav-block-icon--question {
    font-family: var(--font-title);
    font-size: 100px;
    color: var(--jaune);
    line-height: 1;
    margin-top: -4px;
    text-shadow: 2px 2px 0 rgba(210,0,122,0.15);
}

.home-nav-block-icon img {
    display: block;
    width: 110px;
    height: 110px;
    object-fit: contain;
    position: absolute;
    left: -40px;
}

.home-nav-block-text {
    font-family: var(--font-title);
    font-size: 24px;
    text-transform: uppercase;
    line-height: 1.05;
    margin: 0;
}

.home-nav-block-text span { display: block; }
.home-nav-block-text .t-green { color: var(--vert-frab); }
.home-nav-block-text .t-pink  { color: var(--rose-frab); }

/* ══════════════════════════════════════════════════════════════
   SECTION 4 — BIOSEPTIQUES PROMO
   ══════════════════════════════════════════════════════════════ */
.home-bioseptiques-cover-wrap {
    position: relative;
    top: 50px;
    margin: 0 auto -1px;
}

.home-bioseptiques-cover {
    width: 200px;
    height: 142px;
    object-fit: cover;
    border: 4px solid var(--vert-frab);
    border-radius: 10px 10px 0 0;
    position: relative;
    z-index: 1;
}

.home-bioseptiques-bg {
    background: var(--vert-frab);
    padding: 50px 20px 28px;
}

.home-bioseptiques-text {
    font-family: var(--font-title);
    font-size: 22px;
    color: #fff;
    margin: 8px 0 16px;
    line-height: 1.2;
    padding: 0 20px;
}

.home-bioseptiques-btn {
    background: var(--rose-frab);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 32px;
    border-radius: 10px;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.home-bioseptiques-btn:hover { opacity: 0.9; }

/* ══════════════════════════════════════════════════════════════
   SECTION ACTUS — Carousel articles (Slick Slider)
   ══════════════════════════════════════════════════════════════ */

.home-actus-section {
    background: var(--vert);
    padding: 28px 0 40px;
    overflow: hidden;
}

/* Titre (pill blanc sur fond rose, débordant légèrement à gauche) */
.home-actus-heading-wrap {
    margin-bottom: 16px;
    position: relative;
    left: -16px;
}

@media (max-width: 576px) {
    .home-actus-heading-wrap { left: -30px; }
}

.home-actus-heading {
    display: inline-block;
    color: #fff;
    border-radius: 40px;
    padding: 8px 28px 8px 44px;
    font-family: var(--font-title);
    font-size: 32px;
    background: var(--rose-frab);
    text-transform: uppercase;
    margin: 0;
    line-height: 1.1;
    font-weight: 400;
}

@media (min-width: 768px) {
    .home-actus-heading { font-size: 38px; }
}

/* Filtres catégories */
.home-actus-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.home-actus-filter {
    border: none;
    border-radius: 40px;
    padding: 5px 20px;
    font-family: var(--font-title);
    font-size: 16px;
    text-transform: uppercase;
    cursor: pointer;
    line-height: 1.3;
    transition: opacity 0.2s, box-shadow 0.2s;
}

.home-actus-filter:hover { opacity: 0.85; }

.home-actus-filter.is-active {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.75);
}

.home-actus-filter--jaune { background: var(--jaune); color: #333; }
.home-actus-filter--vert  { background: var(--vert-frab); color: #fff; }
.home-actus-filter--rose  { background: #fff; color: var(--rose-frab); }

/* Wrapper slider + flèches */
.home-actus-slider-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-actus-slider {
    flex: 1;
    min-width: 0;
}

/* Boutons de navigation */
.home-actus-nav {
    flex-shrink: 0;
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    padding: 0;
    transition: opacity 0.2s;
}

.home-actus-nav:hover { opacity: 0.8; }

/* Slides */
.home-actus-slide {
    padding: 0 6px;
    height: 100%;
    box-sizing: border-box;
}

/* Carte article */
.home-actus-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    color: inherit;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
    height: 100%;
    transition: box-shadow 0.2s;
}

.home-actus-card:hover {
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
}

/* En-tête coloré avec le titre */
.home-actus-card-header {
    padding: 14px 12px;
    font-family: var(--font-title);
    font-size: 18px;
    line-height: 1.2;
    color: #fff;
    height: 90px;
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: center;
    overflow: hidden;
}

.home-actus-card-header span {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-actus-card-header--rose  { background: var(--rose-frab); }
.home-actus-card-header--jaune { background: var(--jaune); color: #333; }
.home-actus-card-header--vert  { background: var(--vert-frab); }

/* Image */
.home-actus-card-img {
    overflow: hidden;
    aspect-ratio: 4 / 3;
    flex-shrink: 0;
}

.home-actus-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-actus-img-placeholder {
    width: 100%;
    height: 100%;
    background: #e6e6e6;
}

/* Corps : date + extrait */
.home-actus-card-body {
    padding: 12px;
    flex: 1;
}

.home-actus-card-date {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    color: var(--vert-frab);
    margin: 0 0 6px;
}

.home-actus-card-excerpt {
    font-family: var(--font-body);
    font-size: 13px;
    color: #333;
    line-height: 1.5;
    margin: 0;
}

/* Bouton nav affiché sous le carousel dans la section actus */
.home-actus-nav-block {
    margin-top: 28px;
}

/* Correctifs Slick pour hauteurs égales */
.home-actus-slider .slick-track {
    display: flex !important;
    align-items: stretch;
}
.home-actus-slider .slick-slide {
    height: auto !important;
    display: flex !important;
}
.home-actus-slider .slick-slide > div {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.home-actus-slider .home-actus-slide {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.home-actus-slider .home-actus-card {
    flex: 1;
}
