/* =============================================
   NeoFRPBypass — Design "Dark Pro" v2
   ============================================= */

/* === FONTS — CDN jsDelivr, fallback unpkg, fallback local === */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('https://cdn.jsdelivr.net/npm/@fontsource-variable/inter@5.3.0/files/inter-latin-wght-normal.woff2') format('woff2'),
         url('https://unpkg.com/@fontsource-variable/inter@5.3.0/files/inter-latin-wght-normal.woff2') format('woff2'),
         url('../fonts/inter-latin-wght-normal.woff2') format('woff2');
}

/* Classe utilitaire des icônes — les spans sont convertis en SVG inline
   par icons.js (aucune police de 4 Mo à télécharger). Sans JS, le bloc
   <noscript> des layouts injecte la police en secours. */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.material-symbols-outlined svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
    vertical-align: -0.125em;
}

/* Réserve la place de l'icône pendant le fetch du SVG (le texte
   est vidé par icons.js, sans ça le span s'effondrerait) */
.material-symbols-outlined.icon-pending {
    min-width: 1em;
}

/* Masque le texte ligature tant que le SVG n'est pas injecté
   (évite le flash "download", "settings"… en connexion lente).
   .has-js n'est posé que si JavaScript tourne — sans JS, la
   police de secours affiche le texte normalement. */
.has-js .material-symbols-outlined:not(.icon-done):not(.icon-fallback) {
    color: transparent;
}

/* === TOKENS === */
:root {
    --bg:           #0F0F13;
    --surface:      #16161D;
    --surface-2:    #1C1C26;
    --border:       #25252F;
    --primary:      #4F8EF7;
    --primary-dim:  rgba(79,142,247,0.12);
    --accent:       #7C3AED;
    --accent-dim:   rgba(124,58,237,0.12);
    --success:      #22C55E;
    --warning:      #F59E0B;
    --danger:       #EF4444;
    --text:         #E8E8F0;
    --muted:        #6B6B7E;
    --font:         'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius:       8px;
    --radius-sm:    4px;
    --speed:        0.18s;
    --shadow:       0 10px 30px rgba(0,0,0,0.1);
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.fade-in { animation: fadeIn 0.4s ease forwards; }

/* === BACK TO TOP === */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    transform: translateY(-5px);
    background: var(--accent);
}

/* Light theme */
[data-theme="light"] {
    --bg:           #F4F5F7;
    --surface:      #FFFFFF;
    --surface-2:    #F0F0F5;
    --border:       #E0E0EB;
    --text:         #1A1A2E;
    --muted:        #6B6B7E;
}

/* === RESET === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background var(--speed), color var(--speed);
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* =============================================
   HEADER
   ============================================= */
header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-accent {
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.3px;
}

.logo .material-symbols-outlined {
    color: var(--primary);
    font-size: 1.4rem;
}

nav { flex: 1; }

nav ul {
    list-style: none;
    display: flex;
    gap: 0.25rem;
    justify-content: center;
}

nav ul li a {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--muted);
    transition: color var(--speed), background var(--speed);
}

nav ul li a .material-symbols-outlined { font-size: 1.1rem; }

nav ul li a:hover { color: var(--text); background: var(--surface-2); }
nav ul li a.active { color: var(--primary); background: var(--primary-dim); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
}

.icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    color: var(--muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: color var(--speed), background var(--speed);
    text-decoration: none;
}

.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.icon-btn .material-symbols-outlined { font-size: 1.25rem; }

/* =============================================
   SEARCH OVERLAY
   ============================================= */
.search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    z-index: 999;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
}

.search-overlay.open { display: flex; }

.search-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 680px;
    overflow: hidden;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.search-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.search-input-wrap .material-symbols-outlined {
    color: var(--muted);
    font-size: 1.4rem;
    flex-shrink: 0;
}

.search-input-wrap input {
    flex: 1;
    border: none;
    background: none;
    color: var(--text);
    font-family: var(--font);
    font-size: 1.15rem;
    outline: none;
}

.search-input-wrap input::placeholder { color: var(--muted); }

#search-close {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    gap: 0.3rem;
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-family: var(--font);
}

#search-close:hover { color: var(--text); }

#search-results {
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: background var(--speed);
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--surface-2); }

.search-result-item .material-symbols-outlined {
    color: var(--primary);
    flex-shrink: 0;
}

.search-result-item .result-title { font-weight: 500; font-size: 0.95rem; }
.search-result-item .result-type {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 0.1rem;
}

.search-empty {
    padding: 2.5rem 1.25rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.95rem;
}

/* =============================================
   LAYOUT
   ============================================= */
main {
    flex: 1;
    padding: 2rem 0;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    animation: fadeIn 0.5s ease-out;
}

.container {
    padding: 0 2rem;
}

/* =============================================
   HERO
   ============================================= */
.hero {
    padding: 4rem 0 3rem;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 1.1rem;
}

.hero h1 span { color: var(--primary); }

.hero p {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 560px;
    margin-bottom: 2rem;
    line-height: 1.7;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--speed);
}

.btn .material-symbols-outlined { font-size: 1rem; }

.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover { opacity: 0.88; }

.btn-outline {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* =============================================
   SECTION HEADING
   ============================================= */
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.section-title .material-symbols-outlined {
    color: var(--primary);
    font-size: 1.35rem;
}

/* =============================================
   CARDS GRID
   ============================================= */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: background 0.4s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease, backdrop-filter 0.4s ease;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 4px; height: 100%;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.4s;
}

/* Désactivation définitive des barres latérales et supérieures au survol */
.card:hover::after {
    opacity: 0;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity 0.4s;
}

.card:hover::before { opacity: 0; }

.card--purple:hover { box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 20px 40px rgba(0, 0, 0, 0.3); }
.card--success:hover { box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 20px 40px rgba(0, 0, 0, 0.3); }

.card .card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--primary-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.card .card-icon .material-symbols-outlined {
    color: var(--primary);
    font-size: 1.6rem;
}

.card--purple .card-icon { background: var(--accent-dim); }
.card--purple .card-icon .material-symbols-outlined { color: var(--accent); }
.card--success .card-icon { background: rgba(34,197,94,0.1); }
.card--success .card-icon .material-symbols-outlined { color: var(--success); }

.card-icon-img {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border);
}
.card-icon-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.4rem; }
.card p { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }
.card .card-link { margin-top: 1.25rem; }

/* =============================================
   TABLE PRO
   ============================================= */
.table-wrap { overflow-x: auto; }

.table-pro {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.table-pro th {
    background: var(--surface-2);
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border);
}

.table-pro td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table-pro tr:last-child td { border-bottom: none; }
.table-pro tbody tr:hover { background: var(--surface-2); }

.file-row { display: flex; align-items: center; gap: 0.75rem; }
.file-icon { font-size: 1.4rem; flex-shrink: 0; }
.file-name { font-weight: 500; font-size: 0.9rem; }

/* =============================================
   BADGES
   ============================================= */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid;
    letter-spacing: 0.02em;
}

.badge-tools    { color: #60A5FA; border-color: rgba(96,165,250,0.3); background: rgba(96,165,250,0.08); }
.badge-firmware { color: #34D399; border-color: rgba(52,211,153,0.3); background: rgba(52,211,153,0.08); }
.badge-drivers  { color: #FBBF24; border-color: rgba(251,191,36,0.3);  background: rgba(251,191,36,0.08); }

/* =============================================
   PAGE HEADER
   ============================================= */
.page-header {
    padding: 2rem 0 2rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.9rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    letter-spacing: -0.5px;
}

.page-header p { color: var(--muted); font-size: 0.95rem; }

/* =============================================
   FILTER TABS
   ============================================= */
.filter-tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1.5rem; }

.filter-tab {
    padding: 0.4rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
    background: none;
    transition: all var(--speed);
}

.filter-tab:hover { color: var(--primary); border-color: var(--primary); }
.filter-tab.active { background: var(--primary-dim); border-color: var(--primary); color: var(--primary); }

/* =============================================
   CARD HORIZONTAL (Tutoriels)
   ============================================= */
.list-view { display: flex; flex-direction: column; gap: 0.75rem; }

.card-horizontal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: background 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

.card-horizontal:hover { 
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateX(5px); 
}

/* =============================================
   FRP TOOLS LIST - ADAPTIVE LAYOUT
   ============================================= */
.tools-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.tool-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    transition: background 0.4s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

.tool-item:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 25px 50px rgba(0, 0, 0, 0.4);
}

.tool-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.tool-icon-img, .tool-icon-symbol {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-dim);
    color: var(--primary);
    border-radius: 16px;
    font-size: 2rem;
}

.tool-text h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.tool-text p {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.5rem;
    line-height: 1.5;
}

.tool-btn {
    width: 100%;
    margin-top: auto;
}

@media (max-width: 768px) {
    .tools-list {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .tool-item {
        flex-direction: row;
        padding: 0.75rem 1rem;
        border-radius: 12px;
        text-align: left;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        background: var(--surface);
    }
    
    .tool-info {
        flex-direction: row;
        align-items: center;
        gap: 0.85rem;
        text-align: left;
        flex: 1;
        overflow: hidden;
    }
    
    .tool-icon-img, .tool-icon-symbol {
        width: 38px;
        height: 38px;
        font-size: 1.3rem;
        border-radius: 8px;
        flex-shrink: 0;
    }

    .tool-text {
        flex: 1;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .tool-text h3 {
        font-size: 0.95rem;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .tool-text p {
        font-size: 0.7rem;
        color: var(--muted);
        line-height: 1.2;
        margin-top: 2px;
        display: -webkit-box !important;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .tool-btn {
        width: auto;
        margin-top: 0;
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
        background: var(--primary) !important;
        color: white !important;
        border-radius: 8px;
        flex-shrink: 0;
    }

    .tool-btn span:not(.material-symbols-outlined) {
        display: inline !important;
    }
}





.image-wrapper {
    flex-shrink: 0;
    width: 110px;
    height: 70px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface-2);
    border: 1px solid var(--border);
}

.image-wrapper img { width: 100%; height: 100%; object-fit: cover; display: block; }

.icon-wrapper {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--primary-dim);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-wrapper .material-symbols-outlined { color: var(--primary); font-size: 1.5rem; }

.card-horizontal .content { flex: 1; min-width: 0; }
.card-horizontal h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-horizontal p { font-size: 0.82rem; color: var(--muted); }
.card-horizontal .action { flex-shrink: 0; }

/* =============================================
   CONTACT FORM
   ============================================= */
.contact-form { display: flex; flex-direction: column; gap: 1.1rem; max-width: 640px; }

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-size: 0.9rem; font-weight: 500; color: var(--text); }
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.95rem;
    outline: none;
    transition: border-color var(--speed), box-shadow var(--speed);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-dim);
}

/* Custom Select */
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236B6B7E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

/* Custom File Input */
.form-group input[type="file"] {
    padding: 0.5rem;
    cursor: pointer;
}
.form-group input[type="file"]::file-selector-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-sm);
    margin-right: 1rem;
    cursor: pointer;
    font-weight: 500;
    transition: opacity var(--speed);
}
.form-group input[type="file"]::file-selector-button:hover { opacity: 0.9; }

/* Responsive Grid in Forms */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 600px) {
    .form-grid { grid-template-columns: 1fr; gap: 1rem; }
}

.btn { }

/* =============================================
   MOBILE NAVIGATION DRAWER
   ============================================= */
.hamburger-btn { display: none; }
.desktop-only { display: flex; }

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--speed), visibility var(--speed);
}
.mobile-overlay.open {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 300px;
    background: var(--surface);
    border-left: 1px solid var(--border);
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0,0,0,0.25);
}

.mobile-drawer.open {
    transform: translateX(0);
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}

.mobile-drawer-links {
    list-style: none;
    padding: 1rem 0;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.25rem;
}

.mobile-drawer-links li a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    border-left: 4px solid transparent;
    transition: all var(--speed);
}

.mobile-drawer-links li a .material-symbols-outlined { 
    color: var(--muted); 
    font-size: 1.4rem;
    transition: color var(--speed);
}

.mobile-drawer-links li a:hover {
    background: var(--surface-2);
    color: var(--primary);
}

.mobile-drawer-links li a:hover .material-symbols-outlined {
    color: var(--primary);
}

.mobile-drawer-links li a.active { 
    background: var(--primary-dim); 
    border-left-color: var(--primary); 
    color: var(--primary); 
}

.mobile-drawer-links li a.active .material-symbols-outlined { 
    color: var(--primary); 
}

.mobile-drawer-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
    font-size: 0.85rem;
    color: var(--muted);
}

/* =============================================
   FOOTER
   ============================================= */
footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 1.5rem 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: auto;
}

footer a { color: var(--primary); text-decoration: none; }

/* =============================================
   LATEST SECTION  
   ============================================= */
.latest-section { margin-top: 3.5rem; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
    .desktop-nav { display: none; }
    .desktop-only { display: none; }
    .hamburger-btn { display: flex; }
    .search-overlay {
        padding: 8vh 1.5rem 0;
    }
}

@media (max-width: 768px) {
    .nav-inner { padding: 0 1rem; gap: 1rem; }
    main { padding: 1.5rem 1rem; }
    .hero h1 { font-size: 2.2rem; }
    .card-horizontal { flex-wrap: wrap; }
    .image-wrapper { width: 80px; height: 55px; }
    .search-overlay {
        padding: 5vh 1rem 0;
    }
}
/* =============================================
   RICH TEXT (Quill Content)
   ============================================= */
.rich-text {
    line-height: 1.8;
    color: var(--text);
}

.rich-text h1, .rich-text h2, .rich-text h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.rich-text p {
    margin-bottom: 1.25rem;
}

.rich-text ul, .rich-text ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.rich-text li {
    margin-bottom: 0.5rem;
}

.rich-text img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 1.5rem 0;
    border: 1px solid var(--border);
}

.rich-text blockquote {
    border-left: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    background: var(--surface-2);
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--muted);
}

.rich-text code {
    background: var(--surface-2);
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

.rich-text pre {
    background: var(--surface-2);
    padding: 1rem;
    border-radius: var(--radius);
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

/* =============================================
   SEARCH RESULTS PAGE
   ============================================= */
.search-section {
    margin-bottom: 4rem;
}

.search-section .section-title {
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .rich-text {
        font-size: 1rem;
    }
}

/* =============================================
   MOBILE DETAIL MODE FOR TABLES
   ============================================= */
@media (max-width: 768px) {
    .table-pro thead { display: none; }
    .table-pro, .table-pro tbody, .table-pro tr, .table-pro td { display: block; width: 100%; }
    .table-pro tr { 
        background: var(--surface); 
        border: 1px solid var(--border); 
        border-radius: 16px; 
        margin-bottom: 1.25rem; 
        padding: 1.25rem;
    }
    .table-pro td { 
        border: none; 
        padding: 0.4rem 0; 
        text-align: left;
    }
    .table-pro td:first-child { 
        border-bottom: 1px solid var(--border);
        padding-bottom: 0.75rem;
        margin-bottom: 0.5rem;
    }
    .table-pro td:last-child { 
        margin-top: 1rem; 
    }
    .table-pro .btn { 
        width: 100%; 
        justify-content: center; 
        padding: 0.8rem; 
        font-size: 0.9rem;
    }
}

/* =============================================
   AD SLOTS & ADSENSE PLACEHOLDERS
   ============================================= */
.ad-slot {
    margin: 2rem auto;
    padding: 1rem;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    max-width: 100%;
    transition: border-color var(--speed), background var(--speed);
}

.ad-slot:hover {
    border-color: rgba(79, 142, 247, 0.3);
    background: rgba(255, 255, 255, 0.01);
}

.ad-slot::before {
    content: 'PUBLICITÉ';
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
}

/* Horizontal banner styles (Leaderboard) */
.ad-slot--horizontal {
    min-height: 120px;
    max-width: 970px;
}

/* Rectangle styles (Sidebar/In-content) */
.ad-slot--rectangle {
    min-height: 280px;
    max-width: 336px;
}

/* Dynamic responsive wrapper */
.ad-slot-inner {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Simulated Ad banner matching design system */
.ad-placeholder-banner {
    width: 100%;
    height: 100%;
    min-height: 90px;
    background: linear-gradient(135deg, var(--surface-2) 0%, rgba(79, 142, 247, 0.04) 100%);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    color: var(--muted);
    text-align: center;
    padding: 1.25rem;
    user-select: none;
}

.ad-placeholder-banner .material-symbols-outlined {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.ad-placeholder-banner h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.ad-placeholder-banner p {
    font-size: 0.75rem;
    color: var(--muted);
    max-width: 320px;
}

/* Vraie publicité configurée : cadre propre (vs placeholder en pointillés) */
.ad-slot--live {
    border-style: solid;
    border-color: var(--border);
    padding: 0.75rem 1rem 1rem;
}
.ad-slot--live::before {
    margin-bottom: 0.6rem;
}

/* SmartLink : bandeau sponsorisé */
.smartlink-strip {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0.85rem 1.15rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s, background 0.2s;
}
.ad-slot:hover .smartlink-strip {
    border-color: var(--primary);
    border-left-color: var(--primary);
    background: rgba(79, 142, 247, 0.05);
}
.smartlink-icon {
    font-size: 1.4rem;
    color: var(--primary);
    flex-shrink: 0;
}
.smartlink-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.smartlink-text strong {
    font-size: 0.9rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.smartlink-text small {
    font-size: 0.72rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.smartlink-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
    flex-shrink: 0;
}
.smartlink-cta .material-symbols-outlined {
    font-size: 0.95rem;
    transition: transform 0.2s;
}
.ad-slot:hover .smartlink-cta .material-symbols-outlined {
    transform: translateX(3px);
}

/* =============================================
   RESPONSIVE INFO PAGES (Privacy, Terms, About)
   ============================================= */
.info-page-wrapper {
    max-width: 850px;
    margin: 0 auto;
    padding: 0 3rem;
}
.info-page-panel {
    padding: 3rem;
    line-height: 1.8;
}
@media (max-width: 768px) {
    .info-page-wrapper {
        padding: 0 1.25rem;
    }
    .info-page-panel {
        padding: 1.75rem 1.25rem;
    }
}

/* =============================================
   FRP NATIVE LAUNCHER — panneau d'aide
   ============================================= */
.frp-help-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 2500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.frp-help-overlay.open { display: flex; }
.frp-help-card {
    background: var(--surface);
    width: 100%;
    max-width: 460px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.frp-help-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid var(--border);
}
.frp-help-head .material-symbols-outlined { font-size: 1.3rem; }
.frp-help-title { flex: 1; margin: 0; font-size: 1rem; color: var(--text); }
.frp-help-close {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    padding: 0.15rem;
}
.frp-help-close:hover { color: var(--text); }
.frp-help-body { padding: 1.1rem; font-size: 0.92rem; color: var(--text); line-height: 1.6; }
.frp-help-body p { margin: 0 0 0.75rem; }
.frp-help-body p:last-child { margin-bottom: 0; }
.frp-help-url {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.75rem;
    margin: 0.75rem 0;
    overflow-x: auto;
}
.frp-help-url code {
    font-size: 0.75rem;
    color: var(--primary);
    word-break: break-all;
    white-space: normal;
}
.frp-copy-btn { width: 100%; justify-content: center; }

/* =============================================
   AD SLOTS — responsive & peu intrusif
   ============================================= */
.ad-slot {
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}
.ad-link {
    display: block;
    width: 100%;
    max-width: 100%;
    text-decoration: none;
    color: inherit;
}
.ad-slot img,
.ad-slot video,
.ad-slot iframe {
    max-width: 100%;
}
.ad-slot .custom-ad-code-wrapper {
    max-width: 100%;
    overflow: hidden;
}

@media (max-width: 768px) {
    .ad-slot {
        margin: 1.25rem auto;
        padding: 0.65rem 0.75rem;
    }
    .ad-slot::before {
        font-size: 0.6rem;
        margin-bottom: 0.5rem;
        letter-spacing: 1.5px;
    }
    .ad-slot--horizontal { min-height: 80px; }
    .ad-slot--rectangle { min-height: 200px; max-width: 100%; }
    .ad-placeholder-banner { min-height: 70px; padding: 0.85rem; }
    .ad-placeholder-banner .material-symbols-outlined { font-size: 1.4rem; margin-bottom: 0.3rem; }
    .ad-placeholder-banner h4 { font-size: 0.78rem; }
    .ad-placeholder-banner p { display: none; } /* moins de bruit sur petit écran */
    .smartlink-strip { padding: 0.65rem 0.85rem; gap: 0.7rem; }
    .smartlink-text strong { font-size: 0.82rem; }
    .smartlink-cta { font-size: 0.75rem; }
}

/* =============================================
   BADGE « NOUVEAU » — contenus marqués is_new
   ============================================= */
.nb-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #052e12;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    border-radius: 999px;
    padding: 0.18rem 0.55rem;
    margin-left: 0.5rem;
    vertical-align: middle;
    white-space: nowrap;
    box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.35), 0 2px 8px rgba(34, 197, 94, 0.35);
    animation: nb-pulse 2.2s ease-in-out infinite;
}
@keyframes nb-pulse {
    0%, 100% { box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.35), 0 2px 8px rgba(34, 197, 94, 0.35); }
    50% { box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.15), 0 2px 14px rgba(34, 197, 94, 0.55); }
}
