/*
 * GemLink Legal Pages — Frontend Styles v2.1.0
 * Classes préfixées glp-* pour éviter les conflits thème.
 * Les variables de couleur sont surchargées via wp_add_inline_style (PHP).
 */

/* ── VARIABLES ──────────────────────────────────────────────────────────── */
:root {
    --glp-primary:   #141f35;
    --glp-accent:    #00aed7;
    --glp-highlight: #ffd002;
    --glp-bg:        #f4f9fb;
    --glp-border:    #e2eaf2;
    --glp-text:      #4a5568;
}

/* ── HERO ───────────────────────────────────────────────────────────────── */
.glp-hero {
    margin-top: 20px;
    background: linear-gradient(135deg, var(--glp-primary) 0%, #0a3d62 60%, var(--glp-accent) 100%);
    padding: 48px 36px 40px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
}
.glp-hero::after {
    content: '';
    position: absolute; right: -60px; top: -60px;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(255,208,2,.07) 0%, transparent 70%);
    border-radius: 50%; pointer-events: none;
}
.glp-breadcrumb { font-size: 12px; color: rgba(255,255,255,.45); margin-bottom: 16px; }
.glp-breadcrumb a { color: rgba(255,255,255,.45); text-decoration: none; }
.glp-breadcrumb span { color: rgba(255,255,255,.7); }
.glp-hero-title { font-size: 36px; font-weight: 900; color: #fff; line-height: 1.15; margin: 0 0 10px; }
.glp-hero-title span { color: var(--glp-highlight); }
.glp-hero-sub { font-size: 14px; color: rgba(255,255,255,.65); margin: 0; }
.glp-hero-meta { margin-top: 16px; display: flex; gap: 16px; flex-wrap: wrap; }
.glp-hero-meta span {
    display: inline-block;
    font-size: 12px !important;
    color: rgba(255,255,255,.6) !important;
    background: rgba(255,255,255,.12) !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    line-height: 1.4;
}

/* ── MOBILE CHIPS NAV ───────────────────────────────────────────────────── */
.glp-sommaire-mobile {
    display: none;
    background: #fff;
    border: 1px solid var(--glp-border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 10px 16px;
    overflow-x: auto;
    gap: 8px;
    white-space: nowrap;
    margin-bottom: 24px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.glp-sommaire-mobile::-webkit-scrollbar { display: none; }
.glp-sommaire-mobile a {
    display: inline-block;
    font-size: 12px;
    color: var(--glp-primary);
    background: var(--glp-bg);
    border: 1px solid var(--glp-border);
    border-radius: 20px;
    padding: 5px 12px;
    text-decoration: none;
    flex-shrink: 0;
    transition: background .15s, color .15s, border-color .15s;
}
.glp-sommaire-mobile a:hover {
    background: var(--glp-accent);
    color: #fff;
    border-color: var(--glp-accent);
}

/* ── LAYOUT 2-COL ───────────────────────────────────────────────────────── */
.glp-page-body {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 40px;
    padding: 40px 0 60px;
    align-items: start;
}

/* ── SIDEBAR ────────────────────────────────────────────────────────────── */
.glp-sidebar {
    position: sticky;
    top: 32px;
    background: #fff;
    border-radius: 12px;
    padding: 16px 12px 16px 5px;
    border: 1px solid var(--glp-border);
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--glp-border) transparent;
}
.glp-sidebar::-webkit-scrollbar { width: 4px; }
.glp-sidebar::-webkit-scrollbar-track { background: transparent; }
.glp-sidebar::-webkit-scrollbar-thumb { background: var(--glp-border); border-radius: 4px; }
.glp-sidebar h3 {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1.5px; color: var(--glp-accent); margin: 0 0 12px;
    padding-left: 8px;
}
.glp-sidebar ol { list-style: none; counter-reset: glp-som; padding: 0; margin: 0; }
.glp-sidebar ol li {
    counter-increment: glp-som;
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 3px 0;
    border-bottom: 1px solid #f0f4f8;
    font-size: 1em;
    color: #000000;
    transition: color .15s;
}
.glp-sidebar ol li:last-child { border-bottom: none; }
.glp-sidebar ol li::before {
    content: counter(glp-som) ".";
    color: var(--glp-accent); font-weight: 700; font-size: 11px;
    min-width: 16px; flex-shrink: 0;
}
.glp-sidebar ol li a { color: inherit; text-decoration: none; }
.glp-sidebar ol li:hover { color: var(--glp-accent); }

/* ── CONTENT COLUMN ─────────────────────────────────────────────────────── */
.glp-legal-content { display: flex; flex-direction: column; gap: 24px; }

/* ── SECTION CARD ───────────────────────────────────────────────────────── */
.glp-section {
    background: #fff;
    border-radius: 12px;
    padding: 28px 32px;
    border: 1px solid var(--glp-border);
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.glp-section-header {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 20px; padding-bottom: 14px;
    border-bottom: 2px solid #f0f4f8;
}
.glp-num {
    width: 30px; height: 30px;
    background: var(--glp-accent); color: #fff;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800; flex-shrink: 0;
}
.glp-section h2 {
    font-size: 17px; font-weight: 800;
    color: var(--glp-primary); margin: 0;
}
.glp-section h3 {
    font-size: 14px; font-weight: 700;
    color: var(--glp-primary); margin: 20px 0 8px;
}

/* ── LEGAL GRID (fields) ────────────────────────────────────────────────── */
.glp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.glp-field { display: flex; flex-direction: column; gap: 4px; }
.glp-field--full { grid-column: 1 / -1; }
.glp-field label {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; color: var(--glp-accent);
}
.glp-field p { font-size: 14px; color: var(--glp-primary); line-height: 1.6; margin: 0; }
.glp-field p a { color: var(--glp-accent); text-decoration: none; }
.glp-placeholder { color: #b0bec5 !important; font-style: italic; }

/* ── LEGAL TEXT ─────────────────────────────────────────────────────────── */
.glp-text { font-size: 14px; color: var(--glp-text); line-height: 1.8; }
.glp-text p { margin: 0 0 12px; }
.glp-text p:last-child { margin-bottom: 0; }
.glp-text a { color: var(--glp-accent); }
.glp-text strong { color: var(--glp-primary); }
.glp-text ul { margin: 8px 0 12px 0; padding: 0; list-style: none; }
.glp-text ul li { padding-left: 18px; position: relative; margin-bottom: 6px; font-size: 14px; color: var(--glp-text); }
.glp-text ul li::before { content: '›'; position: absolute; left: 0; color: var(--glp-accent); font-weight: 700; }

/* ── BULLET LIST ────────────────────────────────────────────────────────── */
.glp-list { margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.glp-list li {
    font-size: 14px; color: var(--glp-text);
    padding-left: 20px; position: relative; line-height: 1.6;
}
.glp-list li::before {
    content: '›'; position: absolute; left: 0;
    color: var(--glp-accent); font-weight: 700; font-size: 16px; line-height: 1.4;
}

/* ── HOST CARD ──────────────────────────────────────────────────────────── */
.glp-host-card {
    background: var(--glp-bg); border-radius: 8px;
    padding: 18px 22px; margin-top: 12px;
    display: flex; flex-direction: column; gap: 6px;
    border: 1px solid var(--glp-border);
}
.glp-host-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--glp-accent); }
.glp-host-val { font-size: 14px; color: var(--glp-primary); }

/* ── INFO / WARN BOXES ──────────────────────────────────────────────────── */
.glp-info {
    background: #e8f7fb; border-left: 3px solid var(--glp-accent);
    border-radius: 0 8px 8px 0; padding: 12px 16px; margin-top: 14px;
    font-size: 13px; color: var(--glp-primary); line-height: 1.6;
}
.glp-warn {
    background: #fff8e1; border-left: 3px solid var(--glp-highlight);
    border-radius: 0 8px 8px 0; padding: 12px 16px; margin-top: 14px;
    font-size: 13px; color: var(--glp-primary); line-height: 1.6;
}

/* ── FEATURE GRID (compte CGU) ──────────────────────────────────────────── */
.glp-feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.glp-feature-card { background: var(--glp-bg); border-radius: 8px; padding: 14px; border: 1px solid var(--glp-border); }
.glp-fc-icon { font-size: 18px; margin-bottom: 6px; display: block; }
.glp-fc-title { font-size: 13px; font-weight: 700; color: var(--glp-primary); margin-bottom: 4px; display: block; }
.glp-fc-desc { font-size: 12px; color: #5a6a7e; line-height: 1.5; display: block; }

/* ── DATA TABLE (paiement / livraison CGV) ──────────────────────────────── */
.glp-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 14px; }
.glp-table th {
    background: var(--glp-bg); text-align: left; padding: 9px 12px;
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
    color: var(--glp-accent); border-bottom: 2px solid var(--glp-border);
}
.glp-table td { padding: 9px 12px; border-bottom: 1px solid #f0f4f8; color: var(--glp-text); vertical-align: top; }
.glp-table tr:last-child td { border-bottom: none; }
.glp-table td:first-child { font-weight: 600; color: var(--glp-primary); }

/* ── COOKIES TABLE ──────────────────────────────────────────────────────── */
.glp-cookie-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 12px 0; }
.glp-cookie-table th {
    background: var(--glp-bg); text-align: left; padding: 8px 12px;
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
    color: var(--glp-accent); border-bottom: 2px solid var(--glp-border);
}
.glp-cookie-table td { padding: 8px 12px; border-bottom: 1px solid #f0f4f8; color: var(--glp-text); }
.glp-cookie-table tr:last-child td { border-bottom: none; }
.glp-cookie-table code { font-size: 12px; background: var(--glp-bg); padding: 2px 5px; border-radius: 4px; color: var(--glp-primary); }

/* ── UPDATE DATE ────────────────────────────────────────────────────────── */
.glp-update-date { font-size: 13px; color: #8a9bb0; margin-top: 4px; padding: 0 4px; }

/* ── DOCUMENT — BOUTON TÉLÉCHARGEMENT (DOCX/ODT) ────────────────────────── */
.glp-download-page {
    max-width: 640px; margin: 48px auto; padding: 0 16px; text-align: center;
}
.glp-download-btn {
    display: inline-flex; align-items: center; gap: 14px;
    background: var(--glp-accent); color: #fff;
    padding: 18px 32px; border-radius: 10px;
    text-decoration: none; font-size: 16px; font-weight: 700;
    box-shadow: 0 4px 18px rgba(0,174,215,.3);
    transition: background .2s, box-shadow .2s, transform .1s;
}
.glp-download-btn:hover {
    background: #009abf; color: #fff;
    box-shadow: 0 6px 24px rgba(0,174,215,.45);
    transform: translateY(-1px);
}
.glp-download-btn .dashicons {
    font-size: 24px; width: 24px; height: 24px; flex-shrink: 0;
}
.glp-download-btn-meta {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
}
.glp-download-btn-meta strong { display: block; font-size: 16px; line-height: 1.2; }
.glp-download-btn-meta small  { display: block; font-size: 12px; opacity: .8; font-weight: 400; }


/* ── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .glp-page-body { grid-template-columns: 1fr; padding: 24px 0 40px; gap: 0; }
    .glp-sidebar { display: none; }
    .glp-sommaire-mobile { display: flex; }
}
@media (max-width: 600px) {
    .glp-hero { padding: 28px 20px 24px; border-radius: 8px; }
    .glp-hero-title { font-size: 26px; }
    .glp-section { padding: 20px 16px; border-radius: 8px; }
    .glp-section h2 { font-size: 15px; }
    .glp-grid { grid-template-columns: 1fr; }
    .glp-feature-grid { grid-template-columns: 1fr; }
    .glp-table { font-size: 12px; }
    .glp-table th, .glp-table td { padding: 7px 8px; }
    .glp-cookie-table { font-size: 12px; }
    .glp-cookie-table th, .glp-cookie-table td { padding: 7px 8px; }
}
