/* ============================================================================
   CULTUREQUIZZ_LB — STYLE GLOBAL v7.0 (2025)
   ---------------------------------------------------------------------------
   - Harmonisé avec le nouveau header responsive (header.php v7.0)
   - Nouveau système de cards premium
   - Grilles ultra-flexibles (mobile-first)
   - Corrections des anciennes règles cassantes
============================================================================ */

/* ============================================================================
   VARIABLES GLOBALES (Palette Lilas Premium)
============================================================================ */
:root {
    --primary:#8b5cf6;
    --primary-hover:#7c3aed;
    --primary-light:#ede9fe;

    --bg:#f8fafc;
    --card:#ffffff;
    --text:#111827;
    --muted:#6b7280;
    --border:#e5e7eb;

    --header-bg:#a78bfa;
    --footer-bg:#eee6ff;
}

/* ============================================================================
   BASE HTML
============================================================================ */
body {
    margin:0;
    font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
    background:var(--bg);
    color:var(--text);
    overflow-x:hidden;
}

/* Liens universels */
a {
    text-decoration:none;
    color:inherit;
}
a:hover {
    opacity:.85;
}

img { display:block; }

/* Conteneurs */
.wrap, .container {
    max-width:1200px;
    margin:0 auto;
    padding:20px;
    box-sizing:border-box;
}

/* ============================================================================
   HEADER — Aligné avec includes/header.php v7.0
   (La logique responsive est désormais dans header.php)
============================================================================ */

/* Rien ici : tout est dans header.php pour centralisation */

/* style du bouton d'installation du racourcis desktop */


.install-app-container {
    position: relative;
    z-index: 10001;
    pointer-events: auto;
    background: white;
    padding: 6px 0;
}

.install-btn {
    display: none;
    background: #8b5cf6;
    color: white;
    padding: 10px 18px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.install-info {
    display: none;
    font-size: 13px;
    color: #555;
    text-align: center;
}


.install-btn:hover {
  transform: translateY(-1px);
}

.ios-hint {
  display: none;
  font-size: 13px;
  color: #555;
  margin-top: 6px;
}



/* ============================================================================
   FOOTER — Style iOS
============================================================================ */
footer {
    background:var(--footer-bg);
    padding:22px;
    margin-top:40px;
    text-align:center;
    color:#4b5563;
    font-size:14px;
    border-top:1px solid #e5e7eb;
    max-width:1200px;
    margin-left:auto;
    margin-right:auto;
    box-shadow:0 4px 10px rgba(0,0,0,0.04);
    border-radius:14px;
}

/* ============================================================================
   CARDS — Design Lilas Premium
============================================================================ */
.card {
    background:var(--card);
    border:1px solid var(--border);
    padding:20px;
    border-radius:14px;
    box-shadow:0 4px 12px rgba(0,0,0,0.05);
    margin-bottom:20px;
}

.section-title {
    font-size:22px;
    font-weight:700;
    color:var(--primary);
    margin-bottom:14px;
    display:flex;
    align-items:center;
    gap:6px;
}

/* Grid responsive */
.grid {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:16px;
}

/* ============================================================================
   BOUTONS
============================================================================ */
.btn-primary {
    background:var(--primary);
    color:white;
    padding:10px 16px;
    border-radius:10px;
    font-weight:600;
}
.btn-primary:hover {
    background:var(--primary-hover);
}

/* ============================================================================
   LAYOUT PUBLIC
============================================================================ */
main.container,
.wrap,
body > main {
    max-width:1200px !important;
    box-sizing:border-box;
}

/* Sections pleine largeur */
.hero, .hero-top, .header-hero {
    width:100%;
    padding-left:0;
    padding-right:0;
}

/* ============================================================================
   CORRECTIONS CRITIQUES (ancien code supprimé)
============================================================================ */

/* L’ancienne règle .app-public cassait l’affichage — corrigée */
body.app-public {
    background:var(--bg);
}

/* Assure une bonne structure */
.app-public main {
    max-width:1200px;
    margin:auto;
}

/* Padding cohérent */
main.wrap {
    padding-top:20px;
    padding-bottom:60px;
}

/* ============================================================================
   TABLEAUX ALIGNÉS — Version Premium
============================================================================ */
.table {
    width:100%;
    border-collapse:collapse;
    table-layout:fixed; /* 🔥 Aligne parfaitement les colonnes */
    margin-top:12px;
}

.table th {
    background:var(--primary-light);
    color:var(--primary);
    padding:12px 8px;
    font-weight:600;
    text-align:center;
}

.table td {
    padding:12px 8px;
    text-align:center;
    border-bottom:1px solid var(--border);
    vertical-align:middle;
}

/* Notes de couleur */
.good { color:#10b981; font-weight:700; }
.mid  { color:#f59e0b; font-weight:700; }
.bad  { color:#ef4444; font-weight:700; }

/* ============================================================================
  Examen info dans profile
============================================================================ */


.exam-info {
    font-size: 0.95rem;
    margin-top: 8px;
    color: var(--primary);
}
.exam-info.muted {
    color: var(--muted);
}

/* ============================================================
   HEADER — Boutons ronds premium (v2 fusionné + vertical)
   ============================================================ */

.nav-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    height: 52px;              /* AVANT 60px — réduit de ~15% */
    min-width: 68px;           /* AVANT 80px — réduit de ~15% */

    padding: 6px 10px;         /* AVANT 8px 12px — réduit */
    border-radius: 34px;       /* AVANT 40px — réduit */

    background: linear-gradient(135deg, #b794f4, #8b5cf6);
    color: white !important;

    font-weight: 500;
    text-decoration: none;

    border: 1px solid rgba(255,255,255,0.25);
    box-shadow: 0 2px 5px rgba(140, 82, 255, 0.32);
    transition: 0.25s ease;
}

.nav-pill .pill-icon {
    font-size: 19px;   /* AVANT 22px */
    line-height: 1;
}

.nav-pill .pill-label {
    font-size: 11px;   /* AVANT 13px */
    margin-top: 2px;
}


.nav-pill:hover {
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(140, 82, 255, 0.45);
    color: white !important;
}

.nav-pill.active {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    box-shadow: 0 6px 16px rgba(90, 20, 160, 0.55);
}

.nav-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 70px;
    min-width: 80px;
}

/* AUTOMATIQUE : sépare le 1er caractère (emoji) du reste du texte */
.nav-pill {
    line-height: 1.1;
}

.nav-pill::first-letter {
    display: block;
    font-size: 22px; /* optionnel, pour harmoniser la taille emoji */
}


/* ============================================================
   CARDS PREMIUM — v4.0 (Full Unified Design)
============================================================ */

.card {
    background: #ffffff;
    border-radius: 22px;
    padding: 22px 24px;

    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);

    transition: 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Hover effect (lift + shadow) */
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(0,0,0,0.12);
}

/* ----------- TITRE PRINCIPAL ----------- */

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
}

/* ----------- SOUS-TITRE / CATÉGORIE ----------- */

.card-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 10px;
}

/* ----------- TEXTE INFO / SCORE / NB QUESTIONS ----------- */

.card-info {
    font-size: 13px;
    color: #4b5563;
    margin-bottom: 12px;
}

/* ----------- BOUTON JOUER PREMIUM ----------- */

.card .btn-play {
    align-self: flex-end;

    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 14px;
    color: white !important;

    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;

    cursor: pointer;
    transition: 0.25s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border: none;
}

.card .btn-play:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245,158,11,0.5);
}

/* ----------- VARIANTES DE COULEUR ----------- */

.btn-play.green {
    background: linear-gradient(135deg, #10b981, #059669);
}
.btn-play.red {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}
.btn-play.blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

/* ----------- RESPONSIVE ----------- */

@media (max-width: 600px) {
    .card {
        padding: 18px 20px;
        border-radius: 18px;
    }

    .card-title {
        font-size: 17px;
    }

    .btn-play {
        padding: 8px 14px;
        font-size: 13px;
    }
}

/* =========================================================
   FIX HEADER STICKY — PREVENT TOP OVERFLOW
   CultureQuizz_LB
========================================================= */

:root {
    --cq-header-height: 120px;
}

main.wrap {
    padding-top: var(--cq-header-height);
}

@media (max-width: 520px) {
    :root {
        --cq-header-height: 90px;
    }
}

/* =========================================
   HEADER FIX — USER ACTIONS ALIGNMENT
========================================= */

.cq-user-mini {
    max-width: 260px;
    justify-content: flex-end;
    white-space: nowrap;
    margin-right: 12px;
}

.user-badge {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}



