/* Compléments de style CMS — composants absents du build AdminKit */

/* --- Alertes (non incluses dans AdminKit) --- */
.alert {
    position: relative;
    padding: .9rem 1.15rem;
    margin-bottom: 1.25rem;
    border: 1px solid transparent;
    border-radius: .375rem;
    font-size: .925rem;
}
.alert-dismissible {
    padding-right: 3rem;
}
.alert-dismissible .btn-close {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    padding: 1.05rem 1.15rem;
}
.alert .alert-message {
    display: block;
}
.alert ul {
    margin-bottom: 0;
    padding-left: 1.15rem;
}
.alert-success { color: #0f5132; background-color: #d1e7dd; border-color: #badbcc; }
.alert-danger  { color: #842029; background-color: #f8d7da; border-color: #f5c2c7; }
.alert-warning { color: #664d03; background-color: #fff3cd; border-color: #ffecb5; }
.alert-info    { color: #055160; background-color: #cff4fc; border-color: #b6effb; }

/* --- Barre d'actions collante (formulaires longs) ---
   AdminKit pose « overflow: hidden » sur .main, ce qui empêche position:sticky
   de fonctionner. « clip » découpe de la même façon sans créer de conteneur
   de défilement, la barre peut donc rester visible pendant le scroll. */
.main { overflow-x: clip; overflow-y: visible; }

.page-actions {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: #f5f7fb;
    padding: .85rem 0;
    margin-bottom: 1.25rem;
    transition: box-shadow .15s ease-in-out, padding .15s ease-in-out;
}
.page-actions.is-stuck {
    box-shadow: 0 .5rem .75rem -.5rem rgba(0, 0, 0, .18);
    border-bottom: 1px solid #e3e8ef;
    padding: .6rem 0;
}
.page-actions .page-actions-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}
.page-actions.is-stuck .page-actions-title { font-size: 1.05rem; }
.page-actions .page-actions-meta { transition: opacity .15s ease-in-out; }
.page-actions.is-stuck .page-actions-meta { display: none; }

/* --- Menu latéral : familles ---
   Les intitulés de section d'AdminKit sont très discrets ; on les rend
   lisibles et on aère la séparation entre deux familles. */
.sidebar-header {
    color: rgba(233, 236, 239, .45);
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 1.6rem 1.625rem .55rem;
}

.sidebar-nav > .sidebar-header + .sidebar-item .sidebar-link {
    padding-top: .5rem;
}

/* --- Navigation principale d'un formulaire d'édition --- */
.page-tabs {
    flex-wrap: wrap;
    row-gap: .25rem;
}
.page-tabs .nav-link {
    color: #495057;
    font-size: .875rem;
    padding: .55rem .85rem;
}
.page-tabs .nav-link:hover { color: #3b7ddd; }
.page-tabs .nav-link.active { font-weight: 600; }
.page-tabs .nav-link svg { width: 15px; height: 15px; }
/* Les onglets techniques (HTML, SEO, Réglages) restent en retrait à droite. */
.page-tabs .nav-item.ms-auto ~ .nav-item .nav-link,
.page-tabs .nav-item.ms-auto .nav-link { color: #6c757d; }
.page-tabs .nav-item.ms-auto ~ .nav-item .nav-link.active,
.page-tabs .nav-item.ms-auto .nav-link.active { color: #3b7ddd; }

/* --- SEO : aperçu du résultat de recherche --- */
.seo-preview {
    background: #fff;
    border: 1px solid #e3e8ef;
    border-radius: .5rem;
    padding: .9rem 1.1rem;
    max-width: 620px;
}
.seo-preview-url {
    color: #202124;
    font-size: .78rem;
    line-height: 1.4;
    word-break: break-all;
}
.seo-preview-title {
    color: #1a0dab;
    font-size: 1.15rem;
    line-height: 1.35;
    margin-top: .15rem;
}
.seo-preview-desc {
    color: #4d5156;
    font-size: .85rem;
    line-height: 1.55;
    margin-top: .25rem;
}

/* --- SEO : note et pastilles de contrôle --- */
.seo-score {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    flex: 0 0 auto;
}
.seo-score.is-good { background: #198754; }
.seo-score.is-medium { background: #fd7e14; }
.seo-score.is-bad { background: #dc3545; }

.seo-check-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: .35rem;
    flex: 0 0 auto;
}
.seo-check-ok { background: #198754; }
.seo-check-warning { background: #fd7e14; }
.seo-check-error { background: #dc3545; }

/* --- En-têtes de section : titre + sous-titre trop collés ---
   AdminKit applique une marge négative au sous-titre ; on rétablit un espacement lisible. */
.card-header { padding-top: 1.1rem; padding-bottom: 1.1rem; }
.card-header .card-title { margin-bottom: 0; font-weight: 600; }
.card-header .card-subtitle {
    margin-top: .4rem;
    line-height: 1.45;
    font-weight: 400;
}

/* --- Logo de la barre latérale ---
   Le PNG est blanc sur fond transparent : il n'est lisible que sur le fond sombre du menu.
   Il occupe toute la largeur disponible du menu ; la hauteur suit le ratio de l'image. */
.sidebar-brand-logo {
    display: block;
    width: 100%;
    height: auto;
}
