/*
Theme Name: Cabinet VAILLES
Author: Votre Nom
Description: Thème sur mesure pour Cabinet VAILLES Géomètres-Experts
Version: 1.0
*/

/* --- VARIABLES & RESET --- */
:root {
    --primary-red: #b81e28;
    --dark-red: #8a1219;
    --header-bg: #1a1a1a;
    --dark-bg: #222;
    --white: #ffffff;
    --text-color: #333;
    --text-light: #666;
    --input-border: #ccc;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Open Sans', sans-serif; color: var(--text-color); line-height: 1.6; background-color: var(--white); }
h1, h2, h3, h4, h5 { font-family: 'Montserrat', sans-serif; font-weight: 600; margin-bottom: 1rem; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; height: auto; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* --- HEADER --- */
header { background-color: var(--header-bg); color: var(--white); padding: 15px 0; font-size: 0.9rem; }
.header-wrapper { display: flex; justify-content: space-between; align-items: center; padding-bottom: 20px; }
.header-top { display: flex; align-items: center; gap: 20px; margin-bottom: 0; padding-right: 0; }
.header-social a { margin-left: 10px; color: var(--white); }
.logo-container { display: flex; align-items: center; gap: 15px; text-decoration: none; }
.logo-img { height: 50px; width: auto; }
.logo-text { font-family: 'Montserrat', sans-serif; color: var(--white); font-size: 1.5rem; font-weight: 700; line-height: 1; }
.logo-text span { display: block; font-size: 0.4em; font-weight: 400; color: var(--primary-red); letter-spacing: 2px; }

/* Menu WordPress */
.main-nav ul { display: flex; justify-content: center; gap: 40px; margin: 0; padding: 0; }
.main-nav li { text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; font-weight: 600; list-style: none; }
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--primary-red); }

/* --- GLOBAL ELEMENTS --- */
.page-header { text-align: center; padding: 60px 0 40px; }
.page-header h1 { font-size: 2.5rem; margin-bottom: 15px; font-weight: 400; color: #333; }
.red-line { width: 2px; height: 30px; background: var(--primary-red); margin: 0 auto; }
.section-header-center { text-align: center; margin-bottom: 40px; }
.section-header-center h2 { font-size: 2rem; margin-bottom: 10px; }

/* --- HERO PAGES --- */
.hero-img-container { position: relative; margin-bottom: 40px; width: 100%; height: 450px; }
.hero-img { width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }
.overlay-icon { position: absolute; top: 40px; left: 40px; width: 80px; height: 80px; background-color: rgba(255,255,255,0.95); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #333; font-size: 2rem; box-shadow: 0 5px 15px rgba(0,0,0,0.1); border: 2px solid var(--primary-red); }
.hero {
    display: flex;
    height: 600px;
    position: relative;
    width: 100%;
}
.hero-left {
    width: 40%;
    background: #2c2c2c;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 10%;
}
.hero-right {
    width: 60%;
    /* Mettez l'URL de votre image ici */
    background: url('http://www.vailles.fr/wp-content/uploads/2025/12/DSC09622-scaled-2.jpg') center/cover no-repeat;
}
.hero-logo-large {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 30px;
}
.hero-icon-span {
    color: var(--primary-red);
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}
.btn-hero {
    border: 1px solid white;
    padding: 10px 20px;
    text-transform: uppercase;
    display: inline-block;
    width: fit-content;
    color: white;
    transition: 0.3s;
}
.btn-hero:hover {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
}
.cabinet-intro {
    display: flex;
    gap: 50px;
    align-items: center;
    padding-top: 60px;
    padding-bottom: 60px;
}
.cabinet-img-col { flex: 1; }
.cabinet-text-col { flex: 1; }

/* --- SECTION CABINET (ORDINATEUR) --- */
.cabinet-intro {
    display: flex !important; /* Force l'affichage flexible */
    flex-direction: row;      /* Force l'alignement horizontal */
    align-items: center;      /* Centre verticalement */
    gap: 50px;                /* Espace entre l'image et le texte */
    margin-top: 50px;
    margin-bottom: 50px;
}

.cabinet-img-col {
    flex: 1;       /* Prend 50% de la largeur */
    width: 50%;
}

.cabinet-text-col {
    flex: 1;       /* Prend 50% de la largeur */
    width: 50%;
}

/* S'assure que l'image ne dépasse pas de sa colonne */
.cabinet-img-col img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* --- CONTENT ZIGZAG --- */
.content-row { display: flex; align-items: flex-start; gap: 50px; margin-bottom: 60px; }
.content-row.reverse { flex-direction: row-reverse; }
.text-col { flex: 1; }
.img-col { flex: 0 0 350px; }
.content-img { width: 100%; height: 250px; object-fit: cover; border-radius: 4px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.content-title { color: var(--primary-red); font-size: 1.3rem; margin-bottom: 15px; font-weight: 600; }
.content-text { color: var(--text-light); font-size: 0.9rem; line-height: 1.7; margin-bottom: 15px; text-align: justify; }

/* --- SERVICES GRID --- */
.other-skills-section { padding: 60px 0 100px; background-color: #fff; border-top: 1px solid #eee; }
.services-grid, .other-skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; max-width: 1200px; margin: 0 auto; }
.service-card { background-color: var(--primary-red); padding: 40px; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; border: 1px solid rgba(255,255,255,0.1); transition: all 0.3s ease; cursor: pointer; color: white; }
.service-card:nth-child(even) { background-color: #a31822; }
.service-card:hover { transform: translateY(-10px); background-color: var(--dark-red); z-index: 2; box-shadow: 0 15px 30px rgba(0,0,0,0.4); }
.service-icon { width: 60px; height: 60px; background-color: var(--white); border-radius: 50%; color: var(--primary-red); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 20px; transition: 0.3s; }
.service-card:hover .service-icon { transform: scale(1.1) rotate(5deg); }
.service-card h3 { font-size: 1.1rem; text-transform: uppercase; margin-bottom: 15px; color: #fff; }
.service-card p { font-size: 0.8rem; line-height: 1.5; margin-bottom: 20px; }
.service-arrow { margin-top: auto; font-size: 1.5rem; opacity: 0.7; transition: 0.3s; }
.service-card:hover .service-arrow { opacity: 1; transform: translateX(10px); }

/* --- FOOTER --- */
.footer-separator-logo { text-align:center; padding-top: 60px; margin-bottom: 20px; border-top: 1px solid #eee; }
.footer-top { padding: 40px 20px 60px; display: flex; justify-content: center; align-items: center; gap: 100px; }
.footer-social-block h4, .footer-newsletter h4 { margin-bottom: 15px; text-transform: uppercase; font-size: 1rem; font-weight: 400; color: #333; }
.social-circles a { display: inline-flex; width: 40px; height: 40px; border: 1px solid #ccc; border-radius: 50%; align-items: center; justify-content: center; margin-right: 10px; color: #888; }
.social-circles a:hover { border-color: var(--primary-red); color: var(--primary-red); }
.footer-bottom { background-color: #222; color: #aaa; padding: 30px 0; text-align: center; font-size: 0.8rem; }
.footer-bottom ul { display: flex; justify-content: center; gap: 50px; margin: 0; padding: 0; }
.footer-logo-small { display: flex; align-items: center; gap: 5px; color: #fff; }

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .content-row, .content-row.reverse { flex-direction: column; gap: 20px; }
    .img-col { width: 100%; text-align: center; }
    .services-grid, .other-skills-grid { grid-template-columns: 1fr; }
    .header-wrapper, .footer-top { flex-direction: column; gap: 30px; }
    .main-nav { display: none; }
    .hero { flex-direction: column; height: auto; }
	    .hero {
        flex-direction: column; 
        height: auto; 
    }
    .hero-left {
        width: 100%;
        padding: 60px 20px;
        text-align: center;
        align-items: center; 
    }
    .hero-right {
        width: 100%;
        height: 350px; /* Important pour voir l'image sur mobile */
    }
    .cabinet-intro {
        flex-direction: column;
    }
    /* ... vos autres codes responsive (hero, header, etc.) ... */

    /* AJOUT POUR LE CABINET SUR MOBILE */
    .cabinet-intro {
        flex-direction: column !important; /* Passe en colonne sur mobile */
    }
    .cabinet-img-col, .cabinet-text-col {
        width: 100%; /* Prend toute la largeur sur mobile */
    }
}

/* --- PAGE CONTACT & CF7 --- */

.contact-hero {
    background-color: #2c2c2c;
    /* Image de fond sombre texturée */
    background-image: url('https://www.transparenttextures.com/patterns/black-linen.png');
    padding: 80px 0;
    color: white;
}

.contact-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 50px;
}

.contact-left {
    width: 35%;
    padding-top: 40px;
}

.contact-left h2 { font-size: 2rem; margin-bottom: 20px; font-weight: 400; color: white; }

.email-link {
    display: inline-block;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 10px 20px;
    color: #ddd;
    margin-top: 10px;
    font-size: 0.9rem;
}
.email-link i { margin-right: 10px; color: var(--primary-red); }

/* --- CF7 FORMULAIRE --- */
.contact-form-container {
    width: 60%;
    background-color: var(--white);
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    color: var(--text-color);
}

/* Force les lignes en flexbox */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    position: relative;
    margin-bottom: 0;
}

/* Styles des inputs CF7 */
.form-control, 
.wpcf7-form-control-wrap input[type="text"],
.wpcf7-form-control-wrap input[type="email"],
.wpcf7-form-control-wrap input[type="tel"],
.wpcf7-form-control-wrap textarea,
.wpcf7-form-control-wrap select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--input-border);
    border-radius: 4px;
    font-family: 'Open Sans', sans-serif;
    color: #555;
    font-size: 0.9rem;
    box-sizing: border-box;
    background: #fff;
}

.form-control:focus, 
.wpcf7-form-control-wrap input:focus, 
.wpcf7-form-control-wrap textarea:focus {
    outline: 1px solid var(--primary-red);
    border-color: var(--primary-red);
}

.wpcf7-form-control-wrap textarea {
    resize: vertical;
    min-height: 150px;
}

/* Icones positionnées */
.input-icon-right {
    position: absolute;
    right: 15px;
    top: 50%; /* Centre l'icône verticalement */
    margin-top: -7px; /* Correction fine du centrage */
    color: var(--primary-red);
    font-size: 0.8rem;
    pointer-events: none;
    z-index: 2;
}

/* Correction spécifique CF7 pour l'icône dans le select */
.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

/* Upload Fichier Simple */
.upload-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.85rem;
    font-weight: 600;
}
.wpcf7-file {
    font-size: 0.8rem;
}

/* Checkbox RGPD */
.checkbox-group {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}
.wpcf7-list-item { margin: 0; }
.wpcf7-list-item-label { margin-left: 5px; }

/* Bouton Submit */
.btn-submit {
    width: 100%;
    background-color: var(--primary-red);
    color: white;
    border: none;
    padding: 12px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
}
.btn-submit:hover { background-color: var(--dark-red); }

/* Messages d'erreur/succès CF7 */
div.wpcf7-response-output {
    margin: 20px 0 0 !important;
    padding: 10px !important;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: center;
}
span.wpcf7-not-valid-tip {
    font-size: 0.75rem;
    color: #dc3545;
    margin-top: 5px;
    display: block;
}

/* --- ACCORDEON & MAP --- */
.offices-section { padding: 80px 0; text-align: center; }
.accordion { max-width: 800px; margin: 0 auto; text-align: left; }
.accordion-item { border-bottom: 1px solid #eee; padding: 20px 0; }
.accordion-header {
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; font-family: 'Montserrat', sans-serif;
    color: var(--dark-red); font-weight: 500; font-size: 1.1rem;
}
.accordion-header:hover { color: var(--primary-red); }
.acc-icon {
    width: 30px; height: 30px; border: 1px solid var(--primary-red);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: var(--primary-red); font-size: 0.8rem; transition: 0.3s;
}
.accordion-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; }
.accordion-content-inner { padding-top: 15px; font-size: 0.9rem; color: #555; line-height: 1.8; }
.accordion-item.active .accordion-content { max-height: 200px; }
.accordion-item.active .acc-icon { transform: rotate(45deg); background: var(--primary-red); color: white; }

.map-section {
    position: relative; width: 100%; height: 400px; overflow: hidden; background-color: #eee;
}
.map-img { width: 100%; height: 100%; background-size: cover; background-position: center; filter: grayscale(30%); }
.map-btn {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background-color: #dc3545; color: white; padding: 10px 25px;
    border-radius: 4px; font-weight: 600; box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .contact-wrapper { flex-direction: column; }
    .contact-left, .contact-form-container { width: 100%; }
    .form-row { flex-direction: column; gap: 10px; }
}
