:root {
    --bg: #ffffff;
    --bg-soft: #F7F8FA;
    --surface: #ffffff;
    --surface-2: #F3F4F6;
    --text: #161A22;
    --muted: #5B6472;
    --primary: #C1121F;
    --primary-strong: #9B0F19;
    --border: #D9DDE3;
    --radius: 20px;
    --container: 1180px;

    /* Compat variables */
    --color-primary: #C1121F;
    --color-primary-dark: #9B0F19;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

main { min-height: 70vh; }

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    margin-top: 0;
    line-height: 1.15;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); line-height: 1.06; margin: 0 0 1rem; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); margin: 0 0 1rem; }
h3, h4 { margin-top: 0; }

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

.container {
    width: min(92%, var(--container));
    margin: 0 auto;
}
.narrow { max-width: 760px; }

/* ── Header ── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* ── Logo ── */
.logo { display: flex; align-items: center; }
.logo-img {
    height: 100px;
    width: auto;
    object-fit: contain;
}

/* ── Nav ── */
.main-nav { display: flex; align-items: center; gap: 1.2rem; }
.main-nav a { color: var(--muted); font-weight: 600; transition: color 0.2s; }
.main-nav a:hover { color: var(--primary); }

.nav-dashboard {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.9rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text) !important;
    transition: background 0.2s;
}
.nav-dashboard:hover { background: var(--surface-2); }

/* ── Burger ── */
.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    z-index: 100;
}
.burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.burger:focus { outline: none; }
.burger-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-open span:nth-child(2) { opacity: 0; }
.burger-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Alerts ── */
.messages-wrap { padding-top: 1rem; }
.alert { border-radius: 14px; padding: 1rem 1.1rem; margin-bottom: 1rem; }
.alert-success { background: #ecfdf3; border: 1px solid #bbf7d0; color: #166534; }
.mt-24 { margin-top: 24px; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    font-weight: 700;
    font-family: inherit;
    padding: 0.95rem 1.4rem;
    border-radius: 14px;
    transition: 0.25s ease;
    white-space: nowrap;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-strong); transform: translateY(-1px); }
.main-nav .btn-primary { color: #000; }
.main-nav .btn-primary:hover { color: #000; }
.btn-outline,
.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-outline:hover,
.btn-secondary:hover { background: var(--surface-2); border-color: #b0b8c4; }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.9rem; border-radius: 10px; }

/* ── Eyebrow / Kicker ── */
.eyebrow,
.section-kicker {
    display: inline-block;
    margin-bottom: 0.75rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.82rem;
}

/* ── Hero ── */
.hero {
    padding: 5.5rem 0 4rem;
    background: linear-gradient(135deg, #0F1115 0%, #1B1F27 100%);
    color: #F7F8FA;
}
.hero p, .hero .hero-text, .hero .muted { color: rgba(247,248,250,0.75); }
.hero h1 { color: #F7F8FA; }
.hero .eyebrow { color: #f87171; }
.hero .btn-secondary { color: #F7F8FA; border-color: rgba(247,248,250,0.3); }
.hero .btn-secondary:hover { background: rgba(247,248,250,0.1); }
.hero .hero-card, .hero .hero-panel {
    background: rgba(247,248,250,0.07);
    border-color: rgba(247,248,250,0.12);
    color: #F7F8FA;
}
.hero .hero-card h3, .hero .hero-panel h3 { color: #F7F8FA; }
.hero .hero-card ul, .hero .hero-panel ul { color: rgba(247,248,250,0.75); }

.page-hero {
    padding: 4rem 0 3rem;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
}
.page-hero p { color: var(--muted); }

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
    align-items: center;
}

.hero-text { font-size: 1.1rem; color: var(--muted); max-width: 580px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.8rem 0; }

/* Hero card / panel */
.hero-card,
.hero-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.8rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.hero-panel ul,
.hero-card ul {
    padding-left: 1.2rem;
    margin: 0.75rem 0 0;
    color: var(--muted);
}
.hero-panel li,
.hero-card li { margin-bottom: 0.5rem; }

/* ── Cards ── */
.card,
.sidebar-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.6rem;
    color: var(--text);
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
    transform: scale(1.02) translateY(-3px);
    box-shadow: 0 12px 32px rgba(193,18,31,0.12);
    border-color: var(--primary);
}
.card p, .card .muted { color: var(--muted); }
.card .btn { margin-top: auto; align-self: flex-start; }

/* ── Service cards (home) ── */
.service-icon {
    font-size: 2rem;
    margin-bottom: 0.9rem;
    line-height: 1;
}
.service-card h3 { margin-bottom: 0.5rem; }
.service-card p  { flex: 1; margin-bottom: 1.2rem; }
.service-card:hover {
    transform: scale(1.04) translateY(-5px);
    box-shadow: 0 16px 40px rgba(193,18,31,0.18);
    border-color: var(--primary);
}

/* Grille 4 colonnes pour services home */
.services-home-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.3rem;
}

.text-link {
    color: var(--primary);
    font-weight: 700;
    margin-top: auto;
    align-self: flex-start;
    transition: opacity 0.2s;
}
.text-link:hover { opacity: 0.8; }

/* ── Card grids ── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.3rem;
}

/* ── Sections ── */
.section { padding: 4.5rem 0; }

.section-light,
.section-alt {
    background: var(--bg-soft);
}

.section-head {
    margin-bottom: 2rem;
    max-width: 760px;
}
.section-head h2 { margin-bottom: 0.5rem; }

/* ── Steps ── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2rem; }
.step-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.8rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(193,18,31,0.12);
    border-color: var(--primary);
}
.step-number {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: var(--font-heading), sans-serif;
    color: rgba(193,18,31,0.2);
    line-height: 1;
    margin-bottom: 1rem;
}

/* ── Feature items ── */
.feature-list { display: grid; gap: 1rem; }
.feature-item {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem 1.2rem;
    color: var(--text);
    font-weight: 500;
}

/* ── CTA / Contact box ── */
.contact-box,
.cta-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    background: linear-gradient(135deg, #0F1115, #1B1F27);
    border: 1px solid rgba(247,248,250,0.1);
    border-radius: var(--radius);
    padding: 2.5rem;
    color: #F7F8FA;
}
.contact-box h2, .cta-box h2 { color: #F7F8FA; }
.contact-box p, .cta-box p { color: rgba(247,248,250,0.7); }
.contact-box .eyebrow, .cta-box .eyebrow { color: #f87171; }

/* ── Contact / content grids ── */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 2rem; }
.content-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }

/* ── Forms ── */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.2rem;
}
.full-width { grid-column: 1 / -1; }

.form-control,
.form-select {
    width: 100%;
    margin-top: 6px;
    padding: 0.85rem 1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}
.form-control::placeholder { color: #aab0bb; }
.form-control:focus,
.form-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(193,18,31,0.08); }

/* ── Service blocks (page liste) ── */
.service-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 2.2rem;
    margin-bottom: 1.8rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.service-block:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(193,18,31,0.1);
    border-color: var(--primary);
}
.service-block-header {
    display: flex;
    gap: 1.4rem;
    align-items: flex-start;
    margin-bottom: 1.2rem;
}
.service-icon-lg {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(193,18,31,0.08);
    border: 1px solid rgba(193,18,31,0.2);
    border-radius: 10px;
    padding: 0.4rem 0.85rem;
    flex-shrink: 0;
    margin-top: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.service-lead {
    font-size: 1.05rem;
    color: var(--muted);
    margin: 0.3rem 0 0;
    font-weight: 500;
}
.service-desc { margin: 0; line-height: 1.75; color: var(--muted); }
.service-block h2 { margin: 0 0 0.4rem; font-size: 1.4rem; }

.service-features {
    list-style: none;
    padding: 0;
    margin: 1.2rem 0 1.5rem;
    display: grid;
    gap: 0.5rem;
}
.service-features li {
    padding: 0.5rem 0.9rem 0.5rem 2rem;
    background: rgba(193,18,31,0.04);
    border-left: 3px solid var(--primary);
    border-radius: 0 8px 8px 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
}
.service-features li::before {
    content: "✓";
    position: absolute;
    left: 0.55rem;
    color: var(--primary);
    font-weight: 700;
}

/* Pricing card */
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.pricing-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.pricing-highlight { font-size: 1.3rem; font-weight: 800; color: var(--primary); font-family: var(--font-heading), sans-serif; }
.pricing-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.6rem;
    color: var(--muted);
}
.pricing-list li::before { content: "✓  "; color: var(--primary); font-weight: 700; }

/* ── Bloc IA highlight ── */
.ai-highlight {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
    background: linear-gradient(135deg, #0F1115, #1B1F27);
    border: 1px solid rgba(193,18,31,0.3);
    border-radius: var(--radius);
    padding: 1.8rem;
    margin: 2rem 0;
    color: #F7F8FA;
}
.ai-highlight h3 { color: #F7F8FA; margin-bottom: 0.75rem; }
.ai-highlight p { color: rgba(247,248,250,0.75); margin-bottom: 0.75rem; }
.ai-highlight p:last-of-type { margin-bottom: 1.2rem; }
.ai-highlight-icon { font-size: 2rem; flex-shrink: 0; margin-top: 0.2rem; }

.service-features--lg li { font-size: 1rem; padding: 0.65rem 1rem 0.65rem 2.2rem; }

/* Sidebar links */
.sidebar-links { list-style: none; padding: 0; margin: 0.75rem 0 0; display: flex; flex-direction: column; gap: 0.5rem; }
.sidebar-links a { color: var(--primary); font-weight: 600; transition: opacity 0.2s; }
.sidebar-links a:hover { opacity: 0.75; }

/* ── Service detail ── */
.rich-text p { color: var(--muted); line-height: 1.8; }
.service-cta {
    margin-top: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.8rem;
}
.service-cta h3 { margin-bottom: 1rem; }

/* ── Service gallery ── */
.service-gallery { margin-top: 2.5rem; }
.service-gallery h3 { margin-bottom: 1.25rem; font-size: 1.15rem; }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}
.gallery-item {
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
}
.gallery-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item figcaption {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    color: var(--muted);
}
.gallery-item { cursor: zoom-in; }

/* ── Lightbox ── */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.lightbox.is-open { display: flex; }
.lightbox-content {
    max-width: min(calc(100% - 2rem), 900px);
    text-align: center;
    animation: lb-in 0.22s ease;
}
@keyframes lb-in {
    from { opacity: 0; transform: scale(0.93); }
    to   { opacity: 1; transform: scale(1); }
}
.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 14px;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}
.lightbox-caption {
    margin-top: 0.75rem;
    color: rgba(255,255,255,0.65);
    font-size: 0.88rem;
}
.lightbox-close {
    position: fixed;
    top: 1.25rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.2s;
    z-index: 10000;
}
.lightbox-close:hover { opacity: 1; }

/* ── Footer ── */
.site-footer {
    margin-top: 2rem;
    background: #0F1115;
    padding: 3rem 0 1.5rem;
    color: #F7F8FA;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.8fr 0.9fr;
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-grid h3, .footer-grid h4 { font-family: var(--font-heading), sans-serif; margin-bottom: 0.75rem; color: #F7F8FA; }
.footer-grid p, .footer-grid li { color: rgba(247,248,250,0.6); }
.footer-grid a { color: rgba(247,248,250,0.6); transition: color 0.2s; }
.footer-grid a:hover { color: #F7F8FA; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-bottom { color: rgba(247,248,250,0.4); font-size: 0.9rem; border-top: 1px solid rgba(247,248,250,0.08); padding-top: 1.5rem; }

/* ── Muted ── */
.muted { color: var(--muted); }

/* ── Animations au scroll ── */
.reveal, .reveal-up {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible, .reveal-up.is-visible { opacity: 1; transform: translateY(0); }
.reveal-1 { transition-delay: 0.08s; }
.reveal-2 { transition-delay: 0.2s; }
.card-grid .reveal-up:nth-child(1) { transition-delay: 0.05s; }
.card-grid .reveal-up:nth-child(2) { transition-delay: 0.12s; }
.card-grid .reveal-up:nth-child(3) { transition-delay: 0.19s; }
.card-grid .reveal-up:nth-child(4) { transition-delay: 0.26s; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .hero-grid, .card-grid, .contact-grid, .content-grid, .footer-grid, .steps, .split-grid {
        grid-template-columns: 1fr 1fr;
    }
    .services-home-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
    .burger { display: flex; }

    .main-nav {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0;
        padding: 0.5rem 0 1rem;
        border-top: 1px solid var(--border);
        margin-top: 0.5rem;
    }
    .main-nav.nav-open { display: flex; }
    .main-nav a { padding: 0.7rem 0; border-bottom: 1px solid var(--border); color: var(--text); }
    .main-nav .btn { margin-top: 0.5rem; text-align: center; }

    .header-inner { flex-wrap: wrap; }

    .hero-grid, .card-grid, .contact-grid, .content-grid,
    .footer-grid, .steps, .split-grid, .contact-box, .cta-box,
    .services-home-grid {
        grid-template-columns: 1fr;
    }

    .cta-box, .contact-box { flex-direction: column; align-items: flex-start; }

    .form-grid { grid-template-columns: 1fr; }

    .hero, .page-hero, .section { padding: 3.5rem 0; }
}
