/* ============================================================
   assurance-artisans.com — feuille de style principale
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary-beige: #F5F1E8;
    --secondary-gray: #E8E5E1;
    --navy-blue: #2C3E50;
    --navy-dark: #1f2d3a;
    --off-white: #FEFCF8;
    --accent-gold: #D4AF37;
    --accent-gold-dark: #B8941F;
    --text-dark: #2C2C2C;
    --text-light: #666666;
    --error: #e74c3c;
    --success: #27ae60;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.1);
    --transition: 0.3s ease;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--off-white);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

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

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--navy-blue);
    color: #fff;
    padding: 10px 16px;
    z-index: 9999;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------------- Header ---------------- */
.header {
    background: rgba(254, 252, 248, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: background var(--transition);
}
.header.scrolled { background: rgba(254, 252, 248, 0.98); }

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--navy-blue);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}
.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color var(--transition);
}
.nav-menu a:hover,
.nav-menu a.active { color: var(--accent-gold); }

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    cursor: pointer;
    width: 32px;
    height: 32px;
    padding: 0;
    position: relative;
}
.nav-toggle span {
    display: block;
    height: 3px;
    background: var(--navy-blue);
    margin: 5px 0;
    border-radius: 2px;
    transition: var(--transition);
}
.nav-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------------- Hero ---------------- */
.hero {
    background: linear-gradient(rgba(44, 62, 80, 0.7), rgba(44, 62, 80, 0.7)),
                url('../img/hero-chantier.jpg') center/cover;
    background: linear-gradient(rgba(44, 62, 80, 0.7), rgba(44, 62, 80, 0.7)),
                image-set(url('../img/hero-chantier.webp') type('image/webp'), url('../img/hero-chantier.jpg') type('image/jpeg')) center/cover;
    min-height: 100vh;
    display: flex;
    align-items: center;
    color: #fff;
    text-align: center;
    padding: 120px 0 80px;
}
.hero-content h1 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}
.hero-content .subtitle {
    font-size: clamp(1.05rem, 2vw, 1.4rem);
    margin: 0 auto 30px;
    max-width: 800px;
    font-weight: 300;
}

.cta-button {
    display: inline-block;
    background: var(--accent-gold);
    color: #fff;
    padding: 18px 35px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.3);
}
.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
    background: var(--accent-gold-dark);
}
.cta-button-light { background: #fff; color: var(--navy-blue); }
.cta-button-light:hover { background: var(--secondary-gray); }

/* ---------------- Sections ---------------- */
.section { padding: 100px 0; }
.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.8rem, 4vw, 3rem);
    text-align: center;
    margin-bottom: 50px;
    color: var(--navy-blue);
}

.why-insure { padding: 100px 0; background: var(--primary-beige); }

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.benefit-card {
    background: #fff;
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform var(--transition);
}
.benefit-card:hover { transform: translateY(-5px); }
.benefit-icon { font-size: 3rem; margin-bottom: 20px; }
.benefit-card h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--navy-blue);
}
.highlight-text {
    text-align: center;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-light);
    margin-top: 30px;
}

/* ---------------- Garanties ---------------- */
.guarantees { padding: 100px 0; background: #fff; }
.guarantees-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}
.guarantee-card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition);
}
.guarantee-card:hover { transform: translateY(-5px); }
.card-image { display: block; width: 100%; height: 200px; object-fit: cover; background: var(--secondary-gray); }
.card-content { padding: 30px; }
.card-content h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--navy-blue);
}
.card-content p { margin-bottom: 20px; color: var(--text-light); }
.card-link {
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition);
}
.card-link:hover { color: var(--navy-blue); }

/* ---------------- Formulaire ---------------- */
.form-section { padding: 100px 0; background: var(--primary-beige); }
.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 50px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.form-group { margin-bottom: 25px; }
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--navy-blue);
}
.form-section-title {
    color: var(--navy-blue);
    margin-bottom: 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--secondary-gray);
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color var(--transition);
    background: #fff;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
}
.form-group input.invalid,
.form-group select.invalid,
.form-group textarea.invalid {
    border-color: var(--error);
}
.form-group textarea { height: 120px; resize: vertical; }

.form-consent {
    font-size: 0.9rem;
    color: var(--text-light);
    background: #fafaf6;
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.submit-button {
    background: var(--navy-blue);
    color: #fff;
    padding: 18px 35px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: var(--transition);
}
.submit-button:hover { background: #34495e; transform: translateY(-2px); }
.submit-button:disabled { opacity: .6; cursor: not-allowed; }

.flash {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
}
.flash.success { background: #e6f6ec; color: #1f6b3b; border: 1px solid #b7e0c5; }
.flash.error   { background: #fdecea; color: #8a1f1f; border: 1px solid #f4b8b3; }

/* ---------------- Final CTA ---------------- */
.final-cta {
    padding: 80px 0;
    background: var(--navy-blue);
    color: #fff;
    text-align: center;
}
.final-cta h2 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    margin-bottom: 20px;
}
.final-cta p { max-width: 600px; margin: 0 auto 30px; font-size: 1.05rem; }

/* ---------------- Footer ---------------- */
.footer {
    background: var(--text-dark);
    color: #fff;
    padding: 80px 0 30px;
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}
.footer-section h3,
.footer-section .footer-title {
    font-family: 'Poppins', sans-serif;
    margin-bottom: 20px;
    color: var(--accent-gold);
    font-size: 1.1rem;
}
.footer-section p { color: #ccc; margin-bottom: 12px; }
.footer-section a {
    color: #ccc;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    transition: color var(--transition);
    font-size: 0.95rem;
}
.footer-section a:hover { color: var(--accent-gold); }
.footer-contact-buttons { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.btn-mail {
    background: var(--accent-gold) !important;
    color: #fff !important;
    padding: 12px 18px;
    border-radius: 25px;
    text-align: center;
    font-weight: 500;
    display: block !important;
    margin: 0 !important;
}
.btn-tel {
    background: var(--navy-blue) !important;
    color: #fff !important;
    padding: 12px 18px;
    border-radius: 25px;
    text-align: center;
    font-weight: 500;
    display: block !important;
    margin: 0 !important;
}
.btn-mail:hover { background: var(--accent-gold-dark) !important; }
.btn-tel:hover  { background: #34495e !important; }
.footer-hours { color: #ccc; font-size: 0.9em; margin-top: 8px; }
.footer-bottom {
    border-top: 2px solid #444;
    padding-top: 25px;
    text-align: center;
    color: #ccc;
}
.footer-bottom p { font-size: 0.9rem; margin: 4px 0; }
.footer-legal { color: #888; }

/* ---------------- Pages internes ---------------- */
.page {
    padding: 140px 0 80px;
    min-height: 70vh;
}
.page h1 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--navy-blue);
    margin-bottom: 30px;
}
.page h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    color: var(--navy-blue);
    margin: 30px 0 12px;
}
.page p { margin-bottom: 12px; }
.page .back-link {
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 20px;
}
.page .back-link:hover { color: var(--navy-blue); }
.contact-info {
    margin-top: 30px;
    padding: 20px;
    background: var(--primary-beige);
    border-radius: 10px;
}

/* ---------------- Hero CTAs ---------------- */
.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.hero-note { margin-top: 18px; font-size: 1rem; font-weight: 500; opacity: .95; }

/* ---------------- Obligations / métiers ---------------- */
.obligations { padding: 100px 0; background: var(--off-white); }
.obligations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}
.obligation {
    background: #fff;
    padding: 30px;
    border-radius: var(--radius);
    border-left: 4px solid var(--accent-gold);
    box-shadow: var(--shadow);
}
.obligation h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.15rem;
    color: var(--navy-blue);
    margin-bottom: 10px;
}
.obligation p { color: var(--text-light); }

/* ---------------- Cartes produits (sans image) ---------------- */
.section-intro {
    max-width: 800px;
    margin: -30px auto 40px;
    text-align: center;
    color: var(--text-light);
    font-size: 1.05rem;
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}
.product-card {
    background: #fff;
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}
.product-card h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    color: var(--navy-blue);
    margin-bottom: 12px;
}
.product-card p { color: var(--text-light); margin-bottom: 20px; flex: 1; }

/* ---------------- FAQ ---------------- */
.faq-section { padding: 100px 0; background: var(--off-white); }
.faq-list { max-width: 850px; margin: 0 auto; }
.faq-item {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    padding: 0 24px;
}
.faq-item summary {
    cursor: pointer;
    padding: 20px 0;
    list-style-position: outside;
}
.faq-item summary h3 {
    display: inline;
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--navy-blue);
}
.faq-item summary:focus-visible { outline: 2px solid var(--accent-gold); outline-offset: 4px; }
.faq-item p { padding-bottom: 20px; color: var(--text-dark); }

/* ---------------- Fil d'Ariane / pages ---------------- */
.breadcrumb { font-size: 0.9rem; color: var(--text-light); margin-bottom: 20px; }
.breadcrumb a { color: var(--accent-gold-dark); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.page ul { margin: 0 0 12px 22px; }
.page li { margin-bottom: 6px; }
.footer-legal a { color: #aaa; text-decoration: none; }
.footer-legal a:hover { color: #fff; text-decoration: underline; }
.footer-bottom a { color: inherit; }

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
    .nav-toggle { display: block; }
    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    .nav.active { max-height: 500px; }
    .nav-menu {
        flex-direction: column;
        padding: 20px;
        gap: 18px;
    }
    .form-row { grid-template-columns: 1fr; }
    .form-container { padding: 30px 20px; }
}
@media (max-width: 600px) {
    .section, .why-insure, .guarantees, .form-section, .obligations, .faq-section { padding: 60px 0; }
    .hero { padding: 110px 0 60px; }
    .container { padding: 0 16px; }
}
