@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url('fonts/fraunces.woff2') format('woff2');
}

@font-face {
    font-family: 'Fraunces';
    font-style: italic;
    font-weight: 400 600;
    font-display: swap;
    src: url('fonts/fraunces-italic.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('fonts/inter.woff2') format('woff2');
}

:root {
    --olive: #6B7A4F;
    --olive-fonce: #4F5A3A;
    --terracotta: #C66B3D;
    --terracotta-fonce: #9D4F2A;
    --lin: #F5EFE6;
    --lin-paper: #FBF6EC;
    --blanc-casse: #FDFAF4;
    --encre: #2B1F1A;
    --taupe: #6B5D52;
    --radius-card: 12px;
}

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

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--encre);
    background-color: var(--lin);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--terracotta); text-underline-offset: 3px; }

a:hover { color: var(--terracotta-fonce); }

.site-header {
    background: rgba(245, 239, 230, 0.9);
    border-bottom: 1px solid rgba(43, 31, 26, 0.06);
}

.site-header__inner {
    max-width: 880px;
    margin: 0 auto;
    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.wordmark {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    letter-spacing: -0.015em;
    color: var(--encre);
    text-decoration: none;
    font-size: 32px;
    line-height: 1;
}

.wordmark em {
    position: relative;
    font-style: italic;
    color: var(--terracotta);
}

.wordmark em::before {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 100%;
    width: 0.85em;
    height: 0.30em;
    margin-bottom: -0.26em;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 16'><rect x='9' y='2' width='3' height='6.5' fill='%23C66B3D' rx='0.4'/><path d='M3 14 L16 5 L29 14' stroke='%23C66B3D' stroke-width='3' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: contain;
}

.back-link {
    font-size: 14px;
    color: var(--olive-fonce);
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover { color: var(--terracotta); }

main.legal {
    max-width: 760px;
    margin: 0 auto;
    padding: 56px 28px 80px;
}

.legal h1 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: clamp(32px, 5vw, 44px);
    line-height: 1.15;
    letter-spacing: -0.018em;
    margin: 0 0 12px;
}

.legal .lede {
    font-size: 17px;
    color: var(--taupe);
    margin: 0 0 40px;
}

/* Encart de version des CGU : écrit au chargement à partir des balises méta de la page, seule
   écriture du numéro. Reste masqué (attribut hidden) si le script ne tourne pas. */
.legal .version-badge {
    display: inline-block;
    background: var(--lin-paper);
    border: 1px solid rgba(43, 31, 26, 0.08);
    border-radius: var(--radius-card);
    padding: 8px 14px;
    margin: 0 0 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--taupe);
}

.legal .version-badge[hidden] { display: none; }

.legal h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-size: 22px;
    margin: 36px 0 14px;
    letter-spacing: -0.01em;
}

.legal h3 {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
    font-size: 16px;
    margin: 22px 0 8px;
    color: var(--encre);
}

.legal p, .legal li {
    font-size: 15.5px;
    color: var(--encre);
}

.legal p { margin: 0 0 14px; }

.legal ul { padding-left: 22px; margin: 0 0 16px; }

.legal li { margin-bottom: 6px; }

.legal .updated {
    margin-top: 48px;
    padding-top: 20px;
    border-top: 1px dashed rgba(43, 31, 26, 0.15);
    font-size: 13px;
    color: var(--taupe);
}

.legal ol { padding-left: 22px; margin: 0 0 16px; }

.toc {
    background: var(--lin-paper);
    border: 1px solid rgba(43, 31, 26, 0.08);
    border-radius: var(--radius-card);
    padding: 20px 24px 16px;
    margin: 0 0 8px;
}

.toc__title {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-size: 15px;
    margin: 0 0 10px;
}

.toc ol {
    margin: 0;
    padding-left: 20px;
    columns: 2;
    column-gap: 32px;
}

.toc li {
    font-size: 14px;
    margin-bottom: 4px;
    break-inside: avoid;
}

.toc a { text-decoration: none; }

.toc a:hover { text-decoration: underline; }

.toc__annexes {
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px dashed rgba(43, 31, 26, 0.15);
    font-size: 14px;
}

.annex-rule {
    margin: 52px 0 8px;
    border: 0;
    border-top: 2px solid rgba(43, 31, 26, 0.12);
}

.legal .table-wrap { overflow-x: auto; margin: 0 0 18px; }

.legal table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14.5px;
}

.legal th, .legal td {
    text-align: left;
    vertical-align: top;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(43, 31, 26, 0.1);
}

.legal thead th {
    font-weight: 600;
    background: var(--lin-paper);
    border-bottom: 1px solid rgba(43, 31, 26, 0.2);
}

.legal tbody th { font-weight: 600; }

.legal .placeholder {
    background: rgba(212, 160, 87, 0.18);
    padding: 1px 5px;
    border-radius: 3px;
    font-style: italic;
    color: var(--olive-fonce);
}

.site-footer {
    background: var(--lin-paper);
    padding: 28px;
    border-top: 1px solid rgba(43, 31, 26, 0.06);
    text-align: center;
    font-size: 14px;
    color: var(--taupe);
}

.site-footer__inner {
    max-width: 880px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.site-footer .wordmark { font-size: 18px; }

.site-footer__sep { color: rgba(43, 31, 26, 0.2); }

.site-footer a { color: var(--terracotta); text-decoration: none; font-weight: 500; }

.site-footer a.wordmark { color: var(--encre); }

.site-footer a:hover { text-decoration: underline; }

@media (max-width: 640px) {
    main.legal { padding: 36px 20px 56px; }
    .site-header__inner { padding: 14px 18px; }
    .toc { padding: 16px 18px 12px; }
    .toc ol { columns: 1; }
}
