/* ==========================================================================
   Département — version « choc »
   --------------------------------------------------------------------------
   1. En-tête (aplat bleu, numéro géant au contour, titre géant, visuel, chiffres)
   3. Gammes (lignes qui virent au bleu, sous-familles en pastilles)
   4. Aperçu du catalogue
   5. Catalogue sur demande (tuile bleu nuit)
   6. Applications (tuiles illustrées, département 01)
   7. Constructeurs (tuiles blanches arrondies)
   8. Autres départements (deux grandes tuiles illustrées)
   9. Mouvement réduit
   ========================================================================== */

/* Le titre de section prend les deux tiers de la largeur, comme à l'accueil */
@media (min-width: 900px) {
    .page-department .section__head {
        grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
    }
}

.page-department .section__aside .btn {
    margin-top: 1.5rem;
}

/* 1. En-tête --------------------------------------------------------------- */
.dept-head {
    /* Corps du titre : le mot le plus long (« Instrumentation ») tient sur 320 px de large. */
    --dept-title: clamp(2.25rem, 0.75rem + 6.6vw, 7.25rem);
}

.dept-head .page-head__top {
    margin-bottom: clamp(1.75rem, 1.25rem + 2.5vw, 3.5rem);
}

/* Position du département dans la division : « 01 / 04 » */
.dept-head__folio {
    padding: 0.4rem 0.95rem;
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.9);
}

.dept-head__folio strong {
    font-weight: 800;
    color: var(--yellow);
}

/* Étiquette et numéro sur une ligne, titre dessous ; sur grand écran le numéro
   occupe toute la hauteur du titre, à droite. */
.dept-head__lead {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "eyebrow index"
        "title   title";
    align-items: end;
    gap: clamp(1rem, 0.75rem + 1.5vw, 1.75rem) 1.5rem;
}

.dept-head__eyebrow {
    grid-area: eyebrow;
    padding-bottom: 0.3rem;
    color: var(--white);
}

.dept-head__index {
    grid-area: index;
    font-size: clamp(4.5rem, 2.5rem + 10vw, 7.5rem);
    font-weight: 800;
    line-height: 0.8;
    letter-spacing: -0.06em;
    font-variant-numeric: lining-nums;
    color: transparent;
    -webkit-text-stroke: 2px var(--yellow);
    user-select: none;
}

.dept-head .dept-head__title {
    grid-area: title;
    max-width: none;
    font-size: var(--dept-title);
    /* pas de césure automatique : le corps est calculé pour que chaque mot tienne */
    hyphens: manual;
    -webkit-hyphens: manual;
}

@media (min-width: 900px) {
    .dept-head__lead {
        grid-template-areas:
            "eyebrow index"
            "title   index";
        column-gap: clamp(1.5rem, 3vw, 3rem);
    }

    .dept-head__index {
        /* deux lignes de titre de haut, pied des chiffres aligné sur la ligne de base du titre */
        margin-bottom: calc(var(--dept-title) * 0.06);
        font-size: calc(var(--dept-title) * 1.9);
        -webkit-text-stroke-width: 3px;
    }
}

/* Planche : texte et chiffres à gauche, visuel à droite */
.dept-head__plate {
    display: grid;
    gap: clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
    margin-top: clamp(1.75rem, 1.25rem + 2.5vw, 3.5rem);
}

.dept-head__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.25rem;
    margin-top: clamp(1.5rem, 1.25rem + 1vw, 2.25rem);
}

/* Visuel : grande tuile arrondie cerclée d'un liseré clair */
.dept-head__figure {
    position: relative;
    display: grid;
    min-width: 0;
}

.dept-head__media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--tile-radius);
    background: var(--ink);
    box-shadow: 0 0 0 0.5rem rgba(255, 255, 255, 0.14);
}

/* L'image déborde le cadre de 9 % en haut et en bas : marge de la parallaxe. */
.dept-head__parallax {
    position: absolute;
    inset: -9% 0;
}

.dept-head__parallax img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 30%;
}

/* Légende : pastille blanche posée sur le visuel */
.dept-head__cap {
    position: absolute;
    left: clamp(0.75rem, 2vw, 1.25rem);
    bottom: clamp(0.75rem, 2vw, 1.25rem);
    max-width: calc(100% - 2 * clamp(0.75rem, 2vw, 1.25rem));
    padding: 0.45rem 0.95rem;
    border-radius: 1.25rem;
    background: var(--white);
    color: var(--ink);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.35;
    box-shadow: 0 12px 24px -14px rgba(6, 24, 42, 0.75);
}

.dept-head__cap b {
    margin-right: 0.35rem;
    font-weight: 800;
    color: var(--brand);
}

/* Chiffres clés : numéraux géants sous un filet jaune */
.dept-head__data {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem clamp(1.25rem, 3vw, 2.5rem);
    margin: 0;
}

/* Dans le code, le libellé (dt) précède la valeur (dd) ; à l'écran, la valeur passe au-dessus. */
.dept-head__datum {
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-end;
    gap: 0.6rem;
    padding-top: 1.1rem;
    border-top: 2px solid var(--yellow);
}

.dept-head__datum--main {
    grid-column: 1 / -1;
}

.dept-head__datum dd {
    font-size: clamp(2.75rem, 1.8rem + 3.6vw, 5rem);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.055em;
    font-variant-numeric: tabular-nums;
    color: var(--white);
}

.dept-head__datum--main dd {
    font-size: clamp(4.25rem, 2.4rem + 7.6vw, 8.5rem);
}

.dept-head__datum dt {
    max-width: 16em;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
}

.dept-head__contact {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    padding-top: 1.1rem;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
}

.dept-head__contact dt {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
}

.dept-head__contact .btn span {
    overflow-wrap: anywhere;
}

@media (min-width: 700px) and (max-width: 999px) {
    .dept-head__media {
        aspect-ratio: 16 / 9;
    }
}

@media (min-width: 1000px) {
    .dept-head__plate {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        grid-template-rows: auto 1fr;
        grid-template-areas:
            "intro figure"
            "data  figure";
        gap: 2.5rem clamp(2.5rem, 5vw, 5.5rem);
    }

    .dept-head__intro {
        grid-area: intro;
    }

    .dept-head__figure {
        grid-area: figure;
    }

    .dept-head__data {
        grid-area: data;
        align-self: end;
    }

    /* La tuile prend la hauteur de la colonne de gauche ; un grand angle arrondi rappelle l'arche de l'accueil. */
    .dept-head__media {
        aspect-ratio: auto;
        min-height: clamp(24rem, 34vw, 32rem);
        border-radius: var(--tile-radius) clamp(7rem, 13vw, 12rem) var(--tile-radius) var(--tile-radius);
    }
}

/* 3. Gammes ---------------------------------------------------------------- */
.dept-ranges {
    padding-top: calc(var(--section) + 1rem);
}

.ranges {
    --range-num: clamp(3.5rem, 6vw, 5.5rem);
    border-top: 2px solid var(--ink);
}

.range {
    padding-block: 0.4rem;
    border-bottom: 1px solid var(--line);
}

/* La ligne de famille : au survol elle devient une capsule bleue */
.range__link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
        "num name go"
        "num meta go";
    align-items: center;
    gap: 0.5rem 0.9rem;
    padding: 0.9rem 0;
    border-radius: 999px;
    text-decoration: none;
    transition: padding 0.45s var(--ease), background-color 0.45s var(--ease), color 0.45s var(--ease);
}

.range__num {
    grid-area: num;
    font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.75rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.05em;
    font-variant-numeric: tabular-nums;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--brand);
    transition: color 0.45s var(--ease), -webkit-text-stroke-color 0.45s var(--ease);
}

.range__name {
    grid-area: name;
    font-size: clamp(1.375rem, 1.05rem + 1.7vw, 2.75rem);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.04em;
    text-wrap: pretty;
}

/* Compteur en pastille */
.range__meta {
    grid-area: meta;
    justify-self: start;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: var(--paper-2);
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    transition: background-color 0.45s var(--ease), color 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.range__meta--request {
    background: transparent;
    box-shadow: inset 0 0 0 1.5px var(--ink);
}

.range__go {
    grid-area: go;
    display: grid;
    place-items: center;
    width: clamp(2.75rem, 2.4rem + 1.2vw, 3.5rem);
    aspect-ratio: 1;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1.5px currentColor;
    transition: background-color 0.45s var(--ease), color 0.45s var(--ease), box-shadow 0.45s var(--ease), transform 0.5s var(--ease);
}

.range__go .icon {
    stroke-width: 2;
}

.range__link:hover,
.range__link:focus-visible {
    padding-inline: clamp(1rem, 0.6rem + 1.6vw, 2rem) clamp(0.6rem, 0.4rem + 0.8vw, 1.1rem);
    background: var(--brand);
    color: var(--white);
}

.range__link:hover .range__num,
.range__link:focus-visible .range__num {
    color: var(--yellow);
    -webkit-text-stroke-color: var(--yellow);
}

.range__link:hover .range__meta,
.range__link:focus-visible .range__meta {
    background: var(--white);
    color: var(--ink);
    box-shadow: none;
}

.range__link:hover .range__go,
.range__link:focus-visible .range__go {
    background: var(--yellow);
    color: var(--ink);
    box-shadow: none;
    transform: rotate(45deg);
}

.range__link:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 3px;
}

/* Sous-familles : repliées sur petit écran (department.js), en pastilles */
.range__subs {
    padding-bottom: 0.9rem;
}

.range__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 2.75rem;
    padding: 0 0.5rem 0 1.1rem;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1.5px var(--ink);
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    transition: background-color var(--fast), color var(--fast);
}

.range__toggle::-webkit-details-marker {
    display: none;
}

.range__toggle .icon {
    box-sizing: border-box;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0.3rem;
    border-radius: 50%;
    background: var(--ink);
    color: var(--white);
    stroke-width: 2;
    transition: transform var(--base) var(--ease), background-color var(--fast), color var(--fast);
}

.range__subs[open] .range__toggle .icon {
    transform: rotate(180deg);
}

.range__toggle:hover {
    background: var(--ink);
    color: var(--white);
}

.range__toggle:hover .icon {
    background: var(--yellow);
    color: var(--ink);
}

.range__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.75rem;
}

.range__list li {
    max-width: 100%;
}

.range__sub {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 2.5rem;
    padding: 0.35rem 0.4rem 0.35rem 1rem;
    border-radius: 1.25rem;
    box-shadow: inset 0 0 0 1.5px var(--line);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    color: var(--ink);
    transition: background-color var(--fast), color var(--fast), box-shadow var(--fast);
}

.range__n {
    flex: none;
    display: grid;
    place-items: center;
    min-width: 1.75rem;
    height: 1.75rem;
    padding: 0 0.5rem;
    border-radius: 999px;
    background: var(--paper-2);
    font-size: 0.8125rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    transition: background-color var(--fast), color var(--fast);
}

a.range__sub:hover,
a.range__sub:focus-visible {
    background: var(--ink);
    box-shadow: inset 0 0 0 1.5px var(--ink);
    color: var(--white);
}

a.range__sub:hover .range__n,
a.range__sub:focus-visible .range__n {
    background: var(--yellow);
    color: var(--ink);
}

/* Sous-famille sans fiche en ligne : simple libellé, non cliquable */
.range__sub--request {
    padding-right: 1rem;
    background: var(--paper-2);
    box-shadow: none;
    color: var(--ink-soft);
}

.range__sub--request .range__n {
    min-width: 0;
    padding: 0;
    background: transparent;
    font-weight: 700;
    color: var(--blue-deep);
}

@media (pointer: coarse) {
    .range__sub {
        min-height: 2.75rem;
    }
}

@media (min-width: 900px) {
    .range__link {
        grid-template-columns: var(--range-num) minmax(0, 1fr) auto auto;
        grid-template-areas: "num name meta go";
        gap: 1.5rem;
        padding: 1.1rem 0;
    }

    /* Sur grand écran l'index reste entièrement déplié, aligné sous le nom de la famille. */
    .range__subs {
        padding: 0 0 1.1rem calc(var(--range-num) + 1.5rem);
    }

    .range__toggle {
        display: none;
    }

    .range__list {
        padding-top: 0.15rem;
    }
}

/* 4. Aperçu du catalogue --------------------------------------------------- */
.dept-catalogue__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 2rem;
    margin-top: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

.dept-catalogue__count {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    font-weight: 700;
    color: var(--ink-soft);
}

.dept-catalogue__count strong {
    font-size: clamp(3rem, 2.2rem + 3vw, 5rem);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.055em;
    font-variant-numeric: tabular-nums;
    color: transparent;
    -webkit-text-stroke: 2px var(--brand);
}

/* 5. Catalogue sur demande : tuile bleu nuit ------------------------------- */
.dept-request__tile {
    /* sur le bleu nuit, le mot d'accent passe au jaune */
    --blue: var(--yellow);
    display: grid;
    gap: 1.75rem 4rem;
    padding: clamp(1.75rem, 1rem + 4vw, 4.5rem);
    border-radius: var(--tile-radius);
    background: var(--ink);
    color: var(--white);
}

.dept-request__title {
    font-size: clamp(1.9rem, 1.1rem + 3.3vw, 4.25rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.045em;
    text-wrap: pretty;
}

.dept-request__side {
    display: grid;
    gap: 1.5rem;
    justify-items: start;
    align-content: end;
    max-width: 30em;
    color: rgba(255, 255, 255, 0.9);
}

.dept-request__tile .btn:focus-visible {
    outline-color: var(--white);
}

.dept-request__ref {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(255, 255, 255, 0.22);
}

.dept-request__ref li {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.3;
}

@media (min-width: 900px) {
    .dept-request__tile {
        grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    }

    .dept-request__tile .eyebrow,
    .dept-request__ref {
        grid-column: 1 / -1;
    }
}

/* 6. Applications : tuiles illustrées -------------------------------------- */
/* Petit écran : rangée à faire défiler du doigt, la tuile suivante dépasse du bord. */
.dept-apps__strip {
    display: flex;
    gap: 0.75rem;
    margin: -0.5rem calc(var(--gutter) * -1);
    padding: 0.5rem var(--gutter);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
}

.dept-apps__strip::-webkit-scrollbar {
    display: none;
}

.dept-apps__cell {
    flex: 0 0 min(72vw, 17rem);
    scroll-snap-align: start;
}

.dept-apps__tile {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: clamp(15rem, 11rem + 12vw, 21rem);
    padding: clamp(1.1rem, 0.9rem + 1vw, 1.75rem);
    overflow: hidden;
    border-radius: var(--tile-radius);
    background: var(--ink);
    color: var(--white);
    text-decoration: none;
    isolation: isolate;
}

.dept-apps__img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ease);
}

/* Voile bleu nuit pour la lisibilité ; il s'épaissit au survol */
.dept-apps__tile::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to top, rgba(6, 24, 42, 0.94) 0%, rgba(6, 24, 42, 0.5) 45%, rgba(6, 24, 42, 0.12) 80%);
}

.dept-apps__tile::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--ink);
    opacity: 0;
    transition: opacity 0.6s var(--ease);
}

.dept-apps__num {
    position: absolute;
    top: clamp(0.6rem, 1.4vw, 1.1rem);
    left: clamp(1.1rem, 0.9rem + 1vw, 1.75rem);
    font-size: clamp(3.25rem, 2.2rem + 3.6vw, 5.75rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.06em;
    color: transparent;
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.85);
    transition: color 0.5s var(--ease), -webkit-text-stroke-color 0.5s var(--ease);
}

.dept-apps__go {
    position: absolute;
    top: clamp(1.1rem, 0.9rem + 1vw, 1.75rem);
    right: clamp(1.1rem, 0.9rem + 1vw, 1.75rem);
    display: grid;
    place-items: center;
    width: clamp(2.75rem, 2.4rem + 1vw, 3.5rem);
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--white);
    color: var(--ink);
    transition: background-color 0.45s var(--ease), transform 0.6s var(--ease);
}

.dept-apps__go .icon {
    stroke-width: 2;
}

.dept-apps__name {
    font-size: clamp(1.25rem, 1rem + 1.1vw, 2rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.dept-apps__tile:hover .dept-apps__img,
.dept-apps__tile:focus-visible .dept-apps__img {
    transform: scale(1.07);
}

.dept-apps__tile:hover::before,
.dept-apps__tile:focus-visible::before {
    opacity: 0.55;
}

.dept-apps__tile:hover .dept-apps__num,
.dept-apps__tile:focus-visible .dept-apps__num {
    color: var(--yellow);
    -webkit-text-stroke-color: var(--yellow);
}

.dept-apps__tile:hover .dept-apps__go,
.dept-apps__tile:focus-visible .dept-apps__go {
    background: var(--yellow);
    transform: rotate(45deg) scale(1.08);
}

.dept-apps__tile:focus-visible {
    outline: 3px solid var(--white);
    outline-offset: 4px;
}

/* Grand écran : mosaïque de deux puis trois tuiles */
@media (min-width: 760px) {
    .dept-apps__strip {
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: clamp(0.75rem, 0.5rem + 1vw, 1.25rem);
        margin: 0;
        padding: 0;
        overflow: visible;
    }

    .dept-apps__cell {
        grid-column: span 2;
    }

    .dept-apps__cell:nth-child(-n+2) {
        grid-column: span 3;
    }
}

/* 7. Constructeurs : tuiles blanches --------------------------------------- */
.dept-partners__list {
    display: grid;
    gap: clamp(0.75rem, 0.5rem + 1vw, 1.25rem);
}

/* Petit écran : logo à gauche, texte à droite */
.partner {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    grid-template-areas:
        "logo main"
        "logo meta";
    gap: 0.6rem 1rem;
    align-items: center;
    height: 100%;
    padding: 1.1rem;
    border: 1.5px solid var(--line);
    border-radius: var(--tile-radius);
    background: var(--white);
    transition: border-color 0.4s var(--ease), transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.partner__logo {
    grid-area: logo;
    display: grid;
    place-items: center;
    aspect-ratio: 3 / 2;
    overflow: hidden;
}

.partner__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(1);
    opacity: 0.75;
    transition: filter 0.4s var(--ease), opacity 0.4s var(--ease);
}

.partner__logo .no-image {
    border-radius: 0.75rem;
}

.partner__main {
    grid-area: main;
    align-self: end;
    min-width: 0;
}

.partner__name {
    font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.partner__divisions {
    margin-top: 0.35rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--muted);
}

.partner__meta {
    grid-area: meta;
    align-self: start;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.75rem;
}

.partner__country {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.partner:hover .partner__logo img {
    filter: none;
    opacity: 1;
}

@media (hover: hover) {
    .partner:hover {
        border-color: var(--brand);
        transform: translateY(-6px);
        box-shadow: 0 22px 34px -24px rgba(15, 117, 188, 0.7);
    }
}

/* À partir de la tablette : logo en tête de tuile */
@media (min-width: 560px) {
    .dept-partners__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .partner {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto 1fr auto;
        grid-template-areas:
            "logo"
            "main"
            "meta";
        gap: 1rem;
        align-items: start;
        padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
    }

    .partner__logo {
        justify-self: start;
        aspect-ratio: auto;
        width: min(100%, 13rem);
        height: clamp(5.5rem, 4.5rem + 3vw, 7.5rem);
    }

    .partner__logo img {
        object-position: left center;
    }

    .partner__main {
        align-self: start;
    }
}

/* Grand écran : le nombre de colonnes (--cols) évite une tuile orpheline */
@media (min-width: 1000px) {
    .dept-partners__list {
        grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
        max-width: calc(var(--cols, 3) * 27rem);
    }
}

/* 8. Autres départements : deux grandes tuiles ------------------------------ */
.dept-nav__title {
    margin-bottom: clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
}

.dept-nav__grid {
    display: grid;
    gap: clamp(0.75rem, 0.5rem + 1vw, 1.25rem);
}

@media (min-width: 800px) {
    .dept-nav__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.dept-nav__tile {
    --pad: clamp(1.25rem, 1rem + 1.4vw, 2.25rem);
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: clamp(20rem, 14rem + 20vw, 31rem);
    padding: var(--pad);
    /* réserve la place du grand numéro : le texte ne le recouvre jamais */
    padding-top: clamp(6.25rem, 3.75rem + 8.5vw, 12rem);
    overflow: hidden;
    border-radius: var(--tile-radius);
    background: var(--ink);
    color: var(--white);
    text-decoration: none;
    isolation: isolate;
}

.dept-nav__img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 28%;
    transition: transform 1.2s var(--ease);
}

/* Voile bleu nuit pour la lisibilité ; il vire au bleu SINAL au survol */
.dept-nav__tile::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to top, rgba(6, 24, 42, 0.94) 0%, rgba(6, 24, 42, 0.62) 42%, rgba(6, 24, 42, 0.08) 78%);
}

.dept-nav__tile::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--brand);
    opacity: 0;
    transition: opacity 0.6s var(--ease);
}

.dept-nav__index {
    position: absolute;
    top: clamp(0.5rem, 1.5vw, 1.25rem);
    left: var(--pad);
    font-size: clamp(4.5rem, 2.5rem + 7vw, 9.5rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.06em;
    color: transparent;
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.85);
    transition: color 0.5s var(--ease), -webkit-text-stroke-color 0.5s var(--ease);
}

.dept-nav__go {
    position: absolute;
    top: var(--pad);
    right: var(--pad);
    display: grid;
    place-items: center;
    width: clamp(3rem, 2.5rem + 1.6vw, 4.25rem);
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--white);
    color: var(--ink);
    transition: background-color 0.45s var(--ease), transform 0.6s var(--ease);
}

.dept-nav__go .icon {
    stroke-width: 2;
}

/* Tuile « précédent » : la flèche passe à gauche, le numéro à droite */
.dept-nav__tile--prev .dept-nav__index {
    left: auto;
    right: var(--pad);
}

.dept-nav__tile--prev .dept-nav__go {
    right: auto;
    left: var(--pad);
}

.dept-nav__body {
    display: grid;
    gap: 0.75rem;
    max-width: 34rem;
}

.dept-nav__dir {
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--yellow);
}

.dept-nav__name {
    font-size: clamp(1.75rem, 1.2rem + 2.3vw, 3.25rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
}

.dept-nav__summary {
    font-size: 1.0625rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

.dept-nav__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.dept-nav__meta span {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 0.875rem;
    font-weight: 700;
    transition: background-color 0.45s var(--ease), color 0.45s var(--ease);
}

.dept-nav__tile:hover .dept-nav__img,
.dept-nav__tile:focus-visible .dept-nav__img {
    transform: scale(1.07);
}

.dept-nav__tile:hover::before,
.dept-nav__tile:focus-visible::before {
    opacity: 0.82;
}

.dept-nav__tile:hover .dept-nav__index,
.dept-nav__tile:focus-visible .dept-nav__index {
    color: var(--yellow);
    -webkit-text-stroke-color: var(--yellow);
}

.dept-nav__tile:hover .dept-nav__go,
.dept-nav__tile:focus-visible .dept-nav__go {
    background: var(--yellow);
    transform: translateX(0.4rem) scale(1.08);
}

.dept-nav__tile--prev:hover .dept-nav__go,
.dept-nav__tile--prev:focus-visible .dept-nav__go {
    transform: translateX(-0.4rem) scale(1.08);
}

.dept-nav__tile:hover .dept-nav__meta span,
.dept-nav__tile:focus-visible .dept-nav__meta span {
    background: var(--white);
    color: var(--ink);
}

.dept-nav__tile:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 4px;
}

/* 9. Mouvement réduit : rien ne défile -------------------------------------- */
@media (prefers-reduced-motion: reduce) {

    .dept-apps__strip {
        scroll-snap-type: none;
    }
}
