/*
 * Override CSS pour le Centre d'aide (leggit/aide/).
 *
 * Charte :
 *   - Palette plus sobre : navy domine, or attenue
 *   - Sidebar laterale style docs (GitBook-like)
 *   - Pas de hero marketing : layout container + content max-width 760px
 *   - Coherence visuelle avec le site (meme typo, meme boutons)
 */

/* ====================================================================
 * Bandeau "Centre d'aide" en haut
 * ==================================================================== */
.lg-aide-banner {
    background: #162542;
    color: #f4ead6;
    font-size: 12px;
    padding: 6px 0;
    letter-spacing: 0.04em;
}
.lg-aide-banner .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.lg-aide-banner-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.15em;
}
.lg-aide-banner-label i {
    color: #b68c5a;
}
.lg-aide-back-to-site {
    color: #f4ead6;
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 12px;
}
.lg-aide-back-to-site:hover {
    opacity: 1;
    color: #b68c5a;
}

/* ====================================================================
 * Header Aide : suffix "Aide" derriere le wordmark
 * ==================================================================== */
.lg-aide-header .leggit-wordmark + .lg-aide-suffix {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #b68c5a;
    margin-left: 0.5rem;
    padding: 2px 8px;
    border: 1px solid currentColor;
    border-radius: 3px;
    vertical-align: middle;
}

/* Le menu top dans l'aide a un look un peu plus sobre */
.lg-aide-nav ul {
    border-top: 1px solid rgba(22, 37, 66, 0.08);
}

/* ====================================================================
 * Layout principal : container 2 colonnes (sidebar + content)
 * ==================================================================== */
.lg-aide-main {
    background: #fbf8f4;
    min-height: 60vh;
    padding: 2.5rem 0 4rem;
}
.lg-aide-container {
    max-width: 1180px;
    margin: 0 auto;
    /* padding-top : compense le menu position:absolute du header (banner + logo + nav).
       Aligne sur le pattern utilise par .leggit-page-header (140px) cote frontend,
       avec un leger surplus pour le bandeau "Centre d aide" specifique a /aide/. */
    padding: 160px 1.5rem 3rem;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2.5rem;
    align-items: start;
}
.lg-aide-container.lg-aide-no-sidebar {
    grid-template-columns: 1fr;
    /* Article = 8/12 de la largeur d'ecran (cf. Bootstrap col-lg-8).
       Capse a 1400px pour les ecrans ultra-wide (au-dela la lecture devient inconfortable). */
    width: 66.6667vw;
    max-width: 1400px;
}

/* En dessous de 992px : on retombe sur la largeur pleine (avec padding lateral du container)
   pour ne pas avoir une carte trop etroite sur tablette / mobile. */
@media (max-width: 991px) {
    .lg-aide-container.lg-aide-no-sidebar {
        width: 100%;
        max-width: 100%;
    }
}

/* Sur tablette : sidebar en haut, repliable */
@media (max-width: 991px) {
    .lg-aide-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding-top: 130px; /* nav repliee en burger : header plus court */
    }
}
@media (max-width: 768px) {
    .lg-aide-container {
        padding-top: 110px;
    }
}

/* ====================================================================
 * Sidebar laterale (TOC docs)
 * ==================================================================== */
.lg-aide-sidebar {
    position: sticky;
    top: 1.5rem;
    align-self: start;
}
.lg-aide-sidebar-inner {
    background: #ffffff;
    border: 1px solid rgba(22, 37, 66, 0.1);
    border-radius: 8px;
    padding: 1.2rem 1rem;
}
.lg-aide-sidebar-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 15px;
    font-weight: 600;
    color: #162542;
    margin: 0 0 0.8rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(22, 37, 66, 0.08);
    letter-spacing: -0.01em;
}
.lg-aide-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.lg-aide-sidebar-list li {
    margin: 0;
}
.lg-aide-sidebar-list a {
    display: block;
    padding: 0.5rem 0.6rem;
    font-size: 13.5px;
    color: #4a5573;
    text-decoration: none;
    border-radius: 4px;
    border-left: 2px solid transparent;
    line-height: 1.4;
    transition: all 0.2s;
}
.lg-aide-sidebar-list a:hover {
    background: rgba(22, 37, 66, 0.04);
    color: #162542;
}
.lg-aide-sidebar-list li.is-active a {
    color: #162542;
    background: rgba(182, 140, 90, 0.08);
    border-left-color: #b68c5a;
    font-weight: 500;
}

@media (max-width: 991px) {
    .lg-aide-sidebar { position: relative; top: 0; }
    .lg-aide-sidebar-inner { padding: 1rem; }
}

/* ====================================================================
 * Contenu principal : article docs
 * ==================================================================== */
.lg-aide-content {
    min-width: 0; /* fix grid overflow */
}
.lg-aide-content article {
    background: #ffffff;
    border: 1px solid rgba(22, 37, 66, 0.08);
    border-radius: 8px;
    padding: 2rem 2.2rem;
    margin-bottom: 1.5rem;
}

/* Breadcrumb */
.lg-aide-breadcrumb {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4a5573;
    margin-bottom: 1.5rem;
    opacity: 0.85;
}
.lg-aide-breadcrumb a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
.lg-aide-breadcrumb a:hover {
    color: #b68c5a;
    border-bottom-color: #b68c5a;
}
.lg-aide-breadcrumb .sep {
    margin: 0 0.5rem;
    opacity: 0.4;
}

/* Titres */
.lg-aide-content h1 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(28px, 3vw, 36px);
    font-weight: 500;
    color: #162542;
    margin: 0 0 0.5rem;
    letter-spacing: -0.015em;
    line-height: 1.15;
}
.lg-aide-content .lg-aide-lede {
    font-size: 17px;
    line-height: 1.55;
    color: #4a5573;
    margin: 0 0 2rem;
}
.lg-aide-content h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 22px;
    font-weight: 500;
    color: #162542;
    margin: 2rem 0 0.8rem;
    letter-spacing: -0.01em;
}
.lg-aide-content h2 i { color: #b68c5a; margin-right: 0.5rem; }
.lg-aide-content h3 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 18px;
    font-weight: 500;
    color: #162542;
    margin: 1.5rem 0 0.5rem;
}
.lg-aide-content p, .lg-aide-content li {
    font-size: 15px;
    line-height: 1.65;
    color: #2a3550;
}
.lg-aide-content ul, .lg-aide-content ol {
    padding-left: 1.4rem;
}
.lg-aide-content li {
    margin-bottom: 0.4rem;
}
.lg-aide-content strong {
    color: #162542;
    font-weight: 600;
}
.lg-aide-content a {
    color: #b68c5a;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.lg-aide-content a:hover {
    color: #9d7848;
}

/* Bloc info / alerte */
.lg-aide-content .lg-aide-callout {
    background: #f4ead6;
    border-left: 4px solid #b68c5a;
    padding: 1rem 1.2rem;
    border-radius: 0 6px 6px 0;
    margin: 1.5rem 0;
}
.lg-aide-content .lg-aide-callout.is-warn {
    background: #fbe7e3;
    border-left-color: #c85a4f;
}
.lg-aide-content .lg-aide-callout.is-success {
    background: #e3eedb;
    border-left-color: #5b8c5a;
}
.lg-aide-content .lg-aide-callout p:last-child {
    margin-bottom: 0;
}

/* ====================================================================
 * Cards d'index (portail + index de section)
 * ==================================================================== */
.lg-aide-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.2rem;
    margin: 1.5rem 0;
}

/* Portail /aide/index.php : grille 3 x 2 fixe (6 cards) au-dessus de 768px.
   Scope a .lg-aide-no-sidebar pour ne pas casser les pages /aide/X/index.php
   qui ont 5 cards (et qui gardent l auto-fill par defaut). */
@media (min-width: 769px) {
    .lg-aide-no-sidebar .lg-aide-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}
.lg-aide-card {
    background: #ffffff;
    border: 1px solid rgba(22, 37, 66, 0.1);
    border-radius: 8px;
    padding: 1.4rem 1.4rem 1.2rem;
    text-decoration: none !important;
    color: inherit;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.lg-aide-card:hover {
    border-color: #b68c5a;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(22, 37, 66, 0.08);
}
.lg-aide-card-icon {
    font-size: 28px;
    color: #b68c5a;
    margin-bottom: 0.8rem;
}
.lg-aide-card-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 17px;
    font-weight: 500;
    color: #162542;
    margin: 0 0 0.4rem;
    letter-spacing: -0.005em;
}
.lg-aide-card-desc {
    font-size: 13.5px;
    line-height: 1.5;
    color: #4a5573;
    margin: 0;
    flex: 1;
}
.lg-aide-card-cta {
    margin-top: 0.8rem;
    font-size: 13px;
    color: #b68c5a;
    font-weight: 500;
}

/* ====================================================================
 * Footer Aide simplifie
 * ==================================================================== */
.lg-aide-footer {
    background: #162542;
    color: #f4ead6;
    padding: 2.5rem 0 1rem;
    margin-top: 3rem;
}
.lg-aide-footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 1.5rem;
}
.lg-aide-footer-title {
    font-family: 'Fraunces', serif;
    font-size: 14px;
    font-weight: 500;
    color: #b68c5a;
    margin: 0 0 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.lg-aide-footer-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}
.lg-aide-footer-list li {
    margin-bottom: 0.45rem;
    font-size: 14px;
}
.lg-aide-footer-list a {
    color: #f4ead6;
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.lg-aide-footer-list a:hover {
    opacity: 1;
    color: #b68c5a;
}
.lg-aide-footer-list i {
    color: #b68c5a;
    font-size: 12px;
}
.lg-aide-footer-tagline {
    font-size: 12px;
    opacity: 0.65;
    margin-top: 0.8rem;
    font-style: italic;
}
.lg-aide-footer-bottom {
    border-top: 1px solid rgba(244, 234, 214, 0.1);
    padding-top: 1rem;
    font-size: 12px;
    opacity: 0.7;
    text-align: center;
}

/* ====================================================================
 * Responsive ajustements
 * ==================================================================== */
@media (max-width: 768px) {
    .lg-aide-content article {
        padding: 1.4rem 1.2rem;
    }
    .lg-aide-banner-label .full-text { display: none; }
}
