* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family-base);
    color: var(--dark);
    line-height: 1.6;
}

/* ========== HEADER ========== */
.header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid transparent;
    border-image: var(--gradient-hero) 1;
}

.header::before {
    /* Bandeau institutionnel : coordonnées officielles, sans toucher au HTML */
    content: "\f095\00a0 77510012   \2022   \f3c5\00a0 7, Avenue de l'ONU (New Hospital), Cabinet n\00b0 4   \2022   \f017\00a0 Lun-Sam : 8h00 - 20h00";
    font-family: "Font Awesome 6 Free", "Segoe UI", sans-serif;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    display: block;
    background: var(--gradient-hero);
    color: #fff;
    text-align: center;
    padding: 0.3rem 1rem;
}

.navbar {
    padding: 0.7rem 0;
}

/* Bandeau institutionnel caché en mobile : le HTML garde son </br> décoratif */
@media (max-width: 991.98px) {
    .header::before { display: none; }
    .navbar .d-flex > br { display: none; }
    .hero { margin-top: 76px; }
    section[id], footer { scroll-margin-top: 76px; }
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Le bloc menu passe à droite, le logo reste à gauche */
.navbar .container > .d-flex {
    flex: 1;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center;
    width: auto !important;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.05rem; /* DIMINUÉ ICI (était 1.5rem) */
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    white-space: nowrap;
    width: auto !important;
    justify-content: flex-start !important;
    text-align: left !important;
    gap: 0.6rem;
    line-height: 1.2;
    max-width: 420px;
}

.logo i {
    font-size: 1.15rem;
    margin-right: 0;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--gradient-hero);
    color: #fff;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.25);
    flex-shrink: 0;
}

.logo:hover {
    text-decoration: none;
    color: var(--primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-menu li {
    margin: 0 0.35rem;
}

.nav-menu a {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

/* Liens de navigation en pastilles avec icônes espacées */
.nav-menu .nav-item .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--dark);
    transition: all 0.25s ease;
}

.nav-menu .nav-item .nav-link:hover {
    background: rgba(30, 64, 175, 0.07);
    color: var(--primary);
}

.nav-menu .nav-item .nav-link i {
    font-size: 0.85rem;
    color: var(--secondary);
    transition: transform 0.25s ease;
}

.nav-menu .nav-item .nav-link:hover i {
    transform: scale(1.15);
}

/* Styles for the dropdown */
.nav-item.dropdown .dropdown-menu {
    background-color: var(--white);
    border: 1px solid var(--border-color, #e2e8f0);
    border-top: 3px solid var(--primary);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
    border-radius: 12px;
    padding: 0.5rem 0.25rem;
    min-width: 260px;
}

.nav-item.dropdown .dropdown-header {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray);
    padding: 0.5rem 1rem 0.25rem;
}

.nav-item.dropdown .dropdown-divider {
    border-top: 1px solid #eef2f7;
    margin: 0.4rem 0.75rem;
}

.nav-item.dropdown .dropdown-item {
    color: var(--dark);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background-color 0.2s, color 0.2s;
}
.nav-item.dropdown .dropdown-item:hover {
    background-color: rgba(30, 64, 175, 0.07);
    color: var(--primary);
}
.nav-item.dropdown .dropdown-item i {
    width: 22px;
    margin-right: 0.6rem;
    color: var(--primary);
    text-align: center;
}
.nav-item.dropdown .dropdown-item:hover i {
    color: var(--secondary);
}

.btn-login {
    background: var(--gradient-hero);
    color: var(--white);
    border: none;
    padding: 0.55rem 1.6rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 14px rgba(30, 64, 175, 0.3);
}

/* Le lien « Mon Espace » cumule .nav-link et .btn-login : garder l'aspect CTA */
.nav-menu .nav-item .nav-link.btn-login,
.nav-menu .nav-item .nav-link.btn-login:hover {
    background: var(--gradient-hero);
    color: var(--white);
    border-radius: 50px;
}

.nav-menu .nav-item .nav-link.btn-login i {
    color: #fff;
}

.btn-login:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    color: var(--white);
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(30, 64, 175, 0.35);
}

/* Styles pour les nouvelles sections */
.espace-section {
    padding: 80px 0;
}
/* Ajustement des couleurs de fond pour alterner les sections si nécessaire */
#espace-patient {
    background-color: var(--light); /* Exemple : fond clair pour l'espace patient */
}
#espace-pro {
    background-color: var(--white); /* Exemple : fond blanc pour l'espace pro */
}
#espace-assure {
    background-color: var(--light); /* Exemple : fond clair pour l'espace assure */
}


.espace-pro-card, .espace-assureur-card, .espace-patient-card { /* Ajout de .espace-patient-card */
background: var(--white);
padding: 3rem;
border-radius: 15px;
box-shadow: 0 10px 30px rgba(0,0,0,0.1);
text-align: center;
margin-bottom: 2rem;
}
.espace-pro-card h3, .espace-assureur-card h3, .espace-patient-card h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-weight: 700;
}
.espace-pro-card p, .espace-assureur-card p, .espace-patient-card p {
    color: var(--gray);
    margin-bottom: 2rem;
}
.espace-section .btn-group .btn {
    border-radius: 50px !important;
    margin: 0 0.5rem;
}


/* ========== HERO SECTION ========== */
.hero {
    margin-top: 104px;
    padding: 100px 0;
    background: var(--gradient-hero);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

/* Ancres section sous le header fixe (bandeau + navbar desktop) */
section[id] {
    scroll-margin-top: 104px;
}

/* Le footer de la page d'accueil (class .footer) porte un gris inline :
   la charte sombre est forcée sur l'élément <footer>. */
footer {
    scroll-margin-top: 104px;
    background: linear-gradient(160deg, #0f1e3d 0%, var(--dark) 60%, #16294f 100%) !important;
    color: var(--white) !important;
}

/* La page d'accueil rend déjà son propre footer (accueil_landing.php) :
   le footer générique de footeraccueil.php ne s'affiche que si un seul
   <footer> existe sur la page. */
body:has(.footer) > footer:not(.footer) {
    display: none;
}


.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: -25%;
    width: 50%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 600"><circle cx="400" cy="300" r="300" fill="white" opacity="0.03"/><circle cx="400" cy="300" r="200" fill="white" opacity="0.03"/><circle cx="400" cy="300" r="100" fill="white" opacity="0.03"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

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

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-hero {
    padding: 0.8rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
}

.btn-hero-primary {
    background: var(--white);
    color: var(--primary);
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    text-decoration: none;
    color: var(--primary);
}

.btn-hero-outline {
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-hero-outline:hover {
    background: var(--white);
    color: var(--primary);
    text-decoration: none;
}

/* ========== INFO CARDS ========== */
.info-section {
    padding: 80px 0;
    background: var(--light);
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: -100px;
    position: relative;
    z-index: 10;
}

.info-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.3s;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.info-card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.info-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.info-card p {
    color: var(--gray);
    margin: 0;
}

/* ========== CTA SECTION ========== */
.cta {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    padding: 60px 0;
    text-align: center;
    border-radius: 20px;
    margin: 80px 0;
}

.cta h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-cta {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-cta-white {
    background: var(--white);
    color: var(--primary);
}

.btn-cta-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    text-decoration: none;
    color: var(--primary);
}

.btn-cta-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-cta-outline:hover {
    background: var(--white);
    color: var(--primary);
    text-decoration: none;
}

/* ========== FOOTER ==========
   La vitrine utilise un <footer> nu (footeraccueil.php) : le style est
   porté par l'élément lui-même, pas seulement par .footer. */
.footer,
footer {
    background: linear-gradient(160deg, #0f1e3d 0%, var(--dark) 60%, #16294f 100%);
    color: var(--white);
    padding: 56px 0 0;
    border-top: 4px solid transparent;
    border-image: linear-gradient(90deg, var(--primary-light), var(--accent-color)) 1;
}

footer .container {
    padding-bottom: 0;
}

footer h5 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1.1rem;
    color: #fff;
    position: relative;
    padding-bottom: 0.55rem;
}

footer h5::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 36px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--primary-light), var(--accent-color));
}

footer p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.92rem;
}

footer .row > div + div h5::after,
footer .text-center h5::after {
    left: auto;
}

footer ul.list-unstyled li {
    margin-bottom: 0.55rem;
}

footer ul.list-unstyled a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
}

footer ul.list-unstyled a::before {
    content: '\203A';
    color: var(--accent-color);
    font-weight: 700;
}

footer ul.list-unstyled a:hover {
    color: #fff;
    transform: translateX(4px);
}

footer .fa-phone,
footer .fa-envelope {
    color: var(--accent-color);
    margin-right: 0.45rem;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    font-size: 0.8rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    transition: all 0.25s ease;
    margin: 0 0.3rem 0.3rem 0;
}

.social-links a:hover {
    background: var(--gradient-hero);
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(14, 165, 233, 0.3);
}

.social-links i {
    font-size: 1.15rem !important;
    color: #fff;
}

footer hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin: 2rem 0 0;
    opacity: 1;
}

footer .text-center {
    padding: 1.2rem 0 1.4rem;
}

footer .text-center p {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-about h3 {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.footer-about h3 i {
    margin-right: 0.5rem;
    color: var(--secondary);
    font-size: 1.8rem;
}

.footer-about p {
    color: rgba(255,255,255,0.8);
    line-height: 1.8;
}

.footer-links h4 {
    margin-bottom: 1rem;
}

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

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s;
}

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

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

/* ========== MOBILE MENU ========== */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 991.98px) { /* Adjust breakpoint for Bootstrap's default lg */
.nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--white);
    position: absolute;
    top: 100%;
    left: 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 1rem 0;
    text-align: center;
}

.nav-menu.active {
    display: flex;
}

.nav-menu li {
    margin: 0.5rem 0;
}

.nav-menu .nav-item.dropdown {
    width: 100%;
}

.nav-menu .nav-item.dropdown .dropdown-toggle {
    width: 100%;
}

.nav-menu .nav-item.dropdown .dropdown-menu {
    position: static !important; /* Override absolute positioning for mobile dropdown */
    width: 100%;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    margin-top: 0;
}

.nav-menu .nav-item.dropdown .dropdown-item {
    padding: 0.5rem 1rem;
    text-align: center;
}

.mobile-menu-toggle {
    display: block;
}

.hero h1 {
    font-size: 2rem;
}

.hero p {
    font-size: 1rem;
}

.section-title h2 {
    font-size: 1.8rem;
}

.footer-content {
    grid-template-columns: 1fr;
    text-align: center;
}

.info-cards {
    margin-top: -50px;
}

.hero-buttons {
    justify-content: center;
}
.navbar-brand .logo {
    font-size: 1rem;
}
.navbar-brand .logo i {
    font-size: 1.5rem;
}
.footer-about h3 {
    font-size: 1rem;
}
.footer-about h3 i {
    font-size: 1.5rem;
}
}
/* Pour les très petits écrans, on pourrait encore réduire */
@media (max-width: 576px) {
    .navbar-brand .logo {
        font-size: 0.8rem;
    }
    .navbar-brand .logo i {
        font-size: 1.2rem;
    }
    .footer-about h3 {
        font-size: 0.8rem;
    }
    .footer-about h3 i {
        font-size: 1.2rem;
    }
}
