/* Variables CSS pour cohérence globale */
:root {
    --primary-color: #007bff;
    --secondary-color: #28a745;
    --accent-color: #ff6b6b;
    --text-dark: #333;
    --text-light: #666;
    --background-light: #f8f9fa;
    --white: #ffffff;
    --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 20px 60px rgba(0, 0, 0, 0.3);
    --border-radius: 15px;
    --transition: all 0.3s ease;
}

/* Reset de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base body */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    font-size: 16px;
}

/* Ajustement pour le contenu principal avec navbar fixe */
main {
    margin-top: 80px;
}

/* Ajustement pour les pages avec section intro */
.home-container {
    margin-top: 0; /* Pas d'espace supplémentaire après l'intro */
}

/* Assurer la continuité visuelle */
.intro + .home-container .hero {
    margin-top: 0;
    padding-top: 80px;
}

/* =================================
   HEADER / NAVIGATION
================================= */

.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 0;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
    text-decoration: none;
}

.navbar-brand img {
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.navbar-brand:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.navbar-nav {
    align-items: center;
}

.nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    margin: 0 15px;
    padding: 10px 0 !important;
    position: relative;
    transition: all 0.3s ease;
    text-decoration: none;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

/* Style pour le lien actif */
.nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* Bouton navbar */
.btn-navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-left: 15px;
}

.btn-navbar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
    color: white;
    text-decoration: none;
}

/* Menu mobile */
.navbar-toggler {
    border: none;
    padding: 4px 8px;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler:hover {
    transform: scale(1.1);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Dropdown menu */
.dropdown-menu {
    background: white;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    padding: 10px 0;
    margin-top: 10px;
}

.dropdown-item {
    padding: 10px 20px;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateX(5px);
}

/* =================================
   FOOTER
================================= */

.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 60px 0 20px;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></svg>') repeat;
    background-size: 100px 100px;
    animation: backgroundMove 30s linear infinite;
}

@keyframes backgroundMove {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-100px) translateY(-100px); }
}

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

.footer-section {
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: white;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
}

.footer-section p {
    color: #bdc3c7;
    line-height: 1.7;
    margin-bottom: 15px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: #3498db;
    transform: translateX(5px);
    text-decoration: none;
}

.footer-links i {
    font-size: 0.9rem;
    width: 15px;
}

/* Contact info */
.contact-info {
    list-style: none;
    padding: 0;
}

.contact-info li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: #bdc3c7;
}

.contact-info i {
    font-size: 1.2rem;
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

/* Social media */
.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-link:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transform: translateY(-3px);
    color: white;
    text-decoration: none;
}

/* Newsletter */
.newsletter-form {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.newsletter-input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.newsletter-input::placeholder {
    color: #bdc3c7;
}

.newsletter-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
}

.newsletter-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.newsletter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
}

/* Footer bottom */
.footer-bottom {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    color: #95a5a6;
    margin: 0;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* =================================
   SCROLL TO TOP BUTTON
================================= */

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.4);
}

/* =================================
   ANIMATIONS GÉNÉRALES POUR BASE
================================= */

/* Animation d'apparition du navbar au scroll */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.navbar {
    animation: slideDown 0.5s ease-out;
}

/* Animation des liens footer */
.footer-links a,
.contact-info li {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

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

.contact-info li:nth-child(1) { animation-delay: 0.1s; }
.contact-info li:nth-child(2) { animation-delay: 0.2s; }
.contact-info li:nth-child(3) { animation-delay: 0.3s; }

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

/* Animation des réseaux sociaux */
.social-link {
    opacity: 0;
    animation: bounceIn 0.6s ease-out forwards;
}

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

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* =================================
   RESPONSIVE DESIGN POUR BASE
================================= */

@media (max-width: 768px) {
    main {
        margin-top: 70px;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .nav-link {
        margin: 5px 0;
        text-align: center;
    }
    
    .btn-navbar {
        margin: 10px 0 0 0;
        width: 100%;
        text-align: center;
    }
    
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-section {
        text-align: center;
        margin-bottom: 30px;
    }
    
    .footer-section h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-links {
        justify-content: center;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .contact-info {
        text-align: left;
        display: inline-block;
    }
    
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0 10px;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .navbar-brand img {
        height: 30px;
    }
    
    .footer {
        padding: 30px 0 15px;
    }
    
    .footer-section h4 {
        font-size: 1.1rem;
    }
    
    .contact-info li {
        font-size: 0.9rem;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Amélioration de l'accessibilité */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Partners Section */
.partners-section {
    margin-top: 2rem;
}

.partners-title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    padding-bottom: 0.5rem;
}

.partners-grid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.partner-link {
    position: relative;
    display: block;
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    text-decoration: none;
}

.partner-link:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    border-color: rgba(255,255,255,0.4);
}

.partner-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    transition: all 0.3s ease;
    filter: brightness(0.9) contrast(1.1);
}

.partner-link:hover .partner-logo {
    filter: brightness(1.1) contrast(1.2);
    transform: scale(1.05);
}

.partner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,123,255,0.9), rgba(40,167,69,0.9));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    padding: 0.25rem;
}

.partner-overlay i {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.partner-overlay span {
    font-size: 0.65rem;
    line-height: 1.2;
}

.partner-link:hover .partner-overlay {
    opacity: 1;
}

/* Animation pour les partenaires */
@keyframes partnerFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}

.partner-link:nth-child(1) {
    animation: partnerFloat 3s ease-in-out infinite;
    animation-delay: 0s;
}

.partner-link:nth-child(2) {
    animation: partnerFloat 3s ease-in-out infinite;
    animation-delay: 0.5s;
}

.partner-link:nth-child(3) {
    animation: partnerFloat 3s ease-in-out infinite;
    animation-delay: 1s;
}

/* Responsive */
@media (max-width: 768px) {
    .partners-grid {
        justify-content: center;
        gap: 0.75rem;
    }
    
    .partner-link {
        width: 70px;
        height: 50px;
    }
    
    .partner-overlay span {
        font-size: 0.6rem;
    }
}

@media (max-width: 480px) {
    .partners-grid {
        gap: 0.5rem;
    }
    
    .partner-link {
        width: 60px;
        height: 45px;
    }
    
    .partners-title {
        font-size: 1rem;
    }
}