/* ==========================================================================
   CHAVIGNY DISTRIBUTION - Charte graphique globale
   Header, menu latéral "Produits", footer, boutons et titres de section.
   Les styles propres à une page vont dans css/{vue}.css (ex : css/home.css).
   ========================================================================== */

:root {
    --ch-red: #d0343a;
    --ch-red-dark: #b0272d;
    --ch-red-soft: #fbeaeb;
    --ch-grey: #76777b;
    --ch-grey-dark: #4a4b4f;
    --ch-grey-light: #efefef;
    --ch-border: #dcdcde;
    --ch-white: #ffffff;
    --ch-text: #2a2b2e;

    --ch-font: 'Arimo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --ch-radius-sm: 6px;
    --ch-radius: 12px;
    --ch-radius-lg: 20px;
    --ch-radius-pill: 999px;
    --ch-shadow: 0 2px 10px rgba(0, 0, 0, .06);
    --ch-shadow-lg: 0 12px 32px rgba(0, 0, 0, .12);
    --ch-ease: cubic-bezier(.4, 0, .2, 1);

    --ch-container: 1320px;
    --ch-gutter: 24px;
    --ch-header-main-h: 88px;
    --ch-header-nav-h: 56px;
    --ch-drawer-w: 360px;
    --ch-drawer-sub-w: 400px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
body {
    font-family: var(--ch-font);
    color: var(--ch-text);
    background: var(--ch-white);
    -webkit-font-smoothing: antialiased;
}

body.ch-no-scroll {
    overflow: hidden;
}

.ch-container {
    width: 100%;
    max-width: var(--ch-container);
    margin: 0 auto;
    padding: 0 var(--ch-gutter);
}

.ch-main:focus {
    outline: none;
}

.ch-sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.ch-skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 2000;
    padding: 10px 18px;
    background: var(--ch-red);
    color: var(--ch-white);
    border-radius: var(--ch-radius-sm);
    font-weight: 700;
    transform: translateY(-150%);
    transition: transform .2s var(--ch-ease);
}

.ch-skip-link:focus {
    transform: translateY(0);
    color: var(--ch-white);
}

/* Focus clavier visible et cohérent sur tous les éléments de la charte */
.ch-header :focus-visible,
.ch-drawer :focus-visible,
.ch-footer :focus-visible,
.ch-main :focus-visible {
    outline: 3px solid rgba(208, 52, 58, .45);
    outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Boutons & liens
   -------------------------------------------------------------------------- */
.ch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 22px;
    border: 2px solid transparent;
    border-radius: var(--ch-radius-pill);
    font-family: var(--ch-font);
    font-size: .95rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .2s var(--ch-ease), color .2s var(--ch-ease), border-color .2s var(--ch-ease), box-shadow .2s var(--ch-ease), transform .2s var(--ch-ease);
}

.ch-btn:active {
    transform: translateY(1px);
}

.ch-btn-primary {
    background: var(--ch-red);
    color: var(--ch-white);
}

.ch-btn-primary:hover,
.ch-btn-primary:focus-visible {
    background: var(--ch-red-dark);
    color: var(--ch-white);
    box-shadow: 0 6px 16px rgba(208, 52, 58, .28);
}

.ch-btn-outline {
    background: var(--ch-white);
    border-color: var(--ch-grey);
    color: var(--ch-grey-dark);
}

.ch-btn-outline:hover,
.ch-btn-outline:focus-visible {
    border-color: var(--ch-red);
    color: var(--ch-red);
}

.ch-btn-lg {
    min-height: 50px;
    padding: 0 32px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.ch-btn-block {
    width: 100%;
}

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

.ch-link i {
    transition: transform .2s var(--ch-ease);
}

.ch-link:hover {
    color: var(--ch-red-dark);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.ch-link:hover i {
    transform: translateX(4px);
}

.ch-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: var(--ch-radius-pill);
    background: var(--ch-red);
    color: var(--ch-white);
    font-size: .72rem;
    font-weight: 700;
    line-height: 1;
}

/* Titre de section : texte rouge centré, filets gris de part et d'autre */
.ch-section-title {
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 0 0 36px;
    color: var(--ch-red);
    font-family: var(--ch-font);
    font-size: clamp(1.3rem, 1.1rem + .8vw, 1.65rem);
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
}

.ch-section-title::before,
.ch-section-title::after {
    content: "";
    flex: 1 1 0;
    height: 1px;
    background: var(--ch-grey);
    opacity: .55;
}

.ch-section-title > span {
    flex: 0 1 auto;
    max-width: 80%;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.ch-header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: var(--ch-white);
    transition: box-shadow .25s var(--ch-ease);
}

.ch-header.scrolled,
.ch-header.is-scrolled {
    box-shadow: 0 4px 18px rgba(0, 0, 0, .08);
}

.ch-header-row {
    display: flex;
    align-items: center;
    gap: 32px;
    min-height: var(--ch-header-main-h);
}

.ch-logo {
    flex: 0 0 auto;
    display: block;
    line-height: 0;
}

.ch-logo img {
    display: block;
    width: auto;
    height: 58px;
    max-width: none;
}

/* Recherche (neutralise les anciennes règles .nav-search de styles.css, classe conservée pour js/script.js) */
.ch-search,
.ch-header .ch-search.nav-search,
.ch-header .ch-search.nav-search:focus-within {
    display: block;
    height: auto;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    overflow: visible;
}

.ch-search {
    position: relative;
    flex: 1 1 auto;
    max-width: 640px;
    margin: 0 auto;
}

.ch-search-input {
    width: 100%;
    height: 46px;
    padding: 0 56px 0 20px;
    border: 1.5px solid var(--ch-red);
    border-radius: var(--ch-radius-pill);
    background: var(--ch-white);
    color: var(--ch-text);
    font-family: var(--ch-font);
    font-size: .95rem;
    transition: box-shadow .2s var(--ch-ease);
    -webkit-appearance: none;
    appearance: none;
}

.ch-search-input::placeholder {
    color: var(--ch-grey);
}

.ch-search-input:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(208, 52, 58, .15);
}

.ch-search-input::-webkit-search-cancel-button {
    cursor: pointer;
}

.ch-search-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--ch-grey-dark);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color .2s var(--ch-ease), color .2s var(--ch-ease);
}

.ch-search-btn:hover,
.ch-search-btn:focus-visible {
    background: var(--ch-red);
    color: var(--ch-white);
}

/* Accès rapides */
.ch-quick {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.ch-quick-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ch-grey-dark);
    font-size: .95rem;
    font-weight: 500;
    text-decoration: none;
    transition: color .2s var(--ch-ease);
}

/* Nom de l'agence du client : tronqué proprement s'il est long */
.ch-quick-agence .ch-quick-label {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ch-quick-link > i,
.ch-quick-icon > i {
    color: var(--ch-red);
    font-size: 1.3rem;
}

.ch-quick-link:hover {
    color: var(--ch-red);
}

.ch-quick-icon {
    position: relative;
    display: inline-flex;
}

.ch-quick-icon .ch-badge {
    position: absolute;
    top: -9px;
    right: -12px;
    border: 2px solid var(--ch-white);
}

/* Compte */
.ch-account {
    position: relative;
}

.ch-account-btn,
.ch-login-btn {
    min-height: 40px;
    padding: 0 18px;
    border-radius: var(--ch-radius-sm);
}

.ch-account-chevron {
    font-size: .8rem;
    transition: transform .2s var(--ch-ease);
}

.ch-account-btn[aria-expanded="true"] .ch-account-chevron {
    transform: rotate(180deg);
}

.ch-account-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 950;
    min-width: 250px;
    padding: 8px;
    border: 1px solid var(--ch-border);
    border-radius: var(--ch-radius);
    background: var(--ch-white);
    box-shadow: var(--ch-shadow-lg);
    animation: ch-fade-down .18s var(--ch-ease);
}

.ch-account-menu[hidden] {
    display: none;
}

.ch-account-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--ch-radius-sm);
    color: var(--ch-text);
    font-size: .93rem;
    text-decoration: none;
}

.ch-account-menu a i {
    width: 18px;
    color: var(--ch-grey);
    text-align: center;
}

.ch-account-menu a:hover,
.ch-account-menu a:focus-visible {
    background: var(--ch-grey-light);
    color: var(--ch-red);
}

.ch-account-menu a:hover i {
    color: var(--ch-red);
}

.ch-account-menu .ch-account-logout {
    margin-top: 6px;
    border-top: 1px solid var(--ch-border);
    border-radius: 0 0 var(--ch-radius-sm) var(--ch-radius-sm);
    color: var(--ch-red);
}

@keyframes ch-fade-down {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Burger (mobile uniquement) */
.ch-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0 10px;
    border: 0;
    border-radius: var(--ch-radius-sm);
    background: transparent;
    cursor: pointer;
}

.ch-burger span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--ch-grey-dark);
}

/* Barre de navigation */
.ch-header-nav {
    border-top: 1px solid var(--ch-grey-light);
    border-bottom: 1px solid var(--ch-border);
    background: var(--ch-white);
}

.ch-nav-row {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: var(--ch-header-nav-h);
}

.ch-products-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    height: 38px;
    padding: 0 26px 0 18px;
    border: 0;
    border-radius: var(--ch-radius-pill);
    background: var(--ch-grey);
    color: var(--ch-white);
    font-family: var(--ch-font);
    font-size: .98rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .2s var(--ch-ease);
}

.ch-products-btn:hover,
.ch-products-btn:focus-visible,
.ch-products-btn[aria-expanded="true"] {
    background: var(--ch-red);
}

.ch-products-btn-icon {
    display: inline-flex;
    flex-direction: column;
    gap: 3px;
    width: 18px;
}

.ch-products-btn-icon span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.ch-nav-sep {
    width: 1px;
    height: 26px;
    background: var(--ch-grey);
    opacity: .5;
}

.ch-nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ch-nav-links a {
    position: relative;
    display: block;
    padding: 8px 12px;
    color: var(--ch-grey-dark);
    font-size: .98rem;
    text-decoration: none;
    transition: color .2s var(--ch-ease);
}

.ch-nav-links a::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 2px;
    height: 2px;
    border-radius: 2px;
    background: var(--ch-red);
    transform: scaleX(0);
    transition: transform .2s var(--ch-ease);
}

.ch-nav-links a:hover,
.ch-nav-links a.is-active {
    color: var(--ch-red);
}

.ch-nav-links a:hover::after,
.ch-nav-links a.is-active::after {
    transform: scaleX(1);
}

.ch-nav-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    color: var(--ch-grey-dark);
    font-size: .92rem;
    font-weight: 700;
    text-decoration: none;
}

.ch-nav-phone i {
    color: var(--ch-red);
}

.ch-nav-phone:hover {
    color: var(--ch-red);
}

/* --------------------------------------------------------------------------
   Menu latéral "Produits"
   -------------------------------------------------------------------------- */
.ch-drawer {
    position: fixed;
    inset: 0;
    z-index: 1000;
    visibility: hidden;
    transition: visibility 0s linear .3s;
}

.ch-drawer.is-open {
    visibility: visible;
    transition: visibility 0s;
}

.ch-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(30, 30, 32, .5);
    opacity: 0;
    transition: opacity .3s var(--ch-ease);
}

.ch-drawer.is-open .ch-drawer-backdrop {
    opacity: 1;
}

.ch-drawer-panels {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--ch-drawer-w);
    max-width: calc(100vw - 48px);
    transform: translateX(-100%);
    transition: transform .3s var(--ch-ease);
}

.ch-drawer.is-open .ch-drawer-panels {
    transform: translateX(0);
}

.ch-drawer-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    background: var(--ch-white);
}

.ch-drawer-root {
    left: 0;
    width: 100%;
    z-index: 2;
    box-shadow: 4px 0 24px rgba(0, 0, 0, .12);
}

/* Desktop : le sous-panneau s'ouvre à droite du panneau principal */
.ch-drawer-sub {
    left: 100%;
    z-index: 1;
    width: var(--ch-drawer-sub-w);
    border-left: 1px solid var(--ch-border);
    box-shadow: 8px 0 24px rgba(0, 0, 0, .1);
    visibility: hidden;
    opacity: 0;
    transform: translateX(-24px);
    transition: opacity .22s var(--ch-ease), transform .22s var(--ch-ease), visibility 0s linear .22s;
}

.ch-drawer-sub.is-active {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
    transition: opacity .22s var(--ch-ease), transform .22s var(--ch-ease), visibility 0s;
}

.ch-drawer-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 72px;
    padding: 0 16px 0 24px;
    border-bottom: 1px solid var(--ch-grey-light);
}

.ch-drawer-title {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--ch-text);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

.ch-drawer-title i {
    color: var(--ch-red);
}

.ch-drawer-close,
.ch-drawer-back {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1.5px solid var(--ch-border);
    border-radius: 50%;
    background: var(--ch-white);
    color: var(--ch-grey-dark);
    font-size: 1.05rem;
    cursor: pointer;
    transition: border-color .2s var(--ch-ease), color .2s var(--ch-ease), background-color .2s var(--ch-ease);
}

.ch-drawer-close:hover,
.ch-drawer-back:hover {
    border-color: var(--ch-red);
    background: var(--ch-red);
    color: var(--ch-white);
}

/* Desktop : le retour est inutile, le panneau principal reste visible */
.ch-drawer-back {
    display: none;
}

.ch-drawer-sub .ch-drawer-head {
    padding-left: 24px;
}

.ch-drawer-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px 0 28px;
    scrollbar-width: thin;
    scrollbar-color: var(--ch-border) transparent;
}

.ch-drawer-group + .ch-drawer-group {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--ch-grey-light);
}

.ch-drawer-group-title {
    display: block;
    margin: 0;
    padding: 14px 24px 8px;
    color: var(--ch-text);
    font-size: 1.02rem;
    font-weight: 700;
    text-decoration: none;
}

a.ch-drawer-group-title:hover {
    color: var(--ch-red);
}

.ch-drawer-list,
.ch-drawer-sublist {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ch-drawer-item {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 44px;
    padding: 8px 20px 8px 24px;
    border: 0;
    background: transparent;
    color: var(--ch-grey-dark);
    font-family: var(--ch-font);
    font-size: .95rem;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s var(--ch-ease), color .15s var(--ch-ease);
}

.ch-drawer-item-icon {
    flex: 0 0 24px;
    color: var(--ch-red);
    font-size: 1.2rem;
    text-align: center;
}

.ch-drawer-item-label {
    flex: 1 1 auto;
}

.ch-drawer-item-arrow {
    flex: 0 0 auto;
    color: var(--ch-grey);
    font-size: .85rem;
    transition: transform .15s var(--ch-ease), color .15s var(--ch-ease);
}

.ch-drawer-item:hover,
.ch-drawer-item[aria-expanded="true"] {
    background: var(--ch-grey-light);
    color: var(--ch-text);
}

.ch-drawer-item[aria-expanded="true"] {
    box-shadow: inset 4px 0 0 var(--ch-red);
    font-weight: 700;
}

.ch-drawer-item:hover .ch-drawer-item-arrow,
.ch-drawer-item[aria-expanded="true"] .ch-drawer-item-arrow {
    color: var(--ch-red);
    transform: translateX(3px);
}

.ch-drawer-empty {
    margin: 0;
    padding: 16px 24px;
    color: var(--ch-grey-dark);
}

.ch-drawer-catalog {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 24px 0;
    padding: 12px 16px;
    border: 1.5px dashed var(--ch-border);
    border-radius: var(--ch-radius-sm);
    color: var(--ch-grey-dark);
    font-weight: 700;
    text-decoration: none;
}

.ch-drawer-catalog i {
    color: var(--ch-red);
}

.ch-drawer-catalog:hover {
    border-color: var(--ch-red);
    color: var(--ch-red);
}

/* Sous-panneau : lien "Tous les produits" + sous-familles */
.ch-drawer-all {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 16px 12px;
    padding: 14px 16px;
    border-radius: var(--ch-radius-sm);
    background: var(--ch-red-soft);
    color: var(--ch-red);
    font-weight: 700;
    text-decoration: none;
    transition: background-color .15s var(--ch-ease), color .15s var(--ch-ease);
}

.ch-drawer-all:hover {
    background: var(--ch-red);
    color: var(--ch-white);
}

.ch-drawer-sublist a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 42px;
    padding: 8px 24px;
    color: var(--ch-text);
    font-size: .95rem;
    text-decoration: none;
    transition: background-color .15s var(--ch-ease), color .15s var(--ch-ease);
}

.ch-drawer-sublist a:hover {
    background: var(--ch-grey-light);
    color: var(--ch-red);
}

/* Sous-famille : tiret devant le libellé (repère de liste) */
.ch-drawer-dash {
    flex: 0 0 12px;
    width: 12px;
    height: 2px;
    border-radius: 2px;
    background: var(--ch-red);
    opacity: .55;
    transition: opacity .15s var(--ch-ease), transform .15s var(--ch-ease);
}

.ch-drawer-sublist a:hover .ch-drawer-dash,
.ch-drawer-sublist a:focus-visible .ch-drawer-dash {
    opacity: 1;
    transform: scaleX(1.35);
    transform-origin: left center;
}

.ch-drawer-sublabel {
    flex: 1 1 auto;
    min-width: 0;
}

.ch-drawer-count {
    flex: 0 0 auto;
    min-width: 32px;
    padding: 2px 8px;
    border-radius: var(--ch-radius-pill);
    background: var(--ch-grey-light);
    color: var(--ch-grey-dark);
    font-size: .75rem;
    text-align: center;
}

.ch-drawer-sublist a:hover .ch-drawer-count {
    background: var(--ch-white);
}

/* Navigation / compte dans le menu : mobile uniquement */
.ch-drawer-mobile {
    display: none;
    margin-top: 20px;
    padding-top: 8px;
    border-top: 1px solid var(--ch-grey-light);
}

.ch-drawer-mobile .ch-btn {
    margin: 8px 24px 0;
    width: calc(100% - 48px);
}

.ch-badge-inline {
    margin-left: auto;
}

.ch-drawer-logout,
.ch-drawer-logout .ch-drawer-item-icon {
    color: var(--ch-red);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.ch-footer {
    margin-top: 0;
    font-family: var(--ch-font);
}

.ch-reassurance {
    background: var(--ch-red);
    border-top: 0;
    color: var(--ch-white);
}

.ch-reassurance-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding-top: 34px;
    padding-bottom: 34px;
}

.ch-reassurance-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--ch-white);
    text-align: center;
    text-decoration: none;
}

.ch-reassurance-item > i {
    color: var(--ch-white);
    font-size: 2.3rem;
    transition: color .2s var(--ch-ease), transform .2s var(--ch-ease);
}

.ch-reassurance-item p {
    margin: 0;
    line-height: 1.35;
}

.ch-reassurance-item strong {
    display: block;
    color: var(--ch-white);
    font-size: 1rem;
}

.ch-reassurance-item span {
    display: block;
    color: var(--ch-white);
    font-size: .9rem;
}

a.ch-reassurance-item:hover > i,
a.ch-reassurance-item:focus-visible > i {
    color: var(--ch-white);
    transform: translateY(-3px);
}

a.ch-reassurance-item:hover strong,
a.ch-reassurance-item:focus-visible strong {
    text-decoration: underline;
    text-underline-offset: 3px;
}

a.ch-reassurance-item:focus-visible {
    outline: 2px solid var(--ch-white);
    outline-offset: 4px;
    border-radius: var(--ch-radius-sm);
}

.ch-footer-main {
    background: var(--ch-white);
    border-top: 1px solid var(--ch-border);
}

.ch-footer-grid {
    display: grid;
    grid-template-columns: 1.15fr 1.1fr 1fr 1fr;
    gap: 40px;
    padding-top: 48px;
    padding-bottom: 44px;
}

.ch-footer-brand img {
    display: block;
    width: auto;
    height: 56px;
    margin-bottom: 18px;
}

.ch-footer-brand p {
    max-width: 320px;
    margin: 0 0 20px;
    color: var(--ch-grey-dark);
    font-size: .92rem;
    line-height: 1.6;
}

.ch-footer-title {
    position: relative;
    margin: 0 0 18px;
    padding-bottom: 10px;
    color: var(--ch-text);
    font-size: .92rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* Deux rubriques dans une même colonne */
.ch-footer-section + .ch-footer-section {
    margin-top: 30px;
}

/* Page à venir : lien affiché sans renvoi */
.ch-footer-col a.is-soon {
    cursor: default;
}

.ch-footer-col a.is-soon:hover {
    color: var(--ch-grey-dark);
}

/* Réseaux sociaux */
.ch-footer-social {
    display: flex;
    gap: 10px;
}

.ch-footer-col .ch-footer-social li + li {
    margin-top: 0;
}

.ch-footer .ch-footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1.5px solid var(--ch-border);
    border-radius: 50%;
    color: var(--ch-text);
    font-size: 1.15rem;
    transition: background-color .2s var(--ch-ease), border-color .2s var(--ch-ease), color .2s var(--ch-ease);
}

/* Sélecteur renforcé : prime sur .ch-footer-col a:hover (texte rouge) déclaré plus loin */
.ch-footer .ch-footer-social a:hover,
.ch-footer .ch-footer-social a:focus-visible {
    border-color: var(--ch-red);
    background: var(--ch-red);
    color: var(--ch-white);
}

/* Logos des enseignes du groupe */
.ch-footer-partners {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 58px));
    gap: 10px;
    margin-top: 20px !important;
}

.ch-footer-col .ch-footer-partners li + li {
    margin-top: 0;
}

.ch-footer-partners li {
    min-width: 0;
}

/* Logos côte à côte : carrés qui rétrécissent si la colonne est étroite */
.ch-footer-partners a {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 4px;
    border: 1px solid var(--ch-border);
    border-radius: var(--ch-radius-sm);
    background: var(--ch-white);
    transition: border-color .2s var(--ch-ease), box-shadow .2s var(--ch-ease), transform .2s var(--ch-ease);
}

.ch-footer-partners img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ch-footer-partners a:hover,
.ch-footer-partners a:focus-visible {
    border-color: var(--ch-red);
    box-shadow: var(--ch-shadow);
    transform: translateY(-2px);
}

.ch-footer-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 32px;
    height: 2px;
    background: var(--ch-red);
}

.ch-footer-col ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ch-footer-col li + li {
    margin-top: 10px;
}

.ch-footer-col a {
    color: var(--ch-grey-dark);
    font-size: .92rem;
    text-decoration: none;
    transition: color .2s var(--ch-ease);
}

.ch-footer-col a:hover {
    color: var(--ch-red);
}

.ch-footer-brand .ch-btn,
.ch-footer-brand .ch-btn:hover {
    color: var(--ch-white);
}

.ch-footer-contact li {
    display: flex;
    gap: 12px;
    color: var(--ch-grey-dark);
    font-size: .92rem;
    line-height: 1.5;
}

.ch-footer-contact i {
    flex: 0 0 16px;
    margin-top: 3px;
    color: var(--ch-red);
}

.ch-footer-bottom {
    background: var(--ch-grey);
    color: var(--ch-white);
}

.ch-footer-bottom-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    padding-top: 16px;
    padding-bottom: 16px;
    font-size: .85rem;
}

.ch-footer-bottom p {
    margin: 0;
}

.ch-footer-bottom ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ch-footer-bottom a {
    color: var(--ch-white);
    text-decoration: none;
}

.ch-footer-bottom a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Écran de chargement (recherche, filtres...) : couleurs de la charte
   Surcharge css/styles.css (barre et texte bleus à l'origine)
   -------------------------------------------------------------------------- */
.search-loader {
    background: rgba(255, 255, 255, .96);
}

.search-loader-bar {
    height: 5px;
    background: rgba(208, 52, 58, .14);
}

.search-loader-bar span {
    background: linear-gradient(90deg, var(--ch-red-dark), var(--ch-red));
}

.search-loader-text {
    color: var(--ch-grey-dark);
    font-family: var(--ch-font);
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   Popup de recherche historique : jamais affichée
   -------------------------------------------------------------------------- */
#searchPopup[hidden] {
    display: none !important;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
    .ch-header-row {
        gap: 22px;
    }

    .ch-nav-phone {
        display: none;
    }
}

@media (max-width: 1023px) {
    :root {
        --ch-gutter: 16px;
        --ch-header-main-h: auto;
    }

    /* Header mobile : burger | logo | accès rapides, recherche sur 2e ligne */
    .ch-header-row {
        flex-wrap: wrap;
        gap: 8px 12px;
        padding-top: 10px;
        padding-bottom: 12px;
    }

    .ch-burger {
        display: flex;
        margin-left: -8px;
    }

    .ch-logo img {
        height: 44px;
    }

    .ch-quick {
        margin-left: auto;
        gap: 6px;
    }

    .ch-search {
        order: 5;
        flex: 1 1 100%;
        max-width: none;
    }

    .ch-search-input {
        height: 44px;
        font-size: 16px; /* évite le zoom automatique iOS */
    }

    .ch-quick-label,
    .ch-account-label,
    .ch-account-chevron,
    .ch-quick-agence {
        display: none;
    }

    .ch-quick-link {
        justify-content: center;
        width: 44px;
        height: 44px;
    }

    .ch-account-btn,
    .ch-login-btn {
        width: 44px;
        min-height: 44px;
        padding: 0;
        border-radius: 50%;
    }

    .ch-account-btn i,
    .ch-login-btn i {
        font-size: 1.1rem;
    }

    .ch-header-nav {
        display: none;
    }

    /* Menu : les panneaux glissent l'un sur l'autre */
    .ch-drawer-panels {
        width: 400px;
    }

    .ch-drawer-sub {
        left: 0;
        z-index: 3;
        width: 100%;
        border-left: 0;
        box-shadow: none;
        opacity: 1;
        transform: translateX(100%);
        transition: transform .28s var(--ch-ease), visibility 0s linear .28s;
    }

    .ch-drawer-sub.is-active {
        transform: translateX(0);
        transition: transform .28s var(--ch-ease), visibility 0s;
    }

    .ch-drawer-sub .ch-drawer-head {
        padding-left: 12px;
    }

    .ch-drawer-back {
        display: inline-flex;
    }

    .ch-drawer-item[aria-expanded="true"] {
        box-shadow: none;
        font-weight: 400;
    }

    .ch-drawer-mobile {
        display: block;
    }

    .ch-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 36px 32px;
    }
}

@media (max-width: 640px) {
    .ch-section-title {
        gap: 14px;
        margin-bottom: 26px;
    }

    .ch-reassurance-grid {
        grid-template-columns: 1fr;
        gap: 22px;
        padding-top: 28px;
        padding-bottom: 28px;
    }

    .ch-reassurance-item {
        flex-direction: row;
        text-align: left;
        gap: 16px;
    }

    .ch-reassurance-item > i {
        flex: 0 0 44px;
        font-size: 1.9rem;
        text-align: center;
    }

    .ch-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 30px 20px;
        padding-top: 36px;
        padding-bottom: 32px;
    }

    .ch-footer-col a {
        font-size: .88rem;
    }

    /* Réseaux sociaux et logos en pleine largeur : logos à taille normale */
    .ch-footer-col:last-child {
        grid-column: 1 / -1;
    }

    .ch-footer-bottom-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ch-drawer,
    .ch-drawer-backdrop,
    .ch-drawer-panels,
    .ch-drawer-sub,
    .ch-btn,
    .ch-account-menu {
        transition: none !important;
        animation: none !important;
    }
}

/* --------------------------------------------------------------------------
   Bouton « Revenir en haut » commun à toutes les pages (créé par js/script.js)
   -------------------------------------------------------------------------- */
.ch-top {
    position: fixed;
    z-index: 800;
    right: 24px;
    bottom: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: var(--ch-red);
    box-shadow: 0 8px 22px rgba(208, 52, 58, .35);
    color: var(--ch-white);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background .2s var(--ch-ease), transform .2s var(--ch-ease);
}

.ch-top[hidden] {
    display: none;
}

.ch-top:hover,
.ch-top:focus-visible {
    background: var(--ch-red-dark);
    outline: none;
    transform: translateY(-2px);
}

.ch-top:focus-visible {
    box-shadow: 0 0 0 3px var(--ch-white), 0 0 0 5px var(--ch-red);
}

@media (max-width: 767.98px) {
    .ch-top {
        right: 16px;
        bottom: calc(16px + env(safe-area-inset-bottom));
        width: 44px;
        height: 44px;
    }

    /* Au-dessus des barres fixes du panier et de la validation de commande */
    body:has(.pn-mobilebar:not([hidden])) .ch-top,
    body:has(.vc-mobilebar:not([hidden])) .ch-top {
        bottom: calc(96px + env(safe-area-inset-bottom));
    }
}

@media (prefers-reduced-motion: reduce) {
    .ch-top {
        transition: none;
    }
}

/* --------------------------------------------------------------------------
   Boutons « Rafraîchir » (commandes, devis, factures) : état pendant la mise à jour (js/script.js)
   -------------------------------------------------------------------------- */
[data-refresh].is-loading {
    cursor: progress;
    opacity: 1;
}

[data-refresh].is-loading i {
    animation: ch-spin .9s linear infinite;
}

[data-refresh].is-error {
    border-color: var(--ch-red);
    color: var(--ch-red);
}

@keyframes ch-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    [data-refresh].is-loading i {
        animation-duration: 2.5s;
    }
}

/* --------------------------------------------------------------------------
   Libellés des groupes (univers, familles, sous-familles) : toujours en majuscules
   Menu « Produits », accueil, recherche, fils d'Ariane
   -------------------------------------------------------------------------- */
.ch-upper {
    text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Encart « Encours dépassé » (validation de commande, devis) : vue/snippets/encours-alert.php
   -------------------------------------------------------------------------- */
.ch-encours-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 16px 0 0;
    padding: 14px 16px;
    border: 1px solid rgba(208, 52, 58, .35);
    border-left: 4px solid var(--ch-red);
    border-radius: var(--ch-radius-sm);
    background: var(--ch-red-soft);
    text-align: left;
}

.ch-encours-alert-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--ch-red);
    color: var(--ch-white);
    font-size: .95rem;
}

.ch-encours-alert-text {
    min-width: 0;
}

.ch-encours-alert-text p {
    margin: 0 0 4px;
    color: var(--ch-grey-dark);
    font-size: .85rem;
    line-height: 1.5;
}

.ch-encours-alert-text .ch-encours-alert-title {
    color: var(--ch-red-dark);
    font-size: .92rem;
    font-weight: 700;
}

/* Montants : libellé à gauche, valeur à droite, une ligne chacun */
.ch-encours-alert-amounts {
    display: grid;
    gap: 4px;
    margin: 8px 0 6px;
    padding: 8px 10px;
    border-radius: var(--ch-radius-sm);
    background: rgba(255, 255, 255, .7);
}

.ch-encours-alert-amounts > div {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 2px 12px;
}

.ch-encours-alert-amounts dt {
    margin: 0;
    color: var(--ch-grey-dark);
    font-size: .82rem;
    font-weight: 600;
}

.ch-encours-alert-amounts dd {
    margin: 0 0 0 auto;
    color: var(--ch-text);
    font-size: .9rem;
    font-weight: 700;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.ch-encours-alert-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-top: 6px !important;
}

.ch-encours-alert-actions a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ch-red-dark);
    font-weight: 700;
    text-decoration: none;
}

.ch-encours-alert-actions a:hover,
.ch-encours-alert-actions a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Bouton de validation bloqué */
.ch-btn:disabled,
.ch-btn[aria-disabled="true"] {
    opacity: .5;
    cursor: not-allowed;
    box-shadow: none;
    pointer-events: none;
}

/* Menu « Produits » : image de la famille à la place de l'icône
   Cadre identique pour toutes les images du menu (64 × 48 px) : image réduite sans déformation et centrée */
.ch-drawer-item-img {
    display: block;
    flex: 0 0 64px;
    width: 64px;
    height: 48px;
    object-fit: contain;
    object-position: center;
}

.ch-drawer-title-img {
    display: inline-block;
    width: 64px;
    height: 48px;
    object-fit: contain;
    object-position: center;
    vertical-align: middle;
}

/* Menu « Produits » : image de la catégorie principale (ligne service) devant son titre, même cadre que les familles */
.ch-drawer-group-title.has-img {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ch-drawer-group-img {
    display: block;
    flex: 0 0 64px;
    width: 64px;
    height: 48px;
    object-fit: contain;
    object-position: center;
}

/* Menu « Produits » : catégorie sans image, icône générique dans le même cadre 64 × 48 px */
.ch-drawer-generic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--ch-radius-sm);
    background: var(--ch-grey-light);
    color: var(--ch-grey);
    font-size: 1.35rem;
}

.ch-drawer-item:hover .ch-drawer-generic,
a.ch-drawer-group-title:hover .ch-drawer-generic {
    color: var(--ch-red);
}

/* Menu « Produits » : catégorie sans image, icône de liste dans le même cadre 64 × 48 px */
.ch-drawer-listicon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ch-grey-light);
    color: var(--ch-red);
    font-size: 1.3rem;
}

.ch-drawer-item:hover .ch-drawer-listicon,
a.ch-drawer-group-title:hover .ch-drawer-listicon {
    background: var(--ch-red-soft);
    color: var(--ch-red);
}

/* Familles d'un univers : décalées à droite sous le titre de l'univers ;
   sans photo, petite flèche de rattachement (au lieu du cadre 64 × 48 px de l'univers) */
.ch-drawer-group .ch-drawer-item {
    padding-left: 52px;
}

.ch-drawer-subarrow {
    display: inline-flex;
    flex: 0 0 18px;
    align-items: center;
    justify-content: center;
    width: 18px;
    color: var(--ch-red);
    font-size: .95rem;
    opacity: .7;
    transition: opacity .15s var(--ch-ease), transform .15s var(--ch-ease);
}

.ch-drawer-item:hover .ch-drawer-subarrow,
.ch-drawer-item:focus-visible .ch-drawer-subarrow {
    opacity: 1;
    transform: translateX(2px);
}

/* --------------------------------------------------------------------------
   Bandeau « Commande différée » (services YZY indisponibles) : tout en haut du site,
   dans le header collant (reste visible au défilement). Hauteur fixe de 40px, ajoutée
   à --ch-header-nav-h pour que les colonnes collantes des pages passent sous le bandeau
   -------------------------------------------------------------------------- */
:root:has(.ch-differe) {
    --ch-header-nav-h: calc(56px + 40px);
}

.ch-differe ~ .ch-header-nav .ch-nav-row {
    min-height: 56px;
}

.ch-differe {
    height: 40px;
    overflow: hidden;
    background: var(--ch-red);
    color: var(--ch-white);
}

.ch-differe-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 40px;
}

.ch-differe-icon {
    flex-shrink: 0;
    font-size: 1rem;
}

.ch-differe-text {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: .88rem;
    line-height: 1.35;
    text-align: center;
}

.ch-differe-text strong {
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.ch-differe-info {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: var(--ch-white);
    font-size: 1.15rem;
    text-decoration: none;
    transition: background-color .2s var(--ch-ease), transform .2s var(--ch-ease);
}

.ch-differe-info:hover,
.ch-differe-info:focus-visible {
    background: rgba(255, 255, 255, .18);
    color: var(--ch-white);
    transform: scale(1.08);
    outline: none;
}

.ch-differe-info:focus-visible {
    box-shadow: 0 0 0 2px var(--ch-white);
}

@media (max-width: 767.98px) {
    .ch-differe-detail {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   Encart « Mode commande différée » : Mes commandes, Mes devis, Mes factures
   (vue/snippets/differe-alert.php)
   -------------------------------------------------------------------------- */
.ch-differe-alert {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 0 0 24px;
    padding: 16px 18px;
    border: 1px solid #f3c9cb;
    border-left: 4px solid var(--ch-red);
    border-radius: var(--ch-radius);
    background: var(--ch-red-soft, #fbeaeb);
}

.ch-differe-alert-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--ch-red);
    color: var(--ch-white);
    font-size: 1.05rem;
}

.ch-differe-alert-text {
    min-width: 0;
}

.ch-differe-alert-text p {
    margin: 0 0 6px;
    color: var(--ch-text);
    font-size: .9rem;
    line-height: 1.55;
}

.ch-differe-alert-text p:last-child {
    margin-bottom: 0;
}

.ch-differe-alert-text .ch-differe-alert-title {
    margin-bottom: 4px;
    color: var(--ch-red-dark, #b0272d);
    font-size: 1rem;
    font-weight: 700;
}

.ch-differe-alert-text a {
    color: var(--ch-red-dark, #b0272d);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (max-width: 479.98px) {
    .ch-differe-alert {
        padding: 14px;
    }

    .ch-differe-alert-icon {
        width: 34px;
        height: 34px;
        font-size: .95rem;
    }
}

/* Vérification anti-robot Cloudflare Turnstile (library/antirobot.php) : n'apparaît qu'en cas de doute */
.ch-turnstile {
    margin: 12px 0 4px;
}

.ch-turnstile:empty {
    margin: 0;
}
