/*
Theme Name: SMAF Child Theme
Theme URI: https://wpastra.com/
Template: astra
Author: Gatien MARQUANT
Version: 2.0.0 - Optimisé
*/

/* ======================================== 
   VARIABLES CSS
======================================== */
:root {
    /* Couleurs principales */
    --primary-color: #5B7C99;
    --primary-rgb: 91, 124, 153;
    --secondary-color: #E8956B;
    --secondary-rgb: 232, 149, 107;
    --dark-slate: #3D4F5C;
    --dark-slate-rgb: 61, 79, 92;
    
    /* Couleurs neutres */
    --beige-light: #F5F5F0;
    --cream: #E8E4DC;
    --gray-structure: #8B9BA8;
    --gray-light: #F8F9FA;
    --gray-medium: #95A5A6;
    
    /* Couleurs système */
    --text-color: #2C3E50;
    --white: #FFFFFF;
    --black: #000000;
    --success: #27AE60;
    --error: #E74C3C;
    --warning: #F39C12;
    
    /* Ombres */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* ======================================== 
   BANDEAU CERTIFICATIONS (Qualibat & RGE)
======================================== */
.certifications-badge {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    padding: 15px 10px;
    border-radius: 8px 0 0 8px;
    box-shadow: -2px 0 15px rgba(0, 0, 0, 0.15);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: all 0.3s ease;
}

.certifications-badge:hover {
    padding-right: 15px;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.2);
}

.certifications-badge .cert-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.certifications-badge .cert-item:hover {
    transform: scale(1.05);
}

.certifications-badge .cert-item img {
    width: 60px;
    height: auto;
    display: block;
    margin-bottom: 5px;
}

.certifications-badge .cert-item span {
    font-size: 10px;
    color: var(--text-color);
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive - Masquer sur mobile */
@media (max-width: 768px) {
    .certifications-badge {
        display: none;
    }
}

/* ======================================== 
   PLEINE LARGEUR - Solution unifiée
======================================== */
.home .site-content,
.home .ast-container,
.home #primary,
.home #main,
body:not(.home) .site-content,
body:not(.home) .ast-container,
body:not(.home) #primary,
body:not(.home) #main,
.post-type-archive-reference .site-content,
.post-type-archive-reference .ast-container,
.tax-reference_category .site-content,
.tax-reference_category .ast-container,
.page-template-page-references .site-content,
.simulateur-page .site-content,
.simulateur-page .ast-container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
}

.home .entry-content,
body:not(.home) .entry-content {
    margin: 0 !important;
}

body.home,
body:not(.home) {
    overflow-x: hidden;
}

/* Container centré pour le contenu */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ======================================== 
   TYPOGRAPHIE
======================================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

/* ======================================== 
   HEADER - Transparent sur accueil, bleu ailleurs
======================================== */
/* Header transparent sur accueil */
.home .site-header {
    position: absolute !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100% !important;
    z-index: 999;
    background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, transparent 100%) !important;
    box-shadow: none !important;
    transition: all 0.4s ease;
}

/* Supprimer les backgrounds blancs d'Astra */
.home .site-header .main-header-bar,
.home .site-header .ast-container,
.home .site-header .main-header-bar-wrap {
    background-color: transparent !important;
    background-image: none !important;
}

/* Supprimer toutes les bordures */
.home .site-header,
.home .site-header .main-header-bar,
.home .site-header .ast-container,
.home .main-header-bar {
    border: none !important;
    border-bottom: none !important;
    border-top: none !important;
}

.home .site-header.scrolled,
.home .site-header.scrolled .main-header-bar,
.home .site-header.scrolled .ast-container {
    border: none !important;
    border-bottom: none !important;
}

.home .site-header .site-title a,
.home .site-header .site-branding a,
.home .site-header .main-header-menu a,
.home .site-header .ast-mobile-menu-buttons,
.home .site-header .menu-toggle {
    color: var(--white) !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.home .site-header .main-header-menu a:hover {
    color: var(--secondary-color) !important;
}

/* Header devient opaque au scroll */
.home .site-header.scrolled {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: rgba(var(--primary-rgb), 0.98) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
    backdrop-filter: blur(10px);
}

.home .site-header.scrolled .main-header-bar,
.home .site-header.scrolled .ast-container {
    background: transparent !important;
    background-image: none !important;
}

.home .site-header.scrolled .site-title a,
.home .site-header.scrolled .site-branding a,
.home .site-header.scrolled .main-header-menu a {
    text-shadow: none;
}

/* Header bleu sur toutes les autres pages */
body:not(.home) .site-header,
body:not(.home) .site-header .main-header-bar,
body:not(.home) .site-header .ast-container,
.post-type-archive-reference .site-header,
.post-type-archive-reference .site-header .main-header-bar,
.tax-reference_category .site-header,
.tax-reference_category .site-header .main-header-bar {
    background: rgba(var(--primary-rgb), 0.98) !important;
    background-image: none !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
}

body:not(.home) .site-header .main-header-menu a,
body:not(.home) .site-header .site-title a,
body:not(.home) .site-header .site-branding a {
    color: var(--white) !important;
}

/* ========================================
   MENU NAVIGATION - Sélection active
======================================== */

/* Liens du menu */
.site-header .main-header-menu a {
    position: relative;
    padding: 10px 15px;
    transition: color 0.3s ease;
    color: var(--white) !important;
}

/* Menu actif et hover en orange - Toutes les variantes possibles */
.site-header .main-header-menu .current-menu-item > a,
.site-header .main-header-menu .current_page_item > a,
.site-header .main-header-menu .current-menu-ancestor > a,
.site-header .main-header-menu .current-menu-parent > a,
.site-header .main-header-menu .current_page_ancestor > a,
.site-header .main-header-menu .current_page_parent > a,
.site-header .main-header-menu li.current-menu-item > a,
.site-header .main-header-menu li.current_page_item > a,
.site-header .main-header-menu a:hover,
.site-header .main-header-menu a:focus,
.site-header .main-header-menu a:active {
    color: var(--secondary-color) !important;
}

/* Forcer la couleur orange sur la page active avec !important très fort */
body.home .site-header .main-header-menu .menu-item-home > a,
body.page .site-header .main-header-menu .current_page_item > a,
body.page .site-header .main-header-menu .current-menu-item > a {
    color: var(--secondary-color) !important;
}

/* Logo responsive */
.home .site-header .custom-logo {
    max-height: 100px !important;
    width: auto !important;
    transition: all 0.4s ease;
}

.home .site-header.scrolled .custom-logo {
    max-height: 45px !important;
}

/* Padding header */
.home .site-header .main-header-bar {
    padding: 30px 40px !important;
    transition: all 0.4s ease;
}

.home .site-header.scrolled .main-header-bar {
    padding: 20px 40px 3px !important;
}

/* Menu hamburger en blanc */
.home .ast-mobile-menu-buttons .menu-toggle,
.home .ast-button-wrap .menu-toggle {
    color: var(--white) !important;
    border-color: var(--white) !important;
}

.home .site-header.scrolled .ast-mobile-menu-buttons .menu-toggle,
.home .site-header.scrolled .ast-button-wrap .menu-toggle {
    color: var(--white) !important;
    border-color: var(--white) !important;
}

/* Sous-menus */
.home .site-header .main-header-menu .sub-menu {
    background: rgba(var(--primary-rgb), 0.98) !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2) !important;
}

.home .site-header .main-header-menu .sub-menu a {
    color: var(--white) !important;
    text-shadow: none !important;
}

.home .site-header .main-header-menu .sub-menu a:hover {
    background: rgba(var(--secondary-rgb), 0.2) !important;
    color: var(--secondary-color) !important;
}

/* Menu typographie */
.site-header .main-header-menu a {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
}

/* ======================================== 
   HERO CAROUSEL
======================================== */
.hero-fullscreen {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
}

.hero-carousel {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    z-index: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute !important;
    inset: 0;
    background: rgba(0, 0, 0, 0.3) !important;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content-center {
    position: relative;
    z-index: 3;
    text-align: center;
    color: var(--white);
    max-width: 1300px !important;
    padding: 0 20px;
}

.hero-title-large {
    font-size: 4rem !important;
    letter-spacing: -1.5px;
    line-height: 1.05;
    font-weight: 800 !important;
    margin-bottom: 25px;
    color: var(--secondary-color) !important;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

.hero-subtitle-large {
    font-size: 1.8rem !important;
    font-weight: 500 !important;
    margin-bottom: 15px !important;
    letter-spacing: 2px !important;
    text-transform: uppercase;
    color: var(--white) !important;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.8);
    opacity: 0.9;
}

.hero-tagline {
    font-size: 1.2rem !important;
    max-width: 800px;
    font-weight: 400  !important;
    line-height: 1.4  !important;
    margin: 0 auto 40px !important;
    color: var(--white) !important;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.8);
}

/* Bandeau de notation */
.hero-rating-bandeau {
    display: none; /* Masqué sur toutes les pages */
    align-items: center;
    justify-content: center;
    gap: 30px;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 40px;
    border-radius: 50px;
    box-shadow: var(--shadow-md);
    margin-top: 40px;
    backdrop-filter: blur(10px);
}

.rating-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rating-logo-text {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-color);
}

.rating-stars {
    color: #FFD700;
    font-size: 1.2rem;
}

.rating-score {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-color);
}

.rating-separator {
    width: 1px;
    height: 30px;
    background: rgba(0, 0, 0, 0.15);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    font-size: 2rem;
    animation: bounce 2s infinite;
    z-index: 3;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ======================================== 
   BOUTONS - Styles unifiés
======================================== */
.btn-hero-large,
.btn-secondary-large,
.btn-cta-white,
.wpcf7-form input[type="submit"] {
    display: inline-block;
    padding: 18px 45px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-hero-large,
.wpcf7-form input[type="submit"] {
    background: var(--secondary-color);
    color: var(--white);
    box-shadow: 0 10px 30px rgba(var(--secondary-rgb), 0.4);
}

.btn-hero-large:hover,
.wpcf7-form input[type="submit"]:hover {
    background: #D67D54;
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(var(--secondary-rgb), 0.6);
}

.btn-secondary-large {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: 0 10px 30px rgba(var(--primary-rgb), 0.3);
}

.btn-secondary-large:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.btn-cta-white {
    background: var(--white);
    color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.btn-cta-white:hover {
    background: var(--secondary-color);
    color: var(--white);
    transform: translateY(-3px);
}

/* ======================================== 
   SECTIONS - Styles communs
======================================== */
.presentation-modern,
.why-choose-modern,
.services-modern,
.realisations-modern,
.cta-final {
    padding: 80px 0;
}

/* Marges latérales pour la présentation */
.presentation-modern {
    padding: 80px 100px;
}

.presentation-modern .container-narrow {
    max-width: 900px;
    margin: 0 auto;
}

.section-title-center {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--gray-medium);
    margin-bottom: 60px;
}

.section-cta {
    text-align: center;
    margin-top: 50px;
}

/* ======================================== 
   CARTES - Styles unifiés
======================================== */
.service-card-large,
.reference-card,
.realisation-card,
.why-card-modern {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.service-card-large:hover,
.reference-card:hover,
.realisation-card:hover,
.why-card-modern:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

/* ======================================== 
   GRILLES - Layouts unifiés
======================================== */
.why-grid-modern,
.services-grid-large,
.realisations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.references-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    margin: 30px 0;
}

/* ======================================== 
   POURQUOI NOUS CHOISIR
======================================== */
.why-choose-modern {
    background: var(--gray-light);
}

.why-card-modern {
    padding: 40px 30px;
    text-align: center;
}

.why-icon-large {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 2rem;
    color: var(--white);
}

.why-card-modern h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.why-card-modern p {
    line-height: 1.6;
}

/* ======================================== 
   SERVICES
======================================== */
.service-image-wrapper,
.realisation-image,
.reference-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.service-image-wrapper img,
.realisation-image img,
.reference-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card-large:hover .service-image-wrapper img,
.realisation-card:hover .realisation-image img,
.reference-card:hover .reference-image img {
    transform: scale(1.1);
}

.service-overlay,
.realisation-overlay,
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.9), rgba(var(--secondary-rgb), 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card-large:hover .service-overlay,
.realisation-card:hover .realisation-overlay,
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.service-overlay i,
.realisation-overlay i,
.gallery-overlay i {
    font-size: 2.5rem;
    color: var(--white);
}

.service-content-large,
.realisation-info,
.reference-content {
    padding: 25px;
}

.service-content-large h3,
.realisation-info h3,
.reference-title a {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.service-link,
.reference-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.service-link:hover,
.reference-link:hover {
    color: var(--primary-color);
}

/* ======================================== 
   RÉALISATIONS
======================================== */
.realisations-modern {
    background: var(--gray-light);
}

.category-badge {
    background: var(--secondary-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ======================================== 
   CTA FINAL
======================================== */
.cta-final {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-slate) 100%);
    color: var(--white);
}

.cta-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--white);
}

.cta-content p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.95;
}

/* ======================================== 
   PAGE HEADER - Style unifié
======================================== */
.page-header,
.hero-small {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-slate) 100%);
    color: var(--white);
    padding: 20px 0 !important;
    text-align: center;
}

.page-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--secondary-color) !important;
}

.page-description {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* ======================================== 
   FILTRES
======================================== */
.references-filters {
    background: var(--beige-light);
    padding: 30px 0;
    border-bottom: 3px solid var(--primary-color);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-btn,
.modula-filter,
.gallery-tab {
    padding: 10px 25px;
    background: var(--white);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color);
    cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active,
.filter-btn.current,
.filter-btn[aria-current="page"],
.modula-filter:hover,
.modula-filter.active,
.gallery-tab:hover,
.gallery-tab.active {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.3);
}

/* Forcer le style actif sur les liens de taxonomie */
.references-filters a[href*="reference_category"]:not([href*="all"]) {
    /* Style par défaut */
}

.references-filters a.active,
.references-filters a.current-cat,
.references-filters a.current-category {
    background: var(--primary-color) !important;
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.3);
}

/* ======================================== 
   GALERIE
======================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Modula personnalisation */
.modula-item {
    overflow: hidden;
    border-radius: 10px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    position: relative !important;
}

.modula-item:hover {
    transform: scale(1.02);
    z-index: 10;
}

/* Animation au chargement initial uniquement */
.modula-items.modula-loading .modula-item {
    opacity: 0;
    animation: fadeInSimple 0.6s ease-in forwards;
}

.modula-items.modula-loading .modula-item:nth-child(1) { animation-delay: 0.1s; }
.modula-items.modula-loading .modula-item:nth-child(2) { animation-delay: 0.2s; }
.modula-items.modula-loading .modula-item:nth-child(3) { animation-delay: 0.3s; }
.modula-items.modula-loading .modula-item:nth-child(4) { animation-delay: 0.4s; }
.modula-items.modula-loading .modula-item:nth-child(5) { animation-delay: 0.5s; }
.modula-items.modula-loading .modula-item:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInSimple {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Forcer Modula à utiliser un layout grid au lieu de masonry */
.modula-items {
    position: relative !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 20px !important;
    width: 100% !important;
}

/* Réinitialiser le positionnement absolu de Modula */
.modula-item {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4/3 !important;
}

.modula-item:hover {
    transform: scale(1.02) !important;
}

.modula-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* Conteneur de l'image */
.modula-item-img-link,
.modula-item-img-wrapper {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
}

.modula-item-overlay {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.9), rgba(var(--secondary-rgb), 0.8)) !important;
}

.modula-item-title,
.modula-item-description {
    color: var(--white) !important;
}

/* Onglets de galerie */
.gallery-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0 40px;
    flex-wrap: wrap;
}

/* Filtres Modula */
.modula-filters {
    text-align: center;
    margin: 20px 0 40px;
}

.gallery-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    left: -9999px;
    transition: opacity 0.5s ease;
}

.gallery-content.active {
    visibility: visible;
    opacity: 1;
    position: relative;
    left: 0;
}

/* ======================================== 
   FORMULAIRE DE CONTACT
======================================== */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
}

.contact-form {
    background: var(--beige-light);
    padding: 40px;
    border-radius: 10px;
}

.contact-form h2 {
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.wpcf7-form textarea {
    min-height: 150px;
    resize: vertical;
}

.wpcf7-not-valid-tip {
    color: var(--error);
    font-size: 0.9rem;
    margin-top: 5px;
}

.wpcf7-response-output {
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    font-weight: 600;
}

.wpcf7-mail-sent-ok {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.wpcf7-validation-errors {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Informations de contact */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding-top: 40px;
}

.contact-info h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 10px;
    margin-top: 0;
}

/* Carte Google Maps dans les coordonnées */
.contact-info .map-container {
    width: 100%;
    height: 300px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-top: 10px;
}

.contact-info .map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.info-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    min-width: 30px;
}

.info-item a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.info-item a:hover {
    color: var(--secondary-color);
}

/* ======================================== 
   FOOTER
======================================== */
.smaf-custom-footer {
    background: var(--dark-slate);
    color: var(--white);
    padding: 60px 100px 20px;
    width: 100%;
}

.smaf-custom-footer .footer-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.smaf-custom-footer .footer-column h3 {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.smaf-custom-footer .footer-column a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.smaf-custom-footer .footer-column a:hover {
    color: var(--secondary-color);
}

.smaf-custom-footer .footer-column i {
    color: var(--secondary-color);
    margin-right: 8px;
    width: 20px;
}

.smaf-custom-footer .footer-social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.smaf-custom-footer .footer-social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.smaf-custom-footer .footer-social-links a i {
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.smaf-custom-footer .footer-social-links a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.smaf-custom-footer .footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.8;
}

.site-footer {
    display: none !important;
}

/* ======================================== 
   SIMULATEUR
======================================== */
/* S'assurer que le simulateur garde son container */
.simulateur-page .simulator-section,
.simulateur-page .simulator-layout {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

.simulator-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin-top: 30px;
}

.simulator-workspace {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow-sm);
    min-height: 600px;
}

.canvas-container {
    background: transparent;
    border-radius: 12px;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.tools-panel {
    background: var(--white);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow-sm);
    height: fit-content;
    position: sticky;
    top: 20px;
    display: block !important;
    visibility: visible !important;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--white);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification-success .notification-icon {
    background: var(--success);
    color: var(--white);
}

.notification-error .notification-icon {
    background: var(--error);
    color: var(--white);
}

/* ======================================== 
   RÉSEAUX SOCIAUX HEADER
======================================== */
/* Base : inline avec le menu, aligné verticalement */
.header-social-links {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    margin-left: 15px;
    padding: 10px 10px 10px 0;
    vertical-align: middle;
    z-index: 10;
}

/* Sur la page d'accueil : position absolue à droite */
.home .header-social-links {
    position: absolute !important;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 0 !important;
    padding: 0 !important;
    z-index: 100;
}

/* Sur les autres pages : s'assurer que c'est bien inline et aligné */
body:not(.home) .header-social-links {
    position: relative !important;
    top: auto;
    right: auto;
    transform: none;
    margin-left: 20px;
}

/* Ajuster la position au scroll sur la page d'accueil */
.home .site-header.scrolled .header-social-links {
    top: 50%;
    transform: translateY(-50%);
}

.social-link-header {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.15);
    color: var(--white) !important;
    border-radius: 50%;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    vertical-align: middle;
    line-height: 1;
}

.social-link-header:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
}

.social-link-header.facebook:hover { color: #1877F2 !important; }
.social-link-header.instagram:hover { color: #E4405F !important; }
.social-link-header.linkedin:hover { color: #0A66C2 !important; }
.social-link-header.youtube:hover { color: #FF0000 !important; }

/* Ajuster la marge du menu pour laisser de la place aux icônes sur l'accueil */
.home .main-header-menu {
    margin-right: 180px;
}

/* Sur les autres pages, pas de marge */
body:not(.home) .main-header-menu {
    margin-right: 0;
}

/* ======================================== 
   RESPONSIVE - MOBILE (max-width: 767px)
======================================== */
@media (max-width: 767px) {
    /* Hero */
    .hero-fullscreen { min-height: 600px; }
    .hero-content-center {
        margin-top: 60px !important;
    }
    .hero-title-large { 
        font-size: clamp(1.8rem, 6vw, 2.5rem) !important; 
        word-break: break-word !important; 
        overflow-wrap: break-word !important;
        hyphens: auto !important;
        padding: 0 10px !important;
        line-height: 1.1 !important;
    }
    .hero-subtitle-large { 
        font-size: 1.0rem !important; 
        margin-bottom: 25px !important;
    }
    .hero-tagline { 
        font-size: 0.8rem !important; 
        line-height: 1.5 !important;
        padding: 0 10px !important;
    }
    .btn-hero-large { 
        padding: 12px 30px; 
        font-size: 1rem; 
    }
    
    /* Rating */
    .hero-rating-bandeau {
        flex-direction: column;
        gap: 10px;
        padding: 12px 15px;
    }
    
    .rating-separator {
        width: 80%;
        height: 1px;
    }
    
    /* Header */
    .header-social-links { display: none !important; }
    .home .main-header-menu { margin-right: 0; }
    .home .site-header .main-header-bar { padding: 15px 20px !important; }
    .home .site-header .custom-logo { max-height: 45px !important; }
    
    /* Sections */
    .presentation-modern { padding: 40px 20px; }
    .why-choose-modern,
    .services-modern,
    .realisations-modern { padding: 40px 0; }
    
    .section-title-center { font-size: 1.8rem; }
    
    /* Grilles */
    .why-grid-modern,
    .services-grid-large,
    .realisations-grid,
    .references-grid { grid-template-columns: 1fr; gap: 20px; }
    
    /* Footer */
    .smaf-custom-footer { padding: 40px 20px 20px; }
    .smaf-custom-footer .footer-columns { grid-template-columns: 1fr; gap: 30px; }
    
    /* Contact */
    .contact-wrapper { grid-template-columns: 1fr; gap: 40px; }
    
    /* Simulateur */
    .simulator-layout { grid-template-columns: 1fr; }
    .tools-panel { order: -1; position: static; }
    
    /* Galerie */
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-tabs { flex-direction: column; gap: 10px; }
    .gallery-tab { width: 100%; text-align: center; }
    
    /* Formulaires */
    .wpcf7-form input,
    .wpcf7-form textarea {
        font-size: 16px !important;
        padding: 12px 15px;
        min-height: 44px;
    }
}

/* ======================================== 
   RESPONSIVE - TABLETTE (768px - 1024px)
======================================== */
@media (min-width: 768px) and (max-width: 1024px) {
    .hero-title-large { font-size: 2.5rem !important; }
    .hero-subtitle-large { font-size: 1.3rem !important; }
    
    .why-grid-modern,
    .services-grid-large,
    .realisations-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
    
    .references-grid { grid-template-columns: repeat(2, 1fr); gap: 25px; }
    
    .smaf-custom-footer .footer-columns { grid-template-columns: repeat(2, 1fr); }
    
    .header-social-links { display: none !important; }
    .home .main-header-menu { margin-right: 0; }
}

/* ======================================== 
   OPTIMISATIONS TACTILES
======================================== */
@media (max-width: 767px) {
    .btn-hero-large,
    .btn-secondary-large,
    .filter-btn,
    .gallery-tab,
    button,
    input[type="submit"] {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 30px;
    }
    
    .footer-social-links a,
    .header-social-links a {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
}

/* Désactiver hover sur tactile */
@media (hover: none) {
    .service-card-large:hover,
    .realisation-card:hover,
    .why-card-modern:hover,
    .reference-card:hover {
        transform: none;
    }
}

/* ======================================== 
   PRINT
======================================== */
@media print {
    .site-header,
    .smaf-custom-footer,
    .scroll-indicator,
    .btn-hero-large,
    .hero-rating-bandeau {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }
}


/* ========================================
   FIX - Activer les liens sur la galerie Partenaires
======================================== */

/* S'assurer que les liens fonctionnent */
.page-partenaires .modula-item a,
.page-template-page-partenaires .modula-item a {
    display: block !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    position: relative;
    z-index: 2;
}

/* L'image ne doit pas bloquer les clics */
.page-partenaires .modula-item img,
.page-template-page-partenaires .modula-item img {
    pointer-events: none !important;
}

/* Le conteneur doit permettre les clics */
.page-partenaires .modula-item-content,
.page-template-page-partenaires .modula-item-content {
    pointer-events: auto !important;
}

/* Indicateur visuel au survol */
.page-partenaires .modula-item a:hover,
.page-template-page-partenaires .modula-item a:hover {
    opacity: 0.9;
}

/* Ajouter un curseur pointer sur toute la zone */
.page-partenaires .modula-item,
.page-template-page-partenaires .modula-item {
    cursor: pointer;
}

/* ========================================
   PAGE PARTENAIRES - Affichage complet des logos
======================================== */

/* Forcer l'affichage complet des images (pas de crop) */
.page-partenaires .modula-item img,
.page-template-page-partenaires .modula-item img,
body.page .modula-item img {
    object-fit: contain !important;
    object-position: center !important;
    width: 100% !important;
    height: 100% !important;
    padding: 15px !important;
    background: var(--white) !important;
}

/* Container des images */
.page-partenaires .modula-item-content,
.page-template-page-partenaires .modula-item-content {
    background: var(--white) !important;
    border: 1px solid #e0e0e0 !important;
}

/* Désactiver le masonry pour un affichage uniforme */
.page-partenaires .modula-items,
.page-template-page-partenaires .modula-items {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 20px !important;
}

.page-partenaires .modula-item,
.page-template-page-partenaires .modula-item {
    position: relative !important;
    left: 0 !important;
    top: 0 !important;
    transform: none !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
}

/* ========================================
   FIX - Masquer le doublon ACCUEIL (désactivé)
======================================== */

/* Désactivé - Ne plus masquer ACCUEIL */
/* .main-header-menu .menu-item-home:first-child {
    display: none !important;
} */


.certifications-list {
    list-style-type: disc;
    padding-left: 20px;
    margin: 15px 0;
    text-align: left;
}

.certifications-list li {
    margin-bottom: 8px;
    line-height: 1.6;
    text-align: left;
}

/* ======================================== 
   PAGE ACTUALITÉS
======================================== */
.actualites-section {
    padding: 60px 0;
    background: var(--gray-light);
}

.actualites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.actualite-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.actualite-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.actualite-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.actualite-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.actualite-card:hover .actualite-image img {
    transform: scale(1.05);
}

.actualite-content {
    padding: 25px;
}

.actualite-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: var(--gray-medium);
}

.actualite-meta i {
    margin-right: 5px;
}

.actualite-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.actualite-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.actualite-title a:hover {
    color: var(--secondary-color);
}

.actualite-excerpt {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 20px;
}

.actualite-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.actualite-link:hover {
    color: var(--secondary-color);
}

.actualite-link i {
    transition: transform 0.3s ease;
}

.actualite-link:hover i {
    transform: translateX(5px);
}

/* Pagination */
.actualites-pagination {
    margin-top: 50px;
    text-align: center;
}

.actualites-pagination .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    background: var(--white);
    color: var(--primary-color);
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.actualites-pagination .page-numbers:hover,
.actualites-pagination .page-numbers.current {
    background: var(--primary-color);
    color: var(--white);
}

.no-actualites {
    text-align: center;
    padding: 60px 20px;
    font-size: 1.1rem;
    color: var(--gray-medium);
}

/* Responsive */
@media (max-width: 768px) {
    .actualites-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .actualite-meta {
        flex-direction: column;
        gap: 5px;
    }
}
