/* Styles complémentaires (hors utilitaires Tailwind) */

/* Les ancres ne passent pas sous l'en-tête collant (h-20 = 5rem) */
section[id] {
    scroll-margin-top: 5.5rem;
}

/* Empêche le défilement de la page quand la modale est ouverte */
body.modal-open {
    overflow: hidden;
}

/* Champ invalide après tentative d'envoi */
.field-error {
    border-color: #DC2626 !important;
    box-shadow: 0 0 0 2px rgb(220 38 38 / 0.2);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Carrousel d'avis : barre de défilement masquée, défilement tactile conservé */
.reviews-track {
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.reviews-track::-webkit-scrollbar {
    display: none;
}
.reviews-track.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    scroll-behavior: auto;
    user-select: none;
}
.reviews-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background: #CBD5E1;
    transition: width 0.2s, background-color 0.2s;
}
.reviews-dot.is-active {
    width: 1.5rem;
    background: #065F46;
}

/* Hero: editorial typography and the original medical photograph. */
.hero {
    background: #f7f7f0;
    color: #213f34;
    overflow: hidden;
}
.hero-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 58px 32px 0;
}
.hero-main {
    display: grid;
    grid-template-columns: 1.18fr 1fr;
    gap: 64px;
    align-items: center;
    padding-bottom: 52px;
}
.hero-copy { padding: 12px 0; }
.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .19em;
    margin-bottom: 25px;
}
.hero-eyebrow > span {
    width: 7px;
    height: 7px;
    background: #a4894c;
    border-radius: 50%;
}
.hero h1 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(42px, 4.7vw, 64px);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -.045em;
    margin: 0 0 28px;
}
.hero h1 em { color: #47765c; font-weight: 400; }
.hero-doctor { display: flex; align-items: center; gap: 16px; }
.hero-doctor-line { width: 32px; height: 1px; background: #a4894c; }
.hero-doctor p { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.hero-doctor div > span { font-size: 12px; color: #68766b; }
.hero-description {
    max-width: 420px;
    font-size: 14px;
    line-height: 1.85;
    color: #657166;
    margin: 24px 0 28px;
}
.hero-actions { display: flex; align-items: center; gap: 25px; flex-wrap: wrap; }
.hero-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    background: #214f3d;
    color: #fff;
    border: 1px solid #214f3d;
    padding: 17px 21px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s, transform .2s;
}
.hero-cta:hover { background: #153c2c; transform: translateY(-2px); }
.hero-cta svg { width: 19px; height: 19px; }
.hero-phone { display: inline-flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 500; }
.hero-phone svg { width: 16px; height: 16px; }
.hero-phone:hover, .hero-discover:hover, .hero-location:hover { color: #047857; }
.hero-discover {
    display: inline-flex;
    align-items: center;
    gap: 24px;
    font-size: 11px;
    color: #6a756b;
    margin-top: 28px;
}
.hero-discover span { font-size: 18px; }
.hero-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 514px;
    color: #eeeddc;
    background: #1e4435;
    overflow: hidden;
    isolation: isolate;
    border-radius: 160px 160px 8px 8px;
    padding: 47px 32px 26px;
}
.hero-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: -2;
}
.hero-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgb(15 44 33 / .42), transparent 35%, rgb(15 44 33 / .18) 52%, rgb(15 44 33 / .94) 88%);
    z-index: -1;
    pointer-events: none;
}
.hero-visual-top { display: flex; align-items: center; justify-content: center; gap: 12px; color: #f3f2e4; }
.hero-visual-top > span { font-size: 8px; letter-spacing: .24em; }
.hero-visual-top svg { width: 13px; height: 13px; }
.hero-visual-bottom { margin-top: auto; padding-top: 240px; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.hero-visual-bottom p { font-family: Georgia, 'Times New Roman', serif; font-size: 21px; line-height: 1.4; letter-spacing: -.025em; }
.hero-visual-bottom p em { font-size: 17px; color: #c5cfb9; }
.hero-visual-bottom > span { font-size: 19px; color: #c5cfb9; white-space: nowrap; }
.hero-visual-caption {
    display: block;
    border-top: 1px solid rgb(220 226 199 / .18);
    padding-top: 18px;
    margin-top: 23px;
    font-size: 7px;
    letter-spacing: .19em;
    color: #b7c4af;
}
.hero-details { border-top: 1px solid #d9dfd2; display: flex; align-items: center; gap: 42px; padding: 25px 0; }
.hero-detail { display: flex; align-items: center; gap: 13px; }
.hero-detail > svg { width: 23px; height: 23px; flex-shrink: 0; color: #62836b; }
.hero-detail div > span { font-size: 8px; letter-spacing: .13em; color: #697868; font-weight: 600; }
.hero-detail p { margin-top: 5px; font-size: 11px; }
.hero-hours-divider { color: #b1b9aa; padding: 0 7px; }
.hero-location { margin-left: auto; display: inline-flex; align-items: center; gap: 20px; font-size: 11px; white-space: nowrap; }
.hero-location > span { font-size: 20px; }
.hero :is(a, button):focus-visible { outline: 2px solid #a4894c; outline-offset: 5px; }
@media (min-width: 1280px) {
    .hero h1 { font-size: 64px; }
}
@media (max-width: 1023px) {
    .hero-inner { padding-top: 40px; }
    .hero-main { gap: 32px; }
    .hero h1 { font-size: 46px; }
    .hero-visual { min-height: 460px; padding: 42px 24px 24px; }
    .hero-visual-bottom { flex-direction: column; align-items: flex-start; }
    .hero-details { gap: 24px; flex-wrap: wrap; }
    .hero-location { margin-left: 0; }
}
@media (max-width: 767px) {
    .hero-inner { padding: 32px 24px 0; }
    .hero-main { grid-template-columns: 1fr; gap: 32px; padding-bottom: 32px; }
    .hero-copy { padding: 0; }
    .hero-eyebrow { font-size: 9px; margin-bottom: 22px; }
    .hero h1 { font-size: clamp(42px, 7.8vw, 58px); max-width: 560px; margin-bottom: 24px; }
    .hero-description { max-width: 480px; margin: 20px 0 24px; }
    .hero-actions { gap: 20px; }
    .hero-discover { margin-top: 22px; }
    .hero-visual { min-height: 420px; aspect-ratio: 4 / 5; width: 100%; max-width: 520px; margin: 0 auto; padding: 35px 28px 24px; border-radius: 140px 140px 8px 8px; }
    .hero-visual-bottom { padding-top: 170px; }
    .hero-visual-bottom { flex-direction: row; align-items: flex-end; }
    .hero-visual-bottom p { font-size: 20px; }
    .hero-visual-bottom p em { font-size: 16px; }
    .hero-visual-bottom > span { font-size: 17px; }
    .hero-details { gap: 22px; align-items: flex-start; flex-direction: column; }
}
@media (max-width: 374px) {
    .hero-inner { padding-left: 20px; padding-right: 20px; }
    .hero h1 { font-size: 38px; }
    .hero-visual-bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 767px) {
    .hero-main { grid-template-columns: minmax(0, 1fr); }
    .hero-copy, .hero-visual { min-width: 0; }
    .hero-visual-bottom { flex-wrap: wrap; }
}
/* Keep the existing navigation within the viewport on small phones. */
@media (max-width: 479px) {
    header a.group { gap: 8px; min-width: 0; }
    header a.group > div:first-child { width: 34px; height: 38px; flex-shrink: 0; }
    header a.group .text-base { font-size: 12px; }
    header a.group .text-xs { font-size: 10px; }
    header a.group .font-arabic { display: none; }
    header [data-open-rdv] { padding: 10px 8px; font-size: 11px; }
    header [data-open-rdv] svg { display: none; }
    #mobileMenuBtn { padding: 6px; }
}

/* Access section: the same cards and typography as the patient reviews. */
.access-heading { margin-bottom: 40px; max-width: 780px; }
.access-details { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 4px 24px 24px; box-shadow: 0 1px 2px rgb(0 0 0 / .04); }
.access-detail { padding: 24px 0; }
.access-detail + .access-detail { border-top: 1px solid #eef0ed; }
.access-detail > div:last-child { min-width: 0; flex: 1; }
.access-form .grid > div { min-width: 0; }
.access-form :is(input, select, textarea) { min-width: 0; max-width: 100%; }
.access-form textarea { resize: vertical; }
.access-map-section .aspect-\[4\/3\] { width: 100%; height: clamp(300px, 34vw, 520px); aspect-ratio: auto; }
@media (max-width: 639px) {
    .access-details { padding: 0 20px 20px; }
    .access-detail { gap: 12px; padding: 22px 0; }
    .access-detail > div:first-child { width: 32px; height: 32px; border-radius: 10px; }
    .access-detail dl > div { gap: 12px; flex-wrap: wrap; }
    .access-detail dl dd { white-space: nowrap; }
}

/* Responsive navigation, touch controls, and short-screen dialogs. */
#rdvModal {
    padding-top: max(16px, env(safe-area-inset-top));
    padding-bottom: max(16px, env(safe-area-inset-bottom));
}
#rdvModal > div {
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom)));
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}
#rdvModal > div > .mb-5 { padding-right: 44px; }
#rdvModal [data-close-rdv] { width: 44px; height: 44px; top: 12px; right: 12px; }
#modalRdvForm .grid > div { min-width: 0; }
#modalRdvForm :is(input, select) { min-width: 0; max-width: 100%; }
#mobileMenu {
    max-height: calc(100vh - 80px);
    max-height: calc(100dvh - 80px);
    overflow-y: auto;
    overscroll-behavior: contain;
}
#mobileMenuBtn { min-width: 44px; min-height: 44px; }
#mobileActions {
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
}
#mobileActions > * { min-height: 44px; }
#toastNotification { max-width: min(384px, calc(100vw - 32px)); overflow-wrap: anywhere; }
@media (max-width: 1279px) and (min-width: 1024px) {
    #siteHeader nav { gap: 20px; }
    #siteHeader a[href^="https://wa.me/"] { display: none; }
}
@media (max-width: 1023px) {
    :is(input, select, textarea) { font-size: 16px !important; min-height: 48px; }
    #mobileMenu a { min-height: 44px; }
    #specialites [data-open-rdv] { min-height: 44px; }
    #acces :is(button, a), #carte a { min-height: 44px; }
    #acces a { display: inline-flex; align-items: center; flex-wrap: wrap; }
    #acces a strong { margin-left: 4px; }
    #acces .access-detail .space-y-2 > .pt-1 { padding-top: 0; }
}
@media (max-width: 639px) {
    section[id] { scroll-margin-top: 76px; }
    #siteHeader > .max-w-7xl > .flex { height: 64px; }
    #mobileMenu { max-height: calc(100dvh - 64px); padding-bottom: max(20px, env(safe-area-inset-bottom)); }
    .hero-inner { padding: 28px 20px 0; }
    .hero h1 { font-size: clamp(36px, 9.5vw, 54px); }
    .hero-description { font-size: 15px; line-height: 1.75; }
    .hero-actions { align-items: stretch; flex-direction: column; gap: 8px; }
    .hero-cta { width: 100%; font-size: 14px; padding: 16px 20px; justify-content: space-between; }
    .hero-phone { min-height: 44px; justify-content: center; font-size: 14px; }
    .hero-discover { min-height: 44px; margin-top: 10px; font-size: 13px; }
    .hero-visual { min-height: 380px; padding: 32px 24px 22px; }
    .hero-visual-bottom { padding-top: 130px; }
    .hero-detail p { font-size: 12px; line-height: 1.6; }
    .hero-detail div > span { font-size: 9px; }
    .hero-location { min-height: 44px; font-size: 13px; }
    .hero-details { gap: 18px; padding: 24px 0 16px; }
    #specialites, #avis, #acces, #carte { padding-top: 48px; padding-bottom: 48px; }
    #specialites .grid { gap: 16px; }
    #specialites .grid > .group { padding: 20px; }
    #specialites .mb-14 { margin-bottom: 32px; }
    .review-card { padding: 20px; }
    .review-card > div:first-child > .flex { flex-wrap: wrap; gap: 8px; }
    #reviewsControls { gap: 12px; }
    .access-heading { margin-bottom: 28px; }
    .access-booking { padding: 20px; }
    .access-detail { flex-wrap: wrap; }
    .access-detail address, footer { overflow-wrap: anywhere; }
    #carte .mb-5 > .flex { width: 100%; }
    #carte .mb-5 > .flex > a { justify-content: center; flex: 1 1 170px; }
    #rdvModal { padding-left: 12px; padding-right: 12px; }
    #rdvModal > div { padding: 20px; border-radius: 20px; }
    #rdvModalTitle { font-size: 20px; line-height: 1.3; }
    #modalRdvForm .grid { grid-template-columns: minmax(0, 1fr); }
    #modalRdvForm :is(button, a) { font-size: 13px; }
    #toastNotification { left: 16px; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); }
    footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
    footer a { min-height: 44px; display: inline-flex; align-items: center; }
}
@media (max-width: 479px) {
    #siteHeader [data-open-rdv] { display: none; }
    #siteHeader a.group .text-base { font-size: 14px; }
    #siteHeader a.group .text-xs { font-size: 11px; }
    #siteHeader a.group > div:first-child { width: 38px; height: 38px; }
}
