/* =====================================================================
 * RousselTM — stylesheet
 * Written from scratch for this site (no third-party template).
 * ------------------------------------------------------------------- */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5.5rem;
}

body, h1, h2, h3, h4, p, ul, figure {
    margin: 0;
}

ul {
    padding: 0;
    list-style: none;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

svg {
    display: block;
    width: 1em;
    height: 1em;
    flex-shrink: 0;
}

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

/* ---------------------------------------------------------------------
 * ## design tokens
 * ------------------------------------------------------------------- */
:root {
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --bg: #070b10;
    --bg-elevated: #0e141d;
    --bg-elevated-2: #131b27;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);

    --text: #e6eaf0;
    --text-muted: #9ca8bb;
    --text-dim: #64738c;
    --white: #ffffff;
    --fg-strong: #ffffff;

    --accent: #0ea5e9;
    --accent-2: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, var(--accent), var(--accent-2));
    --accent-soft: rgba(14, 165, 233, 0.12);

    --radius-sm: 0.8rem;
    --radius-md: 1.4rem;
    --radius-lg: 2rem;
    --radius-full: 999px;

    --shadow-md: 0 20px 44px -24px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 48px -12px rgba(14, 165, 233, 0.4);
    --header-bg: rgba(5, 7, 10, 0.82);

    --container: 1200px;
    --gutter: clamp(1.25rem, 4vw, 3rem);
    --section-space: clamp(4rem, 8vw, 8rem);

    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

    color-scheme: dark;
}

/* ---------------------------------------------------------------------
 * ## light theme override (toggled via data-theme on <html>)
 * ------------------------------------------------------------------- */
:root[data-theme="light"] {
    --bg: #ffffff;
    --bg-elevated: #f4f6fa;
    --bg-elevated-2: #e9edf4;
    --border: rgba(15, 23, 42, 0.09);
    --border-strong: rgba(15, 23, 42, 0.18);

    --text: #0f172a;
    --text-muted: #47536b;
    --text-dim: #6b7688;
    --fg-strong: #0f172a;

    --accent: #0284c7;
    --accent-2: #7c3aed;
    --accent-soft: rgba(2, 132, 199, 0.1);

    --shadow-md: 0 20px 44px -24px rgba(15, 23, 42, 0.25);
    --shadow-glow: 0 0 40px -12px rgba(2, 132, 199, 0.3);
    --header-bg: rgba(255, 255, 255, 0.82);

    color-scheme: light;
}

/* ---------------------------------------------------------------------
 * ## base
 * ------------------------------------------------------------------- */
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 1.05rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

a {
    transition: color 0.25s var(--ease);
}

.container {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.section {
    padding-block: var(--section-space);
}

.section--alt {
    background: var(--bg-elevated);
    border-block: 1px solid var(--border);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}

.eyebrow::before {
    content: "";
    width: 1.6rem;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
}

.section-head {
    max-width: 46rem;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-head.h-center {
    max-width: 40rem;
    margin-inline: auto;
    text-align: center;
}

.section-title {
    font-size: clamp(1.9rem, 1.5rem + 1.8vw, 2.75rem);
}

.lead {
    color: var(--text-muted);
    font-size: 1.15rem;
    margin-top: 1rem;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--accent);
    color: var(--white);
    padding: 0.8rem 1.4rem;
    border-radius: 0 0 var(--radius-sm) 0;
    z-index: 1000;
}

.skip-link:focus {
    left: 0;
}

/* ---------------------------------------------------------------------
 * ## buttons
 * ------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.98rem;
    white-space: nowrap;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.btn svg {
    width: 1.1rem;
    height: 1.1rem;
}

.btn--primary {
    background: var(--accent-gradient);
    color: var(--white);
    box-shadow: var(--shadow-glow);
}

.btn--primary:hover, .btn--primary:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 0 56px -10px rgba(14, 165, 233, 0.55);
}

.btn--ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-strong);
}

.btn--ghost:hover, .btn--ghost:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
}

.btn--sm {
    padding: 0.55rem 1.1rem;
    font-size: 0.88rem;
}

/* ---------------------------------------------------------------------
 * ## header
 * ------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding-block: 1.2rem;
    background-color: var(--header-bg);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
    transition: background-color 0.3s var(--ease), padding 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
    border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
    padding-block: 0.8rem;
    border-color: var(--border);
    box-shadow: 0 12px 30px -20px rgba(0, 0, 0, 0.6);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.site-header__logo {
    font-size: 1.35rem;
    font-weight: 750;
    letter-spacing: -0.01em;
    color: var(--fg-strong);
}

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

.site-nav__list {
    display: flex;
    gap: 2rem;
}

.site-nav__list a {
    font-weight: 500;
    font-size: 0.98rem;
    color: var(--text-muted);
}

.site-nav__list a:hover, .site-nav__list a:focus-visible {
    color: var(--fg-strong);
}

.site-nav__lang {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--text-dim);
}

.site-nav__lang a {
    color: var(--text-dim);
}

.site-nav__lang a[aria-current="true"] {
    color: var(--fg-strong);
    font-weight: 600;
}

.site-nav__actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-strong);
    color: var(--text-muted);
    flex-shrink: 0;
    transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.theme-toggle:hover, .theme-toggle:focus-visible {
    color: var(--fg-strong);
    border-color: var(--accent);
}

.theme-toggle svg {
    width: 1.05rem;
    height: 1.05rem;
}

.theme-toggle .icon-moon {
    display: none;
}

:root[data-theme="light"] .theme-toggle .icon-sun {
    display: none;
}

:root[data-theme="light"] .theme-toggle .icon-moon {
    display: block;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 0.32rem;
    width: 2.4rem;
    height: 2.4rem;
    z-index: 101;
}

.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
    content: "";
    display: block;
    height: 2px;
    background: var(--fg-strong);
    border-radius: var(--radius-full);
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

body.menu-is-open .menu-toggle::before {
    transform: translateY(0.42rem) rotate(45deg);
}

body.menu-is-open .menu-toggle span {
    opacity: 0;
}

body.menu-is-open .menu-toggle::after {
    transform: translateY(-0.42rem) rotate(-45deg);
}

/* ---------------------------------------------------------------------
 * ## hero
 * ------------------------------------------------------------------- */
.hero {
    position: relative;
    overflow: hidden;
    padding-block: clamp(4rem, 10vw, 8rem) clamp(3rem, 8vw, 6rem);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(46rem 30rem at 15% 10%, rgba(14, 165, 233, 0.22), transparent 60%),
        radial-gradient(38rem 32rem at 90% 60%, rgba(139, 92, 246, 0.18), transparent 60%);
    pointer-events: none;
}

.hero__inner {
    position: relative;
    z-index: 1;
    max-width: 44rem;
}

.hero__title {
    font-size: clamp(2.4rem, 1.8rem + 3vw, 4.2rem);
    line-height: 1.08;
}

.hero__lead {
    margin-top: 1.5rem;
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 38rem;
}

.hero__social {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.5rem;
}

.hero__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-strong);
    color: var(--text-muted);
    transition: color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.hero__social a svg {
    width: 0.85rem;
    height: 0.85rem;
    flex-shrink: 0;
}

.hero__social a:hover, .hero__social a:focus-visible {
    color: var(--fg-strong);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.hero__social-video {
    background: var(--accent-gradient);
    border-color: transparent !important;
    color: var(--white) !important;
    box-shadow: var(--shadow-glow);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2.25rem;
}

.hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(1.75rem, 4vw, 3rem);
    margin-top: clamp(3rem, 6vw, 4.5rem);
    padding-top: clamp(2rem, 4vw, 3rem);
    border-top: 1px solid var(--border);
}

.hero__stats li {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.hero__stats strong {
    font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.4rem);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero__stats span {
    color: var(--text-dim);
    font-size: 0.92rem;
    max-width: 12rem;
}

.hero__scroll {
    position: absolute;
    left: var(--gutter);
    bottom: 2rem;
    z-index: 1;
    display: none;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-dim);
    font-size: 0.85rem;
}

.hero__scroll svg {
    width: 1rem;
    height: 1rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

/* ---------------------------------------------------------------------
 * ## service cards
 * ------------------------------------------------------------------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
    gap: 1.25rem;
    margin-top: clamp(2.5rem, 5vw, 4rem);
}

.service-card {
    padding: 2rem 1.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
    transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.service-card:hover {
    transform: translateY(-0.35rem);
    border-color: rgba(14, 165, 233, 0.4);
    background: linear-gradient(180deg, rgba(14, 165, 233, 0.08), rgba(139, 92, 246, 0.02));
}

.service-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    color: var(--accent);
    margin-bottom: 1.25rem;
}

.service-card__icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.service-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.6rem;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.96rem;
}

/* ---------------------------------------------------------------------
 * ## about
 * ------------------------------------------------------------------- */
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.about-photo {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 4 / 3;
}

.about-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------------------------------------------------------------------
 * ## logo grids (clients / participants)
 * ------------------------------------------------------------------- */
.logos {
    margin-top: clamp(3rem, 6vw, 5rem);
}

.logos__label {
    color: var(--text-dim);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1.5rem;
    text-align: center;
}

.logos__grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: clamp(1.5rem, 4vw, 3.5rem);
}

.logo-trigger {
    display: block;
    padding: 0;
    border-radius: var(--radius-sm);
}

.logo-trigger:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.logos__grid img {
    height: 4.6rem;
    max-width: min(100%, 15rem);
    object-fit: contain;
    width: auto;
    filter: grayscale(1);
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.3s var(--ease), filter 0.3s var(--ease), transform 0.3s var(--ease);
}

.logo-trigger:hover img,
.logo-trigger:focus-visible img {
    filter: grayscale(0);
    opacity: 1;
    transform: translateY(-2px);
}

/* ---------------------------------------------------------------------
 * ## formation cards
 * ------------------------------------------------------------------- */
.formations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
    gap: 1.5rem;
}

.formation-card {
    display: block;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg);
    transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.formation-card:hover {
    transform: translateY(-0.35rem);
    border-color: rgba(14, 165, 233, 0.4);
    box-shadow: var(--shadow-md);
}

.formation-card__thumb {
    aspect-ratio: 16 / 10;
    width: 100%;
    object-fit: contain;
    box-sizing: border-box;
    padding: 1.5rem;
    background: var(--bg-elevated-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    /* la plupart des visuels renvoyés par l'API externe ont un fond blanc :
     * le niveau de gris + le mode de fusion "multiply" les fait se fondre
     * dans le cadre au lieu de rester un rectangle blanc plaqué en mode sombre. */
    filter: grayscale(1);
    mix-blend-mode: multiply;
    transition: filter 0.3s var(--ease), background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}

:root[data-theme="light"] .formation-card__thumb {
    mix-blend-mode: normal;
}

.formation-card:hover .formation-card__thumb {
    filter: grayscale(0);
}

.formation-card__body {
    padding: 1.5rem;
}

.formation-card__cat {
    display: inline-block;
    padding: 0.2rem 0.9rem;
    border-radius: var(--radius-full);
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.formation-card__title {
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
}

.formation-card__desc {
    color: var(--text-muted);
    font-size: 0.92rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.formation-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1.1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
}

.formation-card__link svg {
    width: 1rem;
    height: 1rem;
    transition: transform 0.25s var(--ease);
}

.formation-card:hover .formation-card__link svg {
    transform: translateX(3px);
}

.formations-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-md);
    color: var(--text-muted);
}

/* ---------------------------------------------------------------------
 * ## contact
 * ------------------------------------------------------------------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: clamp(2rem, 5vw, 3.5rem);
    text-align: left;
    margin-top: clamp(2rem, 4vw, 3rem);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: clamp(1.5rem, 3vw, 2.25rem);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
}

.contact-form__honeypot {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.form-notice {
    margin: 0;
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-weight: 600;
}

.form-notice--success {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
}

.form-notice--error {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.form-row label,
.form-row__label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-size: 0.96rem;
    transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.form-row textarea {
    resize: vertical;
    min-height: 8rem;
}

.form-row input:focus-visible,
.form-row textarea:focus-visible {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-row input[aria-invalid="true"],
.form-row textarea[aria-invalid="true"] {
    border-color: #dc2626;
}

.form-row__error {
    color: #dc2626;
    font-size: 0.82rem;
    font-weight: 600;
}

.need-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.need-option {
    position: relative;
}

.need-option input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.need-option span {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-strong);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.need-option input:checked + span {
    color: var(--white);
    border-color: transparent;
    background: var(--accent-gradient);
}

.need-option input:focus-visible + span {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.contact-info {
    text-align: center;
    padding: clamp(1.5rem, 3vw, 2.25rem);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    align-self: start;
}

.contact-email {
    display: inline-block;
    overflow-wrap: anywhere;
    max-width: 100%;
    font-size: clamp(1.3rem, 1.1rem + 1vw, 1.7rem);
    font-weight: 650;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-email:hover, .contact-email:focus-visible {
    -webkit-text-fill-color: var(--fg-strong);
}

.contact-info__or {
    margin-top: 1.25rem;
    color: var(--text-dim);
    font-size: 0.85rem;
}

.contact-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    color: var(--text-muted);
}

.contact-meta__item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-align: left;
}

.contact-meta__item svg {
    width: 1.1rem;
    height: 1.1rem;
    color: var(--accent);
    flex-shrink: 0;
}

/* ---------------------------------------------------------------------
 * ## footer
 * ------------------------------------------------------------------- */
.site-footer {
    border-top: 1px solid var(--border);
    padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2.5rem;
}

.site-footer h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.site-footer address,
.site-footer p {
    font-style: normal;
    color: var(--text-muted);
}

.site-footer a:hover {
    color: var(--accent);
}

.social-list {
    display: flex;
    gap: 0.9rem;
}

.social-list a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-strong);
    color: var(--text-muted);
}

.social-list a:hover, .social-list a:focus-visible {
    color: var(--fg-strong);
    border-color: var(--accent);
}

.social-list svg {
    width: 1.1rem;
    height: 1.1rem;
}

.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: clamp(2.5rem, 5vw, 4rem);
    padding-top: 1.75rem;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.85rem;
}

.site-footer__bottom-text {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.2rem;
}

.back-to-top {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-dim);
    font-size: 0.85rem;
}

.back-to-top:hover {
    color: var(--fg-strong);
}

/* ---------------------------------------------------------------------
 * ## lightbox (diaporama des logos)
 * ------------------------------------------------------------------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(4, 6, 10, 0.92);
    padding: 2rem;
}

.lightbox[hidden] {
    display: none;
}

.lightbox__stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: min(90vw, 40rem);
    text-align: center;
}

.lightbox__image {
    display: block;
    max-width: 100%;
    max-height: 55vh;
    width: auto;
    height: auto;
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: clamp(1.5rem, 4vw, 3rem);
    box-sizing: border-box;
}

.lightbox__caption {
    color: #ffffff;
    font-weight: 600;
}

.lightbox__count {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background 0.2s var(--ease);
}

.lightbox__close svg,
.lightbox__prev svg,
.lightbox__next svg {
    width: 1.2rem;
    height: 1.2rem;
}

.lightbox__close:hover, .lightbox__close:focus-visible,
.lightbox__prev:hover, .lightbox__prev:focus-visible,
.lightbox__next:hover, .lightbox__next:focus-visible {
    background: rgba(255, 255, 255, 0.2);
    outline: none;
}

.lightbox__close {
    top: 1.5rem;
    right: 1.5rem;
}

.lightbox__prev {
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox__next {
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

@media (max-width: 560px) {
    .lightbox {
        padding: 1rem;
    }
    .lightbox__prev, .lightbox__next {
        width: 2.25rem;
        height: 2.25rem;
    }
    .lightbox__close {
        top: 1rem;
        right: 1rem;
    }
    .lightbox__prev {
        left: 0.5rem;
    }
    .lightbox__next {
        right: 0.5rem;
    }
}

/* ---------------------------------------------------------------------
 * ## responsive
 * ------------------------------------------------------------------- */
@media (min-width: 1024px) {
    .hero__scroll {
        display: inline-flex;
    }
}

@media (max-width: 1100px) {
    .site-nav {
        position: fixed;
        visibility: hidden;
        height: 100dvh;
        overflow-y: auto;
        inset: 0 0 0 30%;
        z-index: 100;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 2.5rem;
        padding: 3rem var(--gutter);
        background: var(--bg-elevated);
        border-left: 1px solid var(--border);
        transform: translateX(100%);
        transition: transform 0.35s var(--ease);
    }

    body.menu-is-open .site-nav {
        visibility: visible;
        transform: translateX(0);
    }

    .site-nav__list {
        flex-direction: column;
        gap: 1.5rem;
    }

    .site-nav__list a {
        font-size: 1.3rem;
        color: var(--text);
    }

    .site-nav__actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }

    .menu-toggle {
        display: flex;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-photo {
        order: -1;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .site-footer__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 560px) {
    .site-nav {
        inset: 0;
    }

    .hero__actions .btn {
        width: 100%;
        justify-content: center;
    }

    .site-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Keep long API content inside its grid cell. */
.formation-card, .service-card { min-width: 0; overflow-wrap: anywhere; }
.back-to-top svg { width: 1rem; height: 1rem; }
body.menu-is-open, body.lightbox-open { overflow: hidden; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
