/* --- GLOBAL STYLES & VARIABLES --- */
:root {
    --primary-color: #0c5adb;
    --secondary-color: #1a237e;
    --accent-blue: #2575fc;
    --text-dark: #333333;
    --text-muted: #666666;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --font-main: 'Poppins', sans-serif;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.text-center { text-align: center; }

/* --- REUSABLE UTILITY HEADER COMPONENTS --- */
.section-subtitle {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-block;
    margin-bottom: 8px;
}
.section-title {
    color: var(--secondary-color);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 15px;
}
.section-desc {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 50px auto;
}

/* --- TOP INFO BAR --- */
.top-bar {
    background-color: var(--white);
    border-bottom: 1px solid #eeeeee;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 10px 0;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info span {
    margin-right: 20px;
}

.contact-info i {
    color: var(--primary-color);
    margin-right: 5px;
}

.social-links a {
    margin-left: 15px;
    color: var(--text-muted);
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary-color);
}

/* --- MAIN NAVIGATION --- */
.main-header {
    background-color: var(--white);
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo span {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.logo i {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: -5px;
}

.logo small {
    font-size: 0.65rem;
    letter-spacing: 2px;
    color: var(--text-muted);
    font-weight: 600;
}

.nav-links {
    display: flex;
}

.nav-links a {
    padding: 10px 15px;
    font-weight: 500;
    color: var(--secondary-color);
    transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--secondary-color);
    cursor: pointer;
}

.appointment-btn {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 24px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.appointment-btn:hover {
    background-color: var(--secondary-color);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- HERO SECTION --- */
.hero-section {
    background-color: #f3f7ff;
    padding: 60px 0;
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
}

.hero-text h1 {
    font-size: 3rem;
    color: var(--secondary-color);
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-text p {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 14px 32px;
    font-weight: 600;
    border-radius: 4px;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
}

.hero-image img {
    border-radius: 8px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.05);
}

/* --- WELCOME & SIDEBAR SECTION --- */
.welcome-section {
    padding: 80px 0;
    background-color: var(--white);
}

.welcome-grid {
    display: grid;
    grid-template-columns: 1.618fr 1fr;
    gap: 50px;
    align-items: start;
}

.welcome-content h2 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 30px;
    line-height: 1.3;
}

.welcome-content h2 span {
    color: var(--primary-color);
}

.doctor-intro {
    display: flex;
    gap: 25px;
}

.doc-thumb img {
    width: 140px;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
}

.doc-text p {
    color: var(--text-muted);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.signature {
    margin-top: 20px;
}

.signature h3 {
    color: var(--primary-color);
    font-weight: 600;
    font-style: italic;
}

/* Action Sidebar Buttons Layout */
.action-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background-color: #e5efff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(12, 90, 219, 0.1);
}

.action-card {
    display: flex;
    align-items: center;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 22px 25px;
    transition: var(--transition);
}

.action-card:nth-child(even) {
    background-color: #0b52cc;
}

.action-card:hover {
    background-color: var(--secondary-color);
    padding-left: 30px;
}

.action-icon {
    font-size: 1.6rem;
    margin-right: 20px;
    width: 30px;
    text-align: center;
    opacity: 0.9;
}

.action-title {
    font-weight: 500;
    font-size: 1.05rem;
    flex-grow: 1;
}

.action-card .arrow {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* --- SERVICES SECTION --- */
.services-section {
    padding: 100px 0;
    background-color: var(--light-bg);
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}
.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}
.service-card:hover {
    transform: translateY(-5px);
    border-bottom-color: var(--primary-color);
    box-shadow: 0 15px 35px rgba(12,90,219,0.08);
}
.service-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}
.service-card h3 {
    color: var(--secondary-color);
    font-size: 1.25rem;
    margin-bottom: 15px;
}
.service-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}
.read-more-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* --- STATS COUNTER SECTION --- */
.stats-section {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: var(--white);
    padding: 80px 0;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    text-align: center;
    gap: 40px;
}
.stat-item h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 5px;
}
.stat-item p {
    font-size: 1rem;
    opacity: 0.85;
}

/* --- DEPARTMENTS SECTION --- */
.departments-section {
    padding: 100px 0;
    background: var(--white);
}
.dept-tabs-container {
    display: grid;
    grid-template-columns: 1fr 2.5fr;
    gap: 40px;
    margin-top: 50px;
}
.dept-tabs-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.dept-tab-btn {
    background: var(--light-bg);
    border: none;
    padding: 18px 25px;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary-color);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    border-left: 4px solid transparent;
}
.dept-tab-btn:hover, .dept-tab-btn.active {
    background: #e5efff;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}
.dept-tabs-content {
    background: var(--light-bg);
    padding: 40px;
    border-radius: 8px;
    position: relative;
}
.dept-panel {
    display: none;
}
.dept-panel.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}
.dept-panel h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}
.dept-panel p {
    color: var(--text-muted);
    margin-bottom: 25px;
}
.dept-panel ul {
    margin-bottom: 30px;
}
.dept-panel ul li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dark);
    margin-bottom: 10px;
    font-weight: 500;
}
.dept-panel ul li i {
    color: var(--primary-color);
}
.dept-panel img {
    border-radius: 6px;
    max-height: 250px;
    width: 100%;
    object-fit: cover;
}

/* --- TESTIMONIALS SECTION --- */
.testimonials-section {
    padding: 100px 0;
    background: var(--light-bg);
}
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}
.testimonial-card {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.01);
    text-align: left;
}
.stars {
    color: #ffb300;
    margin-bottom: 20px;
    font-size: 0.9rem;
}
.testimonial-card p {
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 25px;
}
.client-info h4 {
    color: var(--secondary-color);
    font-weight: 600;
}

/* --- FOOTER LAYOUT --- */
.main-footer {
    background-color: #0b132b;
    color: rgba(255,255,255,0.75);
    padding: 80px 0 20px 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 30px;
}
.footer-col h4 {
    color: var(--white);
    font-size: 1.15rem;
    margin-bottom: 25px;
}
.footer-col ul li {
    margin-bottom: 12px;
}
.footer-col ul li a:hover {
    color: var(--white);
}
.footer-bottom {
    padding-top: 30px;
    font-size: 0.85rem;
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- RESPONSIVE DESIGN (MEDIA QUERIES) & MENU MOBILE --- */
@media (max-width: 992px) {
    .hero-grid, .welcome-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .hero-text h1 {
        font-size: 2.3rem;
    }
    .top-bar {
        display: none;
    }
}

@media (max-width: 768px) {
    /* Cache l'affichage en ligne par défaut */
    .nav-links, .appointment-btn {
        display: none;
    }
    
    /* Affiche le bouton hamburger */
    .menu-toggle {
        display: block;
        color: var(--secondary-color);
        font-size: 1.6rem;
        z-index: 1001;
    }
    
    /* Structure du menu déroulant mobile */
    .navbar {
        display: none; /* Caché par défaut */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.08);
        border-top: 1px solid #eeeeee;
        padding: 15px 0;
        z-index: 999;
    }

    /* Affiche le menu lorsque JavaScript ajoute la classe .active */
    .navbar.active {
        display: block;
    }

    /* Aligne les liens verticalement */
    .navbar .nav-links {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .navbar .nav-links li {
        width: 100%;
    }

    .navbar .nav-links li a {
        display: block;
        padding: 12px 25px;
        width: 100%;
        border-bottom: 1px solid #f8f9fa;
    }
    
    .navbar .nav-links li a:hover {
        background-color: #f3f7ff;
        padding-left: 30px;
    }

    /* Ajustements pour le reste du layout sur mobile */
    .doctor-intro {
        flex-direction: column;
    }
    .doc-thumb img {
        width: 100%;
        height: 250px;
    }
    .dept-tabs-container {
        grid-template-columns: 1fr;
    }
}