/* ======================================== */
/* STYLE DE BASE & RESET           */
/* ======================================== */
:root {
    --primary-color-start: #007bff;
    --primary-color-end: #42A5F5;
    --primary-darker: #0056b3;
    --background-color-light: #f0f5fa;
    --background-color-white: #ffffff;
    --text-primary: #1d2b4f;
    --text-secondary: #5a647e;
    --card-bg-color: #ffffff;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --font-family-headings: 'Poppins', sans-serif;
    --font-family-body: 'Inter', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-family-body); color: var(--text-secondary); background-color: var(--background-color-white); overflow-x: hidden; line-height: 1.6; }
h1, h2, h3, h4 { font-family: var(--font-family-headings); color: var(--text-primary); }

/* ======================================== */
/* HEADER & NAVIGATION (AVEC MENU DÉROULANT) */
/* ======================================== */
#mainHeader { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); width: 95%; max-width: 1200px; z-index: 1000; transition: all 0.3s ease-in-out; border-radius: var(--border-radius-md); background: rgba(255, 255, 255, 0.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1); }
#mainHeader.scrolled { top: 10px; background: rgba(255, 255, 255, 0.85); box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.header-inner-container { display: flex; justify-content: space-between; align-items: center; padding: 0 24px; height: 80px; }
.header-logo { height: 50px; }
.main-nav ul { list-style: none; display: flex; gap: 30px; margin:0; align-items: center; }
.nav-item { text-decoration: none; color: var(--text-primary); font-weight: 500; position: relative; transition: color 0.3s; display: flex; align-items: center; gap: 8px; padding: 10px 0; }
.nav-item:hover { color: var(--primary-color-start); }
.nav-item .fa-chevron-down { font-size: 0.7rem; transition: transform 0.3s ease; }

.nav-item-with-dropdown { position: relative; }
.dropdown-menu {
    position: absolute;
    top: 90%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 10px;
    min-width: 280px;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}
.nav-item-with-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.nav-item-with-dropdown:hover .fa-chevron-down {
    transform: rotate(180deg);
}
.dropdown-menu a {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 8px;
    font-weight: 500;
    white-space: nowrap;
}
.dropdown-menu a:hover {
    background-color: #f0f5fa;
    color: var(--text-primary);
}

.header-right { display: flex; align-items: center; gap: 15px; }
.menu-toggle { display: none; }
.mobile-nav { display: none; }

/* ======================================== */
/* BOUTONS & CTA */
/* ======================================== */
.btn { padding: 12px 28px; border-radius: 50px; text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 10px; transition: all 0.3s ease; border: none; cursor: pointer; }
.btn-primary-gradient { color: white; background: linear-gradient(90deg, var(--primary-color-start), var(--primary-color-end)); box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2); }
.btn-primary { background: var(--primary-color-start); color: white; box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3); }
.btn-primary:hover, .btn-primary-gradient:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3); }
.btn-secondary-outline { color: var(--text-primary); background: transparent; border: 2px solid #dde4f0; }
.btn-secondary-outline:hover { background: var(--background-color-white); border-color: var(--primary-color-start); }

/* ======================================== */
/* STRUCTURE GÉNÉRALE */
/* ======================================== */
main { padding-top: 100px; }
section { padding: 80px 5%; max-width: 1200px; margin: 0 auto; }
.section-title { font-size: 2.8rem; font-weight: 700; margin-bottom: 24px; text-align: center; }

/* ======================================== */
/* SECTION HÉROS (MISE À JOUR) */
/* ======================================== */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 65vh; 
    text-align: left;
    padding: 0 5%;
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.8) 40%, rgba(255, 255, 255, 0) 100%), url('assets/banniere-adomed.png');
    background-size: cover;
    background-position: right center; 
}
.hero-content {
    flex: 0 0 50%;
    max-width: 550px;
}
.hero-subtitle {
    font-size: 1.6rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-primary);
    margin-bottom: 32px;
}
.hero-title, .hero-image-container {
    display: none;
}

/* ======================================== */
/* LE RESTE DU CSS */
/* ======================================== */
.about-us-section { display: flex; gap: 50px; align-items: center; text-align: left; }
.about-us-image { flex: 0 0 45%; }
.about-us-image img { width: 100%; border-radius: var(--border-radius-lg); }
.about-us-content { flex: 1; }
.about-us-content .section-title { text-align: left; }
.vision-mission { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin: 30px 0; }
.stats-section { background-color: var(--background-color-light); display: flex; justify-content: space-around; flex-wrap: wrap; gap: 20px; padding: 60px 5%; }
.stat-item { text-align: center; }
.stat-number { font-size: 3rem; font-weight: 800; color: var(--primary-color-start); }
.services-grid-section { background-color: var(--background-color-light); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.service-card { background: var(--card-bg-color); border-radius: var(--border-radius-md); padding: 40px; text-align: center; box-shadow: 0 8px 32px rgba(31, 38, 135, 0.05); border: 1px solid #eef3fb; transition: all 0.3s ease; }
.service-card:hover { transform: translateY(-10px); box-shadow: 0 12px 40px rgba(31, 38, 135, 0.1); }
.service-icon { font-size: 2.5rem; color: var(--primary-color-start); width: 80px; height: 80px; margin: 0 auto 20px; background-color: #e3f2fd; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.app-promo-section { display: flex; align-items: center; gap: 50px; background: var(--background-color-light); text-align: left; }
.app-promo-image { flex: 1; }
.app-promo-image img { max-width: 450px; }
.app-promo-text { flex: 1; }
.app-promo-text .section-title { text-align: left; }
.app-promo-buttons { display: flex; gap: 20px; margin-top: 20px; }
.app-promo-buttons img { height: 50px; }
.partners-logos { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 50px; margin-top: 40px; }
.partners-logos img { max-height: 60px; filter: grayscale(100%); opacity: 0.7; transition: all 0.3s ease; }
.partners-logos img:hover { filter: grayscale(0%); opacity: 1; }
.why-us-section { display: flex; align-items: center; gap: 50px; }
.why-us-content { flex: 1; text-align: left; }
.why-us-content .section-title { text-align: left; }
.why-us-content ul { list-style: none; padding: 0; margin-top: 20px; }
.why-us-content li { margin-bottom: 15px; display: flex; align-items: flex-start; gap: 10px; }
.why-us-content .fa-check-circle { color: var(--primary-color-start); font-size: 1.2rem; margin-top: 4px; }

/* === DEBUT DE LA CORRECTION POUR LE SLIDER === */
.why-us-image {
    flex: 0 0 45%;
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    /* On définit un ratio pour que le conteneur ne soit pas vide */
    aspect-ratio: 4 / 3; 
}
.slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.slider img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}
.slider img.active {
    opacity: 1;
}
/* === FIN DE LA CORRECTION POUR LE SLIDER === */

.blog-section { background-color: var(--background-color-light); }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 30px; margin-bottom: 40px; }
.blog-card { background: white; border-radius: var(--border-radius-md); overflow: hidden; box-shadow: 0 8px 32px rgba(31, 38, 135, 0.05); }
.blog-card img { width: 100%; height: 200px; object-fit: cover; }
.blog-content { padding: 25px; text-align: left; }
.blog-content h3 { margin-bottom: 10px; }
.blog-content a { color: var(--primary-color-start); text-decoration: none; font-weight: 600; }
.testimonial-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.testimonial-card { background: var(--background-color-light); padding: 30px; border-radius: var(--border-radius-md); text-align: left; }
.testimonial-card p { font-style: italic; }
.testimonial-author { margin-top: 15px; font-weight: 600; color: var(--text-primary); }
.main-footer { background: var(--text-primary); color: #a9b3c9; padding: 60px 5% 20px 5%; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-logo { max-height: 40px; margin-bottom: 20px; filter: brightness(0) invert(1); }
.footer-column h4 { color: white; font-family: var(--font-family-headings); margin-bottom: 15px; }
.footer-column ul { list-style: none; padding: 0; }
.footer-column li { margin-bottom: 10px; }
.footer-column a { color: #a9b3c9; text-decoration: none; transition: color 0.3s; }
.footer-column a:hover { color: white; }
.social-media { display: flex; gap: 15px; margin-top: 20px; }
.social-media a { color: white; font-size: 1.2rem; }
.footer-bottom { border-top: 1px solid #3a4a75; text-align: center; padding-top: 20px; font-size: 0.9rem; }
.chatbot-container { position: fixed; bottom: 30px; right: 30px; z-index: 1001; display: flex; align-items: flex-end; cursor: pointer; text-decoration: none; }
.chatbot-circle-trigger { width: 65px; height: 65px; border-radius: 50%; background: linear-gradient(135deg, var(--primary-color-start), var(--primary-color-end)); display: flex; justify-content: center; align-items: center; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); transition: all 0.3s ease-in-out; position: relative; overflow: hidden; flex-shrink: 0; }
.chatbot-circle-trigger img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease-in-out; }
.chatbot-container:hover .chatbot-circle-trigger { transform: scale(1.1); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25); }
.chatbot-text-message { background-color: white; color: var(--text-primary); padding: 12px 18px; border-radius: var(--border-radius-md); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); margin-right: 15px; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.3s ease-in-out; white-space: nowrap; }
.chatbot-container:hover .chatbot-text-message { opacity: 1; visibility: visible; transform: translateY(0); }
.chatbot-text-message p { margin: 0; font-weight: 500; }

/* ======================================== */
/* RESPONSIVE - TABLETTES & MOBILES */
/* ======================================== */
@media (max-width: 992px) { 
    .main-nav { display: none; } 
    .menu-toggle { display: block; background: none; border: none; font-size: 24px; color: var(--text-primary); cursor: pointer; } 
    .mobile-nav { display: block; position: absolute; top: 100%; left: 0; width: 100%; background: var(--background-color-white); max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out; box-shadow: 0 10px 20px rgba(0,0,0,0.05); } 
    .mobile-nav.active { max-height: 500px; } 
    .mobile-nav ul { list-style: none; padding: 10px 0; margin: 0; } 
    .mobile-nav li a { display: block; padding: 15px 24px; text-decoration: none; color: var(--text-primary); font-weight: 500; } 
    
    .hero-section { 
        flex-direction: column; 
        text-align: center; 
        gap: 20px; 
        background-image: linear-gradient(rgba(255,255,255,0.9), rgba(255,255,255,0.9)), url(assets/banniere-adomed.png); 
        min-height: 70vh;
        justify-content: center;
        background-position: center center;
    } 

    .hero-content { flex: none; width: 100%; } 
    .about-us-section, .why-us-section { flex-direction: column; } 
    .why-us-section { flex-direction: column-reverse; } 
    .about-us-content .section-title, .why-us-content .section-title { text-align: center; } 
    .app-promo-section { flex-direction: column; text-align: center; } 
    .app-promo-text .section-title { text-align: center; } 
    .app-promo-buttons { justify-content: center; } 
    .testimonial-grid { grid-template-columns: 1fr; } 
}

/* ======================================== */
/* RESPONSIVE - PETITS MOBILES */
/* ======================================== */
@media (max-width: 768px) { 
    .section-title { font-size: 2.2rem; } 
    .hero-subtitle { font-size: 1.2rem; }
    .vision-mission { grid-template-columns: 1fr; } 

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    .header-right .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}