:root {
    --primary: #1e3a5f;
    --primary-dark: #152a45;
    --secondary: #2c5282;
    --accent: #38a169;
    --accent-dark: #2f855a;
    --text: #2d3748;
    --text-light: #52606d;  /* contraste 6,4:1, conforme WCAG AA */
    --bg: #ffffff;
    --bg-alt: #f8f9fa;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-hover: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --shadow-btn: 0 4px 12px rgba(0,0,0,0.15);
    --radius: 8px;
    --container: 1140px;
    --header-height: 72px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

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

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255,255,255,0.96);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo-icon {
    height: 32px;
    width: auto;
}

.logo-tagline {
    display: none;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-light);
    margin-left: 0.75rem;
    padding-left: 0.75rem;
    border-left: 1px solid var(--border);
    letter-spacing: 0;
}

.logo:hover {
    text-decoration: none;
}

.main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
}

.main-nav.open {
    display: block;
}

.nav-list {
    list-style: none;
}

.nav-list li {
    margin-bottom: 0.5rem;
}

.nav-link {
    color: var(--text);
    font-weight: 600;
    font-size: 0.9375rem;
    display: block;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--secondary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary);
    text-decoration: none;
}

/* Burger */
.burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
}

.burger span {
    display: block;
    width: 100%;
    height: 2.5px;
    background: var(--primary);
    border-radius: 2px;
    transition: 0.3s;
}

.burger[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.burger[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Main */
main {
    padding-top: var(--header-height);
}

.section {
    padding: 3rem 0;
}

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

.section-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    color: var(--primary);
    margin-bottom: 1rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-weight: 800;
}

.section-subtitle {
    color: var(--text-light);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.125rem;
    line-height: 1.6;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 5rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.035' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='1.5'/%3E%3Ccircle cx='15' cy='15' r='1.5'/%3E%3C/g%3E%3C/svg%3E");
    z-index: 1;
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1.25rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
    font-weight: 800;
}

.hero-subtitle {
    font-size: 1.125rem;
    opacity: 0.88;
    max-width: 640px;
    margin: 0 auto 2.5rem;
    font-weight: 400;
    line-height: 1.6;
}

/* Trust Bar */
.trust-bar {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 2rem 0;
}

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

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    text-align: center;
}

.trust-icon {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

.trust-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* FAQ */
.faq-list {
    max-width: 760px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 0;
}

.faq-item summary {
    font-weight: 700;
    color: var(--primary);
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 2rem;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 0;
    font-size: 1.25rem;
    color: var(--primary);
}

.faq-item[open] summary::after {
    content: "−";
}

.faq-item p {
    margin-top: 0.75rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius);
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    font-family: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-btn);
}

.btn:active {
    transform: scale(0.98);
}

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

.btn-primary:hover {
    background: var(--accent-dark);
}

.btn-secondary {
    background: var(--secondary);
    color: #fff;
}

.btn-secondary:hover {
    background: var(--primary);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.8);
}

.btn-outline:hover {
    background: #fff;
    color: var(--primary);
    border-color: #fff;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.35em 0.9em;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.badge--green,
.badge--blue,
.badge--orange,
.badge--gray {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

/* Cards */
.cards-grid {
    display: grid;
    gap: 2rem;
    margin-top: 2.5rem;
}

.cards-grid--single {
    grid-template-columns: 1fr;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-top: 3px solid var(--secondary);
    border-radius: var(--radius);
    padding: 2.25rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--shadow-hover);
}

.card--accent { border-top-color: var(--accent); }
.card--primary{ border-top-color: var(--primary); }

.card-title {
    font-size: 1.35rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.card-text {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Security Seal */
.security-seal {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    border: 3px double var(--primary);
    color: var(--primary);
    padding: 1.75rem 2.5rem;
    border-radius: 4px;
    text-align: center;
    transform: rotate(-2deg);
    background: rgba(30, 58, 95, 0.03);
    margin: 2rem 0;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.security-seal__title {
    font-size: 0.9375rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.25rem;
}

.security-seal__text {
    font-size: 0.8125rem;
    color: var(--text-light);
    font-weight: 600;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--border), var(--secondary), var(--border));
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 60px;
}

.timeline-dot {
    position: absolute;
    left: 11px;
    top: 0.25rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--secondary);
    border: 4px solid var(--bg);
    box-shadow: 0 0 0 2px var(--border);
    z-index: 2;
}

.timeline-content {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.timeline-content:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.timeline-content h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
}

.timeline-content p {
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

/* Steps (fallback) */
.steps {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--secondary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
    font-size: 1rem;
}

.step-content h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

/* Lists */
.feature-list {
    list-style: none;
    margin: 1rem 0;
}

.feature-list li {
    padding: 0.5rem 0;
    padding-left: 1.75rem;
    position: relative;
    color: var(--text-light);
    font-size: 0.9375rem;
}

.feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 800;
    font-size: 1rem;
}

/* Illustrations */
.hero-img {
    max-height: 220px;
    width: auto;
    margin: 0 auto 2rem;
    display: block;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.15));
}

.card-img {
    max-height: 140px;
    width: auto;
    margin: 0 auto 1.25rem;
    display: block;
}

.about-img {
    max-height: 200px;
    width: auto;
    margin: 0 auto 2.5rem;
    display: block;
}

/* Form */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary);
    font-size: 0.9375rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.875rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text);
    background: var(--bg);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
}

.form-textarea {
    min-height: 140px;
    resize: vertical;
}

.form-feedback {
    display: none;
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-weight: 500;
    font-size: 0.9375rem;
}

.form-feedback.success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.form-feedback.error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
}

/* Footer */
.site-footer {
    background: var(--primary-dark);
    color: #cbd5e0;
    padding: 4rem 0 2rem;
    font-size: 0.9375rem;
}

.footer-grid {
    display: grid;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-title {
    color: #fff;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #a0aec0;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: #718096;
}

/* Fade-in animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--stagger, 0ms);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* Desktop */
@media (min-width: 768px) {
    .burger {
        display: none;
    }

    .main-nav {
        display: block;
        position: static;
        border: none;
        padding: 0;
        box-shadow: none;
    }

    .nav-list {
        display: flex;
        gap: 2.25rem;
        align-items: center;
    }

    .nav-list li {
        margin-bottom: 0;
    }

    .section {
        padding: 5rem 0;
    }

    .hero {
        padding: 6rem 0 5rem;
        text-align: left;
    }

    .hero .container {
        display: flex;
        align-items: center;
        gap: 4rem;
    }

    .hero > .container > div:first-child {
        flex: 1;
    }

    .hero-img {
        margin: 0;
        max-height: 320px;
    }

    .hero-title {
        margin-bottom: 1.5rem;
    }

    .hero-subtitle {
        margin: 0 0 2.5rem;
    }

    .trust-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cards-grid--single {
        grid-template-columns: 1fr;
    }

    .cards-grid.three {
        grid-template-columns: repeat(3, 1fr);
    }

    .steps {
        grid-template-columns: repeat(4, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .card-img {
        max-height: 160px;
    }

    .about-img {
        max-height: 260px;
        margin: 0 0 2.5rem;
    }

    .timeline::before {
        left: 50%;
        transform: translateX(-50%);
    }

    .timeline-item {
        padding-left: 0;
        width: 50%;
        margin-bottom: 4rem;
    }

    .timeline-item:nth-child(odd) {
        margin-left: 0;
        padding-right: 3.5rem;
        text-align: right;
    }

    .timeline-item:nth-child(even) {
        margin-left: 50%;
        padding-left: 3.5rem;
    }

    .timeline-dot {
        left: 50%;
        transform: translateX(-50%);
        top: 0.5rem;
    }

    .split-hero-text {
        max-width: 540px;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 3.5rem;
    }

    .logo-tagline {
        display: inline;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
    }
    .fade-in { opacity: 1 !important; transform: none !important; }
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}


/* Divers hero de pages internes (remplacent les styles inline) */
.hero--default   { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.hero--secondary { background: linear-gradient(135deg, var(--secondary), #1a365d); }
.hero--dark      { background: linear-gradient(135deg, var(--primary-dark), #0f1f35); }

/* Boutons du hero d'accueil */
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Honeypot anti-spam (remplace le style inline de contact.html) */
.hp-field { position: absolute; left: -9999px; top: -9999px; }

/* Coordonnées page contact (remplace les styles inline) */
.contact-info p { margin-bottom: 1rem; }

/* Mention confidentialité sous le formulaire */
.form-privacy { font-size: 0.8125rem; color: var(--text-light); margin-top: 1rem; }

/* Pages légales (remplacent tous les styles inline des h2 et p) */
.legal h2 { margin-top: 2rem; color: var(--primary); font-size: 1.25rem; }
.legal p, .legal ul { margin-bottom: 1rem; }
.legal ul + p { margin-top: 1rem; }

/* Bloc coordonnées du footer (remplace les style="color: #a0aec0") */
.footer-contact p { color: #a0aec0; margin-bottom: 0.5rem; }

/* Liste "Ils nous font confiance" */
.clients-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.5rem;
    color: var(--text-light);
    font-style: italic;
}

/* Ancres : ne pas passer sous le header fixe */
[id] { scroll-margin-top: calc(var(--header-height) + 1rem); }

/* Sélection de texte */
::selection { background: var(--secondary); color: #fff; }
