/*
Theme Name: Comite des Fetes Marmande
Theme URI: https://www.comite-des-fetes-marmande.fr/
Author: Greg Web
Description: Intégration CSS Avancée - Alignement Onglets sur Grille Finale avec Correctif Responsive
Version: 7.0
Text Domain: cf-marmande
*/

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    font-family: 'Poppins', sans-serif;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

.site-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- LE HEADER POUR L'ACCUEIL (Avec ton Photoshop plein de ballons) --- */
.home .site-header {
    width: 100%;
    background-image: url('https://www.comite-des-fetes-marmande.fr/wp-content/uploads/2026/06/header-acc.png');
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
}

/* --- LE HEADER POUR LES AUTRES PAGES (Plus simple, moins haut) --- */
.site-header {
    width: 100%;
    background-image: url('https://www.comite-des-fetes-marmande.fr/wp-content/uploads/2026/06/header.png');
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
}

.header-top-bar {
    width: 100%;
    padding: 20px 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
}

.site-logo .main-logo-img {
    height: 80px !important;
    width: auto !important;
    display: block !important;
}

/* --- ALIGNEMENT DU LOGO AVEC SON TEXTE --- */
.logo-link {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    text-decoration: none !important;
}

.logo-text-fetes {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-text-fetes .text-fetes-1 {
    font-family: 'Caveat', cursive;
    font-size: 40px;
    font-weight: 700;
    color: #072241;
}

.logo-text-fetes .text-fetes-2 {
    font-family: 'Caveat', cursive;
    font-size: 30px;
    font-weight: 700;
    color: #e30d42;
    padding-left: 10px;
}

/* --- ALIGNEMENT ET STYLE DU MENU PRINCIPAL --- */
.site-navigation {
    display: flex;
    justify-content: flex-end;
    flex-grow: 1;
    margin-left: 40px; 
}

.site-navigation ul,
.site-navigation .nav-menu,
.site-navigation div > ul {
    display: flex !important;
    flex-direction: row !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 30px !important;
}

.site-navigation ul li a,
.site-navigation div > ul li a {
    text-decoration: none !important;
    font-family: 'Poppins', sans-serif !important;
    color: #072241 !important; 
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 14px !important; 
    letter-spacing: 0.5px !important;
    padding: 10px 0 !important;
    display: inline-block !important;
    transition: color 0.2s ease !important;
}

.site-navigation ul li.current-menu-item a,
.site-navigation ul li.current_page_item a,
.site-navigation div > ul li.current-menu-item a {
    color: #d63246 !important; 
    border-bottom: 3px solid #d63246 !important; 
    padding-bottom: 7px !important;
}

.site-navigation ul li a:hover,
.site-navigation div > ul li a:hover {
    color: #d63246 !important;
    border-bottom: 3px solid #d63246 !important;
    padding-bottom: 7px !important;
}

/* --- ZONE HERO (ACCUEIL) --- */
.header-hero-content {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.hero-container {
    width: 100%;
    display: flex;
    align-items: stretch;
    position: relative;
}

.hero-left-text {
    width: 70%;
    padding: 50px 20px 60px 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* Le bloc H1 Bienvenue */
.hero-left-text h1.welcome-block {
    display: flex !important;
    flex-direction: column !important;
    transform: rotate(-1deg);
    margin: 0 0 35px 0 !important; 
    padding: 0 !important;
}

.hero-left-text h1.welcome-block span {
    font-family: 'Caveat', cursive !important;
    font-weight: 700 !important;
    line-height: 0.9 !important;
}

.hero-left-text h1.welcome-block .welcome-text-1 {
    font-size: 32px !important;
    color: #0f172a !important;
}

.hero-left-text h1.welcome-block .welcome-text-2 {
    font-size: 64px !important;
    color: #128285 !important;
}

.hero-left-text h1.welcome-block .welcome-text-3 {
    font-size: 54px !important;
    color: #cc2b43 !important;
    padding-left: 50px !important;
}

/* Le Slogan sous le H1 */
.hero-slogan-text {
    font-family: 'Poppins', sans-serif !important;
    font-size: 34px !important;
    font-weight: 900 !important;
    color: #0f172a !important;
    line-height: 1.25 !important;
    margin: 0 !important;
}

.hero-slogan-text .highlight-teal { color: #128285; }
.hero-slogan-text .highlight-red { color: #cc2b43; }
.hero-slogan-text .highlight-orange { color: #e66e26; }

/* Bloc de droite image */
.hero-right-box {
    width: 55%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.team-wave-clip {
    width: 100%;
    height: 100%;
    min-height: 520px;
    clip-path: polygon(15% 0%, 100% 0%, 100% 100%, 0% 100%, 8% 50%);
    background-color: #e2e8f0;
    overflow: hidden;
}

.team-real-img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    object-position: center center;
    display: block;
}

.hero-blue-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: #0b2240; 
    color: #ffffff;
    padding: 30px 40px;
    width: 280px;
    border-top-left-radius: 40px; 
    z-index: 15;
    box-shadow: -5px -5px 20px rgba(0,0,0,0.15);
}

.hero-blue-badge p {
    margin: 0;
    font-family: 'Caveat', cursive;
    font-weight: 700;
    line-height: 1;
}

.hero-blue-badge .badge-text-1 { font-size: 32px; }
.hero-blue-badge .badge-text-2 { font-size: 24px; opacity: 0.9; padding-left: 10px; }
.hero-blue-badge .badge-text-3 { font-size: 26px; color: #e66e26; padding-left: 15px; margin-top: 5px; }

/* --- ONGLETS DE COULEUR --- */
.header-tabs {
    display: flex;
    width: 100%;
    position: relative;
    z-index: 20;
    background: transparent;
}

.tab-item {
    flex: 1;
    padding: 22px 40px; 
    color: #ffffff;
    display: flex;
    align-items: center;
    min-height: 85px;
}

.tab-content {
    display: flex;
    flex-direction: column;
}

.tab-title {
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tab-sub {
    font-size: 11px;
    opacity: 0.9;
}

.tab-events { background-color: #cc2b43; }
.tab-social { background-color: #e66e26; }
.tab-partner { background-color: #128285; }
.tab-benevolat { background-color: #df9e26; }

/* --- STRUCTURES DES PAGES INTERIEURES --- */
.header-simple-bar {
    width: 100%;
    background-color: #151c28;
    padding: 25px 0;
    text-align: center;
}

.simple-bar-container {
    max-width: 1200px; 
    margin: 0 auto;
    padding: 0 40px; 
}

.page-title-simple {
    font-family: 'Poppins', sans-serif;
    font-size: 36px;
    font-weight: 900;
    color: #ffffff; 
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.site-main {
    width: 100%;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
}

.entry-content {
    width: 100%;
    max-width: 1200px; 
    margin: 0 auto;
    padding: 0px 40px; 
    font-size: 16px;
    line-height: 1.8;
    color: #334155;
}

.entry-content p {
    margin-top: 0;
    margin-bottom: 24px;
}

.entry-content h2 {
    font-family: 'Poppins', sans-serif;
    color: #072241;
    margin-top: 40px;
    margin-bottom: 20px;
}

/* --- FOOTER & GRILLE --- */
.site-footer {
    background: #151c28;
    color: #ffffff;
    padding: 60px 0 30px 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.footer-widgets-grid {
    display: grid;
    grid-template-columns: 0.5fr 1.6fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
    text-align: left;
    align-items: flex-start;
}

.footer-col .wp-block-image {
    margin: 0;
}

.footer-col .wp-block-image img {
    height: auto;
    max-width: 110px;
}

.footer-widget-item p {
    font-size: 14px;
    line-height: 1.8;
    color: #cbd5e1;
    margin: 0;
    text-align: justify;
}

.footer-col h2, 
.footer-col h3,
.footer-col .widgettitle {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-widget-item ul,
.menu-menu-1-footer-container ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.footer-widget-item li {
    margin-bottom: 14px;
    list-style: none !important;
}

.footer-widget-item li:last-child {
    margin-bottom: 0;
}

.footer-widget-item a {
    color: #cbd5e1 !important;
    text-decoration: none !important;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    display: inline-block;
}

.footer-widget-item a:hover {
    color: #d63246 !important;
}
/* Lien de la page active (Actif) */
.footer-widget-item .current-menu-item a {
    color: #d63246 !important;
    font-weight: 600; /* Optionnel : met le lien actif un poil plus épais pour mieux le repérer */
}
.footer-credits {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 25px;
    text-align: center;
}

.footer-credits p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

.white p,.white h2,.white h3 { 
    color: #ffffff;
    margin:0px;
}
.white h2,.white h3 { 
    margin-top:20px;
    margin-bottom:20px;
}


/* --- PAGE ARTICLE UNIQUE --- */
.single-article-main {
    background-color: #ffffff; /* Fond blanc propre sous l'article */
}

.single-article-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 25px 40px;
}

.article-title {
    font-family: 'Comfortaa', sans-serif;
    font-size: 2.2rem;
    color: #1e293b;
    margin-bottom: 25px;
    line-height: 1.3;
}

.article-featured-img {
    width: 100%;
    height: auto;
    border-radius: 8px; /* Un petit arrondi sympa sur la photo du lac */
    margin-bottom: 30px;
}

/* Espace un peu les paragraphes et listes de l'article */
.article-content-body p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: #334155;
}

.article-content-body ul {
    margin-bottom: 1.5rem;
    padding-left: 20px;
}

.article-content-body li {
    margin-bottom: 0.5rem;
}

/* --- LE BLOC DE LA GRILLE (Fixe et net) --- */
/* 1. CONTENEUR GLOBAL : Centrage parfait des cartes */
.vc_pageable-slide-wrapper {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important; /* Force les cartes à se regrouper proprement au centre */
    gap: 30px !important; /* Espace fixe et net entre chaque carte */
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    float: none !important;
}

/* On flingue définitivement les retours à la ligne invisibles de WPBakery */
.vc_pageable-slide-wrapper::before,
.vc_pageable-slide-wrapper::after {
    display: none !important;
    content: none !important;
}

/* 2. LES CARTES : Largeur fixe et identique pour tout le monde sur PC */
.vc_grid-item.vc_col-sm-4 {
    flex: 0 1 calc(33.333% - 20px) !important; /* Ne s'étire pas au-delà d'un tiers de l'écran */
    width: calc(33.333% - 20px) !important;
    max-width: 360px !important; /* Largeur maximale idéale pour garder le format carte de ta maquette */
    min-width: 290px !important; 
    float: none !important; /* Bloque le comportement qui pousse à droite ou à gauche */
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

.vc_grid-item {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05) !important;
}

/* 3. ALIGNEMENT INTERNE : Boutons calés au même niveau */
.vc_grid-item-mini {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    width: 100% !important;
}

.vc_gitem-zone-c {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    flex-grow: 1 !important;
    padding: 25px !important; 
    background: #ffffff !important;
    width: 100% !important;
}

.vc_gitem-zone-c .vc_gitem_row {
    display: block !important;
    width: 100% !important;
}

/* --- LE TITRE --- */
.vc_gitem-post-data-source-post_title h4 {
    font-family: 'Comfortaa', sans-serif !important;
    font-size: 1.4rem !important; 
    color: #0f172a !important; 
    font-weight: 700 !important;
    line-height: 1.4 !important;
    margin-top: 0 !important;
    margin-bottom: 14px !important;
}

/* --- L'EXTRAIT DU TEXTE --- */
.vc_gitem-post-data-source-post_excerpt p {
    font-family: sans-serif !important; 
    font-size: 0.95rem !important;
    color: #475569 !important; 
    line-height: 1.6 !important;
    margin-bottom: 25px !important;
}

/* --- LE BOUTON (Rouge/Rose festif, fixe) --- */
.vc_btn3-container {
    margin: 0 !important;
}

/* --- LE BOUTON (Uniquement dans la grille d'articles) --- */
.vc_grid-item .vc_btn3-container .vc_general.vc_btn3 {
    background-color: #ff4757 !important; 
    color: #ffffff !important; 
    font-family: 'Comfortaa', sans-serif !important;
    font-weight: bold !important;
    font-size: 0.9rem !important;
    padding: 12px 28px !important; 
    border-radius: 50px !important; 
    border: none !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    display: inline-block !important;
}

a[href^="tel:"], 
a[href^="mailto:"] {
    color: inherit !important; /* Force le lien à prendre la couleur de son texte parent (ex: blanc dans le footer) */
    text-decoration: none !important; /* Enlève le soulignement moche */
    font-weight: inherit !important;
    font-family: inherit !important;
}

/* Sécurité pour Safari / iOS et certains navigateurs PC */
[x-apple-data-detectors],
.col-phone a,
.col-mail a {
    color: inherit !important;
    text-decoration: none !important;
    font-size: inherit !important;
    font-family: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
}


/* =======================================================
   --- SECTION CORRECTIVE RESPONSIVE COMPLÈTE (PROPRE) ---
   ======================================================= */

/* --- TABLETTES ET GRANDS ÉCRANS INTERMÉDIAIRES (max-width: 1024px) --- */
@media (max-width: 1024px) {
    .hero-left-text {
        padding-left: 40px; /* On réduit le trop gros retrait à gauche */
        width: 60%;
    }
    .hero-right-box {
        width: 40%;
    }
    .hero-slogan-text {
        font-size: 26px !important; /* Réduction du slogan pour éviter la casse */
    }
    .hero-left-text h1.welcome-block .welcome-text-2 { font-size: 50px !important; }
    .hero-left-text h1.welcome-block .welcome-text-3 { font-size: 40px !important; }
    
    .header-tabs {
        flex-wrap: wrap; /* Les onglets passent sur deux lignes si besoin */
    }
    .tab-item {
        flex: bottom;
        width: 50%;
        min-height: 75px;
        padding: 15px 30px;
    }
}

/* --- SMARTPHONES ET PETITES TABLETTES (max-width: 768px) --- */
@media (max-width: 768px) {
    
    /* --- HEADER EN FLUX ACCORDÉON GLOBAL --- */
    .header-container {
        display: flex !important;
        flex-wrap: wrap !important; /* Permet aux éléments de passer à la ligne */
        justify-content: space-between !important;
        align-items: center !important;
        padding: 15px 20px !important;
    }
    
    .logo-link {
        display: flex !important;
        flex-direction: row !important; /* Maintien du logo et texte côte à côte */
        align-items: center !important;
        gap: 12px !important;
    }
    
    .site-logo .main-logo-img {
        height: 60px !important; /* Un poil plus petit sur mobile pour faire de la place */
    }
    
    .logo-text-fetes .text-fetes-1 { font-size: 26px !important; }
    .logo-text-fetes .text-fetes-2 { font-size: 20px !important; padding-left: 5px !important; }

    /* --- LE BOUTON HAMBURGER ET SA ZONE NAVIGATION --- */
    .site-navigation {
        width: 100% !important; /* Force le conteneur du menu à occuper TOUTE la ligne du dessous */
        display: flex !important;
        flex-direction: column !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* On cache la checkbox native */
    .menu-toggle-checkbox {
        display: none !important;
    }

    /* Le bouton à 3 barres se repositionne mécaniquement tout en haut à droite du header */
    .hamburger-button {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
        cursor: pointer;
        z-index: 999;
        position: absolute !important;
        top: 50px !important; /* Calé à la hauteur du logo */
        right: 20px !important; /* Aligné sur la marge droite de l'écran */
    }

    .hamburger-button span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: #072241;
        border-radius: 3px;
    }

    /* --- LE MENU DEVENU ACCORDÉON À 100% (EN FLUX DIRECT) --- */
    .site-navigation ul.nav-menu {
        display: none !important; /* Caché par défaut */
        flex-direction: column !important;
        width: 100% !important; /* S'ouvre sur toute la largeur */
        background-color: #ffffff !important;
        margin-top: 25px !important; /* Crée l'espace propre sous la ligne du logo */
        padding: 0 !important;
        gap: 0 !important;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 4px 12px rgba(7, 34, 65, 0.08);
    }

    /* Déclencheur : Quand on clique sur le hamburger, le menu s'affiche à 100% et POUSSE le texte du site */
    .menu-toggle-checkbox:checked ~ ul.nav-menu {
        display: flex !important;
    }

    /* Centrage et style des liens mobiles */
    .site-navigation ul.nav-menu li {
        width: 100% !important;
        text-align: center !important;
        border-bottom: 1px solid #f1f5f9 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .site-navigation ul.nav-menu li:last-child {
        border-bottom: none !important;
    }

    .site-navigation ul.nav-menu li a {
        display: block !important;
        padding: 16px 0 !important; /* Confortable pour le pouce */
        font-size: 15px !important;
        font-weight: 700 !important;
        color: #072241 !important;
        text-transform: uppercase !important;
        width: 100% !important;
        border-bottom: none !important; /* Supprime la barre rouge d'ordinateur */
    }

    .site-navigation ul.nav-menu li a:active,
    .site-navigation ul.nav-menu li a:hover {
        background-color: #f8fafc !important;
        color: #d63246 !important;
    }

    /* --- SECTION ARTICLES EN LISTE (WPBBAKERY GRID CLEANUP) --- */
    .vc_grid-container-wrapper,
    .vc_grid-container,
    .vc_basic_grid,
    .vc_pageable-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        left: 0 !important;
    }

    /* Annulation de la marge négative WPBakery qui décalait et coupait l'article à droite */
    .vc_grid.vc_row.vc_grid-gutter-30px .vc_pageable-slide-wrapper {
        margin-right: 0 !important;
        margin-left: 0 !important;
    }

    /* Alignement complet de la boîte de l'article */
    .vc_grid .vc_grid-item {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 30px 0 !important;
        float: none !important;
        padding: 0 !important;
    }

    /* Image de l'article */
    .vc_grid .vc_gitem-zone-a {
        width: 100% !important;
        height: 220px !important;
        left: 0 !important;
    }

    /* Zone de texte à l'intérieur de la carte */
    .vc_grid .vc_gitem-zone-c {
        padding: 20px 15px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .vc_grid .vc_gitem-post-data-source-post_title h4,
    .vc_grid .vc_gitem-post-data-source-post_excerpt p {
        text-align: left !important;
        width: 100% !important;
    }

    /* Bouton Lire Plus */
    .vc_grid .vc_btn3-container {
        text-align: left !important;
        width: 100% !important;
        padding: 0 !important;
        margin-top: 15px !important;
    }

    /* --- SECTION HERO ET LE RESTE DU SITE --- */
    .hero-container { flex-direction: column !important; }
    .hero-left-text { width: 100% !important; padding: 40px 20px !important; text-align: center !important; }
    .hero-left-text h1.welcome-block { align-items: center !important; transform: none !important; }
    .hero-left-text h1.welcome-block .welcome-text-1 { font-size: 26px !important; }
    .hero-left-text h1.welcome-block .welcome-text-2 { font-size: 44px !important; }
    .hero-left-text h1.welcome-block .welcome-text-3 { font-size: 38px !important; padding-left: 0 !important; }
    .hero-slogan-text { font-size: 22px !important; line-height: 1.3 !important; }
    .hero-right-box { width: 100% !important; height: auto !important; }
    .team-wave-clip { min-height: 250px !important; clip-path: none !important; }
    .hero-blue-badge { position: relative !important; width: 100% !important; border-top-left-radius: 0 !important; text-align: center !important; padding: 25px !important; }
    .tab-item { width: 100% !important; text-align: center !important; justify-content: center !important; }
    .simple-bar-container { padding: 30px 20px !important; }
    .entry-content { padding: 0px 20px 50px 20px !important; }
    .page-title-simple { font-size: 24px !important; text-align: center !important; }
    .footer-widgets-grid { grid-template-columns: 1fr !important; gap: 35px !important; text-align: center !important; }
    .footer-col .wp-block-image { justify-content: center !important; }
    .footer-widget-item p { text-align: center !important; }
}

/* --- RE-MASQUAGE DES ÉLÉMENTS DE NAVIGATION MOBILE SUR ÉCRAN ORDINATEUR --- */
.hamburger-button, .menu-toggle-checkbox {
    display: none;
}