/* ============================================
   DIANOCH - Styles Personnalisés
   ============================================ */

/* Variables CSS */
:root {
    --primary-color: #dc3545;
    --secondary-color: #6c757d;
    --dark-color: #000000;
    --light-color: #ffffff;
    --gradient-start: #dc3545;
    --gradient-end: #c82333;
    --red-light: #f8d7da;
    --red-dark: #a71e2a;
    --transition: all 0.3s ease;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    scroll-behavior: smooth;
    background-color: var(--light-color);
    color: var(--dark-color);
}

/* Conteneur avec max-width pour éviter que le contenu soit trop large */
.container {
    max-width: 1200px;
    position: relative;
    z-index: 1;
}

/* Ajout d'espacement visuel supplémentaire avec des ombres légères */
section:not(.hero-section):not(#statistics):not(footer) {
    box-shadow: 0 0 0 1px rgba(220, 53, 69, 0.05) inset;
}

/* Navigation */
.navbar {
    background: rgba(0, 0, 0, 0.95) !important;
    backdrop-filter: blur(10px);
    transition: var(--transition);
    padding: 1rem 0;
    border-bottom: 3px solid var(--primary-color);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.navbar-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.navbar-logo:hover {
    transform: scale(1.05);
}

.footer-logo {
    height: 30px;
    width: auto;
    object-fit: contain;
}

.nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* Hero Section Slider */
.hero-section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    margin-bottom: 120px !important;
    padding: 0 !important;
}

.hero-section .carousel {
    height: 100vh;
}

.hero-section .carousel-inner {
    height: 100%;
}

.hero-section .carousel-item {
    height: 100vh;
}

.hero-slide {
    position: relative;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.7) 0%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 1;
}

.hero-slide .container {
    position: relative;
    z-index: 2;
}

/* Carousel Controls */
.hero-section .carousel-control-prev,
.hero-section .carousel-control-next {
    width: 50px;
    height: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(220, 53, 69, 0.8);
    border-radius: 50%;
    opacity: 0.8;
    transition: var(--transition);
}

.hero-section .carousel-control-prev {
    left: 20px;
}

.hero-section .carousel-control-next {
    right: 20px;
}

.hero-section .carousel-control-prev:hover,
.hero-section .carousel-control-next:hover {
    opacity: 1;
    background: rgba(220, 53, 69, 1);
}

/* Carousel Indicators */
.hero-section .carousel-indicators {
    bottom: 30px;
    z-index: 3;
}

.hero-section .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    margin: 0 5px;
    transition: var(--transition);
}

.hero-section .carousel-indicators button.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    width: 30px;
    border-radius: 6px;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease;
}

.hero-section .lead {
    font-size: 1.25rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-buttons .btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--light-color);
}

.hero-buttons .btn-primary:hover {
    background: var(--red-dark);
    border-color: var(--red-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.hero-buttons .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-down {
    color: white;
    font-size: 2rem;
    animation: bounce 2s infinite;
    text-decoration: none;
    display: block;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-10px) translateX(-50%);
    }
    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Section Spacing - Espacement très généreux entre les sections */
section {
    padding: 150px 0 !important;
    margin: 0;
    position: relative;
    display: block;
}

/* Pages non-accueil - compensation pour la navbar fixe */
body:not(.home-page) section:first-of-type {
    margin-top: 80px !important;
}

/* Hero section - séparation spéciale */
.hero-section {
    margin-bottom: 100px !important;
}

/* Sections avec background blanc */
section:not(.bg-light):not(.hero-section):not(#statistics):not(footer) {
    background-color: #ffffff !important;
    margin-top: 80px !important;
    margin-bottom: 80px !important;
    padding: 150px 0 !important;
}

/* Sections avec background clair - alternance */
section.bg-light {
    background-color: #f8f9fa !important;
    margin-top: 80px !important;
    margin-bottom: 80px !important;
    padding: 150px 0 !important;
    border-top: 1px solid rgba(220, 53, 69, 0.1);
    border-bottom: 1px solid rgba(220, 53, 69, 0.1);
}

/* Séparateurs visuels marqués entre sections */
section:not(.hero-section):not(#statistics):not(footer)::before {
    content: '';
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 5px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0.5;
    border-radius: 3px;
}

section:not(.hero-section):not(#statistics):not(footer)::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 5px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0.5;
    border-radius: 3px;
}

/* Espacement supplémentaire pour certaines sections */
#about {
    padding-top: 180px !important;
    padding-bottom: 180px !important;
    margin-top: 100px !important;
    margin-bottom: 100px !important;
}

#services {
    padding-top: 180px !important;
    padding-bottom: 180px !important;
    margin-top: 100px !important;
    margin-bottom: 100px !important;
}

#projects {
    padding-top: 180px !important;
    padding-bottom: 180px !important;
    margin-top: 100px !important;
    margin-bottom: 100px !important;
}

#team {
    padding-top: 180px !important;
    padding-bottom: 180px !important;
    margin-top: 100px !important;
    margin-bottom: 100px !important;
}

#contact {
    padding-top: 180px !important;
    padding-bottom: 180px !important;
    margin-top: 100px !important;
    margin-bottom: 100px !important;
}

#statistics {
    margin-top: 100px !important;
    margin-bottom: 100px !important;
    padding: 120px 0 !important;
}

/* About Section */
.about-image {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.about-image img {
    transition: var(--transition);
}

.about-image:hover img {
    transform: scale(1.05);
}

.feature-box {
    padding: 0.5rem 0;
    font-size: 1rem;
}

/* Service Cards */
.service-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    border: 2px solid rgba(220, 53, 69, 0.1);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(220, 53, 69, 0.2);
    border-color: var(--primary-color);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: var(--light-color);
    font-size: 2rem;
    transition: var(--transition);
    border: 3px solid var(--dark-color);
}

.service-card:hover .service-icon {
    transform: rotate(360deg) scale(1.1);
}

.service-card h4 {
    color: var(--dark-color);
    font-weight: 600;
}

.service-card ul li {
    padding: 0.5rem 0;
    color: var(--secondary-color);
}

/* Project Cards */
.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    border: 2px solid rgba(220, 53, 69, 0.1);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(220, 53, 69, 0.3);
    border-color: var(--primary-color);
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 300px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.95), rgba(200, 35, 51, 0.95));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    padding: 2rem;
    text-align: center;
    color: white;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay h5 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.project-overlay p {
    margin-bottom: 1.5rem;
}

/* Team Cards */
.team-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    border: 2px solid rgba(220, 53, 69, 0.1);
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(220, 53, 69, 0.2);
    border-color: var(--primary-color);
}

.team-image {
    width: 150px;
    height: 150px;
    margin: 0 auto;
    overflow: hidden;
    border: 5px solid var(--primary-color);
    transition: var(--transition);
    box-shadow: 0 0 0 3px var(--dark-color);
}

.team-card:hover .team-image {
    border-color: var(--red-dark);
    box-shadow: 0 0 0 3px var(--dark-color);
    transform: scale(1.05);
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-card h5 {
    font-weight: 600;
    margin-top: 1rem;
    color: var(--dark-color);
}

.social-links a {
    display: inline-block;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    background: var(--light-color);
    color: var(--primary-color);
    border-radius: 50%;
    margin: 0 0.25rem;
    transition: var(--transition);
    text-decoration: none;
    border: 2px solid var(--primary-color);
}

.social-links a:hover {
    background: var(--primary-color);
    color: var(--light-color);
    transform: translateY(-3px);
    border-color: var(--dark-color);
}

/* Contact Section */
.contact-info {
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    height: 100%;
    border: 2px solid rgba(220, 53, 69, 0.1);
}

.contact-info:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(220, 53, 69, 0.2);
    border-color: var(--primary-color);
}

.contact-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: var(--light-color);
    font-size: 1.5rem;
    border: 3px solid var(--dark-color);
}

.contact-form {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid rgba(220, 53, 69, 0.1);
}

.contact-form .form-control {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.contact-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Footer */
footer {
    background: var(--dark-color) !important;
    margin-top: 120px !important;
    padding-top: 80px !important;
    border-top: 4px solid var(--primary-color);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 6px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0.6;
    border-radius: 3px;
}

footer a {
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-color) !important;
}

footer {
    border-top: 4px solid var(--primary-color);
}

.social-links-footer a {
    transition: var(--transition);
    display: inline-block;
}

.social-links-footer a:hover {
    transform: translateY(-5px) scale(1.1);
    color: var(--primary-color) !important;
}

/* Boutons avec style rouge */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--red-dark);
    border-color: var(--red-dark);
}


/* Back to Top Button */
#backToTop {
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

#backToTop:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.5);
    background-color: var(--red-dark) !important;
    border-color: var(--red-dark) !important;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Tooltip personnalisé */
.custom-tooltip {
    position: relative;
    cursor: help;
}

.custom-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 1000;
}

.custom-tooltip:hover::after {
    opacity: 1;
}

/* Amélioration des transitions */
.service-card,
.project-card,
.team-card,
.contact-info {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Effet de focus amélioré pour l'accessibilité */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .contact-form {
        padding: 2rem 1.5rem;
    }
    
    .stat-item h2 {
        font-size: 2.5rem;
    }
    
    .stat-item {
        padding: 1.5rem;
    }
    
    /* Réduction de l'espacement sur mobile */
    section {
        padding: 80px 0 !important;
        margin-top: 40px !important;
        margin-bottom: 40px !important;
    }
    
    #about,
    #services,
    #projects,
    #team,
    #contact {
        padding-top: 100px !important;
        padding-bottom: 100px !important;
        margin-top: 50px !important;
        margin-bottom: 50px !important;
    }
    
    .hero-section {
        margin-bottom: 60px !important;
    }
    
    footer {
        margin-top: 60px !important;
    }
}

/* Statistics Section */
#statistics {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%) !important;
    position: relative;
    overflow: hidden;
    margin: 100px 0 !important;
    padding: 150px 0 !important;
    border-radius: 0;
}

#statistics::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.stat-item {
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.stat-item i {
    color: rgba(255, 255, 255, 0.9);
    display: block;
    margin-bottom: 1rem;
}

.stat-item h2 {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 1rem 0;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-item p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-weight: 500;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Loading Animation */
.loading {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.loading.loaded {
    opacity: 1;
    transform: translateY(0);
}

