/* 
   Theme: Couvreur Zingueur Nantais - Premium Dark/Terracotta 
   Author: Agent
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    /* Colors */
    --primary: #0f172a;
    /* Slate 900 - Deep Navbar/Text */
    --primary-light: #1e293b;
    /* Slate 800 */
    --accent: #e65100;
    /* Deep Orange - CTA/Highlights */
    --accent-hover: #ff6d00;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;

    /* Spacing */
    --container-width: 1200px;
    --header-height: 80px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--primary);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--white);
    box-shadow: 0 4px 14px 0 rgba(230, 81, 0, 0.39);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(230, 81, 0, 0.23);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary);
}

.text-accent {
    color: var(--accent);
}

.text-center {
    text-align: center;
}

.my-5 {
    margin-top: 5rem;
    margin-bottom: 5rem;
}

/* Header */
header {
    background-color: var(--white);
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
}

.nav-link:hover {
    color: var(--accent);
}

/* Phone CTA in header */
.header-phone {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 1.5rem;
}

.header-phone span {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    font-weight: 600;
}

.header-phone a {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

/* Mobile Menu Trigger */
.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    margin-top: var(--header-height);
    background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.6)), url('../img/hero-roof.jpg');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 6rem 0;
    min-height: 600px;
    display: flex;
    align-items: center;
    text-align: center;
}

.hero-content h1 {
    color: var(--white);
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    color: #cbd5e1;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}

.badge {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Services Grid */
.services-section {
    padding: 5rem 0;
    background-color: var(--bg-light);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-img {
    height: 220px;
    background-color: var(--primary-light);
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-img img {
    transform: scale(1.05);
}

.card-body {
    padding: 2rem;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.card-text {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.link-arrow {
    font-weight: 600;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Footer */
footer {
    background-color: var(--primary);
    color: #cbd5e1;
    padding: 4rem 0 2rem 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a:hover {
    color: var(--accent);
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(230, 81, 0, 0.1);
}

/* Responsive */
/* Page Headers with Background */
.page-hero {
    background-size: cover;
    background-position: center;
    padding: 6rem 0;
    /* Increased padding for better vertical spacing on mobile */
    color: var(--white) !important;
    text-align: center;
    position: relative;
    margin-top: var(--header-height);
    /* Prevent header overlap */
}

.page-hero h1 {
    color: var(--white) !important;
    margin-bottom: 1rem;
}

.page-hero p {
    color: #cbd5e1 !important;
    /* Ensure subtitle is also readable */
}

.page-hero.overlap-bottom {
    padding-bottom: 14rem;
    /* Increased to allow more space before form overlap */
}

/* Responsive Grid Layout for Service Pages */
.page-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* Responsive */
@media (max-width: 900px) {
    .page-layout {
        grid-template-columns: 1fr;
        /* Stack vertically on tablet/mobile */
        gap: 2rem;
    }

    aside {
        order: 2;
        /* Ensure aside goes below main content if flex/grid changes order */
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 1100px) {
    .mobile-toggle {
        display: block;
        font-size: 1.5rem;
        cursor: pointer;
        order: 3;
        /* Ensure burger menu is on the right */
        margin-left: 1rem;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.2rem;
        /* Reduce logo size on mobile */
        flex-shrink: 1;
        /* Allow logo to shrink if needed */
    }

    .logo span {
        display: inline-block;
        /* Keep "Nantais" with "Couvreur" or wrap nicely */
    }

    /* Adjust header actions for mobile */
    .header-actions {
        margin-left: auto;
        /* Push to right */
        gap: 0.5rem !important;
        /* Reduce gap */
    }

    .header-actions .btn {
        padding: 0.5rem 1rem;
        /* Smaller button */
        font-size: 0.8rem;
    }

    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        transform: translateY(-150%);
        transition: transform 0.3s ease-in-out;
        z-index: 900;
        display: flex;
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .header-phone {
        display: none;
    }
}

/* Fix for Devis Hero Content Overlap */
@media (max-width: 768px) {
    .page-hero {
        padding: 6rem 0;
        /* Increase padding to ensure text isn't lost if overlapped */
    }

    /* Remove negative margin on small screens to prevent overlap */
    .contact-container-wrapper {
        margin-top: 0 !important;
        padding-bottom: 3rem !important;
    }
}