/**
 * Sitemap Styles
 * Design minimaliste avec indentation et hiérarchie typographique
 */

/* === Reset === */
.oq-sitemap ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.oq-sitemap li {
    list-style: none;
    margin: 0 0 0.15rem 0;
    padding: 0;
    background: transparent;
    border: none;
}

.oq-sitemap li::before {
    display: none !important;
    content: none !important;
}

/* === Liens soulignés === */
.oq-sitemap a,
.oq-sitemap .oq-sitemap-label {
    display: inline-block;
    background: transparent;
    border: none;
    margin: 0;
    padding: 0.1rem 0;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(37, 67, 86, 0.4);
    color: var(--opq-navy, #254356);
    line-height: 1.4;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

/* Puce devant chaque item */
.oq-sitemap a::before,
.oq-sitemap .oq-sitemap-label::before {
    content: "•";
    display: inline-block;
    margin-right: 0.4rem;
    color: var(--opq-turquoise, #00acc1);
    text-decoration: none;
}

.oq-sitemap a:hover,
.oq-sitemap a:focus {
    color: var(--opq-turquoise-dark, #00838f);
    text-decoration-color: var(--opq-turquoise-dark, #00838f);
}

/* === Libellés non cliquables === */
.oq-sitemap-label {
    cursor: default;
    font-weight: 600;
}

/* === Indentation par niveau === */
.oq-sitemap li.oq-depth-0 { margin-left: 0; }
.oq-sitemap li.oq-depth-1 { margin-left: 0.75rem; }
.oq-sitemap li.oq-depth-2 { margin-left: 1.5rem; }
.oq-sitemap li.oq-depth-3 { margin-left: 2.25rem; }
.oq-sitemap li.oq-depth-4 { margin-left: 3rem; }

/* === Hiérarchie typographique (2 niveaux) === */
/* Niveau 0 : plus grand et gras */
.oq-sitemap li.oq-depth-0 > a,
.oq-sitemap li.oq-depth-0 > .oq-sitemap-label {
    font-weight: 700;
    font-size: 1.05rem;
}

/* Tous les autres niveaux : style identique */
.oq-sitemap li.oq-depth-1 > a,
.oq-sitemap li.oq-depth-2 > a,
.oq-sitemap li.oq-depth-3 > a,
.oq-sitemap li.oq-depth-4 > a {
    font-weight: 400;
    font-size: 0.95rem;
}

/* === Responsive === */
@media (max-width: 768px) {
    .oq-sitemap li.oq-depth-1 { margin-left: 0.5rem; }
    .oq-sitemap li.oq-depth-2 { margin-left: 1rem; }
    .oq-sitemap li.oq-depth-3 { margin-left: 1.5rem; }
    .oq-sitemap li.oq-depth-4 { margin-left: 2rem; }
}

/* === Plier/Déplier === */
.oq-tree-has-children > ul.children {
    display: none;
}

.oq-tree-has-children.is-open > ul.children {
    display: block;
}

/* Item avec toggle */
.oq-sitemap li.oq-tree-has-children {
    background: transparent;
    border: none;
    padding: 0;
    display: block;
    position: relative;
}

/* Lien/label avec espace pour le bouton */
.oq-sitemap li.oq-tree-has-children > a,
.oq-sitemap li.oq-tree-has-children > .oq-sitemap-label {
    padding-right: 1.8rem;
}

/* Les enfants */
.oq-sitemap li.oq-tree-has-children > ul.children {
    margin-top: 0.15rem;
    margin-left: 0;
}

/* Bouton toggle discret */
.oq-tree-toggle {
    background: transparent;
    border: 1px solid var(--opq-navy-light, #3a5a6a);
    border-radius: 3px;
    cursor: pointer;
    width: 1.1em;
    height: 1.1em;
    padding: 0;
    margin: 0;
    line-height: 1;
    text-align: center;
    font-weight: 500;
    color: var(--opq-navy-light, #3a5a6a);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: background-color 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
    position: absolute;
    right: 0;
    top: 0.2rem;
}

.oq-tree-toggle:hover,
.oq-tree-toggle:focus {
    background: var(--opq-navy-light, #3a5a6a);
    color: #fff;
}

.oq-tree-toggle::before {
    content: "+";
}

.oq-tree-has-children.is-open > .oq-tree-toggle::before {
    content: "−";
}

/* === Focus visible pour accessibilité === */
.oq-sitemap a:focus-visible,
.oq-tree-toggle:focus-visible {
    outline: 2px solid var(--opq-turquoise, #00acc1);
    outline-offset: 2px;
}

/* === Styles page plan de site (consolidé depuis css-perso.css) === */
.oq-sitemap > ul > li:first-child {
    list-style-type: none;
    margin-left: -25px;
}

.oq-sitemap .children li {
    list-style-type: none;
    margin-left: 25px;
}
