/* =============================================================================
   Spavoo — feuille de style unique.

   Deux gouttes dans le logo, une de feu et une d'eau : ce sont les deux seules
   couleurs d'accent. Le feu porte les actions (boutons), l'eau les liens.
   Le thème suit le système ; le bouton du header le force (data-theme).
   ========================================================================== */

/* ---------------------------------------------------------------- polices */
/* Hébergées sur le site (licence SIL Open Font License) : afficher la page ne
   contacte aucun service tiers, pas même Google Fonts. Nunito est variable,
   un fichier couvre toutes les graisses. */
@font-face {
    font-family: "Lilita One";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../assets/fonts/lilita-one-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Lilita One";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../assets/fonts/lilita-one-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Nunito";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("../assets/fonts/nunito-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Nunito";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("../assets/fonts/nunito-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ------------------------------------------------------------------ jetons */
:root {
    color-scheme: light;

    --bg: #f4f2ee;
    --bg-alt: #ebe8e2;
    --surface: #ffffff;
    --text: #18181a;
    --muted: #5d5b57;
    --line: #e0dcd4;
    --line-strong: #cdc7bc;

    --fire-1: #ff9a2e;
    --fire-2: #e8452b;
    --btn-1: #e65a21;
    --btn-2: #c7381a;
    --water-1: #79c4ff;
    --water-2: #2f6fe4;
    --link: #1f5fd1;
    --todo: #9a5b00;
    --todo-bg: rgba(255, 170, 40, 0.16);

    --hero-fire: rgba(255, 122, 40, 0.16);
    --hero-water: rgba(47, 111, 228, 0.14);
    --shadow-sm: 0 1px 2px rgba(24, 24, 26, 0.06), 0 2px 8px rgba(24, 24, 26, 0.05);
    --shadow-md: 0 2px 4px rgba(24, 24, 26, 0.05), 0 12px 32px rgba(24, 24, 26, 0.1);

    --show-dark: none;
    --show-light: block;

    --display: "Lilita One", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
    --sans: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --radius-lg: 28px;
    --radius: 18px;
    --radius-sm: 12px;
    --gutter: 16px;
    --header-h: 64px;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;

        --bg: #121212;
        --bg-alt: #171717;
        --surface: #1d1d1d;
        --text: #f2f2f0;
        --muted: #a8a6a1;
        --line: #2b2b2b;
        --line-strong: #3a3a3a;

        --link: #8cc3ff;
        --todo: #ffc35c;
        --todo-bg: rgba(255, 170, 40, 0.14);

        --hero-fire: rgba(255, 122, 40, 0.14);
        --hero-water: rgba(60, 130, 255, 0.14);
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
        --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.3), 0 16px 40px rgba(0, 0, 0, 0.45);

        --show-dark: block;
        --show-light: none;
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;

    --bg: #121212;
    --bg-alt: #171717;
    --surface: #1d1d1d;
    --text: #f2f2f0;
    --muted: #a8a6a1;
    --line: #2b2b2b;
    --line-strong: #3a3a3a;

    --link: #8cc3ff;
    --todo: #ffc35c;
    --todo-bg: rgba(255, 170, 40, 0.14);

    --hero-fire: rgba(255, 122, 40, 0.14);
    --hero-water: rgba(60, 130, 255, 0.14);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.3), 0 16px 40px rgba(0, 0, 0, 0.45);

    --show-dark: block;
    --show-light: none;
}

@media (min-width: 640px) {
    :root {
        --gutter: 24px;
        --header-h: 72px;
    }
}

@media (min-width: 1024px) {
    :root {
        --gutter: 32px;
    }
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 8px);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font: 400 1rem/1.6 var(--sans);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

h1,
h2,
h3,
p {
    margin: 0;
}

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

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

button {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: 3px solid var(--water-2);
    outline-offset: 3px;
    border-radius: 6px;
}

::selection {
    background: var(--fire-1);
    color: #18181a;
}

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

.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;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

.skip-link:focus {
    top: 12px;
}

/* --------------------------------------------------------------- boutons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 24px;
    border: 2px solid transparent;
    border-radius: 999px;
    font: 800 1rem/1.2 var(--sans);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--btn-1), var(--btn-2));
    color: #fff;
    box-shadow: 0 6px 18px rgba(232, 69, 43, 0.28);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(232, 69, 43, 0.36);
}

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

.btn-ghost:hover {
    border-color: var(--water-2);
    color: var(--text);
    transform: translateY(-2px);
}

.btn-soon {
    border: 2px dashed var(--line-strong);
    background: transparent;
    color: var(--muted);
    font-weight: 700;
    cursor: default;
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.icon-btn:hover {
    border-color: var(--line-strong);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------------------------------------------------------------- header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    height: var(--header-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    font: 400 1.5rem/1 var(--display);
    letter-spacing: 0.5px;
}

.brand img {
    width: 40px;
    height: 40px;
    border-radius: 11px;
}

.theme-toggle {
    margin-left: auto;
}

/* Le soleil s'affiche en sombre (pour repasser en clair), la lune en clair. */
.theme-toggle .icon-sun {
    display: var(--show-dark);
}

.theme-toggle .icon-moon {
    display: var(--show-light);
}

/* Téléphone : burger à gauche (comme sur la maquette), menu déroulant. */
.nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    padding: 8px var(--gutter) 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
}

.nav.is-open {
    display: flex;
}

.nav a {
    padding: 14px 4px;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
}

.nav a:last-child {
    border-bottom: 0;
}

.nav a[aria-current="true"] {
    padding-left: 14px;
    box-shadow: inset 4px 0 0 var(--fire-2);
}

@media (min-width: 760px) {
    .menu-toggle {
        display: none;
    }

    .nav {
        position: static;
        display: flex;
        flex-direction: row;
        gap: 4px;
        margin-left: auto;
        padding: 0;
        background: none;
        border: 0;
        box-shadow: none;
    }

    .nav a {
        position: relative;
        padding: 10px 14px;
        border: 0;
        border-radius: 999px;
        color: var(--muted);
        transition: color 0.15s ease, background-color 0.15s ease;
    }

    .nav a:hover {
        color: var(--text);
        background: var(--surface);
    }

    .nav a[aria-current="true"] {
        padding-left: 14px;
        color: var(--text);
        box-shadow: none;
    }

    .nav a[aria-current="true"]::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: 2px;
        width: 18px;
        height: 4px;
        margin-left: -9px;
        border-radius: 4px;
        background: linear-gradient(90deg, var(--fire-2), var(--water-2));
    }

    .theme-toggle {
        margin-left: 8px;
    }
}

/* ------------------------------------------------------------ présentation */
/* La présentation occupe tout l'écran sous le header : la suite de la page
   n'apparaît qu'au défilement. svh = hauteur visible sur mobile, barre
   d'adresse affichée ; vh en repli pour les navigateurs plus anciens. */
.hero {
    display: flex;
    min-height: calc(100vh - var(--header-h) - 1px);
    min-height: calc(100svh - var(--header-h) - 1px);
    padding-block: 16px;
}

.hero > .container {
    display: flex;
}

.hero-panel {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px 72px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(60% 70% at 0% 0%, var(--hero-fire), transparent 70%),
        radial-gradient(60% 70% at 100% 100%, var(--hero-water), transparent 70%),
        var(--surface);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

@media (min-width: 640px) {
    .hero {
        padding-block: 24px;
    }

    .hero-panel {
        padding: 56px 40px 88px;
    }
}

@media (min-width: 1024px) {
    .hero-panel {
        padding: 64px 64px 96px;
    }
}

/* Invitation à défiler, en bas du panneau. */
.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 20px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-left: -20px;
    border-radius: 50%;
    color: var(--muted);
    transition: color 0.15s ease;
    animation: cue 2.4s ease-in-out infinite;
}

.scroll-cue:hover {
    color: var(--text);
}

.scroll-cue svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

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

@media (min-width: 640px) {
    .scroll-cue {
        bottom: 28px;
    }
}

/* Le logo dans sa tuile, comme le carré « LOGO » de la maquette. */
.hero-logo {
    width: clamp(168px, 46vw, 248px);
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 32px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
}

.hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-for-dark {
    display: var(--show-dark) !important;
}

.logo-for-light {
    display: var(--show-light) !important;
}

.hero-title {
    margin-top: 28px;
    font: 400 clamp(1.75rem, 6vw, 3rem)/1.1 var(--display);
    letter-spacing: 0.3px;
    text-wrap: balance;
}

.hero-lead {
    max-width: 62ch;
    margin-top: 16px;
    color: var(--muted);
    font-size: clamp(1rem, 2.4vw, 1.125rem);
    text-wrap: pretty;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
}

/* Braises et bulles qui montent lentement dans le fond du panneau. */
.hero-fx {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.hero-fx span {
    position: absolute;
    left: var(--x);
    bottom: -20px;
    width: var(--s);
    height: var(--s);
    border-radius: 50%;
    opacity: 0;
    animation: rise var(--d) linear var(--delay) infinite;
}

.ember {
    background: var(--fire-1);
    box-shadow: 0 0 10px var(--fire-1);
}

.bubble {
    border: 2px solid var(--water-1);
}

/* Couloir, durée, retard et taille différents pour chaque particule : sans ça
   elles montent en rang et l'effet tombe. */
.hero-fx span:nth-child(1) { --x: 8%;  --d: 9s;  --delay: 0s;   --s: 6px; }
.hero-fx span:nth-child(2) { --x: 16%; --d: 11s; --delay: 3s;   --s: 4px; }
.hero-fx span:nth-child(3) { --x: 24%; --d: 8s;  --delay: 5.5s; --s: 5px; }
.hero-fx span:nth-child(4) { --x: 12%; --d: 12s; --delay: 7s;   --s: 3px; }
.hero-fx span:nth-child(5) { --x: 78%; --d: 10s; --delay: 1s;   --s: 12px; }
.hero-fx span:nth-child(6) { --x: 88%; --d: 12s; --delay: 4s;   --s: 8px; }
.hero-fx span:nth-child(7) { --x: 70%; --d: 9s;  --delay: 6.5s; --s: 10px; }
.hero-fx span:nth-child(8) { --x: 93%; --d: 13s; --delay: 2.5s; --s: 6px; }

@keyframes rise {
    0% {
        transform: translate(0, 0);
        opacity: 0;
    }
    12% {
        opacity: 0.8;
    }
    50% {
        transform: translate(10px, -45vh);
    }
    85% {
        opacity: 0.5;
    }
    100% {
        transform: translate(-6px, -90vh);
        opacity: 0;
    }
}

/* -------------------------------------------------------------- sections */
.section {
    padding-block: clamp(56px, 9vw, 96px);
}

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

.section-head {
    max-width: 620px;
    margin: 0 auto clamp(28px, 5vw, 44px);
    text-align: center;
}

.section-head h2 {
    font: 400 clamp(2rem, 6vw, 2.75rem)/1.1 var(--display);
    letter-spacing: 0.3px;
}

/* Petit trait feu → eau sous chaque titre de section. */
.section-head h2::after {
    content: "";
    display: block;
    width: 56px;
    height: 6px;
    margin: 14px auto 0;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--fire-1), var(--fire-2) 45%, var(--water-2) 55%, var(--water-1));
}

.section-head p {
    margin-top: 14px;
    color: var(--muted);
}

/* ------------------------------------------------------------- carrousel */
.carousel {
    --gap: 12px;
    --per-view: 1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}

@media (min-width: 640px) {
    .carousel {
        --gap: 20px;
        --per-view: 2;
        gap: 12px;
    }
}

@media (min-width: 1024px) {
    .carousel {
        --gap: 28px;
        --per-view: 3;
        gap: 16px;
    }

    /* Deux jeux ou moins : deux colonnes plus larges plutôt que trois
       étroites avec un trou. Dès le troisième jeu, retour à trois. */
    .carousel:has(.carousel-track > :last-child:nth-child(-n + 2)) {
        --per-view: 2;
    }

    .game-card {
        max-width: 440px;
    }
}

.carousel-track {
    display: flex;
    gap: var(--gap);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding-block: 8px 20px;
    margin-block: -8px -20px;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-track:focus-visible {
    outline-offset: 6px;
}

/* Quand tous les jeux tiennent à l'écran, ils se centrent et les flèches
   disparaissent (classe posée par le JS). Les marges automatiques centrent
   sans jamais rogner le début de la piste quand elle déborde. */
.carousel-track > :first-child {
    margin-inline-start: auto;
}

.carousel-track > :last-child {
    margin-inline-end: auto;
}

.carousel.is-static .carousel-btn {
    visibility: hidden;
}

.carousel-btn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
}

.carousel-btn:hover:not(:disabled) {
    border-color: var(--water-2);
    transform: scale(1.06);
}

.carousel-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.carousel-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (min-width: 640px) {
    .carousel-btn {
        width: 48px;
        height: 48px;
    }
}

/* ------------------------------------------------------------ carte de jeu */
/* La couleur de chaque jeu, reprise de son propre univers. */
.game-difym {
    --accent: #4fd8f2;
}

.game-cellow {
    --accent: #35d6bd;
}

.game-card {
    flex: 0 0 calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    scroll-snap-align: start;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.game-card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
    box-shadow: var(--shadow-md), 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
}

.game-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #050c0d;
}

/* Filet de la couleur du jeu entre l'image et le texte. */
.game-media::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--accent);
    box-shadow: 0 0 14px var(--accent);
}

.game-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.game-card:hover .game-media img {
    transform: scale(1.04);
}

.game-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 20px 20px 22px;
}

@media (min-width: 640px) {
    .game-body {
        padding: 22px 24px 26px;
    }
}

.tag,
.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}

.tag {
    background: var(--bg);
    color: var(--muted);
}

/* L'état du jeu, posé sur l'image : toujours sur fond sombre, d'où des
   couleurs fixes plutôt que les jetons du thème. */
.status {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(8, 10, 14, 0.72);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}

.status-live {
    color: #5fe39a;
}

.status-dev {
    color: #ffc35c;
}

.game-body h3 {
    margin-top: 4px;
    font: 400 1.75rem/1.1 var(--display);
    letter-spacing: 0.4px;
}

.game-body p {
    color: var(--muted);
}

.game-body .game-meta {
    margin-bottom: 6px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Le bouton descend en bas de carte : les cartes s'alignent même si leurs
   textes n'ont pas la même longueur. */
.game-body .btn {
    width: 100%;
    margin-top: auto;
}

/* -------------------------------------------------------------- réseaux */
.social-discord {
    --brand: #5865f2;
}

.social-youtube {
    --brand: #ff0033;
}

.social-tiktok {
    --brand: #000000;
}

.social-instagram {
    --brand: #d6249f;
}

.social-instagram .social-icon {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}

.social-x {
    --brand: #000000;
}

/* Cinq réseaux : trois puis deux, centrés, sur téléphone (comme la maquette),
   les cinq sur une ligne au-delà. */
.socials {
    --cols: 3;
    --gap: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--gap);
    max-width: 920px;
    margin-inline: auto;
}

@media (min-width: 640px) {
    .socials {
        --cols: 5;
        --gap: 16px;
    }
}

@media (min-width: 1024px) {
    .socials {
        --gap: 20px;
    }
}

/* Toutes les tuiles à la même hauteur, avec ou sans la mention « Bientôt ». */
.socials li {
    display: flex;
    flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
}

.social {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px 4px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

@media (min-width: 640px) {
    .social {
        padding: 26px 12px 22px;
        gap: 12px;
    }
}

a.social:hover {
    transform: translateY(-4px);
    border-color: var(--brand);
    box-shadow: var(--shadow-md);
}

.social-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--brand);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

@media (min-width: 640px) {
    .social-icon {
        width: 60px;
        height: 60px;
        border-radius: 18px;
    }
}

.social-icon svg {
    width: 55%;
    height: 55%;
    fill: currentColor;
}

.social-name {
    font-weight: 800;
    font-size: 0.8125rem;
    line-height: 1.2;
}

@media (min-width: 640px) {
    .social-name {
        font-size: 1rem;
    }
}

.social-soon {
    margin-top: -6px;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.social.is-soon .social-icon {
    filter: grayscale(0.25);
    opacity: 0.75;
}

.socials-mail {
    margin-top: 32px;
    color: var(--muted);
    text-align: center;
    text-wrap: balance;
}

.socials-mail a {
    font-weight: 700;
    overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------- footer */
.site-footer {
    padding-block: 48px 28px;
    background: var(--bg);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
}

.footer-brand {
    grid-column: 1 / -1;
}

.footer-brand p {
    margin-top: 10px;
    color: var(--muted);
}

/* Sur téléphone, la colonne Contact prend toute la largeur : l'adresse
   e-mail ne se coupe pas en deux. */
@media (max-width: 759px) {
    .footer-grid > :last-child {
        grid-column: 1 / -1;
    }
}

@media (min-width: 760px) {
    .footer-grid {
        grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
    }

    .footer-brand {
        grid-column: auto;
    }
}

.footer-title {
    margin-bottom: 12px;
    color: var(--muted);
    font: 800 0.8125rem/1.2 var(--sans);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a {
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.footer-links a:hover {
    color: var(--link);
    text-decoration: underline;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.875rem;
}

.footer-bottom a {
    color: var(--text);
    font-weight: 700;
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
}

.footer-legal a {
    font-weight: 600;
    text-decoration: none;
}

.footer-legal a:hover,
.footer-legal a[aria-current="page"] {
    text-decoration: underline;
}

/* -------------------------------------------------------- pages légales */
.legal-page {
    padding-block: clamp(28px, 6vw, 56px) clamp(56px, 9vw, 96px);
}

.legal {
    max-width: 760px;
    margin-inline: auto;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
}

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

.back-link svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.legal h1 {
    margin-top: 20px;
    font: 400 clamp(2rem, 7vw, 3rem)/1.1 var(--display);
    letter-spacing: 0.3px;
}

.legal h1::after {
    content: "";
    display: block;
    width: 56px;
    height: 6px;
    margin-top: 14px;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--fire-1), var(--fire-2) 45%, var(--water-2) 55%, var(--water-1));
}

.legal .updated {
    margin-top: 14px;
    color: var(--muted);
    font-size: 0.9375rem;
}

.legal h2 {
    margin-top: 40px;
    font: 400 1.5rem/1.2 var(--display);
    letter-spacing: 0.3px;
}

.legal h3 {
    margin: 24px 0 0;
    font-size: 1.0625rem;
    font-weight: 800;
}

.legal p,
.legal ul {
    margin-top: 12px;
}

.legal ul {
    padding-left: 1.25em;
    list-style: disc;
}

.legal li + li {
    margin-top: 6px;
}

.legal a {
    overflow-wrap: anywhere;
}

.legal code {
    padding: 1px 6px;
    border-radius: 6px;
    background: var(--bg-alt);
    font-size: 0.9em;
}

/* L'essentiel en tête de page. */
.legal-summary {
    margin-top: 28px;
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--water-2);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.legal-summary p {
    margin: 0;
}

.legal-summary ul {
    margin-top: 10px;
}

/* Fiche d'identité : intitulé et valeur, sur une ligne dès la tablette. */
.identity {
    display: grid;
    margin: 16px 0 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    overflow: hidden;
}

.identity > div {
    display: grid;
    gap: 2px;
    padding: 12px 16px;
}

.identity > div + div {
    border-top: 1px solid var(--line);
}

.identity dt {
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 700;
}

.identity dd {
    margin: 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}

@media (min-width: 640px) {
    .identity > div {
        grid-template-columns: 220px 1fr;
        gap: 16px;
    }
}

/* Champ des mentions légales encore vide dans le .env. */
.a-completer {
    display: inline-block;
    padding: 0 8px;
    border: 1px dashed var(--todo);
    border-radius: 6px;
    background: var(--todo-bg);
    color: var(--todo);
    font-weight: 700;
}

/* ---------------------------------------------------- mouvements réduits */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .carousel-track {
        scroll-behavior: auto;
    }
}
