/* Variables & Reset */
html {
    scroll-behavior: smooth;
}

:root {
    /* Palette */
    --primary: #C19A6B;
    /* Marron clair bois */
    --primary-dark: #A68256;
    --secondary: #8B7355;
    /* Marron moyen */
    --accent: #D4A574;
    /* Beige doré */
    --text: #2C2416;
    /* Marron très foncé */
    --text-light: #5A4D3B;
    --bg: #FAF7F2;
    /* Beige très clair */
    --white: #FFFEF9;
    --success: #7D9B6E;
    --warning: #D4896B;
    --danger: #C05555;

    /* Spacing & Radius */
    --radius: 12px;
    --shadow: 0 4px 20px rgba(139, 115, 85, 0.15);
    --container-width: 1200px;

    /* Fonts */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C19A6B' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--text);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: rgba(255, 254, 249, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(139, 115, 85, 0.1);
    border-bottom: 1px solid rgba(193, 154, 107, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon svg {
    width: 40px;
    height: 40px;
    color: var(--primary);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--secondary);
    line-height: 1;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.main-nav ul {
    display: flex;
    gap: 18px;
}

.main-nav a {
    font-weight: 500;
    color: var(--text);
    font-size: 0.87rem;
}

.main-nav a:hover {
    color: var(--primary);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text);
    transition: 0.3s;
}

/* Hero */
.hero {
    text-align: center;
    padding: 60px 0 40px;
    background: linear-gradient(to bottom, rgba(250, 247, 242, 0), rgba(193, 154, 107, 0.1));
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--secondary);
}

.hero .subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

.intro-text {
    max-width: 800px;
    margin: 0 auto;
    color: var(--text);
    font-size: 1.05rem;
}

.intro-text p {
    margin-bottom: 15px;
}

/* Simulator Section */
.simulator-section {
    padding: 40px 0 80px;
}

.simulator-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    overflow: hidden;
    border: 1px solid rgba(193, 154, 107, 0.2);
}

.simulator-inputs {
    padding: 40px;
    background-color: #FFFEF9;
    border-right: 1px solid rgba(193, 154, 107, 0.1);
}

.simulator-results {
    padding: 40px;
    background-color: #FAF7F2;
    display: flex;
    flex-direction: column;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--secondary);
}

.icon {
    font-size: 1.5rem;
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #E0D6C8;
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: border-color 0.3s;
    background: #fff;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
}

.input-wrapper .unit {
    position: absolute;
    right: 15px;
    color: var(--text-light);
    font-weight: 500;
}

.range-slider {
    width: 100%;
    margin-top: 10px;
    accent-color: var(--primary);
    cursor: pointer;
}

.select-wrapper select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #E0D6C8;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
    cursor: pointer;
}

.optional {
    font-weight: 400;
    color: var(--text-light);
    font-size: 0.9em;
}

.actions {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn {
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(193, 154, 107, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--white);
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary);
    color: white;
}

.btn-text {
    background: none;
    color: var(--text-light);
    text-decoration: underline;
    padding: 5px;
}

.btn-text:hover {
    color: var(--text);
}

/* Results Area */
.comfort-indicator {
    background: #E0E0E0;
    padding: 10px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    font-weight: 600;
    transition: all 0.3s;
}

.comfort-indicator.excellent {
    background: #DFF0D8;
    color: #3C763D;
}

.comfort-indicator.good {
    background: #D9EDF7;
    color: #31708F;
}

.comfort-indicator.acceptable {
    background: #FCF8E3;
    color: #8A6D3B;
}

.comfort-indicator.bad {
    background: #F2DEDE;
    color: #A94442;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.result-item {
    background: var(--white);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #E0D6C8;
    display: flex;
    flex-direction: column;
}

.result-item.full-width {
    grid-column: span 2;
}

.result-item .label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.result-item .value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary);
    font-family: var(--font-heading);
}

.result-item .sub {
    font-size: 0.8rem;
    color: var(--text-light);
}

.visualizer {
    background: var(--white);
    border: 1px solid #E0D6C8;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.visualizer h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--text);
}

#stair-canvas-container {
    width: 100%;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#stair-svg {
    width: 100%;
    height: 100%;
}

/* How it works */
.how-it-works {
    padding: 80px 0;
    background-color: var(--white);
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 50px;
    color: var(--secondary);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.step-card {
    text-align: center;
    padding: 30px;
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 20px;
    font-family: var(--font-heading);
}

.step-card h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

/* Advantages */
.advantages {
    padding: 80px 0;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.advantage-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s;
    border: 1px solid rgba(193, 154, 107, 0.1);
}

.advantage-card:hover {
    transform: translateY(-5px);
}

.advantage-card .icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

/* FAQ */
.faq-section {
    padding: 80px 0;
    background-color: var(--white);
}

.accordion {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    border-bottom: 1px solid #E0D6C8;
}

.accordion-header-wrapper {
    margin: 0;
}

.accordion-header {
    width: 100%;
    text-align: left;
    padding: 20px;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-body);
}

.accordion-header::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary);
    transition: transform 0.3s;
}

.accordion-header.active::after {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 20px;
    color: var(--text-light);
}

.accordion-content p,
.accordion-content ul {
    margin-bottom: 20px;
}

.accordion-content ul {
    list-style: disc;
    padding-left: 20px;
}

/* SEO Content */
.seo-content {
    padding: 80px 0;
    background-color: var(--bg);
}

.seo-content h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2rem;
}

.seo-block {
    margin-bottom: 40px;
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.seo-block h3 {
    color: var(--secondary);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.seo-block ul {
    list-style: disc;
    padding-left: 20px;
    margin-top: 15px;
}

.seo-block li {
    margin-bottom: 10px;
}

/* Generic card */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    border: 1px solid rgba(193, 154, 107, 0.15);
}

/* Input fallback (without .input-wrapper) */
.input-group > input[type="number"],
.input-group > input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #E0D6C8;
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: border-color 0.3s;
    background: #fff;
    display: block;
}
.input-group > input[type="number"]:focus,
.input-group > input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
}

/* Footer */
.site-footer {
    background-color: #2C2416;
    color: #E0D6C8;
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    justify-content: flex-end;
}

.footer-links a:hover {
    color: var(--primary);
}

.copyright {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(224, 214, 200, 0.6);
}


/* Base state: all CTAs hidden */
.quote-container {
    display: none !important;
}

/* Desktop Logic: Show only the first CTA when active */
@media (min-width: 769px) {
    .quote-container:not(.mobile-only).active {
        display: block !important;
    }
}

/* Mobile Logic: Show all active CTAs (both 1st and 2nd) */
@media (max-width: 768px) {
    .quote-container.active {
        display: block !important;
    }
}

/* Responsive */
@media (max-width: 900px) {
    .simulator-card {
        grid-template-columns: 1fr;
    }

    .simulator-inputs {
        border-right: none;
        border-bottom: 1px solid rgba(193, 154, 107, 0.1);
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        border-bottom: 1px solid rgba(193, 154, 107, 0.2);
    }

    .main-nav.active {
        display: block;
        animation: slideDown 0.3s ease forwards;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero h1 {
        font-size: 2rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
    }

}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CTA Card Styles - Enhanced visibility */
.cta-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cta-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 45px rgba(193, 154, 107, 0.25) !important;
}

.cta-button {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    border: none !important;
    color: white !important;
    box-shadow: 0 6px 15px rgba(34, 197, 94, 0.4) !important;
    transition: all 0.3s ease !important;
}

.cta-button:hover {
    background: linear-gradient(135deg, #16a34a, #15803d) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(22, 163, 74, 0.5) !important;
}

/* Blog Section */
.blog-section {
    padding: 80px 0;
    background-color: var(--bg);
}

.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.blog-post-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(193, 154, 107, 0.1);
    display: flex;
    flex-direction: column;
}

.blog-post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(139, 115, 85, 0.2);
}

.blog-post-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid rgba(193, 154, 107, 0.1);
}

.blog-post-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-post-date {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-post-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--secondary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.blog-post-excerpt {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

.blog-post-link {
    margin-top: auto;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-post-link::after {
    content: '→';
    transition: transform 0.3s ease;
}

.blog-post-link:hover::after {
    transform: translateX(5px);
}

.blog-loading {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
    grid-column: 1 / -1;
}

.blog-error {
    text-align: center;
    padding: 40px;
    color: var(--danger);
    grid-column: 1 / -1;
}

/* ===================================
   Breadcrumbs
   =================================== */
.breadcrumbs {
    padding: 15px 0;
    background: rgba(193, 154, 107, 0.05);
    border-bottom: 1px solid rgba(193, 154, 107, 0.1);
    font-size: 0.9rem;
}

.breadcrumbs-list {
    display: flex;
    list-style: none;
    gap: 10px;
    align-items: center;
    color: var(--text-light);
    margin: 0;
    padding: 0;
}

.breadcrumbs-item a {
    color: var(--secondary);
    transition: color 0.3s;
}

.breadcrumbs-item a:hover {
    color: var(--primary);
}

.breadcrumbs-item.active {
    color: var(--text-light);
    font-weight: 500;
}

.breadcrumbs-separator {
    color: rgba(139, 115, 85, 0.3);
}

/* ===================================
   Trust Section
   =================================== */
.trust-section {
    padding: 100px 0;
    background: var(--white);
    border-top: 1px solid rgba(193, 154, 107, 0.1);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    text-align: center;
}

.trust-item .icon-box {
    width: 80px;
    height: 80px;
    background: var(--bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: var(--primary);
}

.trust-item h3 {
    margin-bottom: 15px;
    color: var(--secondary);
}

.trust-item p {
    color: var(--text-light);
    font-size: 0.95rem;
}

