/* =============================================================
   legal.css — AURIEL AI
   Pages : privacy, terms, legal, _legal_nav, _cookie_banner
   Chemin : public/front/assets/css/legal.css
============================================================= */

:root {
    --l-accent:    #3D9CFD;
    --l-accent-bg: rgba(61,156,253,.08);
    --l-accent-bdr:#bfdbfe;
    --l-dark:      #111111;
    --l-body:      #4b5563;
    --l-muted:     #6b7280;
    --l-bg:        #f9fafb;
    --l-white:     #ffffff;
    --l-border:    #e5e7eb;
    --l-border-lt: #f0f0f0;
    --l-ok-bg:     #f0fdf4;
    --l-ok-bdr:    #bbf7d0;
    --l-ok-txt:    #166534;
    --l-saved:     #16a34a;
    --l-r-sm: 8px;
    --l-r-md: 10px;
    --l-r-lg: 12px;
}

/* ── Layout ─────────────────────────────────────────────────── */
.legal-main      { padding: 60px 0 80px; min-height: 100vh; background: var(--l-bg); }
.legal-container { max-width: 800px; }

/* ── En-tête de page ─────────────────────────────────────────── */
.legal-label {
    display: block;
    font-size: 11px; font-weight: 700;
    letter-spacing: 2px; text-transform: uppercase;
    color: var(--l-accent); margin-bottom: 12px;
}
.legal-title { font-size: 36px; font-weight: 800; color: var(--l-dark); margin-bottom: 8px; }
.legal-date  { color: var(--l-muted); font-size: 14px; margin: 0; }

.legal-notice {
    background: var(--l-ok-bg); border: 1px solid var(--l-ok-bdr);
    border-radius: var(--l-r-md); padding: 14px 18px; margin-top: 16px;
}
.legal-notice p { color: var(--l-ok-txt); font-weight: 600; font-size: 14px; margin: 0; }

/* ── Sections ────────────────────────────────────────────────── */
.legal-section { margin-bottom: 40px; }

.legal-section h2 {
    font-size: 19px; font-weight: 700; color: var(--l-dark);
    margin-bottom: 12px; padding-bottom: 8px;
    border-bottom: 1px solid var(--l-border-lt);
}
.legal-section p,
.legal-section li { color: var(--l-body); font-size: 15px; line-height: 1.85; }
.legal-section ul  { padding-left: 20px; line-height: 2.2; }

.legal-section a       { color: var(--l-accent); text-decoration: none; }
.legal-section a:hover { text-decoration: underline; }

.legal-note        { font-size: 14px; color: var(--l-body);  margin-top: 8px; }
.legal-note-italic { font-size: 13px; color: var(--l-muted); margin-top: 8px; font-style: italic; }

/* ── Callout ─────────────────────────────────────────────────── */
.legal-callout { border-left: 3px solid var(--l-accent); padding: 4px 0 4px 20px; }

/* ── Badges plateformes ──────────────────────────────────────── */
.legal-platforms {
    background: #f0f7ff; border: 1px solid var(--l-accent-bdr);
    border-radius: var(--l-r-md); padding: 16px; margin-top: 14px;
    display: flex; flex-wrap: wrap; gap: 8px;
}
.legal-badge {
    font-size: 12px; font-weight: 600; color: #1d4ed8;
    background: #dbeafe; padding: 4px 12px; border-radius: 20px;
}

/* ── Tableau permissions ─────────────────────────────────────── */
.legal-table-wrap { border: 1px solid var(--l-border); border-radius: var(--l-r-lg); overflow: hidden; }
.legal-table      { width: 100%; border-collapse: collapse; font-size: 13px; }

.legal-table thead tr { background: var(--l-bg); border-bottom: 2px solid var(--l-border); }
.legal-table th { padding: 12px 16px; text-align: left; font-weight: 700; color: #374151; }
.legal-table th:first-child  { width: 20%; }
.legal-table th:nth-child(2) { width: 45%; }
.legal-table td              { padding: 12px 16px; }

.legal-table tbody tr            { border-bottom: 1px solid #f3f4f6; }
.legal-table tbody tr:last-child { border-bottom: none; }
.legal-table tbody tr.tr-alt     { background: #fafafa; }

.td-platform { font-weight: 600; color: var(--l-dark); }
.td-perms    { color: var(--l-muted); font-size: 12px; }
.td-usage    { color: var(--l-body);  font-size: 13px; }

.icon-fb   { color: #1877f2; margin-right: 6px; }
.icon-ig   { color: #e1306c; margin-right: 6px; }
.icon-goog { color: #ea4335; margin-right: 6px; }
.icon-li   { color: #0077b5; margin-right: 6px; }

/* ── Grille 3 types de cookies ───────────────────────────────── */
.legal-cookies-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 24px; }

.cookie-card { background: var(--l-white); border: 1px solid var(--l-border); border-radius: var(--l-r-md); padding: 16px; }
.cookie-card .c-icon  { font-size: 20px; margin-bottom: 8px; }
.cookie-card .c-title { font-weight: 700; font-size: 13px; color: var(--l-dark); margin-bottom: 4px; }
.cookie-card .c-desc  { color: var(--l-muted); font-size: 12px; margin: 0; line-height: 1.5; }

/* ── Formulaire préférences cookies ─────────────────────────── */
.legal-pref-box { background: var(--l-white); border: 1px solid var(--l-border); border-radius: var(--l-r-lg); padding: 28px; }
.legal-pref-box h3 { font-size: 17px; font-weight: 700; color: var(--l-dark); margin-bottom: 20px; }

.pref-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }

.pref-row input[type="checkbox"] {
    width: 18px; height: 18px; margin-top: 3px;
    accent-color: var(--l-accent); flex-shrink: 0; cursor: pointer;
}
.pref-row input[type="checkbox"]:disabled { cursor: default; opacity: .7; }
.pref-row label           { cursor: pointer; }
.pref-row label.no-cursor { cursor: default; }

.pref-title { font-weight: 600; font-size: 14px; color: var(--l-dark); }
.pref-badge {
    display: inline-block; margin-left: 8px;
    font-size: 11px; background: var(--l-border); color: var(--l-muted);
    padding: 2px 8px; border-radius: 20px; vertical-align: middle;
}
.pref-desc { color: var(--l-muted); font-size: 13px; margin: 4px 0 0; }

.pref-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

.btn-pref-save {
    padding: 10px 24px; background: var(--l-accent); color: var(--l-white);
    border: none; border-radius: var(--l-r-sm); font-weight: 600; font-size: 14px; cursor: pointer;
    transition: opacity .2s;
}
.btn-pref-save:hover { opacity: .88; }

.btn-pref-all {
    padding: 10px 24px; background: var(--l-white); color: var(--l-accent);
    border: 1px solid var(--l-accent); border-radius: var(--l-r-sm);
    font-weight: 600; font-size: 14px; cursor: pointer; transition: background .2s;
}
.btn-pref-all:hover { background: var(--l-accent-bg); }

.pref-saved { color: var(--l-saved); font-size: 13px; font-weight: 500; display: none; }

/* ── Grille droits RGPD ──────────────────────────────────────── */
.legal-rights-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.right-card { background: var(--l-white); border: 1px solid var(--l-border); border-radius: var(--l-r-md); padding: 16px; }
.right-card .r-title { font-weight: 700; font-size: 14px; color: var(--l-dark); margin-bottom: 4px; }
.right-card .r-desc  { color: var(--l-muted); font-size: 13px; margin: 0; line-height: 1.5; }

.legal-rights-note     { color: var(--l-body); font-size: 14px; margin-top: 16px; }
.legal-rights-note a   { color: var(--l-accent); }

/* ── Navbar légale ───────────────────────────────────────────── */
.legal-nav {
    position: sticky; top: 0; z-index: 1000;
    background: var(--l-white); border-bottom: 1px solid var(--l-border);
    height: 64px; display: flex; align-items: center;
}
.legal-nav-inner {
    max-width: 860px; width: 100%; margin: 0 auto; padding: 0 16px;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 8px;
}
.legal-nav-brand             { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.legal-nav-brand img         { height: 30px; width: auto; }
.legal-nav-brand span        { font-weight: 800; font-size: 15px; color: var(--l-dark); }
.legal-nav-links             { display: flex; align-items: center; gap: 4px; }

.legal-nav-link {
    padding: 6px 14px; border-radius: 6px;
    font-size: 13px; font-weight: 500; text-decoration: none; color: var(--l-muted);
    transition: background .15s, color .15s;
}
.legal-nav-link:hover  { background: var(--l-accent-bg); color: var(--l-accent); text-decoration: none; }
.legal-nav-link.active { background: var(--l-accent); color: var(--l-white); }

.legal-nav-back {
    padding: 6px 14px; border-radius: 6px; margin-left: 8px;
    font-size: 13px; font-weight: 600; text-decoration: none;
    color: var(--l-accent); border: 1px solid var(--l-accent-bdr);
    transition: background .15s;
}
.legal-nav-back:hover { background: var(--l-accent-bg); text-decoration: none; }

/* ── Bannière cookie ─────────────────────────────────────────── */
#auriel-cookie-banner {
    display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
    background: var(--l-white); border-top: 1px solid var(--l-border);
    box-shadow: 0 -4px 24px rgba(0,0,0,.08);
    transition: transform .4s ease, opacity .4s ease;
}
.cb-emoji { font-size: 24px; line-height: 1; flex-shrink: 0; margin-top: 2px; }
.cb-title { font-size: 15px; font-weight: 700; color: var(--l-dark); margin-bottom: 4px !important; }
.cb-text  { font-size: 13px; color: var(--l-muted); line-height: 1.6; margin-bottom: 0 !important; }
.cb-link  { color: var(--l-accent); text-decoration: underline; }

.cb-btn-reject {
    padding: 8px 16px; border: 1px solid #d1d5db;
    background: var(--l-white); color: #374151;
    border-radius: var(--l-r-sm); font-size: 13px; font-weight: 500;
    cursor: pointer; white-space: nowrap; transition: background .15s;
}
.cb-btn-reject:hover { background: #f9fafb; }

.cb-btn-settings {
    padding: 8px 16px; border: 1px solid var(--l-accent);
    background: var(--l-white); color: var(--l-accent);
    border-radius: var(--l-r-sm); font-size: 13px; font-weight: 500;
    cursor: pointer; white-space: nowrap; transition: background .15s;
}
.cb-btn-settings:hover { background: var(--l-accent-bg); }

.cb-btn-accept {
    padding: 8px 20px; border: none;
    background: var(--l-accent); color: var(--l-white);
    border-radius: var(--l-r-sm); font-size: 13px; font-weight: 600;
    cursor: pointer; white-space: nowrap; transition: opacity .2s;
}
.cb-btn-accept:hover { opacity: .88; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .legal-title        { font-size: 26px; }
    .legal-cookies-grid { grid-template-columns: 1fr; }
    .legal-rights-grid  { grid-template-columns: 1fr; }
    .legal-nav-link,
    .legal-nav-back     { font-size: 12px; padding: 5px 10px; }
}
