/* ==========================================================================
   PAGE PLAN DU SITE (vue/plan.php)
   Même présentation que les pages CGV / mentions légales - s'appuie sur css/chavigny.css
   ========================================================================== */

.pl {
    background: var(--ch-white);
    color: var(--ch-text);
    font-family: var(--ch-font);
}

/* --------------------------------------------------------------------------
   En-tête
   -------------------------------------------------------------------------- */
.pl-head {
    padding: 22px 0 32px;
    border-bottom: 1px solid var(--ch-border);
    background: var(--ch-grey-light);
}

.pl-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
    font-size: .85rem;
}

.pl-breadcrumb li {
    display: inline-flex;
    align-items: center;
    color: var(--ch-grey-dark);
}

.pl-breadcrumb li + li::before {
    content: "";
    width: 6px;
    height: 6px;
    margin: 0 12px;
    border-top: 1.5px solid var(--ch-grey);
    border-right: 1.5px solid var(--ch-grey);
    transform: rotate(45deg);
}

.pl-breadcrumb a {
    color: var(--ch-grey-dark);
    text-decoration: none;
}

.pl-breadcrumb a:hover {
    color: var(--ch-red);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pl-breadcrumb [aria-current] {
    color: var(--ch-text);
    font-weight: 700;
}

.pl-kicker {
    margin: 0 0 4px;
    color: var(--ch-red);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.pl-title {
    margin: 0;
    color: var(--ch-text);
    font-family: var(--ch-font);
    font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
    font-weight: 700;
    line-height: 1.15;
}

.pl-intro {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--ch-grey-dark);
    font-size: 1rem;
    line-height: 1.6;
}

.pl-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.pl-stats li {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--ch-radius-pill);
    background: var(--ch-white);
    color: var(--ch-grey-dark);
    font-size: .85rem;
}

.pl-stats strong {
    color: var(--ch-red);
    font-size: .95rem;
}

/* --------------------------------------------------------------------------
   Mise en page : sommaire + contenu
   -------------------------------------------------------------------------- */
.pl-body {
    padding-top: 32px;
    padding-bottom: 72px;
}

.pl-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

.pl-aside {
    position: sticky;
    top: calc(var(--ch-header-main-h) + var(--ch-header-nav-h) + 16px);
}

.pl-aside-card {
    padding: 16px;
    border: 1px solid var(--ch-border);
    border-radius: var(--ch-radius-lg);
    background: var(--ch-white);
}

/* Filtre */
.pl-filter {
    position: relative;
}

.pl-filter > i {
    position: absolute;
    top: 50%;
    left: 16px;
    color: var(--ch-grey);
    transform: translateY(-50%);
    pointer-events: none;
}

.pl-filter input {
    width: 100%;
    height: 44px;
    padding: 0 42px 0 42px;
    border: 1.5px solid var(--ch-border);
    border-radius: var(--ch-radius-pill);
    background: var(--ch-white);
    color: var(--ch-text);
    font-family: inherit;
    font-size: .92rem;
    transition: border-color .2s var(--ch-ease), box-shadow .2s var(--ch-ease);
    -webkit-appearance: none;
    appearance: none;
}

.pl-filter input::-webkit-search-cancel-button {
    display: none;
}

.pl-filter input:focus {
    outline: none;
    border-color: var(--ch-red);
    box-shadow: 0 0 0 4px rgba(208, 52, 58, .12);
}

.pl-filter:focus-within > i {
    color: var(--ch-red);
}

.pl-filter-clear {
    position: absolute;
    top: 50%;
    right: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--ch-grey-dark);
    transform: translateY(-50%);
    cursor: pointer;
}

.pl-filter-clear:hover {
    background: var(--ch-grey-light);
    color: var(--ch-red);
}

.pl-filter-clear[hidden] {
    display: none;
}

.pl-filter-status {
    min-height: 1.2em;
    margin: 6px 0 0 16px;
    color: var(--ch-grey-dark);
    font-size: .78rem;
    font-weight: 700;
}

/* Sommaire */
.pl-toc-title {
    margin: 10px 0 6px 10px;
    color: var(--ch-grey);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.pl-toc ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pl-toc-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--ch-radius-sm);
    color: var(--ch-grey-dark);
    font-size: .9rem;
    text-decoration: none;
    transition: background .2s var(--ch-ease), color .2s var(--ch-ease);
}

.pl-toc-link i {
    width: 18px;
    color: var(--ch-grey);
    text-align: center;
    transition: color .2s var(--ch-ease);
}

.pl-toc-link:hover,
.pl-toc-link:focus-visible {
    background: var(--ch-grey-light);
    color: var(--ch-text);
    text-decoration: none;
}

.pl-toc-link.is-current {
    background: var(--ch-red-soft);
    color: var(--ch-red-dark);
    font-weight: 700;
}

.pl-toc-link.is-current i {
    color: var(--ch-red);
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.pl-section {
    scroll-margin-top: calc(var(--ch-header-main-h) + var(--ch-header-nav-h) + 20px);
}

.pl-section + .pl-section {
    margin-top: 44px;
    padding-top: 40px;
    border-top: 1px solid var(--ch-border);
}

.pl-section[hidden] {
    display: none;
}

.pl.is-filtering .pl-section + .pl-section {
    margin-top: 28px;
    padding-top: 24px;
}

.pl-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 20px;
    margin-bottom: 20px;
}

.pl-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px;
    color: var(--ch-text);
    font-family: var(--ch-font);
    font-size: 1.4rem;
    font-weight: 700;
}

.pl-section-head .pl-section-title {
    margin: 0;
}

.pl-section-title i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--ch-red-soft);
    color: var(--ch-red);
    font-size: 1rem;
}

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

.pl-section-link:hover,
.pl-section-link:focus-visible {
    color: var(--ch-red-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

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

.pl-section-link:hover i {
    transform: translateX(3px);
}

.pl-filterable[hidden],
.pl-filter-group[hidden] {
    display: none !important;
}

.pl-muted {
    color: var(--ch-grey);
    font-weight: 400;
}

/* Pages principales : cartes */
.pl-pages {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pl-page {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 100%;
    padding: 16px;
    border: 1px solid var(--ch-border);
    border-radius: var(--ch-radius);
    color: var(--ch-text);
    text-decoration: none;
    transition: border-color .2s var(--ch-ease), box-shadow .2s var(--ch-ease), transform .2s var(--ch-ease);
}

.pl-page:hover,
.pl-page:focus-visible {
    border-color: transparent;
    box-shadow: var(--ch-shadow-lg);
    color: var(--ch-text);
    text-decoration: none;
    transform: translateY(-2px);
}

.pl-page-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--ch-grey-light);
    color: var(--ch-red);
    font-size: 1.1rem;
}

.pl-page-text {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pl-page-name {
    font-weight: 700;
}

.pl-page-desc {
    color: var(--ch-grey-dark);
    font-size: .82rem;
    line-height: 1.4;
}

.pl-page-arrow {
    color: var(--ch-border);
    transition: color .2s var(--ch-ease), transform .2s var(--ch-ease);
}

.pl-page:hover .pl-page-arrow {
    color: var(--ch-red);
    transform: translateX(2px);
}

/* Catalogue : univers > familles > sous-familles */
.pl-univers + .pl-univers {
    margin-top: 28px;
}

.pl-univers-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 16px;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--ch-text);
    font-family: var(--ch-font);
    font-size: 1.1rem;
    font-weight: 700;
}

.pl-univers-title a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ch-text);
    text-decoration: none;
}

.pl-univers-title a:hover,
.pl-univers-title a:focus-visible {
    color: var(--ch-red);
}

.pl-univers-icon {
    color: var(--ch-red);
}

.pl-univers-count {
    color: var(--ch-grey);
    font-size: .8rem;
    font-weight: 400;
}

.pl-familles {
    margin: 0;
    padding: 0;
    columns: 3 240px;
    column-gap: 28px;
    list-style: none;
}

.pl-famille {
    padding: 10px 0;
    border-bottom: 1px solid var(--ch-grey-light);
    break-inside: avoid;
}

.pl-famille-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.pl-famille-link {
    color: var(--ch-text);
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.pl-famille-link:hover,
.pl-famille-link:focus-visible {
    color: var(--ch-red);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pl-famille-toggle {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 6px;
    min-width: 44px;
    min-height: 32px;
    padding: 0 8px;
    border: 0;
    border-radius: var(--ch-radius-pill);
    background: var(--ch-grey-light);
    color: var(--ch-grey-dark);
    font-family: inherit;
    font-size: .75rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s var(--ch-ease), color .2s var(--ch-ease);
}

.pl-famille-toggle:hover,
.pl-famille-toggle:focus-visible {
    background: var(--ch-red-soft);
    color: var(--ch-red);
    outline: none;
}

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

.pl-famille.is-open .pl-famille-toggle i {
    transform: rotate(180deg);
}

/* Sous-familles : présentes dans la page (indexables), repliées sans is-open */
.pl-sous {
    display: none;
    margin: 8px 0 2px;
    padding: 0 0 0 12px;
    border-left: 2px solid var(--ch-grey-light);
    list-style: none;
}

.pl-famille.is-open .pl-sous {
    display: block;
}

.pl-sous li + li {
    margin-top: 2px;
}

.pl-sous a {
    display: block;
    padding: 4px 6px;
    border-radius: var(--ch-radius-sm);
    color: var(--ch-grey-dark);
    font-size: .86rem;
    line-height: 1.35;
    text-decoration: none;
    overflow-wrap: anywhere;
}

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

/* Marques A-Z */
.pl-letters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.pl-letters[hidden] {
    display: none;
}

.pl-letters a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--ch-border);
    border-radius: var(--ch-radius-sm);
    color: var(--ch-text);
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s var(--ch-ease), border-color .2s var(--ch-ease), color .2s var(--ch-ease);
}

.pl-letters a:hover,
.pl-letters a:focus-visible {
    border-color: var(--ch-red);
    background: var(--ch-red);
    color: var(--ch-white);
}

.pl-marques {
    columns: 4 190px;
    column-gap: 28px;
}

.pl-letter-group {
    margin-bottom: 18px;
    break-inside: avoid;
    scroll-margin-top: calc(var(--ch-header-main-h) + var(--ch-header-nav-h) + 20px);
}

.pl-letter {
    margin: 0 0 6px;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--ch-red);
    color: var(--ch-red);
    font-family: var(--ch-font);
    font-size: 1rem;
    font-weight: 700;
}

.pl-letter-group ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pl-letter-group a {
    display: block;
    padding: 3px 0;
    color: var(--ch-text);
    font-size: .88rem;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.pl-letter-group a:hover,
.pl-letter-group a:focus-visible {
    color: var(--ch-red);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Listes simples : catalogues, agences, informations */
.pl-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
    gap: 8px 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pl-links a {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--ch-grey-light);
    color: var(--ch-text);
    font-size: .92rem;
    text-decoration: none;
}

.pl-links a i {
    flex-shrink: 0;
    width: 16px;
    color: var(--ch-red);
    text-align: center;
}

.pl-links a:hover,
.pl-links a:focus-visible {
    color: var(--ch-red);
}

/* Aucun résultat */
.pl-empty {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 20px;
    padding: 24px;
    border-radius: var(--ch-radius-lg);
    background: var(--ch-grey-light);
}

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

.pl-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--ch-white);
    color: var(--ch-grey-dark);
    font-size: 1.2rem;
}

.pl-empty p {
    display: flex;
    flex: 1 1 260px;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    overflow-wrap: anywhere;
}

.pl-empty p span {
    color: var(--ch-grey-dark);
    font-size: .9rem;
}

/* --------------------------------------------------------------------------
   Tablette : sommaire au-dessus du contenu
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .pl-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .pl-aside {
        position: static;
    }

    .pl-toc ul {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .pl-toc ul::-webkit-scrollbar {
        display: none;
    }

    .pl-toc-link {
        flex-shrink: 0;
        padding: 8px 14px;
        border: 1px solid var(--ch-border);
        border-radius: var(--ch-radius-pill);
        white-space: nowrap;
    }

    .pl-familles {
        columns: 2 220px;
    }
}

/* --------------------------------------------------------------------------
   Mobile
   -------------------------------------------------------------------------- */
@media (max-width: 575.98px) {
    .pl-head {
        padding: 16px 0 22px;
    }

    .pl-body {
        padding-top: 20px;
        padding-bottom: 48px;
    }

    .pl-aside-card {
        padding: 12px;
    }

    .pl-filter input {
        font-size: 16px; /* évite le zoom automatique iOS */
    }

    .pl-section + .pl-section {
        margin-top: 32px;
        padding-top: 28px;
    }

    .pl-section-title {
        font-size: 1.2rem;
    }

    .pl-section-title i {
        width: 34px;
        height: 34px;
        font-size: .9rem;
    }

    .pl-familles {
        columns: 1;
    }

    .pl-famille {
        padding: 12px 0;
    }

    .pl-marques {
        columns: 2;
        column-gap: 16px;
    }

    .pl-letters a {
        min-width: 34px;
        height: 34px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pl-page,
    .pl-page-arrow,
    .pl-section-link i,
    .pl-famille-toggle i {
        transition: none;
    }
}

@media print {
    .pl-aside,
    .pl-letters {
        display: none !important;
    }

    .pl-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .pl-sous {
        display: block !important;
    }
}
