/* ══════════════════════════════════════════════════════════════════
   PawaHosting — Legal Pages — Design Pro Hébergeur
   ══════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

/* ── Variables ────────────────────────────────────────────────── */
.pwlp-wrap {
    --pwlp-navy:    #0f172a;
    --pwlp-blue:    #2563eb;
    --pwlp-blue-lt: #eff6ff;
    --pwlp-teal:    #0891b2;
    --pwlp-slate:   #475569;
    --pwlp-border:  #e2e8f0;
    --pwlp-bg:      #f8fafc;
    --pwlp-white:   #ffffff;
    --pwlp-radius:  10px;
    --pwlp-shadow:  0 1px 4px rgba(0,0,0,.08);
    --pwlp-topbar-h:64px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
    color: #1e293b;
    line-height: 1.7;
    background: var(--pwlp-bg);
}

/* ══ STICKY TOPBAR ════════════════════════════════════════════════ */
.pwlp-topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9999;
    height: var(--pwlp-topbar-h);
    background: var(--pwlp-navy);
    border-bottom: 1px solid rgba(255,255,255,.07);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 16px rgba(0,0,0,.3);
}
.pwlp-topbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 28px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Logo dans topbar */
.pwlp-topbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}
.pwlp-logo-img {
    height: 36px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}
.pwlp-logo-text {
    display: none;
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -.5px;
}

/* Titre central */
.pwlp-topbar-center {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.pwlp-topbar-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(37,99,235,.35);
    color: #93c5fd;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
    border: 1px solid rgba(147,197,253,.2);
}
.pwlp-topbar-title {
    font-size: 15px;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Bouton retour */
.pwlp-topbar-back {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 7px 14px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 7px;
    transition: all .2s;
    flex-shrink: 0;
}
.pwlp-topbar-back:hover { color: #fff; border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.05); }

/* Offset pour le contenu sous le topbar */
.pwlp-wrap { padding-top: var(--pwlp-topbar-h); }

/* ══ HERO BANNER ══════════════════════════════════════════════════ */
.pwlp-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f2d50 100%);
    padding: 60px 28px 52px;
    position: relative;
    overflow: hidden;
}
.pwlp-hero::before {
    content: '';
    position: absolute;
    top: -40px; right: -60px;
    width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(37,99,235,.15) 0%, transparent 70%);
    pointer-events: none;
}
.pwlp-hero::after {
    content: '';
    position: absolute;
    bottom: -20px; left: 10%;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(8,145,178,.1) 0%, transparent 70%);
    pointer-events: none;
}
.pwlp-hero-inner {
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.pwlp-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(37,99,235,.2);
    color: #93c5fd;
    border: 1px solid rgba(37,99,235,.35);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 18px;
}
.pwlp-hero-title {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 800;
    color: #f1f5f9;
    margin: 0 0 12px;
    letter-spacing: -.5px;
    line-height: 1.2;
}
.pwlp-hero-desc {
    font-size: 16px;
    color: #94a3b8;
    margin: 0 0 24px;
    max-width: 600px;
}
.pwlp-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.pwlp-hero-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #64748b;
}
.pwlp-hero-meta svg { color: #475569; flex-shrink: 0; }

/* ══ BODY (SIDEBAR + ARTICLE) ═════════════════════════════════════ */
.pwlp-body {
    padding: 40px 28px 80px;
}
.pwlp-body-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    align-items: start;
}

/* ══ SIDEBAR ══════════════════════════════════════════════════════ */
.pwlp-sidebar { }
.pwlp-sidebar-sticky {
    position: sticky;
    top: calc(var(--pwlp-topbar-h) + 24px);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* TOC */
.pwlp-toc, .pwlp-sidebar-docs, .pwlp-sidebar-contact {
    background: var(--pwlp-white);
    border: 1px solid var(--pwlp-border);
    border-radius: var(--pwlp-radius);
    overflow: hidden;
    box-shadow: var(--pwlp-shadow);
}
.pwlp-toc-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid var(--pwlp-border);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: #475569;
}
.pwlp-toc-nav { padding: 8px 0; }
.pwlp-toc-link {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 16px;
    font-size: 13px;
    color: #475569;
    text-decoration: none;
    transition: background .15s, color .15s;
    line-height: 1.4;
    border-left: 2px solid transparent;
}
.pwlp-toc-link:hover, .pwlp-toc-link.active {
    background: var(--pwlp-blue-lt);
    color: var(--pwlp-blue);
    border-left-color: var(--pwlp-blue);
}
.pwlp-toc-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px; height: 20px;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
    transition: background .15s, color .15s;
}
.pwlp-toc-link.active .pwlp-toc-num,
.pwlp-toc-link:hover .pwlp-toc-num {
    background: var(--pwlp-blue);
    color: #fff;
}

/* Liens docs */
.pwlp-doc-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    font-size: 13px;
    color: #475569;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
    transition: all .15s;
    gap: 8px;
}
.pwlp-doc-link:last-child { border-bottom: none; }
.pwlp-doc-link:hover { background: var(--pwlp-blue-lt); color: var(--pwlp-blue); }
.pwlp-doc-link svg { flex-shrink: 0; opacity: .4; }
.pwlp-doc-link:hover svg { opacity: 1; }

/* Contact */
.pwlp-sidebar-contact { padding: 16px; }
.pwlp-sidebar-contact p { font-size: 13px; color: #64748b; margin: 10px 0 14px; }
.pwlp-btn-contact {
    display: block;
    text-align: center;
    background: var(--pwlp-blue);
    color: #fff;
    text-decoration: none;
    padding: 9px 16px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    transition: background .2s;
}
.pwlp-btn-contact:hover { background: #1d4ed8; color: #fff; }

/* ══ ARTICLE (CONTENU) ════════════════════════════════════════════ */
.pwlp-article {
    background: var(--pwlp-white);
    border: 1px solid var(--pwlp-border);
    border-radius: var(--pwlp-radius);
    box-shadow: var(--pwlp-shadow);
    overflow: hidden;
}

.pwlp-content {
    padding: 36px 44px;
}

/* Typographie du contenu */
.pwlp-content h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin: 40px 0 14px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border-left: 4px solid var(--pwlp-blue);
    border-radius: 0 8px 8px 0;
    scroll-margin-top: calc(var(--pwlp-topbar-h) + 20px);
    display: flex;
    align-items: center;
    gap: 10px;
}
.pwlp-content h2:first-child { margin-top: 0; }
.pwlp-content h2::before {
    content: counter(section);
    counter-increment: section;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px; height: 28px;
    background: var(--pwlp-blue);
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}
.pwlp-content { counter-reset: section; }

.pwlp-content h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 24px 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pwlp-content h3::before {
    content: '';
    display: inline-block;
    width: 4px; height: 16px;
    background: var(--pwlp-teal);
    border-radius: 2px;
    flex-shrink: 0;
}
.pwlp-content p { margin: 12px 0; color: #334155; font-size: 15px; }
.pwlp-content ul, .pwlp-content ol {
    padding-left: 0;
    margin: 14px 0;
    list-style: none;
}
.pwlp-content ul li {
    padding: 7px 0 7px 24px;
    position: relative;
    color: #334155;
    font-size: 15px;
    border-bottom: 1px solid #f8fafc;
}
.pwlp-content ul li::before {
    content: '';
    position: absolute;
    left: 0; top: 16px;
    width: 8px; height: 8px;
    background: var(--pwlp-blue);
    border-radius: 50%;
}
.pwlp-content ol { counter-reset: ol-counter; }
.pwlp-content ol li {
    padding: 7px 0 7px 32px;
    position: relative;
    color: #334155;
    font-size: 15px;
    border-bottom: 1px solid #f8fafc;
    counter-increment: ol-counter;
}
.pwlp-content ol li::before {
    content: counter(ol-counter);
    position: absolute;
    left: 0; top: 8px;
    width: 22px; height: 22px;
    background: var(--pwlp-navy);
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pwlp-content a { color: var(--pwlp-blue); font-weight: 500; }
.pwlp-content a:hover { text-decoration: underline; }
.pwlp-content em { color: #64748b; font-size: 13px; }
.pwlp-content strong { color: #0f172a; }
.pwlp-content code {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 13px;
    font-family: 'Fira Code', monospace;
    color: #0369a1;
    border: 1px solid #e0f2fe;
}

/* Tables */
.pwlp-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--pwlp-border);
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.pwlp-content thead tr { background: var(--pwlp-navy); }
.pwlp-content thead th {
    padding: 12px 16px;
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    text-align: left;
}
.pwlp-content tbody tr:nth-child(even) { background: #f8fafc; }
.pwlp-content tbody tr:hover { background: var(--pwlp-blue-lt); }
.pwlp-content tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: top;
}
.pwlp-content tbody td:first-child { font-weight: 600; color: #1e293b; }

/* Pied d'article */
.pwlp-article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 44px;
    background: #f8fafc;
    border-top: 1px solid var(--pwlp-border);
    font-size: 13px;
    color: #64748b;
    flex-wrap: wrap;
}
.pwlp-article-footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pwlp-article-footer-left a { color: var(--pwlp-blue); }
.pwlp-btn-print {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    background: var(--pwlp-white);
    border: 1px solid var(--pwlp-border);
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all .2s;
}
.pwlp-btn-print:hover { border-color: #94a3b8; color: #1e293b; box-shadow: 0 2px 6px rgba(0,0,0,.06); }

/* ══ RESPONSIVE ═══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .pwlp-body-inner { grid-template-columns: 240px 1fr; gap: 20px; }
    .pwlp-content    { padding: 28px 28px; }
    .pwlp-article-footer { padding: 14px 28px; }
}
@media (max-width: 768px) {
    .pwlp-topbar-center { display: none; }
    .pwlp-topbar-inner  { padding: 0 16px; gap: 12px; }
    .pwlp-hero          { padding: 40px 16px 36px; }
    .pwlp-body          { padding: 20px 16px 50px; }
    .pwlp-body-inner    { grid-template-columns: 1fr; }
    .pwlp-sidebar-sticky{ position: static; }
    .pwlp-toc           { display: none; }
    .pwlp-content       { padding: 20px 18px; }
    .pwlp-article-footer{ padding: 14px 18px; flex-direction: column; align-items: flex-start; }
}

/* ══ IMPRESSION ═══════════════════════════════════════════════════ */
@media print {
    .pwlp-topbar, .pwlp-sidebar, .pwlp-btn-print, .pwlp-article-footer { display: none !important; }
    .pwlp-wrap    { padding-top: 0 !important; background: #fff; }
    .pwlp-body    { padding: 0; }
    .pwlp-body-inner { grid-template-columns: 1fr; }
    .pwlp-article { border: none; box-shadow: none; }
    .pwlp-hero    { background: #1e293b !important; print-color-adjust: exact; padding: 20px; }
    .pwlp-content h2 { background: #f0f0f0 !important; print-color-adjust: exact; }
}
