/* Base globale */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Variables du thème */
:root {
    --bg: #F4F1EC;
    --surface: #FFFDFC;
    --surface-soft: #EAF0F2;
    --text: #2A3137;
    --muted: #62717B;
    --border: #D9E0E4;
    --accent: #5F7682;
    --accent-dark: #425A67;
    --accent-soft: #DDE7EC;
    --shadow: 0 18px 48px rgba(42, 49, 55, 0.08);
    --radius-xl: 34px;
    --radius-lg: 26px;
    --radius-md: 18px;
    --shell: 1160px;
}

/* Document */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
}

/* Conteneur central */
.shell {
    width: min(var(--shell), calc(100% - 34px));
    margin: 0 auto;
}

/* Liens */
a {
    color: inherit;
    text-decoration: none;
}

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

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 90;
    background: rgba(244, 241, 236, 0.94);
    border-bottom: 1px solid rgba(217, 224, 228, 0.86);
    backdrop-filter: blur(12px);
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    min-height: 88px;
}

/* Marque */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.brand-logo {
    width: 228px;
    max-width: 44vw;
    height: auto;
    object-fit: contain;
    object-position: left center;
    flex-shrink: 0;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.12;
}

.brand-copy strong {
    font-size: 1.02rem;
    letter-spacing: -0.01em;
}

.brand-copy span {
    color: var(--muted);
    font-size: 0.92rem;
}

/* Burger */
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: var(--text);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

body.menu-open .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

body.menu-open .nav-toggle span:nth-child(2) {
    opacity: 0;
}

body.menu-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px 12px;
}

.main-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus {
    background: var(--accent-soft);
    color: var(--text);
    transform: translateY(-1px);
}

/* Hero */
.hero {
    padding: 48px 0 24px;
}

.hero-card {
    background: linear-gradient(180deg, rgba(255, 253, 252, 0.98), rgba(234, 240, 242, 0.96));
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 44px;
    box-shadow: var(--shadow);
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent-dark);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.14;
}

.hero h1,
.page-title,
.article h1 {
    font-size: clamp(2rem, 5vw, 3.95rem);
    letter-spacing: -0.03em;
}

.article h2 {
    font-size: clamp(1.35rem, 2.4vw, 2rem);
    margin-top: 34px;
}

.hero-text,
.page-intro {
    max-width: 780px;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 1.08rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.button-primary,
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700;
}

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

.button-primary:hover,
.button-primary:focus {
    background: var(--accent-dark);
}

.button-secondary {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

.button-secondary:hover,
.button-secondary:focus {
    border-color: var(--accent);
    color: var(--accent-dark);
}

/* Sections */
.section {
    padding: 22px 0 30px;
}

.section.alt {
    padding: 30px 0 38px;
}

.page-top {
    padding-top: 42px;
}

.section-grid,
.card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.single-grid {
    grid-template-columns: minmax(0, 1fr);
}

.three-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

/* Cartes */
.card,
.article-preview,
.article,
.step-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.card,
.article-preview,
.step-card {
    padding: 28px;
}

.card h2,
.card h3,
.article-preview h2,
.step-card h2,
.step-card h3 {
    margin-bottom: 12px;
}

.card p,
.article-preview p,
.article p,
.article li,
.step-card p,
.footer-text,
.footer-list a {
    color: var(--muted);
}

/* Listes de repères */
.topic-list {
    margin: 18px 0 0;
    padding-left: 22px;
}

.topic-list li + li {
    margin-top: 10px;
}

/* Bandeau méthode */
.method-note {
    padding: 18px 20px;
    background: var(--accent-soft);
    border: 1px solid rgba(95, 118, 130, 0.16);
    border-radius: var(--radius-md);
}

/* Article */
.article-wrap {
    padding: 40px 0 44px;
}

.article {
    padding: 36px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    font-size: 0.92rem;
    color: var(--muted);
}

.article-intro {
    font-size: 1.12rem;
}

.article ul {
    padding-left: 22px;
}

.note {
    margin: 28px 0;
    padding: 18px 20px;
    background: var(--surface-soft);
    border: 1px solid rgba(95, 118, 130, 0.2);
    border-radius: var(--radius-md);
}

.article-image {
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface-soft);
}

/* Liens texte */
.text-link,
.back-link {
    display: inline-flex;
    margin-top: 14px;
    color: var(--accent);
    font-weight: 700;
}

.text-link:hover,
.text-link:focus,
.back-link:hover,
.back-link:focus {
    color: var(--accent-dark);
}

/* Footer */
.site-footer {
    margin-top: 30px;
    padding: 34px 0 22px;
    border-top: 1px solid rgba(217, 224, 228, 0.9);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.footer-title {
    margin: 0 0 10px;
    font-weight: 700;
}

.footer-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-list li + li {
    margin-top: 8px;
}

.footer-bottom-wrap {
    margin-top: 18px;
}

.footer-bottom {
    margin: 0;
    padding-top: 18px;
    border-top: 1px solid rgba(217, 224, 228, 0.82);
    color: var(--muted);
    font-size: 0.92rem;
}

/* Responsive */
@media (max-width: 980px) {
    .main-nav {
        gap: 8px;
    }

    .main-nav a {
        padding: 9px 12px;
    }

    .brand-logo {
        width: 208px;
        max-width: 40vw;
    }
}

@media (max-width: 860px) {
    .nav-toggle {
        display: inline-flex;
    }

    .header-row {
        position: relative;
    }

    .main-nav {
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 14px;
        background: rgba(255, 253, 252, 0.98);
        border: 1px solid var(--border);
        border-radius: 22px;
        box-shadow: var(--shadow);
    }

    body.menu-open .main-nav {
        display: flex;
    }

    .main-nav a {
        width: 100%;
        padding: 12px 14px;
        background: var(--surface);
        border: 1px solid rgba(217, 224, 228, 0.88);
    }

    .section-grid,
    .card-grid,
    .three-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-card,
    .card,
    .article-preview,
    .article,
    .step-card {
        padding: 24px;
    }

    .brand-copy {
        display: none;
    }
}

@media (max-width: 560px) {
    .shell {
        width: min(var(--shell), calc(100% - 24px));
    }

    .hero {
        padding-top: 28px;
    }

    .hero-card,
    .article {
        border-radius: 24px;
    }

    .brand-logo {
        width: 188px;
        max-width: 58vw;
    }
}
