/* =====================================================================
 * Cas clients : page dédiée, liste et bloc de l'accueil.
 * Mobile first strict (base = 375-390 px, puis @media min-width), BEM,
 * aucun !important. Consomme les jetons --af-* (tokens.css) et réutilise
 * les composants de app.css : .container, .marker, .rich-text,
 * .page-head, .breadcrumb, .pagination, contextes .context-inverse,
 * -alt et -warm.
 *
 * Direction (agence) : moderne, élégant, « pas trop punchy ». Les visuels
 * sont des montages de l'agence (ordinateur et téléphone, souvent sur fond
 * transparent) : jamais recadrés, ni encadrés, ni inclinés. L'élégance vient
 * de la typographie, des espaces et des proportions ; le jaune reste rare,
 * les mouvements sont courts et discrets (transform, opacity seulement).
 * ===================================================================== */

/* ---------- Flèche fine des liens et boutons ---------- */
.case-arrow {
    flex: none;
    width: 1.125em;
    height: 1.125em;
    transition: translate var(--af-duration-base) var(--af-ease-standard);
}

/* ---------- Lien d'action sobre : souligné fin, flèche qui glisse ---------- */
.case-link {
    display: inline-flex;
    align-items: center;
    gap: var(--af-space-2);
    min-height: var(--af-target-min);
    color: var(--af-color-text-strong);
    font-family: var(--af-font-ui);
    font-weight: var(--af-weight-ui);
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--af-color-border-control);
    text-underline-offset: 0.35em;
    transition: text-decoration-color var(--af-duration-base) var(--af-ease-standard);
}

.case-link:hover {
    color: var(--af-color-text-strong);
    text-decoration-thickness: 1px;
    text-decoration-color: currentColor;
}

.case-link:hover .case-arrow--right,
.case-link:hover .case-arrow--out {
    translate: 0.2rem 0;
}

.case-link:hover .case-arrow--left {
    translate: -0.2rem 0;
}

.case-link--inverse,
.case-link--inverse:hover {
    color: var(--af-color-text-on-inverse);
}

.case-link--inverse {
    text-decoration-color: var(--af-color-text-on-inverse-muted);
}

/* ---------- Bouton sobre : aplat nuit, contour au survol ---------- */
.case-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--af-space-3);
    min-height: var(--af-control-height);
    padding: var(--af-space-2) var(--af-space-6);
    border: var(--af-border-hairline) solid var(--af-color-border-strong);
    border-radius: var(--af-radius-sm);
    background-color: var(--af-color-bg-inverse);
    color: var(--af-color-text-on-inverse);
    font-family: var(--af-font-ui);
    font-weight: var(--af-weight-ui);
    line-height: var(--af-leading-snug);
    text-decoration: none;
    transition: background-color var(--af-duration-slow) var(--af-ease-standard), color var(--af-duration-slow) var(--af-ease-standard);
}

.case-button:hover {
    background-color: var(--af-color-bg);
    color: var(--af-color-text-strong);
    text-decoration: none;
}

.case-button:hover .case-arrow {
    translate: 0.2rem 0;
}

/* ---------- Technologies : texte séparé par des barres obliques ---------- */
.case-tech {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--af-color-text-strong);
    font-family: var(--af-font-ui);
    font-weight: var(--af-weight-ui);
}

/* la barre suit chaque technologie sauf la dernière : à la coupure de ligne, elle reste en fin de ligne */
.case-tech__item:not(:last-child)::after {
    content: "/";
    padding-inline: 0.45em;
    color: var(--af-color-text-muted);
    font-weight: var(--af-weight-regular);
}

.case-tech--inverse {
    color: var(--af-color-text-on-inverse);
}

.case-tech--inverse .case-tech__item:not(:last-child)::after {
    color: var(--af-color-text-on-inverse-muted);
}

/* ---------- Logo du client : plaque blanche (ou nuit pour un logo clair) ---------- */
.case-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--af-space-3) var(--af-space-4);
    border: var(--af-border-hairline) solid var(--af-color-border);
    border-radius: var(--af-radius-sm);
    background-color: var(--af-white);
}

/* hauteur fixe (place réservée avant le chargement : pas de décalage), largeur déduite de
   width/height, bornée ; object-fit garde les proportions d'un logo très large */
.case-logo img {
    display: block;
    width: auto;
    max-width: 8rem;
    height: 2rem;
    object-fit: contain;
    object-position: left center;
}

.case-logo--lg img {
    max-width: 11rem;
    height: 3.25rem;
}

.case-logo--dark {
    border-color: var(--af-color-border-on-inverse);
    background-color: var(--af-color-bg-inverse);
}

/* sur fond nuit, un logo clair se pose directement */
.context-inverse .case-logo--dark {
    padding-inline: 0;
    border-color: transparent;
    background-color: transparent;
}

/* pas de logo : le nom, en titre de la charte */
.case-logo--name {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font-family: var(--af-font-display);
    font-size: var(--af-text-xl);
    font-style: italic;
    font-weight: var(--af-weight-display);
    line-height: var(--af-leading-snug);
    letter-spacing: var(--af-tracking-tight);
}

/* ---------- Aplat d'exposition des visuels (liste, accueil, cas suivant) ----------
 * Le montage est contenu dans l'aplat, à son format, sans recadrage : un
 * fond transparent laisse voir l'aplat, une capture pleine y est posée.
 */
.case-stage {
    display: grid;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    place-items: center;
    aspect-ratio: 4 / 3;
    margin: 0;
    padding: var(--af-space-5);
    overflow: hidden;
    border-radius: var(--af-radius-md);
    background-color: var(--af-color-bg-alt);
}

.case-stage img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: translate var(--af-duration-slow) var(--af-ease-standard);
}

.case-stage--tint {
    background-color: var(--af-color-bg-tint);
}

/* sans visuel : aplat bleu pâle (texte nuit) ou nuit pour un logo clair */
.case-stage--plate {
    background-color: var(--af-color-bg-tint);
    color: var(--af-color-text-strong);
}

.case-stage--dark {
    background-color: var(--af-color-bg-inverse);
    color: var(--af-color-text-on-inverse);
}

.case-stage--plate .case-logo--name {
    font-size: var(--af-text-3xl);
    text-align: center;
}

/* =====================================================================
 * Page dédiée
 * ===================================================================== */

/* ---------- En-tête nuit : client, titre, chapô, fiche ---------- */
.case-hero {
    padding-block: var(--af-space-4) var(--af-space-12);
}

.case-hero :where(.breadcrumb__link) {
    color: var(--af-color-link-on-inverse);
}

.case-hero .breadcrumb__current,
.case-hero .breadcrumb__item + .breadcrumb__item::before {
    color: var(--af-color-text-on-inverse-muted);
}

.case-hero--with-cover {
    padding-bottom: var(--af-space-10);
}

.case-hero__grid {
    display: grid;
    gap: var(--af-space-10);
}

.case-hero__client {
    margin-bottom: var(--af-space-8);
}

.case-hero__title {
    max-width: 20ch;
    color: var(--af-color-text-on-inverse);
    font-size: clamp(2.125rem, 1.25rem + 3.9vw, 3.875rem);
    line-height: 1.04;
    letter-spacing: -0.03em;
}

.case-hero__lead {
    max-width: 36em;
    margin-top: var(--af-space-6);
    color: var(--af-color-text-on-inverse-muted);
    font-size: var(--af-text-lg);
}

/* Fiche : deux colonnes souples sur téléphone, une colonne à droite sur grand écran */
/* grille fixe (deux colonnes) : l'arrivée de la police ne change pas le rangement des faits (pas de décalage) */
.case-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--af-space-6);
    margin: 0;
    border-top: var(--af-border-hairline) solid var(--af-color-border-on-inverse);
}

.case-facts__row {
    min-width: 0;
    padding-block: var(--af-space-4);
    border-bottom: var(--af-border-hairline) solid var(--af-color-border-on-inverse);
}

.case-facts__row--wide {
    grid-column: 1 / -1;
}

.case-facts__term {
    color: var(--af-color-text-on-inverse-muted);
    font-size: var(--af-text-sm);
}

.case-facts__value {
    margin-top: var(--af-space-1);
    color: var(--af-color-text-on-inverse);
    font-family: var(--af-font-ui);
    font-weight: var(--af-weight-ui);
}

.case-facts__value .case-link {
    margin-block: calc(var(--af-space-3) * -1);
}

/* ---------- Visuel principal : montage large qui chevauche la fin du bandeau ---------- */
.case-cover {
    position: relative;
}

/* le haut du montage reste sur le nuit de l'en-tête */
.case-cover::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 45%;
    background-color: var(--af-color-bg-inverse);
}

/* sur téléphone, le montage large gagne presque toute la largeur de l'écran */
.case-cover .container {
    position: relative;
    padding-inline: var(--af-space-2);
}

.case-cover__figure {
    margin: 0;
}

/* à son format, transparence comprise : ni cadre, ni recadrage, ni animation */
.case-cover__figure img {
    display: block;
    width: 100%;
    height: auto;
}

/* visuel vertical (rare) : centré, à hauteur raisonnable */
.case-cover--portrait .case-cover__figure img {
    width: auto;
    max-width: 100%;
    max-height: 40rem;
    margin-inline: auto;
}

/* ---------- Le récit : chapitres à grand titre ---------- */
.case-chapter {
    padding-block: var(--af-space-section);
}

.case-cover + .case-chapter {
    padding-top: var(--af-space-16);
}

.case-chapter__grid {
    display: grid;
    gap: var(--af-space-6);
}

/* repère de la charte : un trait bleu électrique au-dessus du titre */
.case-chapter__title {
    font-family: var(--af-font-display);
    font-size: clamp(2.25rem, 1.5rem + 3.3vw, 3.375rem);
    font-style: italic;
    font-weight: var(--af-weight-display);
    line-height: 1;
    letter-spacing: -0.035em;
}

.case-chapter__title::before {
    content: "";
    display: block;
    width: 2.5rem;
    height: 3px;
    margin-bottom: var(--af-space-5);
    background-color: var(--af-color-bg-accent);
}

/* première phrase du chapitre en chapô ; un chapitre qui commence par un intertitre garde la taille de ses intertitres */
.case-chapter__body > p:first-child {
    color: var(--af-color-text-strong);
    font-size: var(--af-text-lg);
}

.case-chapter--results .case-chapter__body > p:first-child {
    color: var(--af-color-text-on-inverse);
}

/* contenu riche sur fond nuit : puces, citations et code lisibles */
.case-chapter--results .rich-text li::marker {
    color: var(--af-color-accent-on-inverse);
}

.case-chapter--results .rich-text blockquote {
    border-left-color: var(--af-color-accent-on-inverse);
    color: var(--af-color-text-on-inverse);
}

.case-chapter--results .rich-text code {
    background-color: var(--af-navy-900);
}

.case-chapter--results .rich-text :where(strong, b) {
    color: var(--af-color-text-on-inverse);
}

/* ---------- Captures : larges pour l'ordinateur, en colonnes pour le téléphone ---------- */
.case-gallery {
    display: grid;
    gap: var(--af-space-12);
    margin-top: var(--af-space-12);
}

.case-shot {
    margin: 0;
}

.case-shot img {
    display: block;
    width: 100%;
    height: auto;
}

.case-shot__caption {
    max-width: 42ch;
    margin-top: var(--af-space-3);
    color: var(--af-color-text-muted);
    font-size: var(--af-text-sm);
}

.case-chapter--results .case-shot__caption {
    color: var(--af-color-text-on-inverse-muted);
}

/* captures de téléphone : deux par ligne, une seule centrée */
.case-phones {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--af-space-8) var(--af-space-4);
    align-items: start;
}

.case-phones--1 {
    grid-template-columns: minmax(0, 15rem);
    justify-content: center;
}

/* nombre impair : la dernière se centre sous les autres */
.case-phones--3 .case-shot--phone:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - var(--af-space-2));
}

/* ---------- Témoignage : grande citation typographique ---------- */
.case-quote {
    padding-block: var(--af-space-section);
}

.case-quote__heading {
    color: var(--af-color-text-strong);
    font-family: var(--af-font-ui);
    font-size: var(--af-text-base);
    font-style: normal;
    font-weight: var(--af-weight-ui);
    letter-spacing: 0;
}

.case-quote__figure {
    margin-top: var(--af-space-6);
}

.case-quote__text {
    max-width: 24em;
    color: var(--af-color-text-strong);
    font-family: var(--af-font-display);
    font-size: clamp(1.625rem, 1rem + 2.8vw, 3rem);
    font-style: italic;
    font-weight: var(--af-weight-display);
    line-height: 1.12;
    letter-spacing: -0.025em;
    text-wrap: pretty;
}

/* citation longue : même voix, corps plus sage */
.case-quote--long .case-quote__text {
    max-width: 32em;
    font-size: clamp(1.3125rem, 1rem + 1.4vw, 1.875rem);
    line-height: 1.22;
}

.case-quote__source {
    display: flex;
    flex-direction: column;
    gap: var(--af-space-1);
    margin-top: var(--af-space-8);
    padding-left: var(--af-space-5);
    border-left: 3px solid var(--af-color-bg-accent);
}

.case-quote__author {
    color: var(--af-color-text-strong);
    font-family: var(--af-font-ui);
    font-weight: var(--af-weight-ui);
}

.case-quote__company {
    color: var(--af-color-text-muted);
    font-size: var(--af-text-sm);
}

/* ---------- La suite : cas suivant, liste, contact ---------- */
.case-next {
    padding-block: var(--af-space-section) var(--af-space-12);
}

.case-next__link {
    display: grid;
    gap: var(--af-space-3);
    padding-block: var(--af-space-8);
    border-top: var(--af-border-hairline) solid var(--af-color-border-strong);
    border-bottom: var(--af-border-hairline) solid var(--af-color-border);
    color: var(--af-color-text);
    text-decoration: none;
}

.case-next__link:hover {
    color: var(--af-color-text);
}

.case-next__label {
    display: inline-flex;
    align-items: center;
    gap: var(--af-space-2);
    color: var(--af-color-text-muted);
    font-family: var(--af-font-ui);
    font-weight: var(--af-weight-ui);
}

.case-next__title {
    max-width: 24ch;
    color: var(--af-color-text-strong);
    font-family: var(--af-font-display);
    font-size: clamp(1.875rem, 1.25rem + 2.8vw, 3.25rem);
    font-style: italic;
    font-weight: var(--af-weight-display);
    line-height: 1.04;
    letter-spacing: -0.03em;
    text-wrap: balance;
    text-decoration-line: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.14em;
    transition: text-decoration-color var(--af-duration-slow) var(--af-ease-standard);
}

.case-next__link:hover .case-next__title {
    text-decoration-color: currentColor;
}

.case-next__link:hover .case-arrow {
    translate: 0.2rem 0;
}

.case-next__client {
    color: var(--af-color-text-muted);
}

.case-next__media {
    margin-top: var(--af-space-5);
    aspect-ratio: 16 / 10;
}

.case-next__link:hover .case-stage img {
    translate: 0 -0.25rem;
}

.case-next__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--af-space-2) var(--af-space-8);
    margin-top: var(--af-space-6);
}

.case-next__contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: var(--af-space-3);
    color: var(--af-color-text);
}

/* =====================================================================
 * Liste /cas-clients : lignes alternées, pas de grille de cartes
 * ===================================================================== */
.case-index-head .page-head__title {
    isolation: isolate;
}

.case-index {
    padding-block: var(--af-space-16) var(--af-space-section);
}

.case-index__list {
    display: grid;
    gap: var(--af-space-20);
    margin: 0;
    padding: 0;
    list-style: none;
}

.case-index__empty-text {
    color: var(--af-color-text-strong);
    font-family: var(--af-font-display);
    font-size: var(--af-text-3xl);
    font-style: italic;
    font-weight: var(--af-weight-display);
    line-height: var(--af-leading-tight);
}

.case-row {
    position: relative;
    display: grid;
    gap: var(--af-space-6);
}

/* une ligne sur deux, l'aplat passe au bleu pâle */
.case-index__item:nth-child(even) .case-row__media:not(.case-stage--plate) {
    background-color: var(--af-color-bg-tint);
}

.case-row__meta {
    color: var(--af-color-text-muted);
    font-size: var(--af-text-sm);
}

.case-row__client {
    color: var(--af-color-text-strong);
    font-family: var(--af-font-ui);
    font-weight: var(--af-weight-ui);
}

.case-row__title {
    max-width: 22ch;
    margin-top: var(--af-space-3);
    font-family: var(--af-font-display);
    font-size: var(--af-text-3xl);
    font-style: italic;
    font-weight: var(--af-weight-display);
    line-height: 1.06;
    letter-spacing: -0.03em;
}

.case-row--lead .case-row__title {
    font-size: var(--af-text-4xl);
}

.case-row__link {
    color: var(--af-color-text-strong);
    text-decoration-line: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.14em;
    transition: text-decoration-color var(--af-duration-slow) var(--af-ease-standard);
}

/* toute la ligne est cliquable ; le lien du titre reste le seul arrêt clavier */
.case-row__link::after {
    content: "";
    position: absolute;
    inset: 0;
}

.case-row:hover .case-row__link {
    color: var(--af-color-text-strong);
    text-decoration-color: currentColor;
}

.case-row:hover .case-stage img {
    translate: 0 -0.25rem;
}

.case-row__excerpt {
    max-width: 36em;
    margin-top: var(--af-space-4);
}

.case-row__body .case-tech {
    margin-top: var(--af-space-4);
}

.case-row__more {
    display: inline-flex;
    align-items: center;
    gap: var(--af-space-2);
    margin-top: var(--af-space-5);
    color: var(--af-color-text-strong);
    font-family: var(--af-font-ui);
    font-weight: var(--af-weight-ui);
}

.case-row:hover .case-arrow {
    translate: 0.2rem 0;
}

/* =====================================================================
 * Bloc de l'accueil : le dernier cas client (case_study/_latest.html.twig)
 * Le visuel en grand, à cheval sur un aplat bleu pâle qui file jusqu'au
 * bord droit de l'écran ; le témoignage entre les accolades du logo.
 * ===================================================================== */
.case-latest {
    padding-block: var(--af-space-section);
    /* l'aplat du visuel dépasse jusqu'au bord de l'écran : rogné ici, sans barre de défilement */
    overflow-x: clip;
}

.case-latest__grid {
    display: grid;
    gap: var(--af-space-10);
}

/* téléphone : le visuel d'abord, le récit ensuite */
.case-latest__media {
    position: relative;
    z-index: 0;
    order: -1;
    margin: 0;
}

/* l'aplat part du premier tiers du visuel, descend sous lui et file à droite : le montage le déborde en haut et à gauche */
.case-latest__media::before {
    content: "";
    position: absolute;
    inset: 22% -100vw -12% 30%;
    z-index: -1;
    border-radius: var(--af-radius-md) 0 0 var(--af-radius-md);
    background-color: var(--af-color-bg-tint);
}

.case-latest__media img {
    display: block;
    width: 100%;
    height: auto;
}

/* sans visuel : le logo du client sur l'aplat */
.case-latest__media--plate {
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 10;
}

.case-latest__media--plate::before {
    inset: 0 -100vw 0 0;
}

.case-latest__media--dark::before {
    background-color: var(--af-color-bg-inverse);
}

.case-latest__kicker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--af-space-3) var(--af-space-4);
}

/* « Cas client » poussé au bout de la ligne du logo, derrière un filet bleu court */
.case-latest__tag {
    display: inline-flex;
    align-items: center;
    gap: var(--af-space-3);
    margin-left: auto;
    color: var(--af-color-link);
    font-family: var(--af-font-ui);
    font-size: var(--af-text-sm);
    font-weight: var(--af-weight-ui);
}

.case-latest__tag::before {
    content: "";
    width: 1.5rem;
    height: 2px;
    background-color: var(--af-blue-500);
}

.case-latest--inverse .case-latest__tag {
    color: var(--af-color-link-on-inverse);
}

/* accueil : le logo du client posé tel quel, sans cadre (une plaque sombre reste pour un logo clair) */
.case-latest__kicker .case-logo:not(.case-logo--dark) {
    padding: 0;
    border: 0;
    background-color: transparent;
}

/* même présence pour un logo compact (NC Beauty Pro, presque carré) que pour un logo en longueur
   (Klassfan) : la hauteur permise est plus grande, la largeur reste bornée */
.case-latest__kicker .case-logo img {
    max-width: 8rem;
    height: 3.75rem;
}

/* sans logo : le nom du client */
.case-latest__label {
    color: var(--af-color-text-muted);
    font-family: var(--af-font-ui);
    font-weight: var(--af-weight-ui);
}

.case-latest__title {
    max-width: 20ch;
    margin-top: var(--af-space-5);
    font-family: var(--af-font-display);
    font-size: var(--af-text-3xl);
    font-style: italic;
    font-weight: var(--af-weight-display);
    line-height: 1.06;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.case-latest__lead {
    max-width: 34em;
    margin-top: var(--af-space-5);
    font-size: var(--af-text-lg);
}

.case-latest__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--af-space-4) var(--af-space-8);
    margin-top: var(--af-space-8);
}

/* témoignage : le texte entre deux accolades bleues étirées à sa hauteur, la source dessous */
.case-latest__quote {
    display: grid;
    grid-template-columns: 1rem minmax(0, 1fr) 1rem;
    column-gap: var(--af-space-4);
    margin: var(--af-space-6) 0 0;
}

.case-latest__brace {
    grid-row: 1;
    width: 100%;
    height: 100%;
    color: var(--af-color-bg-accent);
    stroke-width: 4px;
}

.case-latest__brace--close {
    grid-column: 3;
    scale: -1 1;
}

.case-latest__quote-text {
    grid-column: 2;
    grid-row: 1;
    padding-block: var(--af-space-2);
    color: var(--af-color-text-strong);
    font-size: clamp(1.1875rem, 1rem + 0.9vw, 1.5rem);
    line-height: 1.45;
    text-wrap: pretty;
}

.case-latest__quote-source {
    display: grid;
    grid-column: 2;
    gap: var(--af-space-1);
    margin-top: var(--af-space-5);
    color: var(--af-color-text-strong);
    font-family: var(--af-font-ui);
    font-weight: var(--af-weight-ui);
}

.case-latest__quote-client {
    color: var(--af-color-text-muted);
    font-family: var(--af-font-body);
    font-size: var(--af-text-sm);
    font-weight: var(--af-weight-regular);
}

/* =====================================================================
 * Tablette
 * ===================================================================== */
@media (min-width: 48em) {
    .case-quote__source {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: baseline;
        gap: var(--af-space-2) var(--af-space-3);
    }

    .case-next__link--media {
        grid-template-columns: minmax(0, 1fr) 18rem;
        column-gap: var(--af-space-10);
        align-items: center;
    }

    .case-next__link--media .case-next__media {
        grid-column: 2;
        grid-row: 1 / span 3;
        margin-top: 0;
    }

    /* téléphone : trois colonnes dès que la place le permet */
    .case-phones--3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .case-phones--3 .case-shot--phone:last-child:nth-child(odd) {
        grid-column: auto;
        width: auto;
    }

    .case-phones--2,
    .case-phones--3 {
        gap: var(--af-space-10) var(--af-space-8);
    }
}

/* =====================================================================
 * Grand écran
 * ===================================================================== */
@media (min-width: 64em) {
    /* bloc de l'accueil : le récit à gauche, le visuel en grand à droite, le témoignage centré dessous */
    .case-latest__grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        gap: var(--af-space-20) var(--af-space-gap);
        align-items: center;
    }

    .case-latest__text {
        grid-column: 1 / span 5;
        grid-row: 1;
    }

    .case-latest__media {
        grid-column: 6 / -1;
        grid-row: 1;
        order: 0;
    }

    .case-latest__title {
        font-size: clamp(2.25rem, 0.75rem + 2.4vw, 2.75rem);
    }

    .case-latest__quote {
        grid-column: 2 / span 10;
        grid-row: 2;
        justify-self: center;
        max-width: 58rem;
        margin-top: 0;
    }

    /* en-tête : texte à gauche, fiche en colonne à droite */
    .case-hero {
        padding-block: var(--af-space-6) var(--af-space-20);
    }

    .case-hero--with-cover {
        padding-bottom: var(--af-space-12);
    }

    .case-hero__grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        gap: var(--af-space-gap);
        align-items: end;
        margin-top: var(--af-space-6);
    }

    .case-hero__text {
        grid-column: 1 / span 8;
    }

    /* colonne de droite : les faits empilés */
    .case-facts {
        grid-column: 10 / span 3;
        grid-template-columns: minmax(0, 1fr);
    }

    .case-cover::before {
        height: 40%;
    }

    .case-cover .container {
        padding-inline: var(--af-space-gutter);
    }

    /* chapitres : grand titre collant à gauche, texte à droite */
    .case-chapter__grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        gap: var(--af-space-gap);
        align-items: start;
    }

    .case-chapter__title {
        position: sticky;
        top: calc(var(--af-header-height) + var(--af-space-8));
        grid-column: 1 / span 4;
    }

    .case-chapter__body {
        grid-column: 6 / span 7;
    }

    /* captures : les larges en quinconce sur la grille, les téléphones en colonnes */
    .case-gallery {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        column-gap: var(--af-space-gap);
        row-gap: var(--af-space-20);
        margin-top: var(--af-space-20);
    }

    .case-shot--wide {
        grid-column: 1 / span 10;
    }

    .case-shot--offset {
        grid-column: 3 / span 10;
    }

    /* la solution prend le miroir : le récit ne répète pas sa mise en page */
    .case-gallery--solution .case-shot--wide {
        grid-column: 3 / span 10;
    }

    .case-gallery--solution .case-shot--offset {
        grid-column: 1 / span 10;
    }

    .case-shot--offset .case-shot__caption {
        margin-left: auto;
    }

    .case-phones {
        grid-column: 2 / span 10;
        justify-content: center;
    }

    .case-phones--1 {
        grid-template-columns: minmax(0, 18rem);
    }

    .case-phones--2 {
        grid-template-columns: repeat(2, minmax(0, 18rem));
        column-gap: var(--af-space-16);
    }

    .case-phones--3 {
        grid-template-columns: repeat(3, minmax(0, 18rem));
        column-gap: var(--af-space-12);
    }

    /* une respiration : la colonne du milieu descend légèrement */
    .case-phones--3 .case-shot--phone:nth-child(3n + 2) {
        margin-top: var(--af-space-16);
    }

    /* témoignage décalé sur la grille, comme une citation en marge */
    .case-quote__figure {
        margin-left: calc(100% / 12);
    }

    .case-next__link--media {
        grid-template-columns: minmax(0, 1fr) 26rem;
        column-gap: var(--af-space-16);
    }

    /* liste : visuel 7 colonnes, texte 4, alternés */
    .case-index__list {
        gap: var(--af-space-24);
    }

    .case-row {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        gap: var(--af-space-gap);
        align-items: center;
    }

    .case-row__media {
        grid-row: 1;
        grid-column: 1 / span 7;
        padding: var(--af-space-8);
    }

    .case-row__body {
        grid-row: 1;
        grid-column: 8 / span 5;
    }

    .case-index__item:nth-child(even) .case-row__media {
        grid-column: 6 / span 7;
    }

    .case-index__item:nth-child(even) .case-row__body {
        grid-column: 1 / span 5;
    }

    /* à la une : visuel sur toute la largeur, titre et résumé côte à côte dessous */
    .case-row--lead .case-row__media {
        grid-column: 1 / -1;
        aspect-ratio: 2 / 1;
        padding: var(--af-space-12);
    }

    .case-row--lead .case-row__body {
        display: grid;
        grid-template-columns: repeat(12, minmax(0, 1fr));
        gap: var(--af-space-gap);
        grid-row: 2;
        grid-column: 1 / -1;
        margin-top: var(--af-space-4);
    }

    .case-row--lead .case-row__heading {
        grid-column: 1 / span 7;
    }

    .case-row--lead .case-row__summary {
        grid-column: 9 / span 4;
        padding-top: var(--af-space-8);
    }

    .case-row--lead .case-row__excerpt {
        margin-top: 0;
    }

    .case-latest__quote {
        grid-template-columns: 1.75rem minmax(0, 1fr) 1.75rem;
        column-gap: var(--af-space-6);
    }

    .case-latest__brace {
        stroke-width: 6px;
    }
}

/*
 * Témoignage tiré d'un avis Google : la carte des widgets Google (filet gris,
 * initiale dans un rond, nom, logo G, étoiles jaunes Google, texte). Couleurs
 * de Google pour les étoiles et le logo : on doit le reconnaître au premier
 * coup d'œil. Après les règles de placement : ce bloc les ajuste.
 */
.google-review {
    display: block;
    width: 100%;
    max-width: 48rem;
    margin-inline: auto;
    padding: var(--af-space-6);
    border: var(--af-border-hairline) solid #dadce0;
    border-radius: var(--af-radius-md);
    background-color: var(--af-color-bg);
}

.google-review__head {
    display: flex;
    align-items: center;
    gap: var(--af-space-3);
}

.google-review__avatar {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--af-radius-round);
    background-color: var(--af-navy-900);
    color: var(--af-white);
    font-family: var(--af-font-ui);
    font-size: var(--af-text-lg);
    font-weight: var(--af-weight-ui);
    line-height: 1;
}

.google-review__who {
    display: grid;
    flex: 1 1 auto;
    min-width: 0;
}

.google-review__name {
    color: var(--af-color-text-strong);
    font-family: var(--af-font-ui);
    font-weight: var(--af-weight-ui);
    line-height: var(--af-leading-snug);
}

.google-review__role {
    color: var(--af-color-text-muted);
    font-size: var(--af-text-sm);
    line-height: var(--af-leading-snug);
}

.google-review__logo {
    flex-shrink: 0;
    align-self: flex-start;
    width: 1.5rem;
    height: 1.5rem;
}

.google-review__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--af-space-1) var(--af-space-3);
    margin: var(--af-space-4) 0 0;
}

.google-review__stars {
    display: inline-flex;
    gap: 2px;
}

.google-review__star {
    width: 1.125rem;
    height: 1.125rem;
    fill: #fbbc04;
}

.google-review__star--off {
    fill: #dadce0;
}

.google-review__score {
    color: var(--af-color-text-strong);
    font-family: var(--af-font-ui);
    font-size: var(--af-text-sm);
    font-weight: var(--af-weight-ui);
}

.google-review__source {
    color: var(--af-color-text-muted);
    font-size: var(--af-text-sm);
}

.google-review__text p + p {
    margin-top: var(--af-space-3);
}

.google-review__text {
    margin: var(--af-space-3) 0 0;
    color: var(--af-color-text-strong);
    font-size: var(--af-text-base);
    line-height: var(--af-leading-normal);
    text-wrap: pretty;
}

/* texte borné qui défile (six lignes et demie : la demi-ligne invite à défiler), barre fine et grise comme dans les widgets Google */
.google-review__scroll {
    max-height: 6.5lh;
    font-size: var(--af-text-base);
    line-height: var(--af-leading-normal);
    margin-top: var(--af-space-3);
    padding-right: var(--af-space-3);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: #dadce0 transparent;
    scrollbar-width: thin;
}

.google-review__scroll::-webkit-scrollbar {
    width: 6px;
}

.google-review__scroll::-webkit-scrollbar-thumb {
    border-radius: 3px;
    background-color: #dadce0;
}

.google-review__scroll:focus-visible {
    outline-offset: 4px;
}

.google-review__scroll .google-review__text {
    margin-top: 0;
}

@media (min-width: 48em) {
    .google-review {
        padding: var(--af-space-8);
    }

    .google-review__text,
    .google-review__scroll {
        font-size: var(--af-text-lg);
    }
}

/* page du cas : la carte sous l'intitulé « Le mot du client », alignée sur lui */
.case-quote__google {
    margin: var(--af-space-6) 0 0;
}

/* =====================================================================
 * Section Symfony de l'accueil, en deux temps : le texte de l'offre sur un
 * bleu nuit à lueur discrète, puis le cas client Symfony sur fond blanc,
 * au format du bloc e-commerce, avec les notes POC et MVP. Les règles
 * --inverse servent au bloc partagé posé sur la nuit (option inverse).
 * ===================================================================== */
/* profondeur : une lueur bleue à peine sensible en haut à droite, et le bleu nuit qui fonce vers le bas, jusqu'à rejoindre la section suivante */
.offer--symfony.context-inverse {
    background-color: var(--af-navy-900);
    background-image:
        radial-gradient(70rem 40rem at 88% 0%, rgb(51 153 255 / 0.12), transparent 70%),
        linear-gradient(180deg, var(--af-navy-900) 0%, #0a0a47 70%, #08083a 100%);
}

.offer--symfony .offer__text {
    max-width: 52rem;
}

/*
 * Astérisques de POC et MVP (jaunes, comme celui d'AIDeliveryKit) ; en bas
 * à droite de la partie nuit, une pastille ouvre le panneau des définitions
 * (assets/glossary.js).
 */
.offer--symfony {
    position: relative;
    overflow: hidden;
}

.glossary-star {
    color: var(--af-yellow-400);
}

.glossary-trigger {
    display: flex;
    justify-content: flex-end;
    margin: var(--af-space-10) 0 0;
}

.glossary-pill {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: var(--af-space-3);
    min-height: var(--af-target-min);
    padding: var(--af-space-2) var(--af-space-5) var(--af-space-2) var(--af-space-2);
    border: var(--af-border-hairline) solid var(--af-color-border-on-inverse);
    border-radius: 999px;
    background-color: rgb(255 255 255 / 0.04);
    color: var(--af-color-text-on-inverse);
    font-family: var(--af-font-ui);
    font-size: var(--af-text-sm);
    font-weight: var(--af-weight-ui);
    text-decoration: none;
    cursor: pointer;
}

.glossary-pill__stars {
    display: inline-grid;
    place-items: center;
    min-width: 2.25rem;
    height: 1.75rem;
    padding-inline: var(--af-space-2);
    border-radius: 999px;
    background-color: var(--af-yellow-400);
    color: var(--af-navy-950);
    /* l'astérisque se dessine haut dans la ligne : plus grand et redescendu, pour se lire comme tel */
    font-size: 1.15rem;
    line-height: 1;
    letter-spacing: 0.06em;
    padding-top: 0.3em;
}

.glossary-pill:hover,
.glossary-pill[aria-expanded="true"] {
    border-color: var(--af-yellow-400);
    color: var(--af-color-text-on-inverse);
}

@media (prefers-reduced-motion: no-preference) {
    .glossary-pill {
        transition: border-color var(--af-duration-base) var(--af-ease-standard);
    }
}

/* sans script : le panneau, sous le texte, comme un encadré de notes */
.glossary {
    position: relative;
    max-width: calc(var(--af-container) + 2 * var(--af-space-gutter));
    margin: var(--af-space-12) auto 0;
    padding: var(--af-space-6) var(--af-space-gutter) 0;
    border-top: var(--af-border-hairline) solid var(--af-color-border-on-inverse);
    color: var(--af-color-text-on-inverse-muted);
}

.glossary__head {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.glossary__close {
    display: grid;
    place-items: center;
    width: var(--af-target-min);
    height: var(--af-target-min);
    border: var(--af-border-hairline) solid var(--af-color-border-on-inverse);
    border-radius: var(--af-radius-sm);
    background-color: transparent;
    color: var(--af-color-text-on-inverse);
    cursor: pointer;
}

.glossary__close[hidden] {
    display: none;
}

.glossary__close:hover {
    border-color: currentColor;
}

.glossary__list {
    display: grid;
    gap: var(--af-space-6);
    margin: var(--af-space-6) 0 0;
}

.glossary__item {
    padding-left: var(--af-space-5);
    border-left: 3px solid var(--af-color-border-on-inverse);
}

.glossary__item.is-current {
    border-left-color: var(--af-yellow-400);
}

.glossary__term {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--af-space-1) var(--af-space-3);
    color: var(--af-color-text-on-inverse);
    font-family: var(--af-font-display);
    font-size: var(--af-text-3xl);
    font-style: italic;
    font-weight: var(--af-weight-display);
    line-height: 1;
}

.glossary__star {
    color: var(--af-yellow-400);
    font-family: var(--af-font-ui);
    font-size: 0.6em;
    font-style: normal;
}

.glossary__full {
    flex-basis: 100%;
    margin-top: var(--af-space-2);
    color: var(--af-color-link-on-inverse);
    font-family: var(--af-font-ui);
    font-size: var(--af-text-base);
    font-style: normal;
    font-weight: var(--af-weight-ui);
}

/* sous les définitions : une phrase et le bouton principal vers le contact */
.glossary__cta {
    display: grid;
    gap: var(--af-space-4);
    margin-top: var(--af-space-10);
    padding-top: var(--af-space-6);
    border-top: var(--af-border-hairline) solid var(--af-color-border-on-inverse);
}

.glossary__cta-text {
    max-width: 30em;
    color: var(--af-color-text-on-inverse);
    font-size: var(--af-text-base);
    line-height: var(--af-leading-normal);
}

.glossary__def {
    margin: var(--af-space-3) 0 0;
    max-width: 30em;
    font-size: var(--af-text-base);
    line-height: var(--af-leading-normal);
}

/* avec script : panneau latéral venu de la droite, à la hauteur de la partie nuit */
.glossary.is-ready {
    position: absolute;
    inset: 0 0 0 auto;
    z-index: 2;
    width: min(28rem, 100%);
    max-width: none;
    margin: 0;
    padding: var(--af-space-6) var(--af-space-8);
    overflow-y: auto;
    border-top: 0;
    border-left: var(--af-border-hairline) solid var(--af-color-border-on-inverse);
    background-image:
        radial-gradient(30rem 20rem at 100% 0%, rgb(51 153 255 / 0.22), transparent 70%),
        linear-gradient(160deg, var(--af-navy-900), var(--af-navy-950));
    box-shadow: -1rem 0 0 0 rgb(51 153 255 / 0.12);
    transform: translateX(100%);
    visibility: hidden;
}

.glossary.is-ready.is-open {
    transform: none;
    visibility: visible;
}

/*
 * panneau à la hauteur de la partie nuit : la fermeture passe dans le coin,
 * par-dessus, pour que les définitions et le bouton de contact y tiennent
 */
.glossary.is-ready .glossary__head {
    position: absolute;
    top: var(--af-space-4);
    right: var(--af-space-4);
}

.glossary.is-ready .glossary__list {
    margin-top: var(--af-space-2);
}

.glossary.is-ready .glossary__cta {
    margin-top: var(--af-space-8);
    padding-top: var(--af-space-5);
}

/* panneau ouvert dans le bas de l'écran (is-under-badge, assets/glossary.js) : le badge
 * flottant des avis s'efface, il couvrirait le bouton de contact ; ailleurs, il reste */
html:has(.glossary.is-open.is-under-badge) .google-badge {
    visibility: hidden;
}

/* le panneau reçoit le focus à l'ouverture (il s'annonce par son nom) : pas d'anneau autour de tout le panneau */
.glossary.is-ready:focus {
    outline: none;
}

/* au doigt : le défilement vertical reste natif, le balayage horizontal est pour le panneau */
.glossary.is-ready {
    touch-action: pan-y;
}

/* pendant le balayage, le panneau suit le doigt sans transition */
.glossary.is-ready.is-open.is-dragging {
    transition: none;
}

@media (prefers-reduced-motion: no-preference) {
    .glossary.is-ready {
        transition: transform 0.45s var(--af-ease-standard), visibility 0s linear 0.45s;
    }

    .glossary.is-ready.is-open {
        transition: transform 0.45s var(--af-ease-standard), visibility 0s;
    }

    /*
     * à chaque ouverture, les termes décrochent comme une télé (tv-glitch,
     * app.css), comme les titres de page : quand le panneau finit de glisser,
     * POC puis MVP. La classe is-open retirée à la fermeture, l'effet se
     * rejoue à l'ouverture suivante.
     */
    .glossary.is-ready.is-open .glossary__term {
        animation: tv-glitch 0.9s steps(1, end) 0.25s;
    }

    .glossary.is-ready.is-open .glossary__item + .glossary__item .glossary__term {
        animation-delay: 0.4s;
    }
}

.case-latest--inverse .case-latest__media::before {
    background-color: var(--af-navy-950);
}

.case-latest--inverse .case-latest__label,
.case-latest--inverse .case-latest__lead {
    color: var(--af-color-text-on-inverse-muted);
}

.case-latest--inverse .case-latest__title {
    color: var(--af-color-text-on-inverse);
}

/* bouton : blanc sur la nuit, contour blanc au survol */
.case-latest--inverse .case-button {
    border-color: var(--af-white);
    background-color: var(--af-white);
    color: var(--af-navy-950);
}

.case-latest--inverse .case-button:hover {
    background-color: transparent;
    color: var(--af-white);
}

/* ---------- Liste des cas clients : les logos des boutiques, sur la nuit, en bas de page ---------- */
.client-refs {
    padding-block: var(--af-space-section) var(--af-space-16);
    background-image:
        radial-gradient(60rem 30rem at 92% 0%, rgb(51 153 255 / 0.14), transparent 70%),
        linear-gradient(180deg, var(--af-navy-950), var(--af-navy-950));
}

/* isolate : le jaune du surligné passe sous le mot, pas sous le fond de la section */
.client-refs__title {
    isolation: isolate;
    font-size: clamp(2.25rem, 1.4rem + 3vw, 3.25rem);
    line-height: 1;
    letter-spacing: -0.03em;
}

.client-refs__title .marker {
    margin-inline: 0.08em;
}

.client-refs__lead {
    max-width: 34em;
    margin-top: var(--af-space-5);
    color: var(--af-color-text-on-inverse-muted);
    font-size: var(--af-text-lg);
}

/* ---------- Mouvement réduit : rien ne glisse ---------- */
@media (prefers-reduced-motion: reduce) {
    .case-arrow,
    .case-stage img {
        transition: none;
    }
}
