/* ==========================================================================
   SINAL — Division Scientifique
   Couche d'ergonomie : outils de navigation et d'action, finitions de boutons.
   --------------------------------------------------------------------------
   1. Finitions globales (boutons, blocage du défilement, notifications)
   2. Progression de lecture et retour en haut
   3. En-tête : recherche et liste de devis
   4. Palette de recherche (Ctrl/⌘ + K)
   5. Tiroir « Ma liste de devis »
   6. Cartes produit : ajout à la liste, affichage grille / liste
   7. Fiche produit : bascule, barre d'action, référence
   8. Contact : rappel de la liste
   9. Index des sections (grands écrans)
   10. Impression
   Toutes les commandes décrites ici sont des améliorations : sans JavaScript,
   elles restent masquées et le site fonctionne comme avant.
   ========================================================================== */

/* 1. Finitions globales ---------------------------------------------------- */
:root {
    --brand-deep: #0a5c97;
    --brand-glow: rgba(15, 117, 188, 0.55);
    --yellow-soft: #fff7a8;
    --shadow-pop: 0 24px 60px -24px rgba(11, 42, 69, 0.55);
}

/* Aucune barre de défilement qui saute à l'ouverture d'une fenêtre */
html:has(dialog[open]) {
    overflow: hidden;
    scrollbar-gutter: stable;
}

/* Notifications : centrées en bas, au-dessus d'une éventuelle barre d'action */
.toast-region {
    right: auto;
    left: 50%;
    bottom: calc(1.25rem + var(--dock, 0px));
    transform: translateX(-50%);
    justify-items: center;
    width: max-content;
    max-width: min(28rem, calc(100vw - 2rem));
    transition: bottom var(--base) var(--ease);
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-left: 0;
    border-bottom: 3px solid var(--yellow);
    font-size: 1.0625rem;
    font-weight: 500;
}

/* 2. Progression de lecture et retour en haut ------------------------------ */
.read-progress {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 160;
    height: 4px;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--base);
}

.read-progress.is-on {
    opacity: 1;
}

/* Remplissage bleu SINAL, gradué comme une règle ; la tête de lecture est jaune */
.read-progress i {
    position: relative;
    display: block;
    height: 100%;
    width: 0;
    background: var(--brand);
    box-shadow: inset -3px 0 0 var(--yellow);
}

.read-progress i::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.5) 0 1px, transparent 1px 10px);
}

.to-top {
    position: fixed;
    right: 1.25rem;
    bottom: calc(1.25rem + var(--dock, 0px));
    z-index: 80;
    display: grid;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    background: var(--white);
    color: var(--ink);
    box-shadow: 0 12px 28px -14px rgba(11, 42, 69, 0.6), 0 0 0 1px var(--line-soft);
    opacity: 0;
    transform: translateY(14px);
    visibility: hidden; /* hors du parcours au clavier tant qu'il n'est pas affiché */
    pointer-events: none;
    transition: opacity var(--base) var(--ease), transform var(--base) var(--ease), bottom var(--base) var(--ease), background-color var(--fast), visibility var(--base);
}

.to-top.is-shown {
    opacity: 1;
    transform: none;
    visibility: visible;
    pointer-events: auto;
}

.to-top:hover,
.to-top:focus-visible {
    background: var(--yellow);
}

.to-top .icon {
    position: relative;
}

.to-top__ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.to-top__track,
.to-top__value {
    fill: none;
    stroke-width: 2.5;
}

.to-top__track {
    stroke: var(--line-soft);
}

.to-top__value {
    stroke: var(--brand);
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: calc(100 - var(--p, 0));
    transition: stroke-dashoffset 0.15s linear;
}

/* 3. En-tête : recherche et liste de devis --------------------------------- */
/* Deux pastilles rondes dans la capsule ; le raccourci clavier est rappelé dans la fenêtre de recherche */
.hbtn {
    position: relative;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 2.9rem;
    height: 2.9rem;
    padding: 0;
    background: var(--paper-2);
    border: 0;
    border-radius: 50%;
    color: var(--ink);
    transition: background-color var(--fast), color var(--fast), transform 0.35s var(--ease);
}

.js .hbtn {
    display: inline-flex;
}

.hbtn:hover,
.hbtn:focus-visible {
    background: var(--ink);
    color: var(--white);
}

.hbtn:active {
    transform: scale(0.94);
}

.hbtn__label,
.hbtn .kbd {
    display: none;
}

@media (max-width: 479.98px) {
    .hbtn {
        width: 2.6rem;
        height: 2.6rem;
    }
}

.hbtn__badge {
    position: absolute;
    top: -0.3rem;
    right: -0.3rem;
    min-width: 1.3rem;
    height: 1.3rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: var(--yellow);
    box-shadow: 0 0 0 2px var(--white);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.3rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.hbtn__badge.is-bumped {
    animation: ux-bump 0.5s var(--ease);
}

@keyframes ux-bump {
    35% { transform: scale(1.4); }
}

.kbd {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.12rem 0.4rem;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-bottom-width: 2px;
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.02em;
    color: var(--ink-soft);
}

.hbtn:hover .kbd,
.hbtn:focus-visible .kbd {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.35);
    color: var(--white);
}

/* 4. Palette de recherche -------------------------------------------------- */
.palette {
    position: fixed;
    inset: 0;
    margin: min(11vh, 6.5rem) auto auto;
    width: min(44rem, calc(100vw - 1.5rem));
    max-width: none;
    max-height: min(37rem, calc(100dvh - 2rem));
    padding: 0;
    border: 0;
    border-top: 4px solid var(--yellow);
    border-radius: 0;
    background: var(--white);
    color: var(--ink);
    overflow: hidden;
    box-shadow: var(--shadow-pop);
}

.palette[open] {
    display: flex;
    flex-direction: column;
    animation: palette-in 0.3s var(--ease);
}

.palette::backdrop {
    background: rgba(11, 42, 69, 0.62);
    backdrop-filter: blur(3px);
}

.palette[open]::backdrop {
    animation: fade-in 0.3s ease;
}

@keyframes palette-in {
    from { opacity: 0; transform: translateY(-16px) scale(0.985); }
}

.palette__bar {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0 1rem 0 1.25rem;
    border-bottom: 1px solid var(--line);
    color: var(--ink-soft);
    transition: box-shadow var(--fast);
}

.palette__bar:focus-within {
    box-shadow: inset 0 -2px 0 var(--blue);
    color: var(--blue);
}

.palette__input {
    flex: 1;
    min-width: 0;
    min-height: 4.1rem;
    padding: 0;
    background: transparent;
    border: 0;
    outline: none;
    color: var(--ink);
    font-family: var(--font-text);
    font-size: 1.1875rem;
}

.palette__input::placeholder {
    color: var(--muted);
}

.palette__close {
    display: grid;
    place-items: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
}

.palette__body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.35rem 0 0.75rem;
}

.pal-group + .pal-group {
    margin-top: 0.35rem;
}

.pal-group__title {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1.25rem 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.pal-item {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.9rem;
    min-height: 3.6rem;
    padding: 0.55rem 1.25rem 0.55rem calc(1.25rem - 3px);
    border-left: 3px solid transparent;
    text-decoration: none;
    color: inherit;
}

.pal-item.is-active {
    background: var(--blue-tint);
    border-left-color: var(--brand);
}

.pal-item__thumb {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--line-soft);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--blue-deep);
}

.pal-item__thumb img {
    width: 100%;
    height: 100%;
    padding: 0.25rem;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.pal-item__thumb--page {
    background: var(--paper-2);
    border-color: transparent;
}

.pal-item__main {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
}

.pal-item__label {
    overflow: hidden;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.1875rem;
    line-height: 1.2;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.pal-item__sub {
    overflow: hidden;
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.8125rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--muted);
}

.pal-item__go {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity var(--fast), transform var(--base) var(--ease);
    color: var(--blue-deep);
}

.pal-item.is-active .pal-item__go {
    opacity: 1;
    transform: none;
}

.palette mark {
    padding: 0 0.04em;
    background: var(--yellow);
    color: inherit;
}

.pal-note {
    padding: 1.4rem 1.25rem;
    color: var(--muted);
    font-size: 1.0625rem;
}

.pal-skeleton {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr);
    gap: 0.9rem;
    padding: 0.55rem 1.25rem;
}

.pal-skeleton i,
.pal-skeleton b {
    display: block;
    background: linear-gradient(90deg, var(--paper-2) 25%, #f6fafd 50%, var(--paper-2) 75%) 0 0 / 200% 100%;
    animation: ux-shimmer 1.2s linear infinite;
}

.pal-skeleton i {
    width: 3rem;
    height: 3rem;
}

.pal-skeleton b {
    align-self: center;
    height: 0.9rem;
    width: 70%;
}

@keyframes ux-shimmer {
    to { background-position: -200% 0; }
}

.palette__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 1.25rem;
    padding: 0.7rem 1.25rem;
    background: var(--paper-2);
    border-top: 1px solid var(--line);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.8125rem;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.palette__foot-end {
    margin-left: auto;
}

@media (max-width: 639px), (pointer: coarse) {
    .palette__foot {
        display: none;
    }
}

/* 5. Tiroir « Ma liste de devis » ------------------------------------------ */
.drawer {
    position: fixed;
    inset: 0 0 0 auto;
    margin: 0;
    width: min(29rem, 100vw);
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    padding: 0;
    border: 0;
    border-top: 4px solid var(--yellow);
    border-left: 1px solid var(--ink);
    border-radius: 0;
    background: var(--paper);
    color: var(--ink);
    box-shadow: var(--shadow-pop);
}

.drawer[open] {
    display: flex;
    flex-direction: column;
    animation: drawer-in var(--base) var(--ease);
}

.drawer::backdrop {
    background: rgba(11, 42, 69, 0.6);
}

.drawer[open]::backdrop {
    animation: fade-in var(--base) ease;
}

@keyframes drawer-in {
    from { opacity: 0; transform: translateX(2.5rem); }
}

.drawer__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.4rem 1.75rem 1.25rem;
    background: var(--white);
    border-bottom: 1px solid var(--line);
}

.drawer__title {
    margin-top: 0.7rem;
    font-size: var(--step-3);
}

.drawer__title em {
    color: var(--blue);
}

.drawer__body {
    flex: 1;
    min-height: 0;
    padding: 1.25rem 1.75rem 1.75rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.drawer__meter {
    margin-bottom: 0.9rem;
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.drawer__meter strong {
    font-weight: 500;
    color: var(--ink);
}

.drawer__meter:empty {
    display: none;
}

.drawer__empty {
    padding-block: 1.25rem 0.5rem;
    color: var(--ink-soft);
    line-height: 1.6;
}

.drawer__empty-title {
    margin-bottom: 0.75rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--step-2);
    line-height: 1.15;
    color: var(--ink);
}

.drawer__empty .link-arrow {
    margin-top: 1.5rem;
    min-height: 2.75rem;
    color: var(--ink);
}

.drawer__plus {
    display: inline-grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    vertical-align: -0.3rem;
    border: 1px solid var(--ink);
}

.drawer__list {
    border-top: 1px solid var(--ink);
}

.qitem {
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line);
    animation: ux-rise 0.4s var(--ease) both;
}

@keyframes ux-rise {
    from { opacity: 0; transform: translateY(8px); }
}

.qitem__thumb {
    display: grid;
    place-items: center;
    width: 4.5rem;
    height: 4.5rem;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--line-soft);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.75rem;
    text-align: center;
    color: var(--muted);
    text-decoration: none;
}

.qitem__thumb img {
    width: 100%;
    height: 100%;
    padding: 0.35rem;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.qitem__main {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.qitem__brand,
.qitem__ref {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.8125rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.qitem__brand {
    color: var(--blue-deep);
}

.qitem__ref {
    color: var(--muted);
}

.qitem__name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.1875rem;
    line-height: 1.2;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.qitem__name:hover {
    text-decoration: underline;
    text-decoration-color: var(--blue);
}

.qitem__del {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    background: var(--danger);
    border: 1px solid var(--danger);
    color: var(--white);
    transition: background-color var(--fast), border-color var(--fast), transform var(--fast);
}

.qitem__del:hover,
.qitem__del:focus-visible {
    background: #8f1d17;
    border-color: #8f1d17;
}

.qitem__del:active {
    transform: scale(0.95);
}

.qitem__del:focus-visible {
    outline: 2px solid var(--danger);
    outline-offset: 3px;
}

.drawer__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    padding: 1.1rem 1.75rem 1.4rem;
    background: var(--white);
    border-top: 1px solid var(--ink);
}

.drawer__clear {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: underline;
    text-decoration-color: var(--line);
    text-underline-offset: 0.3em;
    color: var(--ink-soft);
}

.drawer__clear:hover {
    color: var(--danger);
    text-decoration-color: currentColor;
}

/* Tiroir, version arrondie : bord gauche en tuile, lignes en tuiles, commandes rondes */
.drawer {
    border: 0;
    border-radius: var(--tile-radius) 0 0 var(--tile-radius);
    overflow: hidden;
}

.drawer__head {
    position: relative;
    isolation: isolate;
    background: var(--brand);
    color: var(--white);
    border-bottom: 0;
}

.drawer__head::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 2.5rem),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 2.5rem);
}

.drawer__head .eyebrow {
    color: rgba(255, 255, 255, 0.9);
}

.drawer__title {
    font-weight: 800;
    letter-spacing: -0.04em;
}

.drawer__title em {
    color: var(--yellow);
}

.drawer__head button {
    color: var(--white);
}

.drawer__head button:focus-visible {
    outline-color: var(--yellow);
}

.drawer__list {
    display: grid;
    gap: 0.5rem;
    border-top: 0;
}

.qitem {
    padding: 0.6rem 0.6rem 0.6rem 0.6rem;
    border: 0;
    border-radius: 1.25rem;
    background: var(--paper-2);
}

.qitem__thumb {
    border: 0;
    border-radius: 0.9rem;
}

.qitem__thumb img {
    mix-blend-mode: normal;
}

.qitem__brand,
.qitem__ref {
    font-family: var(--font-text);
    font-size: 0.6875rem;
    font-weight: 700;
}

.qitem__name {
    font-weight: 800;
    font-size: 1.0625rem;
    letter-spacing: -0.02em;
}

.qitem__del {
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 50%;
    background: var(--white);
    color: var(--danger);
    transition: background-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}

.qitem__del:hover,
.qitem__del:focus-visible {
    background: var(--danger);
    border-color: var(--danger);
    color: var(--white);
    transform: rotate(90deg);
}

.drawer__foot {
    border-top: 0;
    background: var(--paper-2);
}

.drawer__clear {
    padding: 0 1rem;
    border-radius: var(--pill);
    background: var(--white);
    font-family: var(--font-text);
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
}

.drawer__clear:hover {
    background: var(--danger);
    color: var(--white);
}

@media (max-width: 479px) {
    .drawer {
        border-radius: 0;
    }
}

/* 6. Cartes produit : ajout à la liste, affichage grille / liste ---------- */
/* L'enveloppe réunit la tuile (un lien, voir main.css) et le bouton rond d'ajout :
   c'est elle qui se soulève, pour que les deux bougent ensemble. */
.pc {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    transition: transform 0.5s var(--ease);
}

.pc > .product-card {
    flex: 1 1 auto;
    min-width: 0;
}

@media (hover: hover) {
    .pc:hover {
        transform: translateY(-6px);
    }
}

/* Produit déjà dans la liste de devis : la tuile garde son anneau bleu */
.pc:has(> .pc__add[aria-pressed="true"]) > .product-card {
    box-shadow: 0 0 0 2px var(--brand);
}

/* Bouton rond : + (ajouter), ✓ sur fond jaune (dans la liste), × au survol (retirer) */
.pc__add {
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    z-index: 3;
    display: none;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1.5px solid var(--ink);
    border-radius: 50%;
    background: var(--white);
    color: var(--ink);
    transition:
        background-color 0.4s var(--ease),
        border-color 0.4s var(--ease),
        color 0.4s var(--ease),
        transform 0.5s var(--ease);
}

.js .pc__add {
    display: grid;
}

.pc__ico {
    grid-area: 1 / 1;
    display: grid;
    place-items: center;
    transition: transform 0.5s var(--ease), opacity var(--fast);
}

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

.pc__ico--on,
.pc__ico--off {
    opacity: 0;
    transform: scale(0.4) rotate(-45deg);
}

.pc__add:hover,
.pc__add:focus-visible {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--white);
    transform: scale(1.08);
}

.pc__add:hover .pc__ico--add {
    transform: rotate(90deg);
}

.pc__add:active {
    transform: scale(0.94);
}

.pc__add[aria-pressed="true"] {
    background: var(--yellow);
    border-color: var(--yellow);
    color: var(--ink);
}

.pc__add[aria-pressed="true"] .pc__ico--add {
    opacity: 0;
    transform: scale(0.4) rotate(90deg);
}

.pc__add[aria-pressed="true"] .pc__ico--on {
    opacity: 1;
    transform: none;
}

@media (hover: hover) {
    .pc__add[aria-pressed="true"]:hover {
        background: var(--ink);
        border-color: var(--ink);
        color: var(--white);
    }

    .pc__add[aria-pressed="true"]:hover .pc__ico--on {
        opacity: 0;
        transform: scale(0.4) rotate(45deg);
    }

    .pc__add[aria-pressed="true"]:hover .pc__ico--off {
        opacity: 1;
        transform: none;
    }
}

/* Petit écran : la tuile est une ligne, le bouton se place en bas à droite,
   sur la même ligne que le libellé « Fiche produit » */
@media (max-width: 559px) {
    .pc__add {
        top: auto;
        right: 0.75rem;
        bottom: 0.5rem;
    }
}

/* Bascule grille / liste (catalogue) : deux boutons ronds */
.view-toggle {
    display: inline-flex;
    gap: 0.4rem;
    margin-left: auto;
}

.view-toggle__btn {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1.5px solid var(--ink);
    border-radius: 50%;
    background: var(--white);
    color: var(--ink);
    transition:
        background-color 0.4s var(--ease),
        border-color 0.4s var(--ease),
        color 0.4s var(--ease),
        transform 0.5s var(--ease);
}

.view-toggle__btn .icon {
    stroke-width: 2;
}

.view-toggle__btn:hover {
    background: var(--yellow);
    border-color: var(--yellow);
    transform: scale(1.08);
}

.view-toggle__btn[aria-pressed="true"] {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--white);
}

/* Vue en liste : une tuile par ligne — vignette, texte, pastille-flèche puis bouton d'ajout */
@media (min-width: 560px) {
    html[data-view="list"] .catalogue__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    html[data-view="list"] .catalogue__grid .product-card {
        flex-direction: row;
    }

    html[data-view="list"] .catalogue__grid .product-card__media {
        flex: none;
        align-self: stretch;
        width: clamp(8rem, 18vw, 11rem);
        min-height: 8rem;
        aspect-ratio: auto;
        padding: 0.9rem;
    }

    html[data-view="list"] .catalogue__grid .product-card__media img {
        height: auto;
        max-height: 6.5rem;
    }

    html[data-view="list"] .catalogue__grid .product-card__body {
        justify-content: center;
        padding: 0.75rem 8.25rem 0.75rem clamp(1rem, 2vw, 1.75rem);
    }

    html[data-view="list"] .catalogue__grid .product-card__text {
        -webkit-line-clamp: 2;
        max-width: 52em;
    }

    html[data-view="list"] .catalogue__grid .product-card__more {
        position: absolute;
        top: 50%;
        right: 4.75rem;
        margin: -1.25rem 0 0;
        padding: 0;
    }

    html[data-view="list"] .catalogue__grid .product-card__more-label {
        display: none;
    }

    html[data-view="list"] .catalogue__grid .pc__add {
        top: 50%;
        right: 1.35rem;
        margin-top: -1.375rem;
    }

    @media (hover: hover) {
        html[data-view="list"] .catalogue__grid .pc:hover {
            transform: translateX(6px);
        }
    }
}

/* 7. Fiche produit : bascule, barre d'action, référence -------------------- */
/* Bouton « Ajouter à ma liste » : capsule dont la pastille porte deux glyphes
   superposés (+ et ✓). Dans la liste, la capsule passe au jaune. */
.quote-toggle {
    display: none;
}

.js .quote-toggle {
    display: inline-flex;
}

.quote-toggle__add,
.quote-toggle__on {
    transition: opacity 0.3s var(--ease);
}

.quote-toggle__on {
    opacity: 0;
}

/* Sur la barre d'action (fond bleu nuit) : contour blanc */
.product-bar .btn--ghost {
    --btn-bg: transparent;
    --btn-fg: var(--white);
    --btn-ring: rgba(255, 255, 255, 0.85);
    --btn-fill: var(--white);
    --btn-badge-bg: var(--white);
    --btn-badge-fg: var(--ink);
}

.quote-toggle[aria-pressed="true"] {
    --btn-bg: var(--yellow);
    --btn-fg: var(--ink);
    --btn-ring: var(--yellow);
    --btn-fill: var(--white);
    --btn-badge-bg: var(--ink);
    --btn-badge-fg: var(--yellow);
    --btn-badge-on-bg: var(--brand);
    --btn-badge-on-fg: var(--white);
}

.quote-toggle[aria-pressed="true"] .quote-toggle__add {
    opacity: 0;
}

.quote-toggle[aria-pressed="true"] .quote-toggle__on {
    opacity: 1;
}

/* Impression de la fiche : proposée avec JavaScript seulement */
.product-head__tools {
    display: none;
}

.js .product-head__tools {
    display: block;
}

/* Copie de la référence : bouton rond dans la pastille de référence */
.copy-ref {
    display: none;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-right: -0.75rem;
    border-radius: 50%;
    background: var(--white);
    box-shadow: inset 0 0 0 1.5px var(--ink);
    color: var(--ink);
    transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease), color 0.4s var(--ease), transform 0.5s var(--ease);
}

.js .copy-ref {
    display: inline-grid;
}

.copy-ref .icon {
    stroke-width: 2;
}

.copy-ref:hover,
.copy-ref:focus-visible {
    background: var(--yellow);
    box-shadow: inset 0 0 0 1.5px var(--yellow);
    transform: scale(1.08);
}

.copy-ref.is-copied {
    background: var(--success);
    box-shadow: inset 0 0 0 1.5px var(--success);
    color: var(--white);
}

@media (pointer: coarse) {
    .copy-ref {
        width: 2.75rem;
        height: 2.75rem;
    }
}

/* Barre d'action : une capsule bleu nuit flottante, qui monte quand les boutons
   de la fiche ont quitté l'écran. ux.js mesure sa hauteur (--dock) pour décaler
   les notifications. */
.product-bar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 90;
    padding-bottom: calc(clamp(0.6rem, 0.4rem + 1vw, 1rem) + env(safe-area-inset-bottom, 0px));
    pointer-events: none;
    transform: translateY(110%);
    visibility: hidden;
    transition: transform 0.5s var(--ease), visibility 0.5s;
}

.product-bar.is-visible {
    transform: none;
    visibility: visible;
}

.product-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 4rem;
    padding: 0.5rem 0.5rem 0.5rem 1.75rem;
    border-radius: 999px;
    background: var(--ink);
    color: var(--white);
    box-shadow: 0 24px 50px -22px rgba(11, 42, 69, 0.75);
    pointer-events: auto;
}

.product-bar__id {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.product-bar__brand {
    overflow: hidden;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--yellow);
}

.product-bar__name {
    overflow: hidden;
    font-size: 1.125rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-bar__actions {
    display: flex;
    flex: none;
    gap: 0.5rem;
}

.product-bar .btn:focus-visible {
    outline-color: var(--yellow);
}

/* Petit écran : le nom s'efface, la bascule se réduit à sa pastille ronde
   et « Demander un devis » prend toute la place restante */
@media (max-width: 719px) {
    .product-bar__id {
        display: none;
    }

    .product-bar__inner {
        padding: 0.4rem;
    }

    .product-bar__actions {
        flex: 1 1 auto;
    }

    .product-bar__actions > .btn:not(.quote-toggle) {
        flex: 1 1 0;
    }

    .product-bar .quote-toggle {
        flex: none;
        width: var(--btn-h);
        padding: 0;
    }

    .product-bar .quote-toggle > [data-quote-label] {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .product-bar .quote-toggle > .icon:last-child:not(:only-child) {
        margin-right: 0;
    }
}

/* Réserve en bas de page pour que la barre ne masque pas la fin du pied de page */
body.page-product .site-footer {
    padding-bottom: 5.5rem;
}

/* 8. Contact : rappel de la liste ------------------------------------------ */
.quote-recap {
    margin-bottom: 1.75rem;
    padding: 1.1rem 1.25rem 1.25rem;
    background: var(--blue-tint);
    border-left: 3px solid var(--brand);
}

.quote-recap__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
}

.quote-recap__label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink);
}

.quote-recap__label .eyebrow__num {
    border: 1px solid currentColor;
}

.quote-recap__list {
    display: grid;
    gap: 0.35rem;
    margin: 0.9rem 0 0.8rem;
    padding: 0;
    list-style: none;
}

.quote-recap__list li {
    font-size: 1.0625rem;
    line-height: 1.45;
}

.quote-recap__list span {
    display: inline-block;
    margin-right: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--blue-deep);
}

.quote-recap__note {
    font-size: 0.9375rem;
    color: var(--ink-soft);
}

.quote-recap__insert {
    margin-top: 0.9rem;
}

/* 10. Impression ----------------------------------------------------------- */
@media print {
    .read-progress,
    .to-top,
    .hbtn,
    .palette,
    .drawer,
    .product-bar,
    .pc__add,
    .view-toggle,
    .quote-recap,
    .copy-ref,
    .product-head__tools,
    .quote-toggle {
        display: none !important;
    }
}
