/* Styles personnalisés pour compléter Bootstrap - Dark Mode Élégant */

/* Variables de couleurs */
:root {
    --primary-color: #6e9fff; /* Bleu clair élégant */
    --primary-dark: #3d6abf; /* Bleu foncé élégant */
    --secondary-color: #9c6eff; /* Violet subtil */
    --accent-color: #00e5ff; /* Cyan pour les accents */
    --text-light: #e0e0e0; /* Texte clair */
    --text-muted: #c0c0c0; /* Texte atténué - éclairci pour meilleure lisibilité */
    --text-dark: #e0e0e0; /* Texte principal (clair sur fond sombre) */
    --bg-dark: #121212; /* Fond principal très sombre */
    --bg-darker: #0a0a0a; /* Fond encore plus sombre */
    --bg-card: #1e1e1e; /* Fond des cartes */
    --border-subtle: #333333; /* Bordures subtiles */
}

/* Styles généraux */
body {
    font-family: 'Poppins', sans-serif;
    
    background-color: var(--bg-dark);
    color: var(--text-light);
}

/* Animations */
.animate__animated {
    animation-duration: 0.8s;
    animation-fill-mode: both;
}

/* Effet de lueur pour les éléments interactifs */
@keyframes glow {
    0% { box-shadow: 0 0 5px rgba(110, 159, 255, 0.5); }
    50% { box-shadow: 0 0 15px rgba(110, 159, 255, 0.8); }
    100% { box-shadow: 0 0 5px rgba(110, 159, 255, 0.5); }
}

/* Ajustements de la navbar - Thème Cosmique */
.cosmic-header {
    background-color: rgba(10, 15, 30, 0.85) !important;
    border-bottom: 1px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(110, 159, 255, 0.3) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.4s ease;
}

.cosmic-header:hover {
    background-color: rgba(10, 15, 30, 0.95) !important;
    box-shadow: 0 0 25px rgba(110, 159, 255, 0.4) !important;
}

.navbar-brand {
    color: var(--primary-color) !important;
}

.text-glow {
    text-shadow: 0 0 8px rgba(110, 159, 255, 0.5);
    transition: text-shadow 0.3s ease;
}

.navbar-brand:hover .text-glow {
    text-shadow: 0 0 12px rgba(110, 159, 255, 0.8);
}

.cosmic-logo {
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 0 5px var(--primary-color));
    animation: subtle-pulse 3s infinite alternate;
}

.navbar-brand:hover .cosmic-logo {
    transform: scale(1.05) rotate(5deg);
    filter: drop-shadow(0 0 8px var(--primary-color));
}

.cosmic-link {
    color: var(--text-light) !important;
    position: relative;
    transition: all 0.3s ease;
    margin: 0 5px;
    padding: 8px 12px !important;
    border-radius: 4px;
    overflow: hidden;
}

.cosmic-link::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(110, 159, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.cosmic-link:hover::before {
    transform: translateX(100%);
}

.cosmic-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    transition: width 0.3s ease, left 0.3s ease;
}

.cosmic-link:hover {
    color: var(--primary-color) !important;
    text-shadow: 0 0 5px rgba(110, 159, 255, 0.5);
    background-color: rgba(110, 159, 255, 0.05);
}

.cosmic-link:hover::after {
    width: 80%;
    left: 10%;
}

.cosmic-toggler {
    border-color: rgba(110, 159, 255, 0.5) !important;
    transition: all 0.3s ease;
}

.cosmic-toggler:hover {
    background-color: rgba(110, 159, 255, 0.1);
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 10px rgba(110, 159, 255, 0.3);
}

@keyframes subtle-pulse {
    0% { filter: drop-shadow(0 0 5px rgba(110, 159, 255, 0.5)); }
    100% { filter: drop-shadow(0 0 8px rgba(110, 159, 255, 0.8)); }
}

/* Styles pour l'étoile filante du header */
.header-stars-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 76px; /* Hauteur du header */
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.header-shooting-star {
    position: absolute;
    width: 80px;
    height: 1px;
    background: linear-gradient(to right, rgba(0,0,0,0), rgba(255,255,255,0.8), rgba(0,0,0,0));
    opacity: 0;
    z-index: 2;
    box-shadow: 0 0 3px rgba(255, 255, 255, 0.7);
    top: 20px;
    right: 10%;
    transform: rotate(-35deg);
    animation: header-shootingstar 4s linear infinite;
    animation-delay: 1s;
}

@keyframes header-shootingstar {
    0% {
        opacity: 0;
        transform: translateX(0) rotate(-35deg);
    }
    5% {
        opacity: 1;
        filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.9));
    }
    15% {
        opacity: 0.8;
        filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.7));
    }
    20% {
        opacity: 0;
        transform: translateX(-300px) rotate(-35deg);
    }
    100% {
        opacity: 0;
        transform: translateX(-300px) rotate(-35deg);
    }
}

/* Styles des sections */
section {
    overflow: hidden;
    background-color: var(--bg-dark);
    border-bottom: 1px solid var(--border-subtle);
    padding: 4rem 0;
}

/* Amélioration de la lisibilité des textes dans les sections sombres */
.text-muted {
    color: var(--text-muted) !important;
    text-shadow: 0 0 2px rgba(110, 159, 255, 0.1);
}

/* Styles spécifiques pour les textes explicatifs dans les sections principales */
.lead.text-muted {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 300;
    letter-spacing: 0.01em;
    text-shadow: 0 0 3px rgba(110, 159, 255, 0.2);
}

/* Effet de lueur subtil pour les textes dans les cartes */
.card .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
    transition: color 0.3s ease;
}

.card:hover .text-muted {
    color: rgba(255, 255, 255, 0.9) !important;
}

section.bg-light {
    background-color: var(--bg-darker) !important;
}

/* Styles des cartes */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(110, 159, 255, 0.2) !important;
    border-color: var(--primary-color);
}

.card-body {
    color: var(--text-light);
}

.card-title {
    color: var(--primary-color);
}

/* Styles des boutons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--bg-darker);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 0 10px rgba(110, 159, 255, 0.5);
}

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

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--bg-darker) !important;
    box-shadow: 0 0 10px rgba(110, 159, 255, 0.5);
}

/* Styles du portfolio */
.card-img-top {
    height: 200px;
    object-fit: cover;
    filter: grayscale(30%) brightness(0.8);
    transition: filter 0.3s ease;
}

.card:hover .card-img-top {
    filter: grayscale(0%) brightness(1);
}

.portfolio-overlay {
    background-color: rgba(18, 18, 18, 0.8) !important;
}

/* Styles du footer */
footer {
    background: linear-gradient(to bottom, var(--bg-darker), rgba(15, 15, 20, 0.98)) !important;
    border-top: 1px solid var(--primary-dark);
    color: var(--text-muted);
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    padding-top: 3rem;
    padding-bottom: 2rem;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0.6;
}

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

footer h3 {
    color: var(--text-light);
    position: relative;
    padding-bottom: 12px;
    margin-bottom: 20px;
    text-shadow: 0 0 8px rgba(110, 159, 255, 0.2);
    letter-spacing: 0.5px;
}

footer h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

footer a {
    color: var(--text-light) !important;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    opacity: 0.85;
}

footer a:hover {
    color: var(--primary-color) !important;
    text-decoration: none;
    transform: translateX(5px);
    opacity: 1;
    text-shadow: 0 0 8px rgba(110, 159, 255, 0.5);
}

footer .list-unstyled li {
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

footer .list-unstyled li:hover {
    transform: translateX(5px);
}

footer .border-top {
    border-color: var(--border-subtle) !important;
    position: relative;
}

footer .border-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0.3;
}

footer .btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    transition: all 0.3s ease;
}

footer .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(110, 159, 255, 0.4);
}

footer .form-control {
    border: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
}

footer .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(110, 159, 255, 0.25);
}

footer .form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

footer form {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

footer form .btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

footer form .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
    z-index: -1;
}

footer form .btn:hover::before {
    left: 100%;
}

footer .col-lg-3 {
    padding: 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

footer .col-lg-3:hover {
    background-color: rgba(30, 30, 30, 0.5);
    transform: translateY(-5px);
}

footer .col-lg-3:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 10%;
    right: 0;
    height: 80%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--border-subtle), transparent);
    opacity: 0.5;
    display: none;
}

@media (min-width: 992px) {
    footer .col-lg-3:not(:last-child)::after {
        display: block;
    }
}

footer .d-flex a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    transition: all 0.3s ease;
    background: linear-gradient(145deg, #1a1a1a, #222222);
    box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2), -3px -3px 6px rgba(40, 40, 40, 0.1);
}

footer .d-flex a:hover {
    transform: translateY(-3px) scale(1.1);
    background: linear-gradient(145deg, var(--primary-dark), var(--primary-color));
    color: var(--bg-darker) !important;
}

footer .d-flex a i {
    transition: all 0.3s ease;
}

footer .d-flex a:hover i {
    transform: rotate(360deg);
}

footer p.mb-0 {
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: var(--text-light);
    opacity: 0.9;
}

footer .text-muted {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-light) !important;
    opacity: 0.8;
}

/* Formulaires */
.form-control {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-light);
}

.form-control:focus {
    background-color: var(--bg-card);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(110, 159, 255, 0.25);
    color: var(--text-light);
}

/* Styles pour les témoignages */
.testimonial-card {
    background-color: var(--bg-card);
}

.testimonial-text {
    color: var(--text-light);
}

/* Social links */
.social-links a {
    background-color: var(--bg-card);
    color: var(--text-light);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: var(--bg-darker);
    transform: translateY(-3px);
}

/* Media queries */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
}