/* ==========================================================================
   1. VARIABLES ET RESET
   ========================================================================== */
:root {
    --primary: #060A39;
    --secondary: #D9BF86;
    --light: #F3F3E0;
    --dark: #060A39;
    --accent: #e74c3c;
    --text: #333;
    --text-light: #777;
    --shadow-sm: 0 3px 10px rgba(0,0,0,0.05);
    --shadow-md: 0 5px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 20px rgba(0,0,0,0.1);
    --border-radius: 4px;
    --border-radius-lg: 8px;
    --transition-standard: 0.3s;
    --transition-bounce: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* État initialement invisible pour tous les éléments à animer */
.section-title,
.service-card,
.expertise-card,
.about-text,
.about-image,
.partner-item,
.testimonial,
.team-card,
.crisis-highlight,
.crisis-desc,
.crisis-note,
.contact-item,
.contact-form,
.contact-logo,
.footer-column,
.hero-content .slogan,
.hero-content h1,
.hero-content p,
.hero-content .btn > * {
    opacity: 0;
    transform: translateY(20px);
    will-change: opacity, transform;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    color: var(--text);
    background-color: #fafafa;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   2. ANIMATIONS
   ========================================================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); opacity: 1; }
    40% { transform: translateY(-20px); opacity: 1; }
    60% { transform: translateY(-10px); opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes fade {
    from { opacity: .4 }
    to { opacity: 1 }
}

/* ------------------------------------------------------------------
   Fade-in “simple” (opacité uniquement, pas de translation)
   ------------------------------------------------------------------ */
   @keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.animate-fade-in {
    opacity: 0;                       /* état initial */
    animation: fadeIn 1s ease forwards;
}

/* Classes d'animations */
.animate { animation: fadeIn 0.8s ease forwards; }
.animate-fade-up { opacity: 0; animation: fadeInUp 0.8s ease forwards; }
.animate-fade-left { opacity: 0; animation: fadeInLeft 0.8s ease forwards; }
.animate-fade-right { opacity: 0; animation: fadeInRight 0.8s ease forwards; }
.animate-zoom { opacity: 0; animation: zoomIn 0.8s ease forwards; }
.animate-bounce {   animation: bounce 1s ease forwards;   /* ← forwards = fill-mode both 0 → 100 % */
}

/* Délais d'animation */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }

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

/* ==========================================================================
   3. COMPOSANTS COMMUNS
   ========================================================================== */

/* Boutons */
.btn, .btn-footer {
    display: inline-block;
    background-color: var(--secondary);
    color: white;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: background-color var(--transition-standard);
}

.btn-footer {
    border: 0;
}

.btn:after, .btn-footer:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: rgba(0,0,0,0.1);
    transition: height var(--transition-standard) ease;
    z-index: -1;
}

.btn:hover:after, .btn-footer:hover:after {
    height: 100%;
}

.btn:hover, .btn-footer:hover {
    background-color: #16a085;
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 60px;
    position: relative;
}

.section-title:after {
    content: '';
    position: absolute;
    width: 100px;
    height: 4px;
    background-color: var(--secondary);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
}

/* ==========================================================================
   4. HEADER ET NAVIGATION (SUITE)
   ========================================================================== */
   header {
    background-color: var(--primary);
    position: fixed;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

/* 1. Style pour le logo dans l'en-tête */
.logo {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
    margin-right: 10px;
    transition: transform 0.3s ease;
    scale: 2;
}

.logo-img:hover {
    transform: scale(1.2);
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    color: white;
}

/* 2. Style pour le logo en filigrane (watermark) */
.logo-watermark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/logo.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 30%;
    opacity: 0.05;
    z-index: -1;
    pointer-events: none;
}

/* 3. Style pour le logo dans le pied de page */
.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.footer-logo img {
    height: 50px;
    width: auto;
    margin-right: 10px;
}

.logo span {
    color: var(--secondary);
    display: inline-block;
    position: relative;
}

.logo-dot {
    position: relative;
    animation: pulse 2s infinite;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-standard);
}

.nav-links a:hover {
    color: var(--secondary);
}

.mobile-menu {
    display: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
    transition: transform var(--transition-standard) ease;
}

.mobile-menu:hover {
    transform: rotate(90deg);
}

/* Menus déroulants */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--primary);
    min-width: 200px;
    box-shadow: var(--shadow-md);
    z-index: 1;
    border-radius: var(--border-radius);
    top: 100%;
    left: 0;
}

.dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-weight: 400;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: rgba(217, 191, 134, 0.1);
    color: var(--secondary);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* ==========================================================================
   5. HERO
   ========================================================================== */
.hero {
    height: 100vh;
    background-image: url('images/background.png');
    background-repeat: no-repeat;
    background-position: center;
    background-position-y:30%;
    display: flex;
    align-items: center;
    color: white;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding-top: 70px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
}

.hero .slogan {
    font-size: 24px;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 20px;
    font-style: italic;
}

.hero-content .btn {
    will-change: transform;
}

/* Animation spécifique pour le bouton */
@keyframes fadeInUpButton {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounceButton {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); opacity: 1; }
    40% { transform: translateY(-20px); opacity: 1; }
    60% { transform: translateY(-10px); opacity: 1; }
}

.animate-fade-up.hero-btn {
    animation: fadeInUpButton 0.8s ease forwards;
}

.animate-bounce.hero-btn {
    animation: bounceButton 1s ease forwards;
}

/* ==========================================================================
   6. SECTIONS DE CONTENU
   ========================================================================== */

/* About */
.about-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.about-text {
    flex: 1;
    padding-right: 30px;
}

.about-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Services */
.services {
    background-color: var(--light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: white;
    padding: 30px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.4s var(--transition-bounce), box-shadow 0.4s;
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    font-size: 50px;
    color: var(--secondary);
    margin-bottom: 20px;
}

.service-icon i {
    font-size: 60px;
}

.service-title {
    font-size: 22px;
    margin-bottom: 15px;
}

/* Team */
.team-section {
    background-color: var(--light);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* Refonte des cartes d'équipe avec flip 3D */
.team-card {
    background-color: transparent;
    min-height: 400px;
    perspective: 1000px;
    border-radius: var(--border-radius-lg);
    cursor: pointer;
}

.team-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.team-card:hover .team-card-inner {
    transform: rotateY(180deg);
}

.team-card-front, .team-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; /* Safari */
    backface-visibility: hidden;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.team-card-front {
    background-color: white;
    display: flex;
    flex-direction: column;
}

.team-card-back {
    background-color: var(--primary);
    color: white;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px;
}

.team-img-container {
    height: 320px;
    overflow: hidden;
}

.team-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-name-front {
    padding: 20px;
    font-size: 22px;
    font-weight: 600;
    color: var(--primary);
}

.team-name-back {
    font-size: 26px;
    margin-bottom: 10px;
    color: white;
}

.team-position {
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 25px;
    font-size: 18px;
}

.team-contact {
    margin-top: 20px;
}

.team-contact p {
    margin-bottom: 12px;
    font-size: 16px;
}

.team-contact a {
    color: var(--secondary);
    text-decoration: none;
    transition: color var(--transition-standard);
}

.team-contact a:hover {
    text-decoration: underline;
    color: white;
}

/* Ajout d'une icône pour indiquer que la carte est retournable */
.flip-hint {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background-color: rgba(255,255,255,0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--primary);
    animation: pulse 2s infinite;
}

/* Animation améliorée pour le retournement */
@media (prefers-reduced-motion: no-preference) {
    .team-card-inner {
        transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
}

/* Expertise */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.expertise-card {
    text-align: center;
    padding: 20px;
}

.expertise-icon {
    width: 80px;
    height: 80px;
    line-height: 80px;
    margin: 0 auto 20px;
    font-size: 36px;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.expertise-icon i {
    font-size: 36px;
}

.expertise-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 10px;
}

/* Partners */
.partners {
    background-color: var(--light);
}

.partners-logo {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.partner-item {
    width: 180px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-standard);
}

.partner-item:hover {
    transform: scale(1.05);
}

.partner-item img {
    max-width: 100%;
    max-height: 100%;
}

/* le conteneur reste position:relative pour empiler les slides */
.slideshow-container {
    position: relative;
}

.slideshow-container::before{content:'';display:block;padding-top:56.25%;} /* ratio 16/9 */
  
/* état de base : invisibles mais présentes dans le DOM */
.mySlides {
position: absolute;          /* empilées les unes sur les autres */
inset: 0;                    /* top/right/bottom/left = 0 */
opacity: 0;                  /* cachées */
transition: opacity 1s ease-in-out;
}

/* la slide en cours devient visible */
.mySlides.active {
opacity: 1;
z-index: 1;                  /* passe devant le temps du fondu */
}    /* caché tant que JS n'a pas démarré */

.fade      { animation:fade 1.5s; }

.mySlides img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

/* Testimonials */
.testimonials-slider {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.testimonial {
    text-align: center;
    padding: 40px 20px;
}

.testimonial-text {
    font-size: 18px;
    font-style: italic;
    margin-bottom: 20px;
    position: relative;
}

.testimonial-text:before,
.testimonial-text:after {
    content: '"';
    font-size: 60px;
    color: var(--secondary);
    opacity: 0.3;
    position: absolute;
}

.testimonial-text:before {
    top: -20px;
    left: -15px;
}

.testimonial-text:after {
    bottom: -40px;
    right: -15px;
}

.testimonial-author {
    font-weight: 600;
    color: var(--primary);
}

.testimonial-position {
    color: var(--text-light);
    font-size: 14px;
}

/* Crisis Response */
.crisis-response {
    background-color: #f8f9fa;
    padding: 80px 0;
}

.crisis-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.crisis-highlight {
    font-size: 24px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 30px;
    line-height: 1.4;
}

.crisis-desc {
    font-size: 18px;
    margin-bottom: 40px;
}

.crisis-note {
    font-style: italic;
    color: var(--primary);
    font-weight: 500;
}

/* Download button */
.download-btn-container {
    text-align: center;
    margin-top: 40px;
}

/* ==========================================================================
   7. CONTACT & FORMULAIRE
   ========================================================================== */
.contact {
    background-color: var(--primary);
    color: white;
}

.contact .section-title {
    color: white;
}

.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-logo {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.contact-logo-img {
    height: 50px;
    width: auto;
    margin-right: 30px;
    scale: 1.5;
}

.contact-logo-text {
    font-size: 28px;
    font-weight: 700;
    color: white;
}

.contact-logo-text span {
    color: var(--secondary);
}

.contact-form {
    flex: 2;
    min-width: 300px;
}

.contact-item {
    display: flex;
    margin-bottom: 20px;
}

.contact-icon {
    margin-right: 15px;
    color: var(--secondary);
    font-size: 24px;
    display: flex;
    align-items: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
}

textarea.form-control {
    height: 150px;
    resize: vertical;
}

/* ==========================================================================
   8. FOOTER
   ========================================================================== */
footer {
    background-color: var(--dark);
    color: white;
    padding: 50px 0 20px;
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.footer-column {
    flex: 1;
    min-width: 250px;
}

.footer-title {
    font-size: 20px;
    margin-bottom: 20px;
    position: relative;
}

.footer-title:after {
    content: '';
    position: absolute;
    width: 40px;
    height: 3px;
    background-color: var(--secondary);
    bottom: -10px;
    left: 0;
}

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

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

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color var(--transition-standard);
}

.footer-links a:hover {
    color: var(--secondary);
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: background-color var(--transition-standard);
    font-size: 20px;
}

.social-icon:hover {
    background-color: var(--secondary);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #ccc;
}

/* ==========================================================================
   9. MEDIA QUERIES
   ========================================================================== */
   /* Adaptation pour mobile */
@media screen and (max-width: 768px) {
    .logo-img {
        height: 32px;
    }
    
    .logo-text {
        font-size: 24px;
    }
    
    .contact-logo-img {
        height: 40px;
    }
    
    .contact-logo-text {
        font-size: 24px;
    }
}

@media screen and (max-width: 992px) {
    /* Navigation mobile */
    .nav-links {
        display: none;
    }
    
    .mobile-menu {
        display: block;
    }
    
    /* Dropdown mobile */
    .dropdown-content {
        position: static;
        display: none;
        width: 100%;
        box-shadow: none;
        background-color: rgba(217, 191, 134, 0.1);
    }
    
    .dropdown.active .dropdown-content {
        display: block;
    }
    
    .nav-links .dropdown > a:after {
        content: ' ▼';
        font-size: 10px;
    }
    
    /* Ajustements contenu */
    .hero h1 {
        font-size: 40px;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .about-text {
        padding-right: 0;
        margin-bottom: 30px;
    }
    
    .about-image {
        max-width: 100%;
    }
    
    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}