/* ══════════════════════════════════════════════════════════════════
   IVAN COLAS · Pages légales
   Charte identique au site principal (default_index.html)
   ══════════════════════════════════════════════════════════════════ */

:root {
    --ink:           #1a1a1a;
    --ink-soft:      #4a4744;
    --ink-muted:     #8a8480;
    --stone:         #f4f1ec;
    --stone-light:   #faf9f7;
    --white:         #ffffff;
    --gold:          #b8965a;
    --gold-light:    #d4b483;
    --border:        rgba(26, 26, 26, 0.10);
    --border-strong: rgba(26, 26, 26, 0.20);

    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans:  'DM Sans', system-ui, -apple-system, sans-serif;

    --measure: 68ch;
    --page-px: clamp(1.25rem, 6vw, 4rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--ink-soft);
    background: var(--stone);
    padding: 0 var(--page-px) 5rem;
    -webkit-font-smoothing: antialiased;
}

/* ─── Barre supérieure ─────────────────────────────────────────── */

.legal-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    max-width: 980px;
    margin: 0 auto;
    padding: 1.5rem 0;
}

.legal-bar .wordmark {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--ink);
    text-decoration: none;
}

.legal-bar .wordmark:hover { color: var(--gold); }

/* ─── Bouton retour ────────────────────────────────────────────── */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.4rem;
    border: 1px solid var(--border-strong);
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.back-link:hover,
.back-link:focus-visible {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--white);
    text-decoration: none;
}

/* ─── Conteneur ────────────────────────────────────────────────── */

.container {
    max-width: 980px;
    margin: 0 auto;
    background: var(--white);
    padding: clamp(2rem, 6vw, 4.5rem);
    border: 1px solid var(--border);
    border-radius: 0;
    box-shadow: 0 1px 2px rgba(26, 26, 26, 0.03);
}

/* ─── Sélecteur de langue ──────────────────────────────────────── */

.lang-buttons {
    display: flex;
    gap: 2rem;
    margin: 0 0 3rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.lang-switch {
    padding: 0 0 0.6rem;
    margin: 0;
    border: none;
    border-bottom: 1px solid transparent;
    background: none;
    color: var(--ink-muted);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.lang-switch:hover { background: none; color: var(--ink); }

.lang-switch.active {
    background: none;
    color: var(--ink);
    border-bottom-color: var(--gold);
}

.content-fr, .content-en, .content-es { display: none; }
.content-fr.active, .content-en.active, .content-es.active { display: block; }

/* ─── Typographie ──────────────────────────────────────────────── */

h1 {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 300;
    line-height: 1.12;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: 1rem;
}

h1 + p em,
.legal-date {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-style: normal;
    letter-spacing: 0.06em;
    color: var(--ink-muted);
    margin-bottom: 2.5rem;
}

h2 {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 3vw, 1.95rem);
    font-weight: 400;
    line-height: 1.25;
    color: var(--ink);
    margin: 3.5rem 0 1.1rem;
    padding: 0 0 0.6rem;
    border: none;
    border-bottom: 1px solid var(--border);
}

h2::before {
    content: '';
    display: block;
    width: 28px;
    height: 1px;
    background: var(--gold);
    margin-bottom: 1rem;
}

h3 {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--ink);
    margin: 2rem 0 0.6rem;
}

p, li {
    max-width: var(--measure);
    margin-bottom: 1.1rem;
}

ul, ol { margin: 0 0 1.5rem 1.25rem; }
li { padding-left: 0.35rem; }
li::marker { color: var(--gold); }

strong { font-weight: 500; color: var(--ink); }
em { font-style: italic; }

a {
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--gold-light);
    transition: border-color 0.25s ease, color 0.25s ease;
}

a:hover, a:focus-visible {
    color: var(--gold);
    border-bottom-color: var(--gold);
    text-decoration: none;
}

/* ─── Encadrés ─────────────────────────────────────────────────── */

.highlight,
.info-box,
.alert,
.success,
.content-box {
    max-width: var(--measure);
    background: var(--stone-light);
    border: 1px solid var(--border);
    border-left: 2px solid var(--gold);
    border-radius: 0;
    padding: 1.4rem 1.6rem;
    margin: 1.8rem 0;
}

.highlight p:last-child,
.info-box p:last-child,
.alert p:last-child,
.success p:last-child,
.content-box p:last-child,
.highlight ul:last-child,
.info-box ul:last-child { margin-bottom: 0; }

.alert       { border-left-color: var(--ink); }
.success     { border-left-color: var(--gold-light); }
.content-box { border-left-color: var(--border-strong); }

/* ─── Éléments spécifiques (page authenticité) ─────────────────── */

.logo {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 300;
    color: var(--ink);
    text-align: center;
    margin-bottom: 0.5rem;
}

.icon {
    display: inline-block;
    color: var(--gold);
    font-style: normal;
    margin-right: 0.4rem;
}

/* ─── Tableaux ─────────────────────────────────────────────────── */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.8rem 0;
    font-size: 0.92rem;
}

th, td {
    text-align: left;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border);
}

th {
    font-weight: 500;
    color: var(--ink);
    letter-spacing: 0.04em;
    border-bottom-color: var(--border-strong);
}

/* ─── Pied de page ─────────────────────────────────────────────── */

.legal-footer {
    max-width: 980px;
    margin: 2.5rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.75rem;
    align-items: center;
    font-size: 0.8rem;
    color: var(--ink-muted);
}

.legal-footer a {
    color: var(--ink-muted);
    border-bottom: none;
    letter-spacing: 0.03em;
}

.legal-footer a:hover { color: var(--gold); }

.legal-footer .spacer { flex: 1 1 auto; }

/* ─── Accessibilité ────────────────────────────────────────────── */

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ─── Responsive ───────────────────────────────────────────────── */

@media (max-width: 600px) {
    body { padding-bottom: 3rem; }
    .legal-bar { padding: 1rem 0; }
    .lang-buttons { gap: 1.25rem; }
    h2 { margin-top: 2.5rem; }
}

/* ─── Impression (un contrat doit pouvoir s'imprimer) ──────────── */

@media print {
    body { background: #fff; padding: 0; color: #000; }
    .container { border: none; box-shadow: none; padding: 0; max-width: none; }
    .legal-bar, .lang-buttons, .back-link, .legal-footer { display: none !important; }
    .content-fr, .content-en, .content-es { display: none !important; }
    .content-fr.active, .content-en.active, .content-es.active { display: block !important; }
    h2 { break-after: avoid; }
    p, li { break-inside: avoid; max-width: none; }
    a { border: none; color: #000; }
    a[href^="http"]::after { content: ' (' attr(href) ')'; font-size: 0.75em; color: #555; }
}
