/* Thème bleu animé stylé */
:root {
    --primary-color: #1e90ff;
    --primary-light: #5aa9ff;
    --primary-dark: #0062cc;
    --secondary-color: #8a9bb5;
    --dark-color: #0f172a; /* Plus foncé pour un meilleur contraste */
    --darker-color: #0a0f1c; /* Couleur plus foncée pour les arrière-plans */
    --light-color: #f8f9fa;
    --lighter-color: #ffffff;
    --muted-color: #94a3b8;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #facc15;
    --info-color: #38bdf8;
    --gradient-blue: linear-gradient(135deg, #1e90ff 0%, #5aa9ff 50%, #00e0ff 100%);
    --card-bg: rgba(15, 23, 42, 0.85);
    --card-border: rgba(148, 163, 184, 0.2);
}

/* Base */
/* Styles de base */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--darker-color);
    color: var(--light-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Conteneur principal */
#main-content {
    flex: 1 0 auto;
    width: 100%;
}

/* Conteneur du site */
.site-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Correction des couleurs de Bootstrap pour le thème sombre */
.bg-white {
    background-color: var(--card-bg) !important;
    color: var(--light-color);
}

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

.form-control, .form-select {
    background-color: rgba(15, 23, 42, 0.7);
    border-color: var(--card-border);
    color: var(--light-color);
}

.form-control:focus, .form-select:focus {
    background-color: rgba(15, 23, 42, 0.9);
    color: var(--light-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(30, 144, 255, 0.25);
}

.input-group-text {
    background-color: rgba(15, 23, 42, 0.7);
    border-color: var(--card-border);
    color: var(--muted-color);
}

/* Styles pour la page de compte */
.avatar-circle-lg {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--gradient-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 3rem;
    color: white;
    margin: 0 auto 1.5rem;
    border: 4px solid rgba(255, 255, 255, 0.1);
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.card-header {
    border-bottom: 1px solid var(--card-border);
    background-color: rgba(15, 23, 42, 0.6);
    padding: 1rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

.btn-outline-secondary {
    color: var(--muted-color);
    border-color: var(--card-border);
}

.btn-outline-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--muted-color);
    color: var(--light-color);
}

/* Style pour les onglets de navigation */
.nav-tabs {
    border-bottom: 1px solid var(--card-border);
}

.nav-tabs .nav-link {
    color: var(--muted-color);
    border: 1px solid transparent;
    border-bottom: none;
    padding: 0.75rem 1.25rem;
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    background-color: transparent;
    border-color: var(--card-border) var(--card-border) var(--darker-color);
}

/* Style pour les formulaires */
.form-label {
    color: var(--light-color);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Style pour les séparateurs */
hr {
    border-color: var(--card-border);
    opacity: 0.2;
    margin: 1.5rem 0;
}

/* Fond animé avec néons bleus */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.18) 0%, transparent 45%),
        radial-gradient(circle at 80% 80%, rgba(37, 99, 235, 0.22) 0%, transparent 50%),
        radial-gradient(circle at 50% 10%, rgba(59, 130, 246, 0.18) 0%, transparent 45%),
        #020617;
    z-index: -1;
    background-size: 200% 200%;
    animation: bgFlow 18s ease-in-out infinite;
}

@keyframes bgFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Navbar glassmorphism */
.navbar {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.35s ease;
    border-bottom: 1px solid rgba(37, 99, 235, 0.35);
    box-shadow: 0 0 0 rgba(0,0,0,0);
}

.navbar.scrolled {
    padding: 0.55rem 0;
    background: rgba(15, 23, 42, 0.97);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.9);
}

.navbar-brand {
    font-weight: 800;
    font-size: 2.1rem;
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    letter-spacing: -0.04em;
    position: relative;
    padding: 0 6px;
}

.navbar-brand::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 3px;
    border-radius: 999px;
    background: var(--gradient-blue);
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.7);
    transition: width 0.35s ease;
}

.navbar-brand:hover::after {
    width: 100%;
}

.nav-link {
    font-weight: 500;
    padding: 0.45rem 1.1rem !important;
    margin: 0 0.25rem;
    border-radius: 999px;
    color: #e5e7eb !important;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.3), transparent 60%);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    z-index: -1;
}

.nav-link:hover {
    color: #ffffff !important;
    background: rgba(15, 23, 42, 0.8);
}

.nav-link:hover::before {
    opacity: 1;
    transform: scale(1);
}

/* Cartes futuristes */
.card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.9rem;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 55%),
                rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.9);
    position: relative;
    z-index: 1;
    transition: transform 0.45s cubic-bezier(0.19, 1, 0.22, 1),
                box-shadow 0.45s cubic-bezier(0.19, 1, 0.22, 1),
                border-color 0.45s ease;
}

/* .card::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: conic-gradient(
        from 180deg,
        rgba(56, 189, 248, 0.0),
        rgba(56, 189, 248, 0.5),
        rgba(37, 99, 235, 0.0),
        rgba(129, 140, 248, 0.5),
        rgba(56, 189, 248, 0.0)
    );
    opacity: 0;
    transition: opacity 0.45s ease;
    z-index: -1;
} */

.card:hover {
    transform: translateY(-10px) scale(1.015);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 1);
    border-color: rgba(56, 189, 248, 0.7);
}

.card:hover::before {
    opacity: 1;
    animation: borderSpin 4s linear infinite;
}

@keyframes borderSpin {
    to { transform: rotate(360deg); }
}

.card-img-top {
    height: 260px;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1),
                filter 0.6s ease;
    filter: brightness(0.9) saturate(1.1);
}

.card:hover .card-img-top {
    transform: scale(1.06);
    filter: brightness(1.1) saturate(1.25);
}

.card-body {
    padding: 1.35rem 1.4rem 1.4rem;
}

.card-title {
    font-weight: 600;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    color: #f9fafb;
    height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Boutons néon bleus */
.btn {
    padding: 0.6rem 1.6rem;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.04em;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
    z-index: 1;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, #1e90ff, #5aa9ff, #00e0ff);
    background-size: 220% 220%;
    z-index: -1;
    transition: background-position 0.6s ease;
}

.btn-primary {
    color: #0b1220;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.6);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 45px rgba(37, 99, 235, 0.9);
}

.btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.7);
}

.btn:hover::before {
    background-position: 100% 0%;
}

/* Effet ripple focus */
.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: rgba(248, 250, 252, 0.7);
    opacity: 0;
    border-radius: 999px;
    transform: translate(-50%, -50%) scale(1);
    transform-origin: center;
}

.btn-primary:focus-visible::after {
    animation: ripple 0.9s ease-out;
}

@keyframes ripple {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.7;
    }
    100% {
        transform: translate(-50%, -50%) scale(26);
        opacity: 0;
    }
}

/* Formulaire */
.form-control {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(15, 23, 42, 0.85);
    color: #e5e7eb;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.form-control:focus {
    border-color: rgba(56, 189, 248, 0.9);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.7);
    background: rgba(15, 23, 42, 0.95);
    color: #f9fafb;
}

/* Footer bleu animé */
footer {
    margin-top: auto;
    padding: 4rem 0 2.5rem;
    background: radial-gradient(circle at top, #020617 0%, #020617 35%, #020617 60%, #020617 100%);
    position: relative;
    width: 100%;
    flex-shrink: 0;
    color: #e5e7eb;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -30%;
    width: 60%;
    height: 3px;
    background: var(--gradient-blue);
    animation: footerBar 4s ease-in-out infinite;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.9);
}

@keyframes footerBar {
    0% { transform: translateX(-10%); opacity: 0; }
    20% { opacity: 1; }
    80% { transform: translateX(220%); opacity: 1; }
    100% { opacity: 0; }
}

footer::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(56, 189, 248, 0.16) 0%, transparent 55%),
        radial-gradient(circle at 80% 70%, rgba(37, 99, 235, 0.18) 0%, transparent 55%);
    opacity: 0.9;
    pointer-events: none;
    animation: floatGlow 22s ease-in-out infinite;
}

@keyframes floatGlow {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-18px) scale(1.03); }
}

footer .container {
    position: relative;
    z-index: 1;
}

footer h5 {
    color: #f9fafb;
    margin-bottom: 1.6rem;
    font-weight: 600;
}

footer a {
    color: rgba(226, 232, 240, 0.8);
    text-decoration: none;
    transition: color 0.25s ease;
}

footer a:hover {
    color: #ffffff;
}

/* Icônes sociales */
.social-links {
    display: flex;
    gap: 12px;
    margin-top: 1.6rem;
    flex-wrap: wrap;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: radial-gradient(circle at 30% 0, rgba(56, 189, 248, 0.35), rgba(15, 23, 42, 0.95));
    border-radius: 999px;
    color: #f9fafb;
    font-size: 1.2rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.19, 1, 0.22, 1),
                box-shadow 0.35s ease,
                border-color 0.35s ease;
    animation: bounceIn 0.6s both;
}

.social-links a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-blue);
    opacity: 0;
    transform: scale(0.7);
    transition: all 0.35s ease;
    z-index: -1;
}

.social-links a:hover {
    transform: translateY(-5px) scale(1.08);
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.9);
    border-color: transparent;
}

.social-links a:hover::before {
    opacity: 1;
    transform: scale(1);
}

.social-links a i {
    transition: transform 0.3s ease;
}

.social-links a:hover i {
    transform: rotate(8deg) scale(1.18);
}

@keyframes bounceIn {
    0%, 20%, 40%, 60%, 80%, 100% { animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); }
    0% { opacity: 0; transform: scale3d(0.3, 0.3, 0.3); }
    20% { transform: scale3d(1.1, 1.1, 1.1); }
    40% { transform: scale3d(0.9, 0.9, 0.9); }
    60% { opacity: 1; transform: scale3d(1.03, 1.03, 1.03); }
    80% { transform: scale3d(0.97, 0.97, 0.97); }
    100% { opacity: 1; transform: scale3d(1, 1, 1); }
}

.social-links a:nth-child(1) { animation-delay: 0.1s; }
.social-links a:nth-child(2) { animation-delay: 0.2s; }
.social-links a:nth-child(3) { animation-delay: 0.3s; }
.social-links a:nth-child(4) { animation-delay: 0.4s; }

/* Vidéo */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-bottom: 2rem;
    border-radius: 16px;
    box-shadow: 0 20px 55px rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(37, 99, 235, 0.5);
    background: radial-gradient(circle at top, rgba(37, 99, 235, 0.25), rgba(15, 23, 42, 0.95));
}

.video-container iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Commentaires */
.comments-section {
    margin-top: 4rem;
    padding: 2.4rem;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.22), rgba(15, 23, 42, 0.96));
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 22px 60px rgba(15, 23, 42, 1);
    position: relative;
    overflow: hidden;
}

.comments-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: var(--gradient-blue);
    animation: progressBar 2.4s ease-in-out infinite;
}

@keyframes progressBar {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(0); }
    100% { transform: translateX(100%); }
}

.comment {
    padding: 1.6rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    position: relative;
    border-radius: 10px;
    padding-left: 1.6rem;
    margin-left: -1.6rem;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.comment:hover {
    background: rgba(15, 23, 42, 0.9);
    transform: translateX(6px);
}

.comment::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    height: calc(100% - 24px);
    width: 3px;
    border-radius: 999px;
    background: var(--gradient-blue);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.comment:hover::before {
    opacity: 1;
}

.comment:last-child {
    border-bottom: none;
}

.comment-author {
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: #f9fafb;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-author::before {
    content: '👤';
    font-size: 0.9em;
    opacity: 0.8;
}

.comment-date {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-left: 0.6rem;
    font-weight: 400;
}

.comment-content {
    color: #e5e7eb;
    line-height: 1.7;
    padding-left: 4px;
}

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

.comment:nth-child(1) { animation-delay: 0.08s; }
.comment:nth-child(2) { animation-delay: 0.16s; }
.comment:nth-child(3) { animation-delay: 0.24s; }
.comment:nth-child(4) { animation-delay: 0.32s; }

/* Loader */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading {
    border: 4px solid rgba(15, 23, 42, 0.7);
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border-left-color: var(--primary-color);
    animation: spin 0.9s linear infinite;
    margin: 2rem auto;
}

/* Badges */
.badge {
    padding: 0.35em 0.7em;
    font-weight: 500;
    border-radius: 999px;
    font-size: 0.75rem;
}

.badge-primary {
    background-color: rgba(37, 99, 235, 0.18);
    color: #bfdbfe;
}

/* Alertes */
.alert {
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
    background: rgba(15, 23, 42, 0.9);
}

.alert-success {
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(22, 163, 74, 0.12);
    color: #bbf7d0;
}

.alert-danger {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(220, 38, 38, 0.12);
    color: #fecaca;
}

.alert-warning {
    border-color: rgba(250, 204, 21, 0.4);
    background: rgba(234, 179, 8, 0.12);
    color: #fef3c7;
}

/* Pagination */
.pagination {
    margin-top: 2rem;
    justify-content: center;
}

.page-link {
    color: #bfdbfe;
    border: 1px solid rgba(148, 163, 184, 0.5);
    margin: 0 0.2rem;
    border-radius: 999px !important;
    background: rgba(15, 23, 42, 0.9);
    transition: all 0.25s ease;
}

.page-item.active .page-link {
    background: var(--gradient-blue);
    border-color: transparent;
    color: #020617;
}

.page-link:hover {
    color: #eff6ff;
    background: rgba(15, 23, 42, 1);
    border-color: rgba(59, 130, 246, 0.8);
}

/* Style supplémentaire pour la page d'administration */
body {
    background-color: #0f172a;
    color: #f8fafc;
}
.card {
    background-color: #1e293b;
    border: 1px solid #334155;
    color: #f8fafc;
}
.card-header {
    background-color: #1e293b !important;
    border-bottom: 1px solid #334155;
}
.table {
    color: #f8fafc;
}
.table th {
    white-space: nowrap;
    background-color: #1e293b;
    border-color: #334155;
}
.table td {
    border-color: #334155;
    vertical-align: middle;
}
.form-control, .form-select {
    background-color: #1e293b;
    border: 1px solid #334155;
    color: #f8fafc;
}
.form-control:focus, .form-select:focus {
    background-color: #1e293b;
    color: #f8fafc;
    border-color: #60a5fa;
    box-shadow: 0 0 0 0.25rem rgba(56, 189, 248, 0.25);
}
.form-text {
    color: #94a3b8 !important;
}
.btn-outline-secondary {
    color: #f8fafc;
    border-color: #475569;
}
.btn-outline-secondary:hover {
    background-color: #334155;
    border-color: #64748b;
}
.pagination .page-link {
    background-color: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}
.pagination .page-item.active .page-link {
    background-color: #3b82f6;
    border-color: #3b82f6;
}
.pagination .page-item.disabled .page-link {
    background-color: #1e293b;
    color: #64748b;
}

/* Responsive */
/* Styles du footer */
footer {
    background-color: #0f0f0f;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s ease;
}

footer .social-links a:hover {
    background: #e50914;
    transform: translateY(-3px);
}

footer .text-muted {
    color: #8a8d91 !important;
}

footer a {
    transition: all 0.3s ease;
}

footer a:hover {
    color: #e50914 !important;
    text-decoration: none;
}

footer .form-control {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff !important;
}

footer .form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(229, 9, 20, 0.25);
    border-color: #e50914;
}

footer .btn-danger {
    background-color: #e50914 !important;
    border-color: #e50914 !important;
}

footer .btn-danger:hover {
    background-color: #f40612 !important;
    border-color: #f40612 !important;
}

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.6rem;
    }
    
    .card-img-top {
        height: 210px;
    }
    
    .video-container {
        margin-bottom: 1.6rem;
    }
    
    .comments-section {
        padding: 1.8rem;
    }
}

/* Thème sombre (renforcé) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #020617;
        color: #e5e7eb;
    }
}
