/* === CSS VARIABLES === */
:root {
    --bg-color: #FFFFEF;
    --bg-secondary: #F2EFE9;
    --text-primary: #0D1B2A;
    --text-secondary: #4b5563;
    
    --primary-color: #0D1B2A; /* Dark Blue from Charte */
    --secondary-color: #C9A24E; /* Gold from Charte */
    --accent-color: #C9A24E;
    
    --border-color: #e5e7eb;
    
    --transition: all 0.3s ease;
    --font-heading: 'Montserrat', sans-serif;
    --font-text: 'Lora', serif;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-text);
    line-height: 1.6;
}

body {
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

.section {
    padding: 6rem 0;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4 {
    line-height: 1.2;
    font-weight: 600;
    font-family: var(--font-heading);
    color: var(--primary-color);
}

.hero-title {
    font-size: clamp(2.5rem, 4vw, 4rem);
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.section-title {
    font-size: clamp(2rem, 3vw, 2.5rem);
    margin-bottom: 1rem;
}

.pre-title {
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-heading);
    margin-bottom: 0.75rem;
    display: block;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 600px;
    margin-bottom: 3rem;
}

.center {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mt-4 { margin-top: 2rem; }

/* === COMPONENTS === */
.clean-card {
    background: var(--bg-color);
    border: 1px solid rgba(201, 162, 78, 0.2);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(13, 27, 42, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.clean-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(13, 27, 42, 0.1);
    border-color: var(--secondary-color);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary-color);
    color: #ffffff;
}

.btn-primary:hover {
    background: #1e314a; /* Lighter shade of Dark Blue */
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #ffffff;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    color: var(--primary-color);
    border: 1px solid var(--secondary-color);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-heading);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === NAVBAR === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition);
    background: transparent;
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    padding: 1rem 0;
    background: rgba(255, 255, 239, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(201, 162, 78, 0.2);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-primary);
    font-weight: 600;
    font-family: var(--font-heading);
    font-size: 0.95rem;
}

.nav-link:hover {
    color: var(--secondary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Réduction de la taille du bouton dans la navbar */
.nav-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 1001;
}

.menu-toggle span {
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 9px; }
.menu-toggle span:nth-child(3) { bottom: 0; }

/* === PAGE HEADERS (for subpages) === */
.page-header {
    background: var(--bg-secondary);
    padding: 120px 0 60px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* === FORMS (for devis.php) === */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
    width: 100%;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-text);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(201, 162, 78, 0.1);
}

/* === HERO === */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    background: var(--bg-secondary);
    position: relative;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 500px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-visual {
    position: relative;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-placeholder {
    width: 100%;
    max-width: 450px;
    height: 500px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
    text-align: center;
    padding: 2rem;
    margin: 0 auto;
}

/* === SERVICES === */
.services {
    background: var(--bg-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.service-icon {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    width: 36px;
    height: 36px;
}

.service-title {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.service-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* === ABOUT === */
.about {
    background: var(--bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.box-title {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.abstract-visual {
    width: 100%;
    height: 400px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    color: var(--text-secondary);
    box-shadow: var(--shadow-md);
}

/* === TESTIMONIALS === */
.testimonials {
    background: var(--bg-color);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stars {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1rem;
    letter-spacing: 2px;
}

.review-text {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.reviewer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    width: 100%;
}

.r-avatar {
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border: 1px solid var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--primary-color);
}

.r-info strong { display: block; font-size: 0.95rem; }
.r-info span { color: var(--text-secondary); font-size: 0.85rem; }

/* === CTA SECTION === */
.cta-section {
    background: var(--bg-secondary);
}

.cta-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 4rem 2rem;
    background: var(--primary-color);
    border-radius: 40px;
    color: #ffffff;
    width: 100%;
}

.cta-box .section-title {
    color: #ffffff;
}

.cta-box p {
    color: var(--bg-secondary);
    max-width: 500px;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.cta-actions .btn-primary {
    background: var(--secondary-color);
    color: #ffffff;
}

.cta-actions .btn-primary:hover {
    background: #af8d42;
}

.cta-actions .btn-secondary {
    border-color: #ffffff;
    color: #ffffff;
}

.cta-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* === FOOTER === */
.footer {
    background: var(--bg-color);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 1rem;
    max-width: 300px;
    font-size: 0.95rem;
}

.footer h4 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 1rem;
    font-family: var(--font-heading);
}

.footer ul li {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer ul li a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* === PROGRESS BAR (MULTI-STEP FORM) === */
.progressbar {
    counter-reset: step;
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.progressbar::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--border-color);
    z-index: -1;
}

.progressbar li {
    list-style-type: none;
    text-align: center;
    flex: 1;
    position: relative;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.progressbar li::before {
    content: counter(step);
    counter-increment: step;
    width: 30px;
    height: 30px;
    line-height: 30px;
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    margin: 0 auto 0.5rem auto;
    background-color: var(--bg-color);
}

.progressbar li.active {
    color: var(--secondary-color);
}

.progressbar li.active::before {
    border-color: var(--secondary-color);
    background: var(--secondary-color);
    color: white;
}

.form-step {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

/* === COOKIE BANNER === */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(13, 27, 42, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: #fff;
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    z-index: 9999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    transform: translateY(150%);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner p {
    font-size: 0.95rem;
    margin: 0;
}

.cookie-banner .btn-primary {
    background: var(--secondary-color);
    color: #fff;
    white-space: nowrap;
}

/* === NEW SHAPE UTILITIES === */
.soft-corners {
    border-radius: 40px 8px 40px 8px;
    box-shadow: 0 20px 50px rgba(13, 27, 42, 0.1);
    overflow: hidden;
}
.soft-corners img {
    width: 100%;
    height: auto;
    display: block;
}

.shape-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: translateY(2px); /* Prevents 1px gaps */
}
.shape-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}
.shape-divider .shape-fill {
    fill: var(--bg-color);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .nav-links {
        gap: 1rem;
    }
    .nav-link {
        font-size: 0.85rem;
    }
    .nav-actions {
        gap: 0.5rem;
    }
    .nav-actions a[href^="tel:"] {
        font-size: 0.85rem;
    }
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .hero-container, .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .hero-subtitle {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    .hero-buttons {
        justify-content: center;
    }
    .hero-visual {
        margin-top: 2rem;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-brand p {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 1100px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--bg-color);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right 0.4s ease;
        z-index: 1000;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-link {
        font-size: 1.2rem;
    }

    .menu-toggle {
        display: block;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .nav-actions .btn {
        display: none;
    }
    .services-grid, .testimonials-grid {
        grid-template-columns: 1fr;
    }
    .cta-actions {
        flex-direction: column;
        width: 100%;
    }
    .cookie-banner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .cta-box {
        padding: 3rem 1.5rem;
        border-radius: 24px; /* Slightly less round on very small screens so it doesn't look like a circle */
    }
    .cta-actions .btn {
        width: 100%;
    }
}

/* === ANIMATIONS === */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.reveal-right {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.6s ease-out;
}

.reveal.active, .reveal-right.active {
    opacity: 1;
    transform: translate(0);
}
