/* =============================================================================
   PORTFOLIO BTS SIO SLAM · Jules Bernier
   Thème clair, carré, inspiration « Windows » (Segoe UI, accent bleu, fenêtres
   avec boutons réduire/agrandir/fermer). Conforme RGAA 4.1.2 : contrastes
   vérifiés (>= 4,5:1 texte / >= 3:1 UI), focus visible, responsive, reduced-motion.
   ============================================================================= */

/* -----------------------------------------------------------------------------
   1. VARIABLES
   -------------------------------------------------------------------------- */
:root {
    /* Fonds clairs */
    --bg: #ffffff;
    --bg-alt: #f3f3f3;          /* sections alternées (gris Windows) */
    --bg-card: #ffffff;
    --bg-elev: #f3f3f3;         /* surfaces légèrement contrastées */

    /* Textes */
    --text: #1b1b1b;            /* 17:1 sur blanc */
    --text-secondary: #424242;  /* 10:1 */
    --text-muted: #5f5f5f;      /* 6,4:1 */
    --text-on-accent: #ffffff;  /* texte sur fonds d'accent */

    /* Accent (bleu Windows) */
    --accent: #005fb8;
    --accent-dark: #004c87;
    --accent-bright: #004c87;   /* survol = plus foncé sur fond clair */
    --blue: #005fb8;
    --blue-bright: #004c87;

    /* Couleurs secondaires (assez foncées pour rester lisibles sur fond clair) */
    --green: #0f7b0f;
    --green-bright: #0b5e0b;
    --purple: #6b3fa0;
    --cyan: #0e6b75;
    --orange: #8a4b00;
    --yellow: #7a5b00;
    --red: #c42b1c;
    --ps-blue: #005fb8;         /* en-têtes de groupe du tableau */

    /* Fonds teintés (chips, encadrés) */
    --tint-blue: #eaf3fb;       --tint-blue-border: #b9d9f0;
    --tint-green: #dff6dd;      --tint-green-border: #a7e3a0;
    --tint-amber: #fff4ce;      --tint-amber-border: #f1d592;
    --tint-red: #fde7e9;
    --tint-purple: #f0e9fb;
    --tint-cyan: #e0f1f3;

    /* États sémantiques */
    --ok: var(--green);         --ok-soft: var(--tint-green);     --ok-border: var(--tint-green-border);
    --warn: var(--orange);      --warn-text: var(--orange);       --warn-soft: var(--tint-amber);  --warn-border: var(--tint-amber-border);

    /* Bordures */
    --border: #d1d1d1;
    --border-strong: #8a8a8a;   /* champs de formulaire (UI >= 3:1) */

    /* Focus */
    --focus: #005fb8;

    /* Ombres (discrètes) */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .08);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, .12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, .16);
    --glow: none;

    /* Rayons (carré : très peu d'arrondi) */
    --radius-sm: 2px;
    --radius-md: 2px;
    --radius-lg: 3px;
    --radius-full: 9999px;

    /* Espacements */
    --sp-1: .25rem; --sp-2: .5rem; --sp-3: .75rem; --sp-4: 1rem;
    --sp-5: 1.5rem; --sp-6: 2rem; --sp-7: 3rem; --sp-8: 4rem;

    /* Typographie : police système Windows */
    --font-sans: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'Cascadia Mono', 'Consolas', ui-monospace, 'Courier New', monospace;

    --container: 1100px;
    --t-fast: 120ms ease;
    --t-base: 200ms ease;
}

/* -----------------------------------------------------------------------------
   2. RESET / BASES
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 100%;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: underline; text-underline-offset: .15em; }
a:hover { color: var(--accent-dark); }

ul, ol { padding-left: 1.25rem; }

h1, h2, h3, h4 { font-family: var(--font-sans); line-height: 1.25; color: var(--text); font-weight: 600; }
h1 { font-size: clamp(1.8rem, 1.4rem + 2vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 1.15rem + 1.2vw, 1.85rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.02rem; }

p { color: var(--text-secondary); }
strong { color: var(--text); }
code, kbd, samp { font-family: var(--font-mono); }

:focus { outline: none; }

/* -----------------------------------------------------------------------------
   3. UTILITAIRES
   -------------------------------------------------------------------------- */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible,
select:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.skip-links a {
    position: absolute; left: var(--sp-2); top: -120px; z-index: 2000;
    background: var(--accent); color: #fff;
    font-weight: 600; padding: .6rem 1rem;
    border: 1px solid var(--accent-dark); border-radius: var(--radius-sm);
    text-decoration: none; transition: top var(--t-fast);
}
.skip-links a:focus { top: var(--sp-2); outline: 2px solid var(--focus); outline-offset: 2px; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--sp-5); }

.section { padding-block: var(--sp-8); }
.section--alt { background-color: var(--bg-alt); }
.section--dark { background-color: var(--bg-alt); }

.section__title { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 1.95rem); margin-bottom: var(--sp-2); }
.section__lead { color: var(--text-secondary); max-width: 65ch; margin-bottom: var(--sp-6); font-size: 1.05rem; }
.text-center { text-align: center; }
.mt-lg { margin-top: var(--sp-7); }
[hidden] { display: none !important; }

/* -----------------------------------------------------------------------------
   4. FENÊTRE « WINDOWS » (composant réutilisable)
   -------------------------------------------------------------------------- */
.term-window {
    background-color: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.term-bar {
    display: flex;
    align-items: center;
    padding: .45rem .4rem .45rem .8rem;
    background-color: var(--bg-alt);
    border-bottom: 1px solid var(--border);
}
.term-dot { display: none; }   /* on n'utilise pas les pastilles façon Mac */
.term-bar__title { font-size: .85rem; color: var(--text-secondary); font-weight: 600; }
/* Boutons de fenêtre Windows (réduire / agrandir / fermer), décoratifs */
.term-bar::after {
    content: "\2500\00a0\00a0\25a1\00a0\00a0\2715";
    margin-left: auto;
    color: var(--text-muted);
    font-size: .8rem;
    letter-spacing: .15em;
    padding-right: .3rem;
}
.term-body { padding: var(--sp-6); }

/* -----------------------------------------------------------------------------
   5. BOUTONS
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; gap: var(--sp-2);
    padding: .6rem 1.25rem; border-radius: var(--radius-sm);
    font-family: inherit; font-weight: 600; font-size: .98rem;
    text-decoration: none; border: 1px solid transparent; cursor: pointer;
    transition: background-color var(--t-base), color var(--t-base), border-color var(--t-base);
}
.btn--primary { background-color: var(--accent); color: #fff; border-color: var(--accent-dark); }
.btn--primary:hover { background-color: var(--accent-dark); color: #fff; }
.btn--secondary { background-color: var(--bg); color: var(--accent-dark); border-color: var(--border-strong); }
.btn--secondary:hover { background-color: var(--bg-alt); color: var(--accent-dark); border-color: var(--accent); }
.btn--on-dark { border-color: var(--accent-dark); color: var(--accent-dark); background: var(--bg); }
.btn--on-dark:hover { background-color: var(--accent); color: #fff; }
.btn svg { width: 1.1em; height: 1.1em; flex-shrink: 0; }

/* -----------------------------------------------------------------------------
   6. EN-TÊTE / NAVIGATION
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 1000;
    background-color: rgba(255, 255, 255, .97);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--border);
}
.site-header__inner {
    max-width: var(--container); margin-inline: auto;
    padding: var(--sp-3) var(--sp-5);
    display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
}
.brand { font-size: 1.15rem; font-weight: 700; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand:hover { color: var(--accent-dark); }

.nav__list { list-style: none; display: flex; gap: var(--sp-1); align-items: center; padding: 0; margin: 0; }
.nav__link {
    display: inline-block; padding: .5rem .8rem; border-radius: var(--radius-sm);
    font-size: .95rem; font-weight: 500; color: var(--text-secondary); text-decoration: none;
    border-bottom: 2px solid transparent;
}
.nav__link:hover { color: var(--accent-dark); background-color: var(--bg-alt); }
.nav__link[aria-current="page"] { color: var(--accent-dark); font-weight: 700; border-bottom-color: var(--accent); }

.nav-toggle {
    display: none; align-items: center; gap: var(--sp-2);
    background: var(--bg); border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm); padding: .45rem .7rem;
    font: inherit; font-weight: 600; color: var(--text); cursor: pointer;
}
.nav-toggle__bars { position: relative; width: 20px; height: 14px; flex-shrink: 0; }
.nav-toggle__bars span, .nav-toggle__bars::before, .nav-toggle__bars::after {
    content: ""; position: absolute; left: 0; width: 100%; height: 2px;
    background-color: var(--text); transition: transform var(--t-base), opacity var(--t-base);
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars span { top: 6px; }
.nav-toggle__bars::after { top: 12px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* -----------------------------------------------------------------------------
   7. FIL D'ARIANE
   -------------------------------------------------------------------------- */
.breadcrumb { background-color: var(--bg-alt); border-bottom: 1px solid var(--border); }
.breadcrumb__list {
    max-width: var(--container); margin-inline: auto;
    padding: var(--sp-3) var(--sp-5);
    list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-2);
    font-size: .9rem; margin: 0;
}
.breadcrumb__list li { display: flex; align-items: center; gap: var(--sp-2); }
.breadcrumb__list li + li::before { content: "›"; color: var(--text-muted); }
.breadcrumb a { color: var(--accent); }
.breadcrumb [aria-current="page"] { color: var(--text-muted); }

/* -----------------------------------------------------------------------------
   8. HERO (accueil)
   -------------------------------------------------------------------------- */
.hero { padding-block: var(--sp-8); }
.hero__term { max-width: 820px; margin-inline: auto; }
.hero__body > * + * { margin-top: var(--sp-3); }
.hero__eyebrow {
    display: inline-block; background-color: var(--tint-blue); color: var(--accent-dark);
    border: 1px solid var(--tint-blue-border); padding: .2rem .7rem;
    border-radius: var(--radius-sm); font-size: .85rem; font-weight: 600;
}
.hero__title { font-size: clamp(2rem, 1.5rem + 2.4vw, 2.8rem); color: var(--text); }
.hero__subtitle { font-size: 1.2rem; color: var(--accent-dark); font-weight: 600; }
.hero__desc { font-size: 1.05rem; color: var(--text-secondary); max-width: 60ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-5); }

/* -----------------------------------------------------------------------------
   9. GRILLES & CARTES
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: var(--sp-5); }
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--sp-5);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--t-base), border-color var(--t-base);
}
.card--link:hover, .card--link:focus-within { box-shadow: var(--shadow-md); border-color: var(--accent); }
.card__title { margin-bottom: var(--sp-2); }
.card__meta { color: var(--text-muted); font-size: .9rem; }

.quicklinks { margin-top: var(--sp-6); list-style: none; padding: 0; }
.quicklink { display: flex; flex-direction: column; gap: var(--sp-2); text-decoration: none; color: var(--text); height: 100%; }
.quicklink:hover, .quicklink:focus-visible { color: var(--text); }
.quicklink__icon {
    width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
    background-color: var(--tint-blue); color: var(--accent-dark);
    border: 1px solid var(--tint-blue-border); border-radius: var(--radius-sm);
}
.quicklink__icon svg { width: 22px; height: 22px; }
.quicklink__title { font-weight: 700; font-size: 1.1rem; }
.quicklink__desc { color: var(--text-secondary); font-size: .95rem; }
.quicklink__more { color: var(--accent-dark); font-weight: 600; font-size: .9rem; margin-top: auto; }

/* -----------------------------------------------------------------------------
   10. LISTE D'INFOS
   -------------------------------------------------------------------------- */
.info-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: var(--sp-4); margin-top: var(--sp-6); padding: var(--sp-5);
    background-color: var(--bg-alt); border: 1px solid var(--border);
    border-radius: var(--radius-md); list-style: none;
}
.info-grid div { display: flex; flex-direction: column; gap: .15rem; }
.info-grid dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); font-weight: 600; }
.info-grid dd { font-weight: 600; color: var(--text); }

/* -----------------------------------------------------------------------------
   11. TIMELINE
   -------------------------------------------------------------------------- */
.timeline { list-style: none; position: relative; padding-left: var(--sp-6); margin: 0; }
.timeline::before { content: ""; position: absolute; left: 6px; top: .4rem; bottom: .4rem; width: 2px; background: var(--accent); }
.timeline__item { position: relative; margin-bottom: var(--sp-6); }
.timeline__item:last-child { margin-bottom: 0; }
.timeline__item::before {
    content: ""; position: absolute; left: calc(-1 * var(--sp-6) + 1px); top: .35rem;
    width: 12px; height: 12px; background-color: var(--accent);
    border: 2px solid var(--bg); box-shadow: 0 0 0 1px var(--accent);
}
.tag-date {
    display: inline-block; background-color: var(--tint-blue); color: var(--accent-dark);
    border: 1px solid var(--tint-blue-border);
    padding: .2rem .65rem; border-radius: var(--radius-sm);
    font-size: .82rem; font-weight: 600; margin-bottom: var(--sp-2);
}
.timeline__title { margin-bottom: .1rem; }
.timeline__org { color: var(--accent-dark); font-weight: 600; margin-bottom: var(--sp-2); font-size: .95rem; }

/* -----------------------------------------------------------------------------
   12. DIPLÔMES
   -------------------------------------------------------------------------- */
.diploma-list { list-style: none; display: flex; flex-direction: column; gap: var(--sp-3); padding: 0; margin: 0; }
.diploma { display: flex; gap: var(--sp-4); align-items: flex-start; background-color: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--sp-4); }
.diploma__icon { color: var(--accent-dark); flex-shrink: 0; width: 32px; height: 32px; }
.diploma__icon svg { width: 100%; height: 100%; }
.diploma__content { display: flex; flex-direction: column; gap: .1rem; }
.diploma__title { display: block; font-size: 1.02rem; font-weight: 700; }
.diploma__org { display: block; color: var(--accent-dark); font-size: .9rem; font-weight: 600; }
.diploma__date { display: block; color: var(--text-muted); font-size: .88rem; }

/* -----------------------------------------------------------------------------
   13. BADGES / TAGS
   -------------------------------------------------------------------------- */
.badges { list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-2); padding: 0; margin: var(--sp-3) 0 0; }
.badge {
    display: inline-block; padding: .22rem .7rem; border-radius: var(--radius-sm);
    font-size: .8rem; font-weight: 600;
    background-color: var(--bg-card); border: 1px solid var(--border); color: var(--text-secondary);
}
.badges .badge:nth-child(6n+1) { color: var(--blue);   border-color: var(--tint-blue-border); }
.badges .badge:nth-child(6n+2) { color: var(--green);  border-color: var(--tint-green-border); }
.badges .badge:nth-child(6n+3) { color: var(--purple); border-color: var(--tint-purple); }
.badges .badge:nth-child(6n+4) { color: var(--cyan);   border-color: var(--tint-cyan); }
.badges .badge:nth-child(6n+5) { color: var(--orange); border-color: var(--tint-amber-border); }
.badges .badge:nth-child(6n+6) { color: var(--yellow); border-color: var(--tint-amber-border); }

/* -----------------------------------------------------------------------------
   14. CERTIFICATIONS
   -------------------------------------------------------------------------- */
.cert { display: flex; flex-direction: column; text-align: center; align-items: center; }
.cert__status {
    align-self: flex-end; display: inline-flex; align-items: center; gap: .35rem;
    padding: .2rem .65rem; border-radius: var(--radius-sm);
    font-size: .76rem; font-weight: 700;
    background-color: var(--tint-green); color: var(--green); border: 1px solid var(--tint-green-border);
}
.cert__status::before { content: "\2713 "; }
.cert__media {
    width: 130px; height: 130px; margin: var(--sp-3) 0 var(--sp-4);
    border-radius: var(--radius-md); border: 1px solid var(--border);
    background-color: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.cert__media img { width: 100%; height: 100%; object-fit: contain; }
.cert__org { font-weight: 700; color: var(--text); margin-bottom: .15rem; font-size: 1.05rem; }
.cert__date { color: var(--text-muted); font-size: .85rem; margin-bottom: var(--sp-2); }
.cert__desc { color: var(--text-secondary); font-size: .95rem; }
.cert .badges { justify-content: center; }
.cert__proof { margin-top: auto; padding-top: var(--sp-4); }

/* -----------------------------------------------------------------------------
   15. PROJETS
   -------------------------------------------------------------------------- */
.project { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.project__thumb {
    aspect-ratio: 16 / 9; background-color: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; font-weight: 700; text-align: center; padding: var(--sp-4);
}
.project__body { padding: var(--sp-5); display: flex; flex-direction: column; flex: 1; }
.project__title { margin-bottom: var(--sp-2); }
.project__title a { text-decoration: none; color: var(--text); }
.project__title a:hover { color: var(--accent-dark); }
.project__desc { color: var(--text-secondary); margin-bottom: var(--sp-3); }
.project__footer { margin-top: auto; }

/* -----------------------------------------------------------------------------
   16. FORMULAIRE
   -------------------------------------------------------------------------- */
.form { max-width: 640px; }
.form__group { margin-bottom: var(--sp-5); }
.form__label { display: block; font-weight: 600; margin-bottom: var(--sp-2); color: var(--text); }
.form__req { color: var(--warn); }
.form__hint { display: block; color: var(--text-muted); font-size: .88rem; font-weight: 400; margin-top: .1rem; }
.form__control {
    width: 100%; padding: .6rem .8rem; font: inherit; color: var(--text);
    background-color: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
}
.form__control:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--accent); }
textarea.form__control { min-height: 150px; resize: vertical; }
.form__control[aria-invalid="true"] { border-color: var(--red); border-width: 2px; }
.field-error { display: block; color: var(--red); font-weight: 600; margin-top: var(--sp-2); }
.field-error::before { content: "\26a0 "; }

.form-errors { border: 1px solid var(--red); background-color: var(--tint-red); color: var(--text); border-radius: var(--radius-sm); padding: var(--sp-4); margin-bottom: var(--sp-5); }
.form-errors h3 { color: var(--red); font-size: 1.05rem; margin-bottom: var(--sp-2); }
.form-errors a { color: var(--accent-dark); }
.form-success { border: 1px solid var(--green); background-color: var(--tint-green); color: var(--text); border-radius: var(--radius-sm); padding: var(--sp-4); margin-bottom: var(--sp-5); }
.form-success strong { color: var(--green); }

.contact-methods { list-style: none; display: flex; flex-direction: column; gap: var(--sp-4); padding: 0; margin: 0; }
.contact-method { display: flex; gap: var(--sp-3); align-items: flex-start; }
.contact-method__icon {
    width: 40px; height: 40px; flex-shrink: 0;
    background-color: var(--tint-blue); color: var(--accent-dark); border: 1px solid var(--tint-blue-border);
    border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
}
.contact-method__icon svg { width: 20px; height: 20px; }
.contact-method__title { font-size: 1rem; margin-bottom: .1rem; }

/* -----------------------------------------------------------------------------
   17. CONTENU TEXTUEL
   -------------------------------------------------------------------------- */
.prose { max-width: 74ch; }
.prose h2 { margin-top: var(--sp-7); margin-bottom: var(--sp-3); padding-bottom: var(--sp-2); border-bottom: 1px solid var(--border); }
.prose h3 { margin-top: var(--sp-5); margin-bottom: var(--sp-2); color: var(--accent-dark); }
.prose p, .prose ul, .prose ol { margin-bottom: var(--sp-4); }
.prose li { margin-bottom: var(--sp-2); }
.prose code { background-color: var(--bg-alt); padding: .1rem .35rem; border-radius: var(--radius-sm); font-size: .9em; border: 1px solid var(--border); color: var(--accent-dark); }

.sitemap-nav ul { list-style: none; padding-left: 0; }
.sitemap-nav > ul > li { margin-bottom: var(--sp-3); font-weight: 700; }
.sitemap-nav > ul > li::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: .6rem; background-color: var(--accent); vertical-align: middle; }
.sitemap-nav ul ul { margin-top: var(--sp-2); font-weight: 400; padding-left: var(--sp-5); list-style: square; }

.callout {
    border: 1px solid var(--tint-blue-border); border-left: 3px solid var(--accent);
    background-color: var(--tint-blue); border-radius: var(--radius-sm);
    padding: var(--sp-4); margin-block: var(--sp-5);
}
.callout p { color: var(--text-secondary); }
.callout--warn { border-color: var(--warn-border); border-left-color: var(--orange); background-color: var(--tint-amber); }

/* -----------------------------------------------------------------------------
   18. PIED DE PAGE
   -------------------------------------------------------------------------- */
.site-footer { background-color: var(--bg-alt); color: var(--text-secondary); padding-block: var(--sp-7) var(--sp-5); border-top: 2px solid var(--accent); }
.site-footer__grid {
    max-width: var(--container); margin-inline: auto; padding-inline: var(--sp-5);
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--sp-6);
}
.site-footer h2 { color: var(--text); font-size: 1.1rem; margin-bottom: var(--sp-3); }
.site-footer p { color: var(--text-muted); margin-bottom: var(--sp-2); }
.site-footer a { color: var(--accent-dark); }
.site-footer a:hover { color: var(--accent); }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: var(--sp-2); padding: 0; margin: 0; font-size: .95rem; }
.social-links { list-style: none; display: flex; gap: var(--sp-3); padding: 0; margin: 0; }
.social-links a {
    width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
    background-color: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text);
}
.social-links a:hover { background-color: var(--accent); border-color: var(--accent-dark); color: #fff; }
.social-links svg { width: 20px; height: 20px; }
.site-footer__bottom {
    max-width: var(--container); margin: var(--sp-6) auto 0; padding: var(--sp-5) var(--sp-5) 0;
    border-top: 1px solid var(--border); text-align: center; font-size: .9rem; color: var(--text-muted);
}

/* -----------------------------------------------------------------------------
   19. BOUTON RETOUR EN HAUT
   -------------------------------------------------------------------------- */
.to-top {
    position: fixed; right: var(--sp-5); bottom: var(--sp-5);
    width: 44px; height: 44px; background-color: var(--accent); color: #fff;
    border: 1px solid var(--accent-dark); border-radius: var(--radius-sm); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-md); opacity: 0; visibility: hidden;
    transition: opacity var(--t-base), visibility var(--t-base), background-color var(--t-base);
    z-index: 900;
}
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top:hover { background-color: var(--accent-dark); }
.to-top svg { width: 22px; height: 22px; }

/* -----------------------------------------------------------------------------
   20. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
    .nav-toggle { display: inline-flex; }
    .nav {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        background-color: var(--bg); border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg); padding: var(--sp-3) var(--sp-5) var(--sp-5);
        max-height: calc(100vh - 64px); overflow-y: auto;
    }
    .nav.is-open { display: block; }
    .nav__list { flex-direction: column; align-items: stretch; gap: var(--sp-1); }
    .nav__link { padding: .75rem 1rem; font-size: 1rem; border-bottom: none; border-left: 3px solid transparent; }
    .nav__link[aria-current="page"] { border-bottom: none; border-left-color: var(--accent); background-color: var(--bg-alt); }
}

@media (max-width: 520px) {
    .container { padding-inline: var(--sp-4); }
    .section { padding-block: var(--sp-7); }
    .term-body { padding: var(--sp-4); }
    .hero__actions .btn { width: 100%; justify-content: center; }
}

/* -----------------------------------------------------------------------------
   21. MOUVEMENT RÉDUIT (RGAA 13.3)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

/* -----------------------------------------------------------------------------
   22. IMPRESSION
   -------------------------------------------------------------------------- */
@media print {
    body { color: #000; background: #fff; }
    .site-header, .nav-toggle, .to-top, .skip-links, .breadcrumb, .site-footer .social-links { display: none !important; }
    .term-window, .card, .info-grid, .diploma { border-color: #999; box-shadow: none; }
    a { color: #000; text-decoration: underline; }
    .section { padding-block: 1rem; }
}
