/* =========================================================
   Vallières Atelier
   Palette échantillonnée dans le logo. Archivo pour les titres
   (même famille de formes que le mot-symbole), Inter pour le texte.
   ========================================================= */

:root {
    /* ── Couleurs ── */
    --brun: #3d241d;
    --brun-fonce: #2a1712;
    --brun-clair: #5a3a30;
    --taupe: #beaf9f;
    --taupe-pale: #e3dad0;
    --creme: #faf7f3;
    --creme-ombre: #f2ece5;
    --blanc: #fff;

    --texte: var(--brun);
    --texte-doux: #6b5248;
    --bordure: #e6ded6;

    /* Accents tirés de ses coulées d'epoxy — usage parcimonieux */
    --epoxy-bleu: #4a6fa5;
    --epoxy-vert: #5f9b6a;
    --epoxy-rose: #c07689;
    --epoxy-nacre: #ece7e1;

    /* ── Typographie fluide ── */
    --titre: "Archivo", "Helvetica Neue", Arial, sans-serif;
    --texte-police: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

    --t-geant: clamp(2.75rem, 8vw, 6rem);
    --t-h1: clamp(2.25rem, 5vw, 3.75rem);
    --t-h2: clamp(1.75rem, 3.5vw, 2.75rem);
    --t-h3: clamp(1.125rem, 1.6vw, 1.375rem);
    --t-corps: clamp(1rem, 1.1vw, 1.125rem);
    --t-petit: 0.875rem;
    --t-minuscule: 0.75rem;

    /* ── Rythme ── */
    --esp-3xs: 0.25rem;
    --esp-2xs: 0.5rem;
    --esp-xs: 0.75rem;
    --esp-s: 1rem;
    --esp-m: 2rem;
    --esp-l: 3.5rem;
    --esp-xl: 6rem;
    --esp-2xl: 9rem;

    --largeur: 1280px;
    --largeur-texte: 68ch;
    --rayon: 2px;

    /* ── Mouvement ── */
    --sortie: cubic-bezier(0.16, 1, 0.3, 1);
    --doux: cubic-bezier(0.4, 0, 0.2, 1);
    /* Doit rester supérieur à la hauteur du logo, sinon il déborde de la barre.
       Le menu mobile s'ouvre juste sous cette valeur. */
    --entete-h: 96px;
}

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

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

body {
    margin: 0;
    background: var(--creme);
    color: var(--texte);
    font-family: var(--texte-police);
    font-size: var(--t-corps);
    font-weight: 400;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

/* ── Titres ─────────────────────────────────────────────── */

h1,
h2,
h3,
h4 {
    font-family: var(--titre);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 0 0 var(--esp-s);
    text-wrap: balance;
}

h1 {
    font-size: var(--t-h1);
}

h2 {
    font-size: var(--t-h2);
}

h3 {
    font-size: var(--t-h3);
    font-weight: 700;
    letter-spacing: -0.01em;
}

p {
    margin: 0 0 var(--esp-s);
    max-width: var(--largeur-texte);
}

/* Petite étiquette en capitales, réutilisée partout */
.surtitre {
    display: inline-block;
    font-family: var(--titre);
    font-size: var(--t-minuscule);
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--texte-doux);
    margin-bottom: var(--esp-xs);
}

.surtitre--clair {
    color: var(--taupe);
}

/* ── Structure ──────────────────────────────────────────── */

.conteneur {
    width: 100%;
    max-width: var(--largeur);
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 3rem);
}

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

.section--serree {
    padding-block: var(--esp-l);
}

.section__entete {
    max-width: 46ch;
    margin-bottom: var(--esp-l);
}

.saut-contenu {
    position: absolute;
    left: -9999px;
}

.saut-contenu:focus {
    left: var(--esp-s);
    top: var(--esp-s);
    z-index: 200;
    background: var(--brun);
    color: var(--creme);
    padding: var(--esp-2xs) var(--esp-s);
    border-radius: var(--rayon);
}

/* ── Entête ─────────────────────────────────────────────── */

.entete {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    transition: background-color 0.4s var(--doux), box-shadow 0.4s var(--doux);
}

.entete__interieur {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--esp-m);
    min-height: var(--entete-h);
}

.entete__logo {
    display: block;
    flex-shrink: 0;
    line-height: 0;
}

.entete__logo img {
    height: clamp(52px, 5vw, 68px);
    width: auto;
    transition: height 0.4s var(--doux);
}

/* Le logo clair ne sert QUE par-dessus la bannière */
.entete__logo .logo-clair {
    display: none;
}

/* Par-dessus la bannière : fond absent, logo en clair */
.entete--sur-image:not(.entete--ancree) {
    background: linear-gradient(to bottom, rgba(42, 23, 18, 0.55), transparent);
}

.entete--sur-image:not(.entete--ancree) .entete__logo .logo-brun {
    display: none;
}

.entete--sur-image:not(.entete--ancree) .entete__logo .logo-clair {
    display: block;
}

.entete--sur-image:not(.entete--ancree) .nav__liste a {
    color: var(--creme);
}

.entete--sur-image:not(.entete--ancree) .menu-bouton__barre {
    background: var(--creme);
}

/* Une fois défilé : fond crème, ombre discrète */
.entete--ancree {
    background: rgba(250, 247, 243, 0.92);
    backdrop-filter: saturate(160%) blur(12px);
    box-shadow: 0 1px 0 var(--bordure), 0 8px 24px -18px rgba(61, 36, 29, 0.5);
}

.entete--ancree .entete__logo img {
    height: clamp(42px, 3.6vw, 50px);
}

/* ── Navigation ─────────────────────────────────────────── */

.nav__liste {
    list-style: none;
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2.5vw, 2.25rem);
    margin: 0;
    padding: 0;
    font-family: var(--titre);
    font-size: var(--t-petit);
    font-weight: 600;
    letter-spacing: 0.04em;
}

.nav__liste a {
    position: relative;
    text-decoration: none;
    padding-block: var(--esp-3xs);
}

/* Soulignement qui se déploie depuis la gauche */
.nav__liste a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 1px;
    width: 100%;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s var(--sortie);
}

.nav__liste a:hover::after,
.nav__liste .current-menu-item > a::after {
    transform: scaleX(1);
}

/* Bouton hamburger */
.menu-bouton {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.menu-bouton__barre {
    display: block;
    height: 2px;
    width: 24px;
    background: var(--brun);
    transition: transform 0.35s var(--sortie), opacity 0.2s linear;
}

.menu-bouton[aria-expanded="true"] .menu-bouton__barre:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-bouton[aria-expanded="true"] .menu-bouton__barre:nth-child(2) {
    opacity: 0;
}

.menu-bouton[aria-expanded="true"] .menu-bouton__barre:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 860px) {
    .menu-bouton {
        display: flex;
    }

    .nav {
        position: fixed;
        inset: var(--entete-h) 0 auto;
        background: var(--creme);
        border-bottom: 1px solid var(--bordure);
        padding: var(--esp-m) clamp(1rem, 4vw, 3rem) var(--esp-l);
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s var(--doux), transform 0.3s var(--doux);
    }

    .nav[data-ouvert="true"] {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav__liste {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        font-size: 1.25rem;
        font-weight: 700;
    }

    .nav__liste li + li {
        border-top: 1px solid var(--bordure);
    }

    .nav__liste a {
        display: block;
        padding-block: var(--esp-s);
        color: var(--brun) !important;
    }

    .nav__liste a::after {
        display: none;
    }
}

/* ── Bannière ───────────────────────────────────────────── */

.banniere {
    position: relative;
    min-height: min(92vh, 900px);
    display: grid;
    align-items: end;
    overflow: hidden;
    background: var(--brun-fonce);
    isolation: isolate;
}

/* Plus haut que son cadre : la parallaxe déplace l'image vers le bas, et
   sans cette marge on découvrirait du vide en haut. Le débord couvre le
   déplacement maximal calculé dans main.js (18 % de la hauteur). */
.banniere__media {
    position: absolute;
    inset: -20% 0 auto 0;
    height: 140%;
    z-index: -2;
    will-change: transform;
}

.banniere__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Très lent rapprochement : donne vie sans distraire */
    animation: respire 26s ease-out forwards;
}

@keyframes respire {
    from {
        transform: scale(1.08);
    }

    to {
        transform: scale(1);
    }
}

/* Dégradé pour que le texte reste lisible quelle que soit la photo */
.banniere::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to top,
            rgba(42, 23, 18, 0.92) 0%,
            rgba(42, 23, 18, 0.6) 38%,
            rgba(42, 23, 18, 0.15) 70%,
            rgba(42, 23, 18, 0.35) 100%);
}

.banniere__texte {
    padding-block: var(--esp-xl) var(--esp-l);
    color: var(--creme);
    position: relative;
}

.banniere__titre {
    font-size: var(--t-geant);
    text-transform: uppercase;
    letter-spacing: -0.03em;
    max-width: 20ch;
    margin-bottom: var(--esp-s);
}

.banniere__accroche {
    font-size: clamp(1.0625rem, 1.6vw, 1.375rem);
    color: var(--taupe-pale);
    max-width: 48ch;
    margin-bottom: var(--esp-m);
}

/* Entrée en cascade des éléments de la bannière */
.banniere .apparait {
    opacity: 0;
    transform: translateY(24px);
    animation: monte 0.9s var(--sortie) forwards;
}

.banniere .apparait:nth-child(1) {
    animation-delay: 0.1s;
}

.banniere .apparait:nth-child(2) {
    animation-delay: 0.22s;
}

.banniere .apparait:nth-child(3) {
    animation-delay: 0.34s;
}

.banniere .apparait:nth-child(4) {
    animation-delay: 0.46s;
}

@keyframes monte {
    to {
        opacity: 1;
        transform: none;
    }
}

/* Indice de défilement */
.banniere__defiler {
    position: absolute;
    right: clamp(1rem, 4vw, 3rem);
    bottom: var(--esp-l);
    display: flex;
    align-items: center;
    gap: var(--esp-2xs);
    font-family: var(--titre);
    font-size: var(--t-minuscule);
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--taupe-pale);
    text-decoration: none;
}

.banniere__defiler span {
    display: block;
    width: 1px;
    height: 44px;
    background: currentColor;
    transform-origin: top;
    animation: tire 2.4s ease-in-out infinite;
}

@keyframes tire {

    0%,
    100% {
        transform: scaleY(0.35);
        opacity: 0.5;
    }

    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

@media (max-width: 860px) {
    .banniere__defiler {
        display: none;
    }
}

/* ── Boutons ────────────────────────────────────────────── */

.bouton {
    --fond: var(--brun);
    --avant: var(--creme);
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--esp-2xs);
    background: var(--fond);
    color: var(--avant);
    font-family: var(--titre);
    font-size: var(--t-petit);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 1.05rem 2rem;
    border: 1px solid var(--fond);
    border-radius: var(--rayon);
    overflow: hidden;
    transition: color 0.35s var(--doux), border-color 0.35s var(--doux);
}

/* Le fond se remplit depuis le bas au survol */
.bouton::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--avant);
    transform: translateY(101%);
    transition: transform 0.45s var(--sortie);
    z-index: 0;
}

.bouton > * {
    position: relative;
    z-index: 1;
}

.bouton:hover {
    color: var(--fond);
}

.bouton:hover::before {
    transform: translateY(0);
}

.bouton--clair {
    --fond: var(--creme);
    --avant: var(--brun);
}

.bouton--fantome {
    background: transparent;
    color: var(--creme);
    border-color: rgba(250, 247, 243, 0.45);
}

.bouton--fantome::before {
    background: var(--creme);
}

.bouton--fantome:hover {
    color: var(--brun);
    border-color: var(--creme);
}

.groupe-boutons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--esp-xs);
}

/* Lien fléché */
.lien-fleche {
    display: inline-flex;
    align-items: center;
    gap: var(--esp-2xs);
    font-family: var(--titre);
    font-size: var(--t-petit);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
}

.lien-fleche svg {
    transition: transform 0.35s var(--sortie);
}

.lien-fleche:hover svg {
    transform: translateX(6px);
}

/* ── Grille de catégories ───────────────────────────────── */

/* Colonnes explicites plutôt qu'auto-fit : avec quatre métiers, auto-fit
   donnait 3 + 1 orphelin sur grand écran. Ici c'est 1, puis 2, puis 4. */
.grille-cartes {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1rem, 2vw, 1.75rem);
}

@media (min-width: 560px) {
    .grille-cartes {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grille-cartes {
        grid-template-columns: repeat(4, 1fr);
    }
}

.carte {
    position: relative;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background: var(--creme-ombre);
    border-radius: var(--rayon);
    overflow: hidden;
}

.carte__media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: var(--taupe-pale);
}

.carte__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.9s var(--sortie);
}

.carte:hover .carte__media img {
    transform: scale(1.05);
}

.carte__corps {
    padding: var(--esp-s) var(--esp-s) var(--esp-m);
}

.carte__titre {
    margin-bottom: var(--esp-3xs);
}

.carte__extrait {
    color: var(--texte-doux);
    font-size: var(--t-petit);
    margin: 0;
}

/* Variante superposée, pour la galerie */
.carte--superposee .carte__corps {
    position: absolute;
    inset: auto 0 0;
    padding: var(--esp-m) var(--esp-s) var(--esp-s);
    background: linear-gradient(to top, rgba(42, 23, 18, 0.88), transparent);
    color: var(--creme);
}

.carte--superposee .carte__extrait {
    color: var(--taupe-pale);
}

/* ── Galerie en mosaïque ────────────────────────────────── */

/* « dense » comble les trous laissés par les tuiles à cheval sur deux
   colonnes quand le nombre de photos ne tombe pas juste. */
/* Hauteur de rangée fixée plutôt qu'un ratio par tuile : sinon la grande
   tuile à cheval sur deux rangées impose sa hauteur et laisse des trous
   sous les tuiles carrées voisines.
   « dense » comble les vides quand le nombre de photos ne tombe pas juste. */
.mosaique {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: clamp(150px, 19vw, 280px);
    grid-auto-flow: dense;
    gap: clamp(0.5rem, 1.2vw, 1rem);
}

.mosaique__element {
    position: relative;
    overflow: hidden;
    border-radius: var(--rayon);
    background: var(--taupe-pale);
    margin: 0;
}

/* La première pièce prend quatre cases : hiérarchie visuelle.
   Avec 1 grande (2×2) + 4 petites, les deux rangées se remplissent
   exactement — aucun trou possible. */
.mosaique__element:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
}

.mosaique__element img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.9s var(--sortie);
}

.mosaique__element:hover img {
    transform: scale(1.06);
}

@media (max-width: 860px) {
    .mosaique {
        grid-template-columns: repeat(2, 1fr);
    }

    .mosaique__element:nth-child(6) {
        grid-column: span 2;
    }
}

/* ── Matières ───────────────────────────────────────────── */

.matieres {
    display: flex;
    flex-wrap: wrap;
    gap: var(--esp-s) 1.5rem;
}

.matiere {
    text-align: center;
}

/* Pastille d'epoxy : de la résine coulée, pas un aplat de couleur.
   Trois couches font le travail — un reflet spéculaire en haut à gauche,
   de la profondeur en bas à droite, et une ombre portée. La couleur arrive
   par --teinte, posée en attribut style depuis le gabarit. */
.matiere__pastille {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto var(--esp-2xs);
    background-color: var(--teinte, var(--taupe));
    background-image:
        radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.6), transparent 42%),
        radial-gradient(circle at 72% 82%, rgba(0, 0, 0, 0.28), transparent 58%);
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.55),
        inset 0 -8px 14px -4px rgba(0, 0, 0, 0.22),
        0 6px 16px -8px rgba(61, 36, 29, 0.55);
    overflow: hidden;
    transition: transform 0.45s var(--sortie);
}

/* Les volutes de mica, qui donnent l'aspect nacré. Un dégradé conique
   tourne lentement au survol : c'est ce mouvement qui vend la résine. */
.matiere__pastille::after {
    content: "";
    position: absolute;
    inset: -25%;
    background: conic-gradient(from 200deg,
            rgba(255, 255, 255, 0.42),
            transparent 26%,
            rgba(255, 255, 255, 0.22) 48%,
            transparent 68%,
            rgba(255, 255, 255, 0.34) 88%,
            transparent);
    mix-blend-mode: screen;
    transition: transform 1.1s var(--sortie);
}

.matiere:hover .matiere__pastille {
    transform: translateY(-5px) scale(1.06);
}

.matiere:hover .matiere__pastille::after {
    transform: rotate(70deg);
}

/* Le nacré est presque blanc : sans ce liseré il disparaîtrait sur le crème. */
.matiere__pastille--pale {
    box-shadow:
        inset 0 0 0 1px rgba(61, 36, 29, 0.18),
        inset 0 1px 2px rgba(255, 255, 255, 0.7),
        inset 0 -8px 14px -4px rgba(0, 0, 0, 0.12),
        0 6px 16px -8px rgba(61, 36, 29, 0.4);
}

.matiere__nom {
    font-family: var(--titre);
    font-size: var(--t-minuscule);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--texte-doux);
}

/* ── Bandeau d'appel ────────────────────────────────────── */

.bandeau {
    background: var(--brun);
    color: var(--creme);
    padding-block: var(--esp-xl);
}

.bandeau h2 {
    max-width: 26ch;
}

.bandeau p {
    color: var(--taupe-pale);
    max-width: 52ch;
    margin-bottom: var(--esp-m);
}

/* ── Deux colonnes texte + image ────────────────────────── */

.duo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}

.duo__media img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: var(--rayon);
}

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

.pied {
    background: var(--brun-fonce);
    color: var(--taupe-pale);
    padding-block: var(--esp-l) var(--esp-m);
}

.pied a {
    color: var(--taupe-pale);
    text-decoration: none;
}

.pied a:hover {
    color: var(--creme);
    text-decoration: underline;
}

.pied__grille {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--esp-m);
    padding-bottom: var(--esp-l);
}

.pied__logo img {
    height: 96px;
    width: auto;
    margin-bottom: var(--esp-s);
}

.pied__signature {
    font-size: var(--t-petit);
    max-width: 30ch;
    margin: 0;
}

.pied__titre {
    font-family: var(--titre);
    font-size: var(--t-minuscule);
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--taupe);
    margin-bottom: var(--esp-xs);
}

.pied__liste {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--esp-2xs);
    font-size: var(--t-petit);
}

.pied__bas {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--esp-s);
    padding-top: var(--esp-s);
    border-top: 1px solid rgba(190, 175, 159, 0.2);
    font-size: var(--t-minuscule);
    color: rgba(227, 218, 208, 0.7);
}

.pied__bas p {
    margin: 0;
}

/* ── Apparition au défilement ───────────────────────────── */

.revele {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s var(--doux), transform 0.8s var(--sortie);
}

.revele.est-visible {
    opacity: 1;
    transform: none;
}

/* Décalage en cascade entre enfants d'une même grille */
.revele-cascade > * {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s var(--doux), transform 0.7s var(--sortie);
}

.revele-cascade.est-visible > * {
    opacity: 1;
    transform: none;
}

.revele-cascade.est-visible > *:nth-child(2) {
    transition-delay: 0.08s;
}

.revele-cascade.est-visible > *:nth-child(3) {
    transition-delay: 0.16s;
}

.revele-cascade.est-visible > *:nth-child(4) {
    transition-delay: 0.24s;
}

.revele-cascade.est-visible > *:nth-child(5) {
    transition-delay: 0.32s;
}

.revele-cascade.est-visible > *:nth-child(6) {
    transition-delay: 0.4s;
}

.revele-cascade.est-visible > *:nth-child(7) {
    transition-delay: 0.48s;
}

.revele-cascade.est-visible > *:nth-child(8) {
    transition-delay: 0.56s;
}

/* Sans JavaScript, tout doit rester visible */
.sans-js .revele,
.sans-js .revele-cascade > * {
    opacity: 1;
    transform: none;
}

/* ── Pages intérieures ──────────────────────────────────── */

/* L'entête est fixe : hors accueil, on décale le contenu d'autant. */
.contenu--decale {
    padding-top: var(--entete-h);
}

.page-entete {
    background: var(--creme-ombre);
    padding-block: var(--esp-l);
    border-bottom: 1px solid var(--bordure);
}

.page-contenu {
    padding-block: var(--esp-l) var(--esp-xl);
}

.page-contenu :is(h2, h3) {
    margin-top: var(--esp-m);
}

/* ── Dents de scie ──────────────────────────────────────────
   Motif tiré du logo : le « V » est coupé par une lame de scie.
   On le réutilise comme séparateur de section. Deux dégradés en
   biais qui se croisent forment les dents — aucune image. */

/* Masque SVG plutôt que deux dégradés en biais : la recette aux dégradés
   se recouvre et rend un bord droit. Ici le triangle est décrit exactement,
   et la couleur vient simplement du fond — donc une seule règle sert pour
   n'importe quelle teinte. */
.dents {
    height: 20px;
    background-color: var(--brun);

    --dent: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 20' preserveAspectRatio='none'%3E%3Cpath d='M0 0h40L20 20z' fill='%23000'/%3E%3C/svg%3E");

    -webkit-mask-image: var(--dent);
    mask-image: var(--dent);
    -webkit-mask-size: 40px 20px;
    mask-size: 40px 20px;
    -webkit-mask-repeat: repeat-x;
    mask-repeat: repeat-x;
}

/* Conservée pour la lisibilité du gabarit : la couleur est déjà dans .dents */
.dents--sur-brun {
    background-color: var(--brun);
}

/* Dents inversées : pointes vers le bas */
.dents--bas {
    transform: scaleY(-1);
}

/* ── Bandeau défilant ───────────────────────────────────────
   Les mots-clés du métier qui glissent en continu. La liste est
   dupliquée pour que la boucle soit invisible. */

.defile {
    overflow: hidden;
    background: var(--brun);
    color: var(--taupe-pale);
    padding-block: var(--esp-s);
    border-block: 1px solid rgba(190, 175, 159, 0.18);
}

/* Le masque est ici, sur un cadre fixe, et PAS sur la bande entière :
   sinon le fond brun s'effaçait avec le texte et laissait une traînée
   blanchâtre aux extrémités. Le brun reste pleine largeur, seuls les mots
   s'estompent en entrant et en sortant. */
.defile__cadre {
    overflow: hidden;
    --fondu: linear-gradient(90deg,
            transparent 0,
            #000 14%,
            #000 86%,
            transparent 100%);
    -webkit-mask-image: var(--fondu);
    mask-image: var(--fondu);
}

.defile__piste {
    display: flex;
    width: max-content;
    animation: glisse 38s linear infinite;
}

.defile__groupe {
    display: flex;
    align-items: center;
    gap: var(--esp-m);
    padding-right: var(--esp-m);
    font-family: var(--titre);
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
}

.defile__separateur {
    color: var(--taupe);
    opacity: 0.6;
}

@keyframes glisse {
    to {
        /* Exactement la largeur d'un groupe : la boucle ne se voit pas */
        transform: translateX(-50%);
    }
}

.defile:hover .defile__piste {
    animation-play-state: paused;
}

/* ── Grain ──────────────────────────────────────────────────
   Bruit très léger sur les fonds foncés : ça leur donne une
   matière, au lieu d'un aplat numérique parfait. */

.grain {
    position: relative;
    isolation: isolate;
}

.grain::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.045;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Produits ───────────────────────────────────────────────*/

.produits {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1rem, 2vw, 1.75rem);
}

@media (min-width: 560px) {
    .produits {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .produits {
        grid-template-columns: repeat(4, 1fr);
    }
}

.produit {
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.produit__media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--taupe-pale);
    border-radius: var(--rayon);
    margin-bottom: var(--esp-xs);
}

.produit__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.9s var(--sortie);
}

.produit:hover .produit__media img {
    transform: scale(1.05);
}

.produit__etiquette {
    position: absolute;
    top: var(--esp-2xs);
    left: var(--esp-2xs);
    background: var(--brun);
    color: var(--creme);
    font-family: var(--titre);
    font-size: var(--t-minuscule);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.3rem 0.6rem;
    border-radius: var(--rayon);
}

.produit__nom {
    font-family: var(--titre);
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 var(--esp-3xs);
}

.produit__prix {
    font-size: var(--t-petit);
    color: var(--texte-doux);
}

.produit__prix del {
    opacity: 0.55;
    margin-right: var(--esp-3xs);
}

/* État d'attente : la boutique n'a pas encore d'article */
.boutique-attente {
    display: grid;
    gap: var(--esp-s);
    justify-items: start;
    padding: clamp(2rem, 5vw, 4rem);
    background: var(--creme-ombre);
    border: 1px dashed var(--taupe);
    border-radius: var(--rayon);
}

.boutique-attente__prix {
    display: flex;
    flex-wrap: wrap;
    gap: var(--esp-s) var(--esp-m);
    margin: 0;
    padding: 0;
    list-style: none;
}

.boutique-attente__prix li {
    font-family: var(--titre);
    font-size: var(--t-petit);
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--texte-doux);
}

.boutique-attente__prix strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--brun);
}

/* ── Légende au survol de la mosaïque ───────────────────── */

.mosaique__legende {
    position: absolute;
    inset: auto 0 0;
    padding: var(--esp-m) var(--esp-s) var(--esp-xs);
    background: linear-gradient(to top, rgba(42, 23, 18, 0.9), transparent);
    color: var(--creme);
    font-family: var(--titre);
    font-size: var(--t-minuscule);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s var(--doux), transform 0.35s var(--sortie);
}

.mosaique__element:hover .mosaique__legende,
.mosaique__element:focus-within .mosaique__legende {
    opacity: 1;
    transform: none;
}

/* ── Respect des préférences système ────────────────────── */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .revele,
    .revele-cascade > * {
        opacity: 1 !important;
        transform: none !important;
    }

    .banniere__media img {
        animation: none;
        transform: none !important;
    }

    /* Le bandeau s'arrête au début plutôt que de sauter à la fin */
    .defile__piste {
        animation: none;
        transform: none;
    }
}
