/* ============================================
   MAISON MÉDICALE MM78 — HOUDAN
   Site Vitrine — Feuille de styles
   ============================================ */

/* --- Reset & Variables --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Couleurs principales */
    --primary: #1E3A6E;
    --primary-light: #3B70B5;
    --primary-dark: #0F1F3E;
    --accent: #E03343;
    --accent-rgb: 224, 51, 67;
    --accent-light: #E55F6A;
    --badge-coming: #f1c40f;
    --badge-coming-rgb: 241, 196, 15;

    /* Neutres */
    --white: #ffffff;
    --gray-50: #f8f9fa;
    --gray-100: #f1f3f5;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;

    /* Typographie */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;

    /* Espaces */
    --section-padding: 100px 0;
    --container-width: 1200px;
    --border-radius: 12px;
    --border-radius-sm: 8px;

    /* Transitions */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Ombres */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--gray-800);
    line-height: 1.7;
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Boutons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

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

.btn-primary:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--accent-rgb), 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary);
    border-color: var(--white);
    transform: translateY(-2px);
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    padding: 12px 0;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.logo-svg {
    height: 44px;
    width: auto;
    display: block;
    --logo-accent-color: var(--accent);
    color: var(--white);
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled .logo-svg {
    height: 40px;
    color: var(--gray-800);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    border-radius: 50px;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

.navbar.scrolled .nav-link {
    color: var(--gray-600);
}

.navbar.scrolled .nav-link:hover {
    color: var(--primary);
    background: var(--gray-100);
}

.nav-link--cta {
    background: var(--accent);
    color: var(--white) !important;
    padding: 8px 24px;
}

.nav-link--cta:hover {
    background: var(--accent-light) !important;
    color: var(--white) !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

.navbar.scrolled .nav-toggle span {
    background: var(--gray-800);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    padding-bottom: 40px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.15) 0%, transparent 70%);
    animation: heroFloat 20s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 112, 181, 0.2) 0%, transparent 70%);
    animation: heroFloat 15s ease-in-out infinite reverse;
}

@keyframes heroFloat {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(30px, -30px); }
    66% { transform: translate(-20px, 20px); }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
}



.hero-care-center {
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.8;
    margin-bottom: 12px;
}

.hero-logo {
    margin-bottom: 8px;
}

.hero-logo-svg {
    height: clamp(60px, 12vw, 120px);
    width: auto;
    display: block;
    margin: 0 auto;
    --logo-accent-color: var(--accent);
    color: var(--white);
}

.hero-location {
    font-size: 1.3rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    margin-bottom: 24px;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.15rem;
    max-width: 520px;
    margin: 0 auto 40px;
    opacity: 0.85;
    line-height: 1.8;
}

.hero-link {
    color: var(--accent-light);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hero-link:hover {
    color: var(--white);
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: scrollBounce 2s ease-in-out infinite;
}

.hero-scroll a {
    color: rgba(255, 255, 255, 0.5);
}

.hero-scroll a:hover {
    color: var(--white);
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ============================================
   SECTIONS COMMUNES
   ============================================ */
.section {
    padding: var(--section-padding);
}

.section--light {
    background: var(--white);
}

.section--dark {
    background: var(--gray-900);
    color: var(--white);
}

.section--accent {
    background: var(--gray-50);
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.section--dark .section-title {
    color: var(--white);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--gray-600);
    max-width: 560px;
    margin: 0 auto;
}

.section--dark .section-subtitle {
    color: var(--gray-400);
}

/* ============================================
   PRÉSENTATION
   ============================================ */
.presentation-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.presentation-card {
    padding: 40px 32px;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.presentation-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.presentation-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    color: var(--primary-light);
}

.presentation-card h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--gray-900);
}

.presentation-card p {
    font-size: 0.95rem;
    color: var(--gray-600);
    line-height: 1.7;
}

/* ============================================
   SPÉCIALITÉS
   ============================================ */
.specialites-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.specialite-card {
    position: relative;
    padding: 48px 36px 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    transition: var(--transition);
    overflow: hidden;
}

.specialite-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
}

.specialite-card--coming {
    border-color: rgba(var(--accent-rgb), 0.3);
    background: rgba(var(--accent-rgb), 0.05);
}

.specialite-number {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.06);
    position: absolute;
    top: 16px;
    right: 24px;
    line-height: 1;
}

.specialite-content h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: var(--white);
}

.specialite-content p {
    font-size: 0.95rem;
    color: var(--gray-400);
    margin-bottom: 20px;
    line-height: 1.7;
}

.specialite-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.specialite-list li {
    font-size: 0.9rem;
    color: var(--gray-400);
    padding-left: 20px;
    position: relative;
}

.specialite-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.specialite-badge {
    display: inline-block;
    margin-top: 24px;
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    border-radius: 50px;
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--accent-light);
}

.specialite-badge--coming {
    background: rgba(var(--badge-coming-rgb), 0.15);
    color: var(--badge-coming);
}

/* ============================================
   ÉQUIPE
   ============================================ */
.equipe-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.praticien-card {
    text-align: center;
    padding: 40px 24px;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.praticien-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.praticien-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    color: var(--primary-light);
    background: var(--gray-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
}

.praticien-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.praticien-avatar svg {
    padding: 12px;
}

.praticien-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.praticien-specialite {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 500;
}

.praticien-card--centered {
    grid-column: 2 / 3;
}

/* ============================================
   INFORMATIONS PRATIQUES
   ============================================ */
.infos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.info-card {
    padding: 36px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.info-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.info-icon {
    width: 44px;
    height: 44px;
    color: var(--primary-light);
    margin-bottom: 20px;
}

.info-card h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 16px;
    color: var(--gray-900);
}

.horaires {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.horaire-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
}

.horaire-row:last-child {
    border-bottom: none;
}

.horaire-row span:first-child {
    color: var(--gray-700);
    font-weight: 500;
}

.horaire-row span:last-child {
    color: var(--primary-light);
    font-weight: 600;
}

.horaire-row--closed span:last-child {
    color: var(--gray-400);
}

.info-address {
    font-size: 0.95rem;
    color: var(--gray-700);
    line-height: 1.8;
    margin-bottom: 12px;
}

.info-detail {
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 8px;
}

.info-detail strong {
    color: var(--primary-light);
    font-weight: 700;
}

/* ============================================
   CONTACT
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 48px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.contact-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.contact-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    color: var(--primary-light);
    background: var(--gray-50);
    border-radius: 50%;
    padding: 10px;
}

.contact-item h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.contact-item p {
    font-size: 0.95rem;
    color: var(--gray-600);
    line-height: 1.7;
}

.contact-map {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

#map {
    width: 100%;
    height: 400px;
    border-radius: var(--border-radius);
}

/* --- Custom map marker (POI pin) --- */
.map-marker {
    background: none;
    border: none;
}

.map-marker-pin {
    width: 24px;
    height: 36px;
    color: var(--accent);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.map-marker-pin svg {
    width: 100%;
    height: 100%;
}

/* --- Custom map popup --- */
.map-popup .leaflet-popup-content-wrapper {
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    padding: 0;
    overflow: hidden;
    font-family: var(--font-body);
}

.map-popup .leaflet-popup-content {
    margin: 14px 18px;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--gray-700);
}

.map-popup .leaflet-popup-content strong {
    color: var(--primary);
    font-size: 0.9rem;
}

.map-popup .leaflet-popup-tip {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* --- Keep map controls below navbar (z-index 1000) --- */
#map {
    position: relative;
    z-index: 0;
}

/* --- Custom zoom controls --- */
.leaflet-control-zoom {
    border: none !important;
    border-radius: 10px !important;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12) !important;
}

.leaflet-control-zoom a {
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 16px !important;
    color: var(--gray-700) !important;
    background: var(--white) !important;
    border: none !important;
    border-bottom: 1px solid var(--gray-200) !important;
    transition: background 0.2s, color 0.2s;
}

.leaflet-control-zoom a:last-child {
    border-bottom: none !important;
}

.leaflet-control-zoom a:hover {
    background: var(--gray-50) !important;
    color: var(--primary) !important;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 64px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand p {
    margin-top: 16px;
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-affiliation {
    margin-top: 8px;
    font-size: 0.8rem;
    opacity: 0.7;
}

.footer-affiliation a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer-affiliation a:hover {
    color: var(--accent-light);
}

.footer-brand .logo-svg {
    height: 52px;
    width: auto;
    --logo-accent-color: var(--accent);
    color: var(--gray-400);
}

.footer-links h3 {
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links li,
.footer-links a {
    font-size: 0.9rem;
    color: var(--gray-500);
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    text-align: center;
    font-size: 0.85rem;
}

/* ============================================
   ANIMATIONS (Scroll reveal)
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .presentation-grid,
    .specialites-grid {
        grid-template-columns: 1fr 1fr;
    }

    .equipe-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 72px 0;
    }

    /* Mobile Nav */
    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 100px 32px 32px;
        gap: 4px;
        box-shadow: var(--shadow-xl);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        color: var(--gray-700);
        font-size: 1rem;
        width: 100%;
        padding: 12px 16px;
    }

    .nav-link:hover {
        color: var(--primary);
        background: var(--gray-100);
    }

    .nav-link--cta {
        margin-top: auto;
        background: none;
        color: var(--accent) !important;
        padding: 12px 16px;
    }

    .nav-link--cta:hover {
        background: var(--gray-100) !important;
        color: var(--accent-light) !important;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .nav-toggle.active span {
        background: var(--gray-800);
    }

    /* Grid mobile */
    .presentation-grid,
    .specialites-grid,
    .equipe-grid,
    .infos-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .hero-logo-svg {
        height: clamp(64px, 15vw, 100px);
    }

    .praticien-card--centered {
        grid-column: auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}
