/* Plan du site (templates/cms/sitemap.tpl) — refonte UX/UI du 12/11/2026.
   Chargé uniquement sur la page plan-site (lien dans le template), hors bundle CCC de theme.css.
   Couleurs : variables du thème (--yellow, --grey-antracite, --light-grey, --grey). */

.page-sitemap {
    --sm-ink: #1c1c1c;
    --sm-muted: #5b5b5b;
    --sm-line: #e6e2e2;
    --sm-dark: var(--grey-antracite, #2E2E2E);
    --sm-accent: var(--yellow, #FFC501);
    --sm-soft: var(--light-grey, #F3F0F0);
    --sm-radius: 16px;
    --sm-ease: cubic-bezier(.2, .7, .2, 1);
}

.sm-page {
    color: var(--sm-ink);
    padding-bottom: 64px;
}

.sm-page a {
    text-decoration: none;
}

.sm-page a:focus-visible,
.sm-page button:focus-visible,
.sm-page input:focus-visible {
    outline: 3px solid var(--sm-accent);
    outline-offset: 2px;
    box-shadow: 0 0 0 5px var(--sm-ink);
}

.sm-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--sm-muted);
}

.sm-eyebrow::before {
    content: "";
    width: 28px;
    height: 4px;
    border-radius: 2px;
    background: var(--sm-accent);
}

/* ---------- En-tête ---------- */
.sm-hero {
    position: relative;
    display: grid;
    gap: 24px;
    margin: 8px 0 32px;
    padding: 28px 22px;
    border-radius: var(--sm-radius);
    background: var(--sm-soft);
    overflow: hidden;
    isolation: isolate;
}

/* Rappel de bande de roulement en filigrane, coin droit */
.sm-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    right: -60px;
    top: -60px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background:
        repeating-linear-gradient(115deg, rgba(46, 46, 46, .07) 0 10px, transparent 10px 22px),
        radial-gradient(circle, transparent 0 38%, rgba(255, 197, 1, .35) 38% 41%, transparent 41%);
}

.sm-title {
    margin: 0 0 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(32px, 6vw, 52px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.02em;
    color: var(--sm-ink);
}

.sm-lead {
    max-width: 58ch;
    margin: 0;
    font-size: 17px;
    line-height: 1.6;
    color: var(--sm-muted);
}

.sm-jump ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Même ordre que les cartes : Catégories en premier */
.sm-jump li:has(a[href="#sm-categories"]) {
    order: -1;
}

.sm-jump a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 1.5px solid var(--sm-dark);
    border-radius: 999px;
    background: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--sm-ink);
    transition: background-color .2s var(--sm-ease), color .2s var(--sm-ease), transform .2s var(--sm-ease);
}

.sm-jump a:hover {
    background: var(--sm-dark);
    color: #fff;
}

.sm-jump a.sm-jump-brands {
    border-color: var(--sm-accent);
    background: var(--sm-accent);
}

.sm-jump a.sm-jump-brands:hover {
    border-color: var(--sm-dark);
    background: var(--sm-dark);
    color: #fff;
}

.sm-jump a.sm-jump-brands span {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--sm-dark);
    color: #fff;
    font-size: 12px;
}

/* ---------- Rubriques ---------- */
.sm-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin-bottom: 48px;
}

.sm-card {
    padding: 24px 22px 14px;
    border: 1px solid var(--sm-line);
    border-radius: var(--sm-radius);
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    scroll-margin-top: 24px;
}

.sm-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.sm-card-ico {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--sm-soft);
    color: var(--sm-ink);
}

.sm-card-title {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.01em;
    text-transform: none;
    border: 0;
    padding: 0;
}

.sm-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sm-list li {
    margin: 0;
}

.sm-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 10px 2px;
    border-bottom: 1px solid var(--sm-line);
    font-size: 16px;
    line-height: 1.35;
    color: var(--sm-ink);
}

.sm-list > li:last-child > a {
    border-bottom: 0;
}

.sm-ico-arrow {
    flex: none;
    color: #9a9a9a;
    transition: transform .2s var(--sm-ease), color .2s var(--sm-ease);
}

.sm-list a:hover span {
    text-decoration: underline;
    text-decoration-color: var(--sm-accent);
    text-decoration-thickness: 3px;
    text-underline-offset: 4px;
}

.sm-list a:hover .sm-ico-arrow {
    color: var(--sm-ink);
    transform: translateX(4px);
}

.sm-list a[aria-current="page"] {
    color: var(--sm-muted);
}

.sm-list a[aria-current="page"]::after {
    content: "Vous êtes ici";
    order: 2;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--sm-soft);
    font-size: 12px;
    font-weight: 700;
    color: var(--sm-muted);
}

.sm-list a[aria-current="page"] .sm-ico-arrow {
    display: none;
}

.sm-list.nested {
    margin-left: 14px;
    padding-left: 12px;
    border-left: 2px solid var(--sm-line);
}

/* Carte « Catégories » mise en avant : fond sombre, grandes tuiles, placée en premier */
.sm-card--categories {
    order: -1;
    border-color: var(--sm-dark);
    background: var(--sm-dark);
    color: #fff;
}

.sm-card--categories .sm-card-ico {
    background: var(--sm-accent);
    color: var(--sm-dark);
}

.sm-card--categories .sm-card-title {
    color: #fff;
}

.sm-card--categories > .sm-list {
    display: grid;
    gap: 10px;
    margin: 14px 0 10px;
}

.sm-card--categories > .sm-list > li > a {
    min-height: 72px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    transition: background-color .2s var(--sm-ease), border-color .2s var(--sm-ease), color .2s var(--sm-ease);
}

.sm-card--categories > .sm-list > li > a .sm-ico-arrow {
    width: 22px;
    height: 22px;
    color: var(--sm-accent);
}

.sm-card--categories > .sm-list > li > a:hover {
    border-color: var(--sm-accent);
    background: var(--sm-accent);
    color: var(--sm-dark);
}

.sm-card--categories > .sm-list > li > a:hover span {
    text-decoration: none;
}

.sm-card--categories > .sm-list > li > a:hover .sm-ico-arrow {
    color: var(--sm-dark);
}

.sm-card--categories .sm-list.nested a {
    border-bottom-color: rgba(255, 255, 255, .12);
    color: #fff;
}

/* ---------- Marques ---------- */
.sm-brands {
    border: 1px solid var(--sm-line);
    border-radius: var(--sm-radius);
    background: #fff;
    scroll-margin-top: 16px;
}

.sm-brands-head {
    display: grid;
    gap: 22px;
    padding: 28px 22px;
    border-radius: var(--sm-radius) var(--sm-radius) 0 0;
    background: var(--sm-dark);
    color: #fff;
}

.sm-brands-head .sm-eyebrow {
    color: var(--sm-accent);
}

.sm-brands-title {
    margin: 0 0 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(26px, 4.5vw, 38px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.02em;
    color: #fff;
    text-transform: none;
    border: 0;
    padding: 0;
}

.sm-brands-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    font-weight: 700;
    color: #fff;
}

.sm-brands-all .sm-ico-arrow {
    color: var(--sm-accent);
}

.sm-brands-all:hover {
    color: var(--sm-accent);
}

.sm-brands-all:hover .sm-ico-arrow {
    transform: translateX(4px);
}

.sm-search-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.sm-search-field {
    position: relative;
}

.sm-search-ico {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--sm-muted);
    pointer-events: none;
}

.sm-page .sm-search-input {
    width: 100%;
    height: 54px;
    padding: 0 16px 0 48px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: #fff;
    font-size: 16px;
    color: var(--sm-ink);
    -webkit-appearance: none;
    appearance: none;
}

.sm-page .sm-search-input:focus {
    border-color: var(--sm-accent);
    outline: none;
}

.sm-search-status {
    margin: 8px 0 0;
    font-size: 14px;
    color: #cfcfcf;
}

/* Index A–Z collant pendant le défilement des marques */
.sm-az {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 10px 12px;
    border-bottom: 1px solid var(--sm-line);
    background: rgba(255, 255, 255, .96);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.sm-az ul {
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

.sm-az ul::-webkit-scrollbar {
    display: none;
}

.sm-az li {
    flex: none;
    scroll-snap-align: start;
}

.sm-az a,
.sm-az span {
    display: grid;
    place-items: center;
    min-width: 40px;
    height: 40px;
    padding: 0 6px;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 800;
}

.sm-az a {
    color: var(--sm-ink);
    transition: background-color .15s var(--sm-ease);
}

.sm-az a:hover {
    background: var(--sm-accent);
}

.sm-az a.is-current {
    background: var(--sm-dark);
    color: #fff;
}

.sm-az ul {
    position: relative;
}

.sm-az span,
.sm-az a.is-off {
    color: #c4c4c4;
    cursor: default;
}

.sm-az a.is-off:hover {
    background: transparent;
}

.sm-letters {
    padding: 24px 18px 8px;
}

.sm-letter {
    margin-bottom: 28px;
    scroll-margin-top: 80px;
}

.sm-letter[hidden],
.sm-letter li[hidden] {
    display: none;
}

.sm-letter-title {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 0 0 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    color: var(--sm-ink);
}

.sm-letter-title::after {
    content: "";
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--sm-accent) 0 32px, var(--sm-line) 32px);
    transform: translateY(-6px);
}

.sm-letter ul {
    margin: 0;
    padding: 0;
    list-style: none;
    columns: 2;
    column-gap: 20px;
}

.sm-letter li {
    margin: 0;
    break-inside: avoid;
}

.sm-letter a {
    display: flex;
    align-items: center;
    min-height: 36px;
    padding: 4px 0;
    font-size: 15px;
    line-height: 1.3;
    color: var(--sm-ink);
}

.sm-letter a:hover {
    text-decoration: underline;
    text-decoration-color: var(--sm-accent);
    text-decoration-thickness: 3px;
    text-underline-offset: 4px;
}

.sm-empty {
    margin: 0 22px 28px;
    padding: 28px 22px;
    border: 2px dashed var(--sm-line);
    border-radius: 12px;
    text-align: center;
    color: var(--sm-muted);
}

.sm-empty[hidden] {
    display: none;
}

.sm-empty-title {
    margin: 0 0 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: var(--sm-ink);
}

.sm-empty a {
    color: var(--sm-ink);
    text-decoration: underline;
    text-decoration-color: var(--sm-accent);
    text-decoration-thickness: 2px;
}

.sm-empty-reset {
    min-height: 44px;
    margin-top: 14px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    background: var(--sm-accent);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--sm-ink);
    cursor: pointer;
}

/* ---------- Apparition (désactivée si mouvement réduit) ---------- */
@media (prefers-reduced-motion: no-preference) {
    .sm-hero,
    .sm-card,
    .sm-brands {
        animation: sm-rise .5s var(--sm-ease) both;
    }

    .sm-card:nth-child(2) { animation-delay: .06s; }
    .sm-card:nth-child(3) { animation-delay: .12s; }
    .sm-card:nth-child(4) { animation-delay: .18s; }
    .sm-brands { animation-delay: .2s; }

    html:has(.sm-page) {
        scroll-behavior: smooth;
    }
}

@keyframes sm-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

/* ---------- ≥ 576px ---------- */
@media (min-width: 576px) {
    .sm-letters {
        padding: 28px 22px 8px;
    }

    .sm-letter ul {
        columns: 3;
        column-gap: 32px;
    }
}

/* ---------- ≥ 768px ---------- */
@media (min-width: 768px) {
    .sm-hero {
        padding: 40px 40px 36px;
    }

    .sm-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .sm-card {
        padding: 28px 28px 16px;
    }

    .sm-card--pages {
        grid-column: 1 / -1;
    }

    .sm-card--pages > .sm-list {
        columns: 2;
        column-gap: 40px;
    }

    .sm-card--pages > .sm-list > li {
        break-inside: avoid;
    }

    .sm-card--pages > .sm-list > li:last-child > a {
        border-bottom: 1px solid var(--sm-line);
    }

    .sm-brands-head {
        grid-template-columns: minmax(0, 1fr) minmax(280px, 400px);
        align-items: end;
        padding: 36px 40px;
    }

    .sm-az {
        padding: 10px 28px;
    }

    .sm-az ul {
        flex-wrap: wrap;
        overflow: visible;
    }

    .sm-letters {
        padding: 36px 40px 12px;
    }

    .sm-letter ul {
        columns: 3;
    }

    .sm-empty {
        margin: 0 40px 36px;
    }
}

/* ---------- ≥ 992px : grille asymétrique ---------- */
@media (min-width: 992px) {
    .sm-hero {
        grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
        align-items: end;
        gap: 40px;
        padding: 48px 48px 44px;
    }

    .sm-hero::after {
        right: -40px;
        top: -80px;
        width: 360px;
        height: 360px;
    }

    .sm-jump ul {
        justify-content: flex-end;
    }

    .sm-grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        gap: 24px;
    }

    .sm-card--categories {
        grid-column: 1 / span 5;
        grid-row: 1;
    }

    .sm-card--our_offers {
        grid-column: 6 / span 7;
        grid-row: 1;
    }

    .sm-card--pages {
        grid-column: 1 / span 7;
        grid-row: 2;
    }

    .sm-card--your_account {
        grid-column: 8 / span 5;
        grid-row: 2;
        align-self: start;
    }

    .sm-letter ul {
        columns: 4;
    }
}

@media (min-width: 1200px) {
    .sm-letter ul {
        columns: 5;
    }
}
