/**
 * ==============================================================================
 * Expertise 3D - Feuille de Style : Sécurité & Confidentialité (Privacy Policy)
 * ==============================================================================
 * 
 * @package     Expertise3D
 * @author      Frédéric IMBERT - Z-EspaceWeb
 * @copyright   (c) 2026 Frédéric IMBERT - Z-EspaceWeb.com. Tous droits réservés.
 * @license     Propriétaire (Proprietary) - Usage interne / réservé
 * @version     1.9.0 Beta
 * @updated     25/11/2026
 * 
 * @contact     zew@z-espaceweb.com
 * @website     https://z-espaceweb.com
 * @app_url     https://expertise3d.z-espaceweb.com
 * ==============================================================================
 */

*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --bg-main: #0f172a;
    --card-bg: #1e293b;
    --card-sub-bg: #151f30;
    --border-color: #334155;
    --border-highlight: #475569;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-orange: #fb923c;
    --primary: #f97316;
    --primary-hover: #ea580c;
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --info: #38bdf8;
    --info-bg: rgba(56, 189, 248, 0.12);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.2);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 20px 60px 20px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* --------------------------------------------------------------------------
 * Top Navigation & Actions Bar
 * -------------------------------------------------------------------------- */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-back:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
    transform: translateX(-2px);
}

.lang-switch-group {
    display: inline-flex;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 3px;
    gap: 4px;
}

.lang-switch-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.lang-switch-btn:hover {
    color: var(--text-main);
}

.lang-switch-btn.active {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.4);
}

/* --------------------------------------------------------------------------
 * Page Header
 * -------------------------------------------------------------------------- */
.page-header {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.header-logo {
    width: 128px;
    height: 128px;
    object-fit: contain;
    border-radius: 12px;
    background: #0f172a;
    padding: 6px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.header-brand a:hover .header-logo {
    border-color: var(--accent-orange);
    transform: scale(1.02);
}

.header-title-box h1 {
    font-size: 28px;
    margin: 0 0 6px 0;
    color: var(--text-main);
    font-weight: 700;
}

.header-title-box h1 span {
    color: var(--accent-orange);
}

.header-subtitle {
    margin: 0;
    font-size: 15px;
    color: var(--text-muted);
}

.header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.meta-badge.badge-success {
    background: var(--success-bg);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.meta-badge.badge-info {
    background: var(--info-bg);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.meta-badge.badge-neutral {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

/* --------------------------------------------------------------------------
 * Summary Cards Grid (Nutrition-Label / Highlights)
 * -------------------------------------------------------------------------- */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.summary-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.summary-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-orange);
}

.summary-icon {
    font-size: 26px;
    line-height: 1;
    margin-bottom: 4px;
}

.summary-card h3 {
    margin: 0;
    font-size: 16px;
    color: var(--text-main);
    font-weight: 600;
}

.summary-card p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
 * Content Section Cards
 * -------------------------------------------------------------------------- */
.policy-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 26px 30px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.policy-card h2 {
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 16px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.policy-card h2 .icon {
    font-size: 20px;
    color: var(--accent-orange);
}

.policy-card h3 {
    font-size: 16px;
    color: var(--accent-orange);
    margin-top: 20px;
    margin-bottom: 10px;
}

.policy-card p {
    margin: 0 0 14px 0;
    color: #cbd5e1;
    font-size: 14.5px;
    line-height: 1.65;
}

.policy-card p:last-child {
    margin-bottom: 0;
}

.policy-card ul {
    margin: 10px 0 16px 20px;
    padding: 0;
    color: #cbd5e1;
    font-size: 14.5px;
}

.policy-card li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.policy-card strong {
    color: #ffffff;
}

/* --------------------------------------------------------------------------
 * Callout Boxes (Alerts / Highlights)
 * -------------------------------------------------------------------------- */
.callout {
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    margin: 18px 0;
    font-size: 14px;
    line-height: 1.6;
    border-left: 4px solid transparent;
}

.callout-success {
    background-color: rgba(16, 185, 129, 0.08);
    border-left-color: var(--success);
    color: #e2e8f0;
}

.callout-info {
    background-color: rgba(56, 189, 248, 0.08);
    border-left-color: var(--info);
    color: #e2e8f0;
}

.callout-warning {
    background-color: rgba(245, 158, 11, 0.08);
    border-left-color: var(--warning);
    color: #e2e8f0;
}

.callout strong {
    color: #ffffff;
}

/* --------------------------------------------------------------------------
 * Data & Cookie Table
 * -------------------------------------------------------------------------- */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin: 18px 0;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.privacy-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    background: var(--card-sub-bg);
    min-width: 600px;
}

.privacy-table th {
    background-color: #0b1120;
    color: var(--accent-orange);
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
    border-bottom: 1px solid var(--border-color);
}

.privacy-table td {
    padding: 12px 14px;
    color: #cbd5e1;
    border-bottom: 1px solid rgba(51, 65, 85, 0.6);
    vertical-align: top;
}

.privacy-table tr:last-child td {
    border-bottom: none;
}

.privacy-table code {
    background: rgba(0, 0, 0, 0.3);
    color: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12.5px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.badge-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-tag.tag-functional {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

/* --------------------------------------------------------------------------
 * Contact Card
 * -------------------------------------------------------------------------- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 15px;
}

.contact-box {
    background: var(--card-sub-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
}

.contact-box h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: var(--accent-orange);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-box p {
    margin: 0;
    font-size: 13.5px;
    color: var(--text-muted);
}

.contact-box a {
    color: var(--text-main);
    text-decoration: underline;
    transition: color 0.2s;
}

.contact-box a:hover {
    color: var(--accent-orange);
}

/* --------------------------------------------------------------------------
 * Footer
 * -------------------------------------------------------------------------- */
.page-footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-muted);
}

.page-footer a {
    color: var(--accent-orange);
    text-decoration: none;
}

.page-footer a:hover {
    text-decoration: underline;
}

.page-footer .footer-links {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
 * Multilingual Display Controls (FR / EN)
 * -------------------------------------------------------------------------- */
/* By default, French is shown, English is hidden */
html[lang="fr"] .content-en {
    display: none !important;
}

html[lang="fr"] .content-fr {
    display: block;
}

html[lang="en"] .content-fr {
    display: none !important;
}

html[lang="en"] .content-en {
    display: block;
}

/* Fallback if no JS is executed: show French by default, allow target jump */
body:not([data-js-loaded]) .content-en {
    display: none;
}

/* --------------------------------------------------------------------------
 * Responsive Design (iPhone, iPad, Mobile)
 * -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    body {
        padding: 15px 12px 40px 12px;
    }

    .top-nav {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .btn-back {
        justify-content: center;
    }

    .lang-switch-group {
        justify-content: center;
    }

    .page-header {
        padding: 20px 16px;
    }

    .header-brand {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .header-title-box h1 {
        font-size: 22px;
    }

    .policy-card {
        padding: 20px 16px;
    }

    .policy-card h2 {
        font-size: 18px;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
 * Print Styles
 * -------------------------------------------------------------------------- */
@media print {
    body {
        background: #ffffff;
        color: #000000;
        max-width: 100%;
        padding: 0;
    }

    .top-nav, .lang-switch-group, .btn-back {
        display: none !important;
    }

    .page-header, .policy-card, .summary-card {
        background: #ffffff !important;
        color: #000000 !important;
        border: 1px solid #cccccc !important;
        box-shadow: none !important;
    }

    .policy-card p, .policy-card li {
        color: #222222 !important;
    }

    .privacy-table th {
        background: #f1f5f9 !important;
        color: #000000 !important;
    }

    .privacy-table td {
        color: #000000 !important;
    }
}
