/**
 * EFFETS AVANCÉS ULTRA MODERNES
 * Design de classe mondiale pour site éducatif
 */

/* ============================================
   FORMS ULTRA MODERNES
   ============================================ */
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="tel"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    background-color: var(--bg-primary);
    transition: var(--transition);
    direction: rtl;
    color: var(--text-primary);
}

.form-control:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--secondary);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(201, 161, 59, 0.1), var(--shadow-gold);
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: var(--text-light);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
}

.form-group label i {
    color: var(--secondary);
}

/* ============================================
   CARDS PREMIUM
   ============================================ */
.card-premium {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-slow);
    border: 1px solid var(--border-light);
    position: relative;
}

.card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: var(--bg-gradient-gold);
    opacity: 0;
    transition: var(--transition);
}

.card-premium:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-2xl);
    border-color: var(--secondary);
}

.card-premium:hover::before {
    opacity: 1;
}

/* ============================================
   BUTTONS VARIANTS AVANCÉS
   ============================================ */
.btn-outline-gold {
    background: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary);
    font-weight: 700;
}

.btn-outline-gold:hover {
    background: var(--bg-gradient-gold);
    color: #1F4E79;
    border-color: transparent;
    box-shadow: var(--shadow-gold);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    font-weight: 700;
}

.btn-outline-primary:hover {
    background: var(--bg-gradient);
    color: white;
    border-color: transparent;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-weight: 700;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.2);
}

/* ============================================
   DECORATIVE ELEMENTS
   ============================================ */
.decorative-line {
    width: 80px;
    height: 4px;
    background: var(--bg-gradient-gold);
    border-radius: var(--radius-full);
    margin: 1rem auto;
}

.decorative-dot {
    width: 12px;
    height: 12px;
    background: var(--secondary);
    border-radius: 50%;
    display: inline-block;
    margin: 0 0.5rem;
    box-shadow: 0 0 10px rgba(201, 161, 59, 0.5);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* ============================================
   TESTIMONIAL MODERN DESIGN
   ============================================ */
.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 8rem;
    font-family: 'Cairo', serif;
    color: var(--primary);
    opacity: 0.05;
    line-height: 1;
    font-weight: 800;
}

.testimonial-rating {
    margin-bottom: 1.5rem;
    color: var(--secondary);
    font-size: 1.25rem;
}

.testimonial-rating i {
    filter: drop-shadow(0 2px 4px rgba(201, 161, 59, 0.3));
}

/* ============================================
   COURSE CARD ENHANCED
   ============================================ */
.course-card {
    position: relative;
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition-slow);
    border: 1px solid var(--border-light);
}

.course-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(201, 161, 59, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.course-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-2xl);
    border-color: var(--secondary);
}

.course-card:hover::after {
    opacity: 1;
}

.course-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #1F4E79 0%, #2d6ba8 100%);
}

.course-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(31, 78, 121, 0.3) 100%);
    z-index: 1;
}

/* ============================================
   SCROLL PROGRESS BAR
   ============================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 9999;
}

.scroll-progress-bar {
    height: 100%;
    background: var(--bg-gradient-gold);
    width: 0%;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px rgba(201, 161, 59, 0.5);
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 50px;
    height: 50px;
    background: var(--bg-gradient-gold);
    color: #1F4E79;
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-gold);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow), var(--shadow-xl);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast {
    position: fixed;
    top: 2rem;
    left: 2rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 1rem;
    transform: translateX(-400px);
    transition: var(--transition-slow);
    z-index: 10000;
    border-right: 4px solid;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    border-color: var(--accent);
}

.toast-success i {
    color: var(--accent);
    font-size: 1.5rem;
}

.toast-error {
    border-color: var(--danger);
}

.toast-error i {
    color: var(--danger);
    font-size: 1.5rem;
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(31, 78, 121, 0.1);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   SECTION DIVIDERS
   ============================================ */
.section-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--secondary) 50%, transparent 100%);
    margin: 4rem 0;
    position: relative;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: var(--secondary);
    border-radius: 50%;
    box-shadow: 0 0 0 4px white, 0 0 0 6px var(--secondary);
}

/* ============================================
   HOVER EFFECTS PREMIUM
   ============================================ */
.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.hover-glow:hover {
    box-shadow: var(--shadow-glow);
}

.hover-scale {
    transition: var(--transition);
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* ============================================
   GRADIENT TEXT
   ============================================ */
.text-gradient-gold {
    background: var(--bg-gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-primary {
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   UTILITY CLASSES MODERNES
   ============================================ */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-accent { color: var(--accent) !important; }
.text-white { color: white !important; }

.bg-primary { background-color: var(--primary) !important; }
.bg-secondary { background-color: var(--bg-secondary) !important; }
.bg-white { background-color: white !important; }

.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow { box-shadow: var(--shadow) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }
.shadow-xl { box-shadow: var(--shadow-xl) !important; }
.shadow-gold { box-shadow: var(--shadow-gold) !important; }

.rounded-sm { border-radius: var(--radius-sm) !important; }
.rounded { border-radius: var(--radius) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }
.rounded-full { border-radius: var(--radius-full) !important; }

.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }
.mb-4 { margin-bottom: 2rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.mt-1 { margin-top: 0.5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mt-4 { margin-top: 2rem !important; }
.mt-5 { margin-top: 3rem !important; }

.p-1 { padding: 0.5rem !important; }
.p-2 { padding: 1rem !important; }
.p-3 { padding: 1.5rem !important; }
.p-4 { padding: 2rem !important; }
.p-5 { padding: 3rem !important; }

.d-flex { display: flex !important; }
.d-grid { display: grid !important; }
.d-block { display: block !important; }
.d-none { display: none !important; }

.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.align-items-center { align-items: center !important; }
.gap-1 { gap: 0.5rem !important; }
.gap-2 { gap: 1rem !important; }
.gap-3 { gap: 1.5rem !important; }

.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-left { text-align: left !important; }

.font-bold { font-weight: 700 !important; }
.font-extrabold { font-weight: 800 !important; }

/* ============================================
   ALERTS MODERNES
   ============================================ */
.alert {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    border-right: 4px solid;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
}

.alert i {
    font-size: 1.5rem;
}

.alert-success {
    background-color: rgba(167, 199, 169, 0.1);
    color: #6b9a6e;
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(167, 199, 169, 0.15);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: #c82333;
    border-color: var(--danger);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.15);
}

.alert-warning {
    background-color: rgba(201, 161, 59, 0.1);
    color: #a68530;
    border-color: var(--secondary);
    box-shadow: 0 4px 12px rgba(201, 161, 59, 0.15);
}

.alert-info {
    background-color: rgba(31, 78, 121, 0.1);
    color: #1F4E79;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(31, 78, 121, 0.15);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 3rem 0;
}

.pagination-item {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
}

.pagination-item:hover,
.pagination-item.active {
    background: var(--bg-gradient-gold);
    border-color: var(--secondary);
    color: #1F4E79;
    box-shadow: var(--shadow-gold);
    transform: translateY(-2px);
}

/* ============================================
   BREADCRUMB ÉLÉGANT
   ============================================ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    font-family: 'Cairo', sans-serif;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    color: var(--text-light);
    font-weight: 300;
}

.breadcrumb-item a {
    color: var(--secondary);
    font-weight: 600;
    transition: var(--transition);
}

.breadcrumb-item a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* ============================================
   TABS MODERNES
   ============================================ */
.tabs-container {
    border-bottom: 2px solid var(--border-light);
    margin-bottom: 2rem;
}

.tabs-nav {
    display: flex;
    gap: 0;
}

.tab-item {
    padding: 1rem 2rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.tab-item:hover {
    color: var(--primary);
    background: rgba(31, 78, 121, 0.05);
}

.tab-item.active {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
}

/* ============================================
   PROGRESS BAR ÉLÉGANT
   ============================================ */
.progress-bar-container {
    width: 100%;
    height: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.progress-bar {
    height: 100%;
    background: var(--bg-gradient-gold);
    border-radius: var(--radius-full);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(201, 161, 59, 0.5);
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ============================================
   TOOLTIPS
   ============================================ */
[data-tooltip] {
    position: relative;
    cursor: pointer;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 0.5rem);
    right: 50%;
    transform: translateX(50%);
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   BTN BLOCK
   ============================================ */
.btn-block {
    width: 100%;
    display: flex;
}

/* ============================================
   IMAGE OVERLAY EFFECTS
   ============================================ */
.image-overlay-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(31, 78, 121, 0.8) 100%);
    display: flex;
    align-items: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: var(--transition);
}

.image-overlay-container:hover .image-overlay {
    opacity: 1;
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
@media (max-width: 1024px) {
    .hide-tablet {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
    
    .btn-lg {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .card-premium {
        padding: 1.25rem;
    }
    
    .card-premium:hover {
        transform: translateY(-5px) scale(1.01);
    }
    
    .alert {
        padding: 1rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .alert i {
        font-size: 1.25rem;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        bottom: 1.5rem;
        left: 1.5rem;
    }
    
    .toast {
        left: 1rem;
        right: 1rem;
        top: 1rem;
        max-width: calc(100% - 2rem);
    }
}

@media (max-width: 480px) {
    .form-control,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    input[type="time"],
    input[type="tel"],
    input[type="url"],
    textarea,
    select {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .card-premium {
        padding: 1rem;
    }
    
    .card-premium:hover {
        transform: translateY(-3px) scale(1.01);
    }
    
    .hover-lift:hover {
        transform: translateY(-5px);
    }
    
    .pagination-item {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .breadcrumb {
        font-size: 0.85rem;
        flex-wrap: wrap;
    }
    
    .tab-item {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .alert {
        padding: 0.875rem 1rem;
        font-size: 0.85rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .alert i {
        font-size: 1.1rem;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        bottom: 1rem;
        left: 1rem;
    }
    
    .decorative-line {
        width: 60px;
        height: 3px;
    }
    
    [data-tooltip]::before {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }
}

