/* ============================================================
   GCIV ACADEMY - FEUILLE DE STYLE GLOBALE
   Thème clair / sombre avec effets spéciaux
   ============================================================ */

/* ==================== 1. VARIABLES & THÈMES ==================== */
:root {
    --bg-gradient: linear-gradient(135deg, #0a2a4a 0%, #1a3a5a 50%, #0d1b3e 100%);
    --bg-body: #0d1b3e;
    --bg-card: rgba(255, 255, 255, 0.08);
    --bg-card-hover: rgba(255, 255, 255, 0.12);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.85);
    --text-muted: rgba(255, 255, 255, 0.6);
    --border-color: rgba(255, 255, 255, 0.15);
    --accent: #e67e22;
    --accent-hover: #d35400;
    --accent-glow: rgba(230, 126, 34, 0.3);
    --input-bg: rgba(255, 255, 255, 0.06);
    --input-border: rgba(255, 255, 255, 0.2);
    --input-focus: rgba(230, 126, 34, 0.2);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.4);
    --radius: 16px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

body.light-mode {
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --bg-body: #f5f7fa;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f9fa;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    --accent: #e67e22;
    --accent-hover: #d35400;
    --accent-glow: rgba(230, 126, 34, 0.15);
    --input-bg: #ffffff;
    --input-border: #cbd5e0;
    --input-focus: rgba(230, 126, 34, 0.1);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
}

/* ==================== 2. RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background 0.4s ease, color 0.4s ease;
}

a {
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent);
}

img {
    max-width: 100%;
}

/* ==================== 3. TYPOGRAPHIE ==================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent), #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lead {
    color: var(--text-secondary);
}

.text-muted {
    color: var(--text-muted) !important;
}

/* ==================== 4. NAVBAR ==================== */
.navbar-custom {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    transition: var(--transition);
}

.navbar-custom .navbar-brand .brand-text {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.navbar-custom .navbar-brand .brand-text span {
    color: var(--accent);
}

.navbar-custom .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0 5px;
    position: relative;
}

.navbar-custom .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.navbar-custom .nav-link:hover::after,
.navbar-custom .nav-link.active::after {
    width: 100%;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
    color: var(--accent);
}

/* ==================== 5. FOOTER ==================== */
.footer-custom {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    padding: 50px 0 20px;
    color: var(--text-secondary);
}

.footer-custom h5 {
    color: var(--text-primary);
    margin-bottom: 20px;
}

.footer-custom a {
    color: var(--text-muted);
}

.footer-custom a:hover {
    color: var(--accent);
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    margin-right: 10px;
    transition: var(--transition);
}

.social-icons a:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-3px);
}

.copyright {
    border-top: 1px solid var(--border-color);
    margin-top: 30px;
    padding-top: 20px;
    text-align: center;
    color: var(--text-muted);
}

/* ==================== 6. BOUTONS ==================== */
.btn {
    border-radius: 50px;
    padding: 10px 25px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary-modern {
    background: var(--accent);
    border: none;
    color: #fff;
}

.btn-primary-modern:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px var(--accent-glow);
}

.btn-outline-primary-custom {
    border: 2px solid var(--accent);
    color: var(--accent);
    background: transparent;
}

.btn-outline-primary-custom:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px);
}

.btn-hero {
    background: var(--accent);
    color: #fff;
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-hero:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--accent-glow);
}

/* Boutons admin */
.btn-admin {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
}

.btn-admin:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--accent-glow);
}

/* ==================== 7. FORMULAIRES (Design professionnel) ==================== */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-control-modern {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control-modern::placeholder {
    color: transparent;
}

.form-control-modern:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--input-focus);
    background: var(--input-bg);
    outline: none;
}

.form-control-modern + label {
    position: absolute;
    left: 45px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
    transition: var(--transition);
}

.form-control-modern:focus + label,
.form-control-modern:not(:placeholder-shown) + label {
    top: 0;
    left: 45px;
    transform: translateY(-50%);
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--bg-body);
    padding: 0 8px;
    color: var(--accent);
}

.form-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: var(--transition);
}

.form-control-modern:focus ~ .form-icon {
    color: var(--accent);
}

/* Validation */
.form-control-modern.is-valid,
.is-valid .form-control-modern {
    border-color: #28a745;
}

.form-control-modern.is-invalid,
.is-invalid .form-control-modern {
    border-color: #dc3545;
}

.invalid-feedback, .valid-feedback {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #dc3545;
}

.valid-feedback {
    color: #28a745;
}

/* Textarea modern */
textarea.form-control-modern {
    min-height: 120px;
    padding-left: 15px;
}

textarea.form-control-modern + label {
    top: 20px;
    transform: none;
}

textarea.form-control-modern:focus + label,
textarea.form-control-modern:not(:placeholder-shown) + label {
    top: 0;
    transform: translateY(-50%);
}

/* Select modern */
.select-modern {
    width: 100%;
    padding: 12px 15px;
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
    appearance: none;
}

.select-modern:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--input-focus);
}

/* ==================== 8. CARTES & COMPOSANTS ==================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    color: var(--text-primary);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.card-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
}

.card-body {
    padding: 20px;
}

.value-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    transition: var(--transition);
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.value-card .icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--accent);
}

/* ==================== 9. TABLES ==================== */
.table {
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table thead {
    background: var(--accent);
    color: #fff;
}

.table th {
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    padding: 15px;
}

.table td {
    vertical-align: middle;
    padding: 15px;
    border-color: var(--border-color);
}

.table-striped tbody tr:nth-of-type(odd) {
    background: rgba(255,255,255,0.03);
}

.table-hover tbody tr:hover {
    background: var(--accent-glow);
}

/* ==================== 10. EFFETS SPÉCIAUX ==================== */
/* Glassmorphism */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

/* Glow effect */
.glow {
    box-shadow: 0 0 20px var(--accent-glow);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Badge animé */
.hero-badge {
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Ligne décorative */
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 20px auto 0;
    border-radius: 4px;
}

/* Bouton retour en haut */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    box-shadow: 0 5px 15px var(--accent-glow);
    display: none;
    z-index: 9999;
    cursor: pointer;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* ==================== 11. RESPONSIVE ==================== */
@media (max-width: 992px) {
    .navbar-custom .nav-link::after {
        display: none;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 1.8rem;
    }
    
    .form-control-modern + label {
        left: 40px;
    }
    
    .form-control-modern:focus + label,
    .form-control-modern:not(:placeholder-shown) + label {
        left: 40px;
    }
}

@media (max-width: 576px) {
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}
/* Bouton de thème professionnel */
.theme-toggle-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px var(--accent-glow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 10px;
    font-size: 1.2rem;
    position: relative;
}

/* Effet au survol */
.theme-toggle-btn:hover {
    background: var(--accent-hover);
    transform: rotate(20deg) scale(1.15);
    box-shadow: 0 8px 25px var(--accent-glow);
}

/* Effet au clic */
.theme-toggle-btn:active {
    transform: scale(0.95);
}

/* Tooltip élégant */
.theme-toggle-btn::after {
    content: attr(title);
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: var(--bg-body);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: var(--shadow-sm);
}

.theme-toggle-btn:hover::after {
    opacity: 1;
    visibility: visible;
    top: -50px;
}

/* Petite flèche du tooltip */
.theme-toggle-btn::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px 5px 0 5px;
    border-style: solid;
    border-color: var(--text-primary) transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.theme-toggle-btn:hover::before {
    opacity: 1;
    visibility: visible;
}
/* ==================== BOUTON FLOTTANT D'INSTALLATION ==================== */
.btn-install-app {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px 24px;
    font-weight: 600;
    box-shadow: 0 5px 20px var(--accent-glow);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
}

/* Effet au survol */
.btn-install-app:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--accent-glow);
}

/* Effet au clic */
.btn-install-app:active {
    transform: scale(0.95);
}

/* Animation d'apparition */
@keyframes slideInUp {
    from { opacity: 0; transform: translateY(100px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn-install-app:not(.d-none) {
    animation: slideInUp 0.5s ease forwards;
}

/* Responsive (mobile) */
@media (max-width: 768px) {
    .btn-install-app {
        bottom: 20px;
        right: 20px;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}