/* ==============================================
   /assets/css/style.css
   Feuille de style principale (Design Premium & Hiérarchie)
   Palette : Bleu Nuit (#142a45) & Or (#FFC107)
   21/01/2026 23:00
   Version 6.6 (Finale : Commentaires intacts + Design Memo)
   Les cours de Ruchianah
   ============================================== */


/* ==========================================================================
   1) POLICES (FONTS) & CONFIGURATION GLOBALE

   - Polices locales (TTF) : Plus Jakarta Sans
   - Variables CSS : couleurs, dimensions, rayons
   - Base du document : fond, typographie, couleurs, spacing global
   ========================================================================== */

/* --- 1.1 Polices (locales) ------------------------------------------------ */

@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('../fonts/PlusJakartaSans-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('../fonts/PlusJakartaSans-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('../fonts/PlusJakartaSans-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
}


/* --- 1.2 Variables globales ---------------------------------------------- */

:root {
    /* Couleurs */
    --brand-blue: #142a45;   /* Bleu Nuit */
    --brand-gold: #FFC107;   /* Or Jaune */
    --bg-page: #f4f6f9;      /* Gris très légèrement bleuté */
    --text-main: #1a1b1e;    /* Noir texte */

    /* Dimensions */
    --header-height: 70px;
    --radius-card: 20px;
    --radius-pill: 50px;
}


/* --- 1.3 Base document ---------------------------------------------------- */

body {
    background-color: var(--bg-page);

    /* Dégradé léger (évite l'effet plat) */
    background-image: linear-gradient(180deg, #f0f2f5 0%, #eef1f5 100%);
    background-attachment: fixed;

    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-main);

    /* Espace large pour le menu du bas (bottom-nav) */
    padding-bottom: 120px;

    margin: 0;
}

a { text-decoration: none; }


/* ==========================================================================
   2) EN-TÊTE (NAVBAR FIXE)

   - Barre fixe haut (branding + avatar + burger)
   - Hauteur = --header-height
   - Ombre premium
   ========================================================================== */

.navbar-app {
    background-color: var(--brand-blue);
    height: var(--header-height);

    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1040;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 20px;

    /* Ombre plus marquée */
    box-shadow: 0 4px 20px rgba(20, 42, 69, 0.25);
}

.user-avatar {
    width: 44px;
    height: 44px;

    border-radius: 50%;
    object-fit: cover;

    border: 2px solid var(--brand-gold);

    background: white;
    padding: 2px;
}

.site-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);

    font-size: 0.95rem;
    font-weight: 800;
    color: white;

    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.site-brand span { color: var(--brand-gold); }

.btn-burger {
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-burger:hover { color: var(--brand-gold); }


/* ==========================================================================
   3) STRUCTURE & CADRE (TITRES RESPONSIVES & HEADER LEÇON)
   ========================================================================== */

.main-container {
    padding: 0 20px;
    max-width: 850px;

    margin-left: auto;
    margin-right: auto;

    /* Décale sous navbar fixe */
    margin-top: 100px;
}

.page-header {
    margin-bottom: 30px;
    text-align: center;
}

/* --- TITRES DE MODULES UNIFIÉS (Responsivité sur 3 niveaux) --- */

/* 1. Base (Grand écran / Desktop) */
.module-title-unified {
    font-family: inherit;
    font-weight: 800;
    color: var(--brand-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    line-height: 1.2;
    font-size: 2.2rem; 
    text-align: center;
}

/* 2. Écran Intermédiaire (Tablettes / Laptops < 992px) */
@media (max-width: 992px) {
    .module-title-unified {
        font-size: 1.7rem !important;
    }
}

/* 3. Petit Écran (Smartphones < 576px) */
@media (max-width: 576px) {
    .module-title-unified {
        font-size: 1.15rem !important; 
        letter-spacing: 0.5px;
    }
}

/* --- HEADER SPÉCIFIQUE LEÇON (Simplifié) --- */
.page-header-lecon {
    position: relative !important;
    display: flex;
    justify-content: center;
    align-items: center;
    /* On retire les grandes marges car le bouton flottant n'est plus là */
    padding: 0 20px !important;
    min-height: 80px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .page-header-lecon { margin-bottom: 20px; }
}

/* --- CARTES DE LEÇONS & BADGE SOMMAIRE --- */
.lesson-card {
    background: white;
    border-radius: var(--radius-card);
    box-shadow: 0 15px 40px rgba(20, 42, 69, 0.08);
    padding: 40px;
    margin-bottom: 30px;
    overflow: hidden;
    position: relative;
    border-top: 6px solid var(--brand-gold);
    min-height: 200px;
    display: flow-root;
}

/* Conteneur Titre + Badge (Pastille) */
.bloc-header-badge-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* La Pastille Dorée Cliquable */
.badge-gold-top {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    background-color: var(--brand-gold);
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(255, 193, 7, 0.3);
    text-decoration: none !important;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s;
}

.badge-gold-top:hover {
    transform: scale(1.1);
    background-color: #ffca2c; /* Légèrement plus clair */
    color: white;
}

/* Ajustement du titre quand il est à côté du badge */
.bloc-header-badge-wrapper h1 {
    margin: 0 !important;
    border: none !important;
    padding: 0 !important;
    line-height: 1.2;
}

/* Titres H1 standards (sans badge) */
.lesson-card h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--brand-blue);
    margin-bottom: 1.2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* Optimisation h1 sur mobile */
@media (max-width: 576px) {
    .lesson-card h1 {
        font-size: 1.1rem !important;
        line-height: 1.2 !important;
        margin-bottom: 15px !important;
    }
}

.lesson-card h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #444;
    margin-top: 2rem;
    margin-bottom: 1rem;
    position: relative;
    padding-left: 18px;
}

.lesson-card h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.4em;
    width: 6px;
    height: 6px;
    background-color: var(--brand-gold);
    border-radius: 50%;
}

.lesson-card p {
    line-height: 1.8;
    color: #555;
    margin-bottom: 1.2rem;
}

.lesson-card img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

/* --- Responsive pour le Badge --- */
@media (max-width: 768px) {
    .bloc-header-badge-wrapper { gap: 12px; }
    .badge-gold-top { width: 40px; height: 40px; font-size: 1.2rem; }
    .bloc-header-badge-wrapper h1 { font-size: 1.2rem !important; }
}


/* ==========================================================================
   4) NAVIGATION BAS DE PAGE

   - Conteneur fixe bas : .bottom-nav
   - Boutons : .btn-pill (Variante or : .btn-pill.gold)
   - FIX MOBILE (BAZOOKA) : Force l'alignement sur une ligne sur smartphone
   ========================================================================== */

.bottom-nav {
    position: fixed;
    bottom: 30px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    pointer-events: none;
    z-index: 1000;
}

.btn-pill {
    pointer-events: auto;
    background: white;
    color: var(--brand-blue);
    padding: 16px 35px;
    border-radius: var(--radius-pill);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid var(--brand-blue);
    display: flex;
    align-items: center;
    box-shadow: 0 8px 20px rgba(20, 42, 69, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-pill:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(20, 42, 69, 0.3);
}

.btn-pill.gold {
    background: var(--brand-gold);
    border-color: var(--brand-gold);
    color: var(--brand-blue);
}

/* --- FIX MOBILE : Navigation Bas de Page (BAZOOKA) --- */
@media (max-width: 576px) {
    .bottom-nav {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        padding: 0 10px !important;
        bottom: 15px !important;
    }
    .btn-pill {
        flex: 1 1 0 !important;
        width: auto !important;
        min-width: 0 !important;
        padding: 12px 0 !important;
        font-size: 0.75rem !important;
        justify-content: center !important;
        white-space: nowrap !important;
    }
}


/* ==========================================================================
   5) MENU LATÉRAL & DIVERS

   - Liens de sous-menu : hover/active/done
   - Blocs de contenu : style-gold / style-mg
   ========================================================================== */

.sub-link {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    color: #555;
    font-weight: 500;
    border-left: 4px solid transparent;
    transition: all 0.2s;
}

.sub-link:hover {
    background: #f4f6f9;
    color: var(--brand-blue);
    padding-left: 25px;
}

.sub-link.active {
    background: #fffdf2;
    color: #b88b05;
    border-left-color: var(--brand-gold);
    font-weight: 700;
}

.style-gold {
    background-color: #fffbf2;
    border-left: 4px solid var(--brand-gold);
    border-radius: 8px;
}

.style-mg {
    background-color: #f0f7ff;
    border-left: 4px solid var(--brand-blue);
    border-radius: 8px;
}


/* ==========================================================================
   6) ACCUEIL (index.php) — LANGUES / ONGLET / LISTE DES COURS
   ========================================================================== */

.welcome-pills { text-align: center; margin: 0 0 14px 0; }
.welcome-pills .pill {
    display: inline-block;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(20, 42, 69, 0.06);
    color: var(--brand-blue);
    margin: 3px 4px;
}

.course-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-radius: 16px;
    background: #fffbf2;
    border-left: 6px solid var(--brand-gold);
    margin-top: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.course-strip:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
}

.course-strip-title { font-weight: 900; color: #b88b05; text-transform: uppercase; }
.course-strip-subtitle { color: #777; font-size: 0.92rem; }
.course-strip-arrow { color: var(--brand-gold); font-size: 1.4rem; font-weight: 900; }


/* ==========================================================================
   7) ÉLÉMENTS TEXTUELS (ACCUEIL & MÉMORANDUM)

   - Styles pour les textes d'introduction
   - Mise en forme "Premium" pour la page Mémorandum (Titres Bleus, Citations Or)
   ========================================================================== */

/* Accueil : Texte explicatif sous les onglets */
.lang-explain {
    margin-bottom: 25px;
    line-height: 1.6;
    color: #444;
    font-size: 1.05rem;
}

/* Accueil : Lien "Plus de détails" */
.mission-link {
    font-weight: 700;
    color: var(--brand-blue);
    text-decoration: none;
}

/* Accueil : Sous-titre "Les cours suivants..." */
.courses-subtitle {
    display: block;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-bottom: 15px;
    margin-top: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

/* Mémorandum : Titres H1 et H3 dans les sections */
section h1 {
    color: var(--brand-blue);
    font-weight: 800;
    margin-bottom: 1.5rem;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--brand-gold);
    display: inline-block;
}

section h3 {
    color: var(--brand-blue);
    font-weight: 700;
    margin-top: 2rem;
}

/* Mémorandum : Citation (Blockquote) stylisée */
section blockquote {
    font-style: italic;
    border-left: 4px solid var(--brand-gold);
    background-color: #fffbf2; /* Fond crème léger */
    padding: 15px 20px;
    margin: 20px 0;
    color: #555;
    border-radius: 0 10px 10px 0;
}

/* Mémorandum : Mots importants en bleu */
section strong {
    color: var(--brand-blue);
}


/* ==========================================================================
   8) OPTIMISATIONS MOBILES (ONGLETS SWIPE & ESPACES)

   - Réduction des marges du cadre blanc sur petit écran
   - Onglets sur une seule ligne avec défilement horizontal (Swipe)
   ========================================================================== */

@media (max-width: 576px) {
    
    /* 1. On réduit les marges blanches du cadre pour gagner de la place */
    .lesson-card {
        padding: 20px 15px !important;
    }

    /* 2. Onglets : Force une seule ligne avec défilement horizontal */
    .lang-tabs {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        border-bottom: 1px solid #dee2e6 !important; 
        padding-right: 40px !important; 
        margin-left: -15px;
        margin-right: -15px;
        padding-left: 15px;
    }
    
    .lang-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .lang-tabs .nav-item {
        flex: 0 0 auto;
    }
}