/* ========================================================================
   LEGAL PAGES — CGU + Politique de confidentialité — Date : 03/04/2026
   Layout modernisé : hero (réutilise .cover_dossier), sidebar TOC sticky,
   sections en cards numérotées
   ======================================================================== */

/* --- Override du layout parent Bootstrap pour pleine largeur --- */
body.legal-page #content2 { display: block; }
body.legal-page #content_left { width: 100%; float: none; padding: 0; }
body.legal-page #content_right { display: none; }
body.legal-page .no-sidebar { max-width: none; }

/* --- Masquer le fil d'Ariane --- */
body.legal-page #breadcrumbs,
body.legal-page .breadcrumb { display: none !important; }

/* --- Hero : override .cover_dossier pour pages légales --- */
body.legal-page .cover_dossier { height: 280px; }
body.legal-page .cover_dossier .cover_hook h1 { font-size: 40px !important; }
body.legal-page .cover_dossier .cover_hook .update-date {
    font-size: 15px !important;
    opacity: 0.8;
}

/* --- Main grid : sidebar + content --- */
.legal-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    align-items: start;
    margin-top: 2rem;
}

/* --- Sidebar TOC --- */
.legal-toc {
    position: sticky;
    top: 80px;
    background: #f8fafb;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
}
.legal-toc-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.legal-toc-title i { font-size: 14px; }
.legal-toc nav { display: flex; flex-direction: column; gap: 2px; }
.legal-toc nav a {
    font-size: 13px;
    color: #475569;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.15s ease;
    line-height: 1.4;
    display: block;
}
.legal-toc nav a:hover {
    background: #e8f4f2;
    color: #00a799;
    text-decoration: none;
}
.legal-toc nav a.active {
    background: #00a799;
    color: #fff;
    font-weight: 500;
}

/* --- Content area --- */
.legal-content { min-width: 0; }

/* --- Section cards --- */
.legal-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 18px;
    scroll-margin-top: 90px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.legal-section:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

/* --- Section headings with numbered badge --- */
.legal-section h2 {
    font-size: 21px !important;
    font-weight: 600;
    color: #1d4152 !important;
    margin: 0 0 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.3;
}
.legal-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: linear-gradient(135deg, #1d4152, #00a799);
    border-radius: 8px;
    font-size: 14px;
    color: #fff;
    font-weight: 700;
}

/* --- Section sub-headings --- */
.legal-section h3 {
    font-size: 18px !important;
    font-weight: 600;
    color: #1d4152 !important;
    margin: 22px 0 10px;
    text-transform: none !important;
}
.legal-section h4 {
    font-size: 16px !important;
    font-weight: 600;
    color: #334155 !important;
    margin: 16px 0 8px;
}

/* --- Text content --- */
.legal-section p {
    font-size: 15px !important;
    line-height: 1.8;
    color: #475569;
    margin-bottom: 14px;
    text-align: justify;
}
.legal-section p:last-child { margin-bottom: 0; }

.legal-section ul {
    margin: 0 0 16px;
    padding: 0 0 0 24px;
}
.legal-section ul li {
    font-size: 15px !important;
    line-height: 1.7;
    color: #475569;
    padding: 5px 0;
    margin: 0 !important;
    list-style: disc outside !important;
}
.legal-section a {
    color: #00a799;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}
.legal-section a:hover { color: #1d4152; text-decoration: underline; }

.legal-section strong, .legal-section b { color: #334155; }

/* --- Info box (company info, hosting) --- */
.legal-info-box {
    background: #f1f5f9;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 16px;
}
.legal-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 24px;
}
.legal-info-item { font-size: 14px; line-height: 1.5; color: #334155; }
.legal-info-label { color: #64748b; font-size: 13px; }
.legal-info-value { color: #1e293b; font-weight: 500; font-size: 15px; }

/* --- Alert / highlight box --- */
.legal-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 1.65;
}
.legal-alert-info {
    background: rgba(0,167,153,0.08);
    border: 1px solid rgba(0,167,153,0.25);
    color: #0f766e;
}
.legal-alert-warning {
    background: rgba(245,158,11,0.08);
    border: 1px solid rgba(245,158,11,0.25);
    color: #92400e;
}
.legal-alert i { font-size: 18px; margin-top: 2px; flex-shrink: 0; }

/* --- Back to top --- */
.legal-back-top {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 15px;
    padding: 10px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    margin-top: 8px;
    transition: all 0.2s;
}
.legal-back-top:hover {
    border-color: #00a799;
    color: #00a799;
    text-decoration: none;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    body.legal-page .cover_dossier { height: 220px; }
    body.legal-page .cover_dossier .cover_hook h1 { font-size: 28px !important; }
    .legal-grid {
        display: flex;
        flex-direction: column;
        margin-left: 40px;
        margin-right: 40px;
    }
    .legal-toc {
        position: static;
        order: -1;
        width: 100%;
        border-radius: 10px;
        padding: 20px;
        margin-bottom: 16px;
    }
    .legal-section { padding: 20px; }
}
@media (max-width: 480px) {
    body.legal-page .cover_dossier { height: 180px; }


    .legal-section h2 { font-size: 18px !important; }
    .legal-info-grid { grid-template-columns: 1fr; }
}
