/*
 * LOGICAMP.ORG - STYLE MODERNE v2.0 - PATCH DESIGN 01
 * Respecte le design original avec modernisation subtile
 * Encodage: UTF-8
 * Couleurs: Bleu, Blanc, Orange, Argent
 * 
 * PATCH 01 CORRECTIONS:
 * - Menu déroulant horizontal pour IMMO, Catalogue, Tutoriaux, Support
 * - Login form plus compact pour tenir sur une ligne
 * - Ajout style pour "last 30 days" dans statistiques
 */

/* ========================================
   VARIABLES & BASE
   ======================================== */
:root {
    --primary-blue: #0066cc;
    --primary-orange: #ff8c00;
    --secondary-blue: #003d7a;
    --light-blue: #4da6ff;
    --silver: #c0c0c0;
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --dark-gray: #333333;
    --success-green: #28a745;
    --online-green: #00ff00;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-gray);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
}

/* ========================================
   HEADER TOP (Logo + Login + Stats)
   ======================================== */
.top-header {
    background: var(--white);
    padding: 15px 0;
    border-bottom: 3px solid var(--primary-blue);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.top-logo {
    max-height: 80px;
    width: auto;
    display: block;
}

.main-logo {
    max-height: 60px;
    width: auto;
}

.logo-text {
    text-align: center;
}

.logo-text h1 {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-blue);
    margin: 0;
    line-height: 1.2;
}

.logo-text .tagline {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    font-style: italic;
}

/* Header Login Form - PATCH 01: Plus compact */
.header-login-form {
    text-align: center;
}

.login-inline {
    display: flex;
    gap: 5px;
    justify-content: center;
    flex-wrap: nowrap;
    margin-bottom: 3px;
    align-items: center;
}

.login-inline input {
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.8rem;
    width: auto;
    min-width: 80px;
}

.login-inline .btn {
    padding: 4px 12px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.header-links {
    font-size: 0.8rem;
}

.header-links a {
    color: var(--primary-blue);
}

/* Grid Statistics - PATCH 01: Ajusté pour inclure last 30 days */
.grid-stats {
    background: var(--dark-gray);
    color: var(--white);
    padding: 8px 12px;
    border-radius: 8px;
    text-align: center;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
    font-size: 0.8rem;
}

.stat-item.online {
    font-weight: bold;
}

.stat-item.online .stat-value {
    color: var(--online-green);
}

.stat-label {
    color: var(--silver);
}

.stat-value {
    color: var(--white);
    font-weight: bold;
}

/* ========================================
   NAVIGATION MENU - PATCH 01: Ajout dropdowns
   ======================================== */
.main-navigation {
    background: linear-gradient(135deg, var(--primary-orange) 0%, #ff6600 100%);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: space-around;
    flex-wrap: wrap;
}

.nav-menu > li {
    flex: 1;
    text-align: center;
    position: relative;
}

.nav-item {
    display: block;
    padding: 15px 12px;
    color: var(--white);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-right: 1px solid rgba(255,255,255,0.2);
}

.nav-menu li:last-child .nav-item {
    border-right: none;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255,255,255,0.2);
    text-decoration: none;
    transform: translateY(-2px);
}

.nav-item i {
    margin-right: 5px;
}

/* PATCH 01: Dropdown Menu Styles */
.nav-menu li.dropdown {
    position: relative;
}

.nav-menu li.dropdown .nav-item i.bi-chevron-down {
    font-size: 0.7rem;
    margin-left: 3px;
    transition: transform 0.3s ease;
}

.nav-menu li.dropdown:hover .nav-item i.bi-chevron-down {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--white);
    list-style: none;
    padding: 8px 0;
    margin: 0;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    z-index: 1001;
}

.nav-menu li.dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu li {
    width: 100%;
    text-align: left;
}

.dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.dropdown-menu li:last-child a {
    border-bottom: none;
}

.dropdown-menu li a:hover {
    background: var(--primary-blue);
    color: var(--white);
    text-decoration: none;
    padding-left: 25px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 2rem;
    padding: 10px 20px;
    cursor: pointer;
}

@media (max-width: 991px) {
    .nav-menu {
        display: none;
        flex-direction: column;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu > li {
        width: 100%;
    }
    
    .nav-item {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.2);
    }
    
    .mobile-menu-toggle {
        display: block;
        width: 100%;
        text-align: center;
    }
    
    /* Dropdown sur mobile */
    .dropdown-menu {
        position: static;
        box-shadow: none;
        background: rgba(255,255,255,0.95);
        border-radius: 0;
    }
    
    .nav-menu li.dropdown:hover .dropdown-menu {
        display: none;
    }
    
    .nav-menu li.dropdown.active .dropdown-menu {
        display: block;
    }
}

/* ========================================
   HERO SECTION (Image + Form)
   ======================================== */
.hero-section {
    background: var(--white);
    padding: 20px 0;
}

.main-slideshow {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.slideshow-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.slideshow-image:hover {
    transform: scale(1.02);
}

/* Registration Form */
.registration-form {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f2ff 100%);
    border: 2px solid var(--primary-blue);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,102,204,0.2);
}

.form-title {
    text-align: center;
    color: var(--primary-blue);
    font-weight: bold;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.avatar-selection {
    background: var(--white);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.avatar-choice {
    cursor: pointer;
    display: block;
}

.avatar-choice input[type="radio"] {
    display: none;
}

.avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    object-fit: cover;
}

.avatar-choice input[type="radio"]:checked + .avatar-img {
    border-color: var(--primary-blue);
    box-shadow: 0 0 15px rgba(0,102,204,0.5);
    transform: scale(1.1);
}

.avatar-choice span {
    display: block;
    margin-top: 8px;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 15px;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 10px rgba(0,102,204,0.2);
}

.captcha-label {
    display: block;
    font-weight: bold;
    color: var(--primary-blue);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.form-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
}

.form-text a {
    color: var(--primary-blue);
}

.btn-register {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary-orange) 0%, #ff6600 100%);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(255,140,0,0.3);
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,140,0,0.5);
}

/* ========================================
   STATISTICS SECTION
   ======================================== */
.stats-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    padding: 40px 0;
    color: var(--white);
}

.stat-card {
    background: rgba(255,255,255,0.1);
    padding: 30px 20px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.stat-card:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--white);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 10px 0;
}

.stat-description {
    font-size: 1rem;
    opacity: 0.9;
}

.stat-card.online-status .stat-icon {
    color: var(--online-green);
}

/* ========================================
   CONTENT SECTIONS
   ======================================== */
.content-section,
.tutorials-section,
.support-section {
    padding: 60px 0;
    background: var(--white);
}

.content-section {
    background: var(--light-gray);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-blue);
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: var(--primary-orange);
    margin: 15px auto 0;
    border-radius: 2px;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.about-text .lead {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--primary-blue);
}

.about-text a {
    color: var(--primary-blue);
    font-weight: 600;
}

/* ========================================
   GALLERY CARDS
   ======================================== */
.gallery-section {
    margin-top: 40px;
}

.gallery-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
}

.gallery-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border-color: var(--primary-blue);
}

.gallery-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.gallery-content {
    padding: 20px;
    text-align: center;
}

.gallery-content h4 {
    color: var(--primary-blue);
    font-weight: bold;
    margin-bottom: 10px;
}

.gallery-content p {
    color: var(--text-muted);
    margin-bottom: 15px;
}

.btn-explore {
    display: inline-block;
    padding: 10px 25px;
    background: var(--primary-orange);
    color: var(--white);
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-explore:hover {
    background: #ff6600;
    text-decoration: none;
    transform: scale(1.05);
}

/* ========================================
   VIDEO & TUTORIAL SECTIONS
   ======================================== */
.video-card {
    background: var(--light-gray);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

.video-card h4 {
    color: var(--primary-blue);
    margin-bottom: 15px;
    font-weight: bold;
}

.video-card iframe {
    border-radius: 8px;
}

.info-box {
    background: var(--white);
    border: 2px solid var(--primary-blue);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-top: 20px;
}

.info-box h5 {
    color: var(--primary-blue);
    font-weight: bold;
    margin-bottom: 10px;
}

.info-box code {
    background: var(--light-gray);
    padding: 8px 15px;
    border-radius: 6px;
    color: var(--dark-gray);
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
}

/* ========================================
   SUPPORT SECTION
   ======================================== */
.support-section {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f2ff 100%);
}

.support-section .lead {
    color: var(--text-dark);
    font-size: 1.2rem;
}

.btn-donate {
    padding: 15px 40px;
    background: #0070ba;
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-donate:hover {
    background: #005a94;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,112,186,0.3);
}

/* ========================================
   FOOTER
   ======================================== */
.main-footer {
    background: var(--dark-gray);
    color: var(--white);
    padding: 40px 0 20px;
}

.main-footer h5 {
    color: var(--primary-orange);
    font-weight: bold;
    margin-bottom: 20px;
}

.main-footer p {
    line-height: 1.8;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--primary-blue);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-orange);
    transform: translateY(-3px);
    text-decoration: none;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--silver);
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-orange);
    padding-left: 5px;
}

.partners-logos {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.partners-logos img {
    max-height: 50px;
    width: auto;
    filter: grayscale(100%) brightness(1.5);
    transition: all 0.3s ease;
}

.partners-logos img:hover {
    filter: grayscale(0%) brightness(1);
}

.main-footer hr {
    border-color: rgba(255,255,255,0.1);
    margin: 30px 0;
}

.copyright {
    color: var(--silver);
    font-size: 0.9rem;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 991px) {
    .top-header .row > div {
        text-align: center;
        margin-bottom: 15px;
    }
    
    .logo-section {
        justify-content: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    /* PATCH 01: Login form responsive */
    .login-inline {
        flex-wrap: wrap;
    }
}

@media (max-width: 767px) {
    .login-inline {
        flex-direction: column;
    }
    
    .login-inline input,
    .login-inline .btn {
        width: 100%;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .gallery-image {
        height: 200px;
    }
}

/* ========================================
   UTILITIES
   ======================================== */
.text-purple {
    color: #9146ff !important;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.875rem;
}

.btn-success {
    background: var(--success-green);
    color: var(--white);
    border: none;
}

.btn-success:hover {
    background: #218838;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-orange);
}
