/**
 * Page d'accueil moderne CEIL Ouargla
 * Couleurs: Bleu (#0056b3, #007bff), Blanc (#ffffff), Jaune (#ffc107)
 */

/* ===========================
   VARIABLES ET RESET
   =========================== */
:root {
    --ceil-blue-dark: #0056b3;
    --ceil-blue: #007bff;
    --ceil-blue-light: #4a90e2;
    --ceil-yellow: #ffc107;
    --ceil-yellow-dark: #ff9800;
    --ceil-white: #ffffff;
    --ceil-gray-light: #f8f9fa;
    --ceil-gray: #6c757d;
    --text-dark: #2c3e50;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Styles uniquement pour la page d'accueil */
body.homepage {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Fallback si la classe n'est pas ajoutée */
body:has(.hero-section) {
    overflow-x: hidden;
}

/* Contrôle global des images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Limiter aux containers de la page d'accueil */
.hero-section .container,
.hero-section .container-fluid {
    overflow-x: hidden;
}

/* Images dans les cartes */
.card img, .feature-card img, .session-card img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Images de section */
.section-image, .presentation-image {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
}

/* Logos du header */
.header-logo {
    height: 80px;
    max-height: 80px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
    margin: 0 auto;
}

/* ===========================
   HERO SECTION
   =========================== */
.hero-section {
    background: linear-gradient(135deg, var(--ceil-blue-dark) 0%, var(--ceil-blue) 50%, var(--ceil-blue-light) 100%);
    min-height: 60vh;
    height: auto;
    position: relative;
    overflow: hidden;
    overflow-y: hidden;
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
}

/* Masquer les scrollbars dans la section hero */
.hero-section::-webkit-scrollbar {
    display: none;
}

.hero-section {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hero-section::before,
.hero-section::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.hero-section::before {
    width: 600px;
    height: 600px;
    top: -200px;
    right: -200px;
}

.hero-section::after {
    width: 400px;
    height: 400px;
    bottom: -100px;
    left: -100px;
    background: rgba(255, 193, 7, 0.08);
}

.hero-section .container {
    position: relative;
    z-index: 1;
    overflow: visible;
    max-height: 90vh;
}

.hero-section h1 {
    font-weight: 700;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: slideInDown 0.8s ease-out;
    margin-bottom: 1rem !important;
}

.hero-section p.lead {
    font-size: 1.2rem;
    font-weight: 400;
    color: #ffffff !important;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.3);
    animation: fadeIn 1s ease-out 0.3s both;
    margin-bottom: 2rem !important;
    opacity: 0.95;
}

.hero-section .btn {
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-section .btn-primary {
    background: var(--ceil-yellow);
    border: none;
    color: var(--text-dark);
}

.hero-section .btn-primary:hover {
    background: var(--ceil-yellow-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.hero-section .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

/* Sélecteur de langue simple */
.language-selector-simple {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.language-selector-simple:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.lang-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 4px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.lang-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.lang-link.active {
    color: #ffffff;
    background: var(--ceil-blue);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.lang-separator {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
    font-size: 0.9rem;
}

/* Responsive langue */
@media (max-width: 768px) {
    .language-selector-simple {
        padding: 6px 12px;
        gap: 6px;
    }
    
    .lang-link {
        font-size: 0.85rem;
        padding: 3px 8px;
    }
}

/* Boutons de navigation flottants */
.floating-nav-buttons {
    position: fixed;
    right: 30px;
    bottom: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.floating-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--ceil-blue);
    color: white;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
}

.floating-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.floating-btn:hover {
    background: var(--ceil-blue-dark);
    transform: scale(1.1) !important;
    box-shadow: 0 6px 20px rgba(0, 86, 179, 0.4);
}

.scroll-top-btn {
    background: var(--ceil-blue);
}

.scroll-down-btn-fixed {
    background: var(--ceil-yellow);
    color: var(--text-dark);
    animation: bounce 2s infinite;
}

.scroll-down-btn-fixed:hover {
    background: var(--ceil-yellow-dark);
    color: var(--text-dark);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) scale(1);
    }
    40% {
        transform: translateY(-10px) scale(1);
    }
    60% {
        transform: translateY(-5px) scale(1);
    }
}

/* Responsive pour les boutons flottants */
@media (max-width: 768px) {
    .floating-nav-buttons {
        right: 15px;
        bottom: 15px;
        gap: 10px;
    }
    
    .floating-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

/* ===========================
   SECTIONS GÉNÉRALES
   =========================== */
section {
    padding: 80px 0;
}

section h2, .section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--ceil-blue-dark);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

section h2::after, .section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--ceil-yellow), var(--ceil-yellow-dark));
    border-radius: 2px;
}

section p.lead {
    font-size: 1.2rem;
    color: var(--ceil-gray);
    margin-bottom: 50px;
}

/* ===========================
   CARTES (CARDS)
   =========================== */
.card, .feature-card, .session-card {
    border: none;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover, .feature-card:hover, .session-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-title {
    color: var(--ceil-blue-dark);
    font-weight: 600;
}

.card-footer {
    background: transparent;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* ===========================
   SESSION CARDS
   =========================== */
.announcement-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 80px 0;
}

.announcement-title {
    color: var(--ceil-blue-dark);
    font-size: 2.5rem;
    font-weight: 700;
}

.announcement-subtitle {
    color: var(--ceil-gray);
    font-size: 1.2rem;
}

.session-card {
    background: white;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.session-card-header {
    background: linear-gradient(135deg, var(--ceil-blue) 0%, var(--ceil-blue-dark) 100%);
    color: white;
    padding: 25px;
    position: relative;
}

.session-status {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--ceil-yellow);
    color: var(--text-dark);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.session-status.coming-soon {
    background: var(--ceil-gray);
    color: white;
}

.language-flag-container {
    margin-bottom: 15px;
}

.language-flag {
    width: 50px;
    max-width: 50px;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    object-fit: contain;
}

.language-flag-container {
    overflow: hidden;
    max-width: 100%;
}

.session-card-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.session-period {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 13px;
    margin-right: 10px;
}

.session-price {
    display: inline-block;
    background: var(--ceil-yellow);
    color: var(--text-dark);
    padding: 5px 15px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 14px;
}

.session-card-body {
    padding: 25px;
    flex-grow: 1;
}

.session-level, .session-modality {
    display: inline-block;
    background: var(--ceil-gray-light);
    color: var(--ceil-blue-dark);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    margin-right: 8px;
    margin-bottom: 8px;
}

.session-details {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.session-details li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 10px;
}

.session-details li:last-child {
    border-bottom: none;
}

.session-details i {
    color: var(--ceil-blue);
    width: 20px;
}

.session-card-footer {
    padding: 20px 25px;
    background: var(--ceil-gray-light);
}

.session-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.session-btn {
    flex: 1;
    min-width: 120px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.session-btn.primary {
    background: var(--ceil-blue);
    color: white;
}

.session-btn.primary:hover {
    background: var(--ceil-blue-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.session-btn:not(.primary):not(.disabled):not(.upcoming) {
    background: white;
    color: var(--ceil-blue);
    border: 2px solid var(--ceil-blue);
}

.session-btn:not(.primary):not(.disabled):not(.upcoming):hover {
    background: var(--ceil-blue);
    color: white;
}

.session-btn.disabled, .session-btn.upcoming {
    background: var(--ceil-gray);
    color: white;
    cursor: not-allowed;
}

/* ===========================
   BOUTONS
   =========================== */
.btn {
    border-radius: 8px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    border-width: 2px;
}

.btn-primary {
    background: var(--ceil-blue);
    border-color: var(--ceil-blue);
}

.btn-primary:hover {
    background: var(--ceil-blue-dark);
    border-color: var(--ceil-blue-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    color: var(--ceil-blue);
    border-color: var(--ceil-blue);
}

.btn-outline-primary:hover {
    background: var(--ceil-blue);
    border-color: var(--ceil-blue);
    color: white;
}

.btn-lg {
    padding: 14px 35px;
    font-size: 1.1rem;
}

/* ===========================
   BADGES
   =========================== */
.badge {
    border-radius: 20px;
    padding: 6px 15px;
    font-weight: 600;
}

.bg-primary {
    background: var(--ceil-blue) !important;
}

/* ===========================
   CARROUSEL
   =========================== */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    background-color: var(--ceil-blue);
    border-radius: 50%;
    padding: 10px;
}

.carousel-indicators button {
    background-color: var(--ceil-blue);
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* ===========================
   ICÔNES
   =========================== */
.icon-feature {
    font-size: 3.5rem;
    color: var(--ceil-blue);
    margin-bottom: 20px;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 768px) {
    .hero-section {
        min-height: 70vh;
        height: auto;
        padding: 30px 15px;
    }
    
    .hero-section h1 {
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-section p.lead {
        font-size: 1rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .hero-section .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    section {
        padding: 50px 0;
    }
    
    section h2, .section-title {
        font-size: 2rem;
    }
    
    .session-actions {
        flex-direction: column;
    }
    
    .session-btn {
        width: 100%;
    }
    
    /* Logos plus petits sur mobile */
    .header-logo {
        height: 60px;
        max-height: 60px;
    }
    
    /* Titres header plus petits */
    header h1 {
        font-size: 1.2rem !important;
    }
    
    header h2 {
        font-size: 1rem !important;
    }
    
    header p {
        font-size: 0.9rem !important;
    }
}

/* ===========================
   UTILITAIRES
   =========================== */
.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.bg-light {
    background-color: var(--ceil-gray-light) !important;
}
