/* ========================================
   erreurmedicale.be — Style V6 « Azur »
   Palette : bleu nuit profond + bleu ciel + accent ambre
   Typo : Bricolage Grotesque (display) + Mulish (corps)
   Voir skills/erreurmedicale-design/SKILL.md
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&family=Mulish:wght@400;500;600;700;800&display=swap');

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Sombres — bleu nuit profond (hero, sections sombres, cartes avocat) */
    --deep: #0e2c4a;
    --deep-mid: #14416b;
    --deep-light: #1f5687;
    /* Action / primaire — azur profond (texte blanc lisible dessus) */
    --cyan: #1668b0;
    --cyan-dark: #0f4f88;
    /* Accent — bleu ciel pour highlights sur fond sombre */
    --cyan-light: #8ccdf2;
    --gold: #d99a2b;
    /* Lavis clairs */
    --cyan-pale: #eaf3fb;
    --cyan-bg: #d2e6f6;
    --white: #ffffff;
    --off-white: #f1f6fb;
    /* Gris froids (ardoise) — cohérence avec le bleu */
    --gray-50: #f6f9fc;
    --gray-100: #eef3f8;
    --gray-200: #e0e8f0;
    --gray-300: #c4d0dc;
    --gray-400: #8b9bab;
    --gray-500: #5f6f7e;
    --gray-600: #46545f;
    --gray-700: #33414c;
    --gray-800: #22303a;
    --gray-900: #13212c;
    --green: #2f8f6b;
    --green-bg: #eaf4ee;
    --red: #c0392b;
    --amber: #e0a83e;

    /* Typo */
    --heading: 'Bricolage Grotesque', 'Helvetica Neue', system-ui, sans-serif;
    --body: 'Mulish', system-ui, -apple-system, sans-serif;

    /* Rayons & ombres (douces, teintées vert sombre) */
    --radius: 8px;
    --radius-lg: 14px;
    --shadow: 0 1px 2px rgba(15,44,74,.05), 0 6px 20px rgba(15,44,74,.06);
    --shadow-lg: 0 8px 24px rgba(15,44,74,.10), 0 22px 50px rgba(15,44,74,.09);
}

html { scroll-behavior: smooth; }
body { font-family: var(--body); color: var(--gray-800); line-height: 1.72; background: var(--off-white); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--cyan); text-decoration: none; transition: color .2s; }
/* Le hover ne s'applique qu'aux liens textuels : les boutons (.btn) ont
   leur propre couleur de texte, sinon on a un texte bleu foncé sur fond
   bleu foncé au survol → texte invisible. */
a:not(.btn):hover { color: var(--cyan-dark); }
img { max-width: 100%; height: auto; }
ul { list-style: none; }

/* Container */
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 760px; }

/* ========================================
   NAVBAR
   ======================================== */
.navbar {
    position: sticky; top: 0; z-index: 100;
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
}
.nav-container {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
}
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo-icon { font-size: 24px; }
.logo-text {
    font-family: var(--heading); font-size: 18px; font-weight: 700;
    color: var(--deep);
}
.logo-dot { color: var(--cyan); }
.nav-links {
    display: flex; align-items: center; gap: 4px;
}
.nav-links a {
    padding: 8px 14px; border-radius: 8px;
    font-size: 14px; font-weight: 500; color: var(--gray-600);
    text-decoration: none; transition: all .2s;
}
.nav-links a:hover,
.nav-links a.active { background: var(--cyan-pale); color: var(--cyan); }
.nav-cta {
    background: var(--cyan) !important; color: var(--white) !important;
    font-weight: 600 !important; padding: 9px 18px !important;
    border-radius: 8px !important;
}
.nav-cta:hover { background: var(--cyan-dark) !important; }
.mobile-menu {
    display: none; background: none; border: none;
    font-size: 26px; cursor: pointer; color: var(--deep);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-block; padding: 13px 26px; border-radius: 8px;
    font-family: var(--body); font-size: 15px; font-weight: 600;
    text-decoration: none; transition: all .25s; cursor: pointer; border: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--cyan); color: var(--white); }
.btn-primary:hover { background: var(--cyan-dark); box-shadow: 0 4px 16px rgba(22,104,176,.25); }
.btn-ghost {
    background: transparent; color: var(--white);
    border: 1px solid rgba(255,255,255,.25);
}
.btn-ghost:hover { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.05); }
.btn-outline {
    background: transparent; color: var(--cyan);
    border: 2px solid var(--cyan);
}
.btn-outline:hover { background: var(--cyan); color: var(--white); }

/* ========================================
   HERO
   ======================================== */
.hero {
    background: linear-gradient(150deg, var(--deep) 0%, var(--deep-mid) 60%, #08203a 100%);
    padding: 88px 0 76px; color: var(--white);
    position: relative; overflow: hidden;
}
.hero::before {
    content: ""; position: absolute; top: -40%; right: -20%;
    width: 600px; height: 600px; border-radius: 50%;
    background: radial-gradient(circle, rgba(22,104,176,.12) 0%, transparent 70%);
    pointer-events: none;
}
.hero::after {
    content: ""; position: absolute; bottom: -30%; left: -10%;
    width: 400px; height: 400px; border-radius: 50%;
    background: radial-gradient(circle, rgba(140,205,242,.06) 0%, transparent 70%);
    pointer-events: none;
}
.hero-content { position: relative; z-index: 1; text-align: center; }
.hero-badge {
    display: inline-block; padding: 7px 15px;
    background: rgba(140,205,242,.10); border: 1px solid rgba(140,205,242,.35);
    border-radius: 50px; font-size: 11px; font-weight: 700;
    color: var(--cyan-light); margin-bottom: 24px;
    text-transform: uppercase; letter-spacing: 1.5px;
}
.hero h1 {
    font-family: var(--heading); font-size: 50px; font-weight: 600;
    line-height: 1.06; letter-spacing: -.018em; margin-bottom: 18px;
    font-optical-sizing: auto;
}
.hero h1 span { color: var(--cyan-light); }
.hero-subtitle {
    font-size: 17px;
    color: rgba(255,255,255,.78);
    line-height: 1.7;
    margin: 0 auto 32px;
    max-width: 640px;
    font-weight: 400;
    letter-spacing: .002em;
    /* `pretty` répartit les retours à la ligne de façon plus harmonieuse
       et évite les lignes orphelines ; `balance` serait trop court pour
       un paragraphe de 3–4 lignes. */
    text-wrap: pretty;
}
.hero-subtitle strong {
    color: var(--white);
    font-weight: 600;
}
.hero-subtitle em {
    font-style: normal;
    color: var(--cyan-light);
    font-weight: 600;
}
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 48px; justify-content: center; }
@media (max-width: 600px) {
    .hero-btns { flex-direction: column; gap: 10px; }
    .hero-btns .btn { width: 100%; text-align: center; padding: 14px 20px; }
}
.hero-trust {
    display: flex; gap: 32px; align-items: center;
    padding-top: 28px; border-top: 1px solid rgba(255,255,255,.1);
}
.trust-item { text-align: left; }
.trust-number {
    display: block; font-family: var(--heading);
    font-size: 24px; font-weight: 700; color: var(--cyan-light);
}
.trust-label { font-size: 12px; color: rgba(255,255,255,.45); }

/* ========================================
   SECTIONS
   ======================================== */
.section { padding: 40px 0; }
.section-white { background: var(--white); }
.section-light { background: var(--off-white); }
.section-dark { background: var(--deep); color: var(--white); }
.section-cyan { background: var(--cyan-pale); }

.section-title {
    font-family: var(--heading); font-size: 36px; font-weight: 600;
    letter-spacing: -.012em; text-align: center; margin-bottom: 12px;
    color: var(--gray-900); font-optical-sizing: auto;
}
.section-title-light { color: var(--white); }
.section-subtitle {
    text-align: center; font-size: 16px; color: var(--gray-500);
    max-width: 560px; margin: 0 auto 40px;
}
.section-subtitle-light { color: rgba(255,255,255,.5); }

/* ========================================
   GRID / CARDS
   ======================================== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--gray-200); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.card {
    background: var(--white); border: 1px solid var(--gray-200);
    border-radius: var(--radius); padding: 28px;
    transition: all .25s;
}
.card:hover { border-color: var(--cyan); box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.feat-card { background: var(--white); padding: 28px; }
.feat-icon {
    width: 42px; height: 42px; border-radius: var(--radius);
    background: var(--cyan-pale); color: var(--cyan);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; margin-bottom: 14px;
}
.feat-card h3 {
    font-family: var(--heading); font-size: 16px; font-weight: 700;
    color: var(--deep); margin-bottom: 6px;
}
.feat-card p { font-size: 14px; color: var(--gray-500); line-height: 1.6; }
.feat-card .card-link {
    display: inline-block; margin-top: 12px;
    font-size: 13px; font-weight: 600; color: var(--cyan);
}

/* ========================================
   STEPS / TIMELINE
   ======================================== */
.steps { max-width: 640px; margin: 0 auto; }
.step {
    display: flex; gap: 20px; align-items: flex-start;
    margin-bottom: 28px; position: relative;
}
.step-num {
    flex-shrink: 0; width: 40px; height: 40px;
    background: var(--cyan); color: var(--white);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-family: var(--heading); font-size: 16px; font-weight: 700;
}
.step h3 {
    font-family: var(--heading); font-size: 17px; font-weight: 700;
    color: var(--gray-900); margin-bottom: 4px;
}
.step p { font-size: 14px; color: var(--gray-500); line-height: 1.7; }

.timeline { max-width: 680px; margin: 0 auto; position: relative; }
.timeline::before {
    content: ""; position: absolute; left: 19px; top: 0; bottom: 0;
    width: 2px; background: var(--gray-200);
}
.timeline-item { display: flex; gap: 20px; margin-bottom: 32px; position: relative; }
.timeline-dot {
    flex-shrink: 0; width: 40px; height: 40px;
    background: var(--cyan); color: var(--white);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-family: var(--heading); font-size: 16px; font-weight: 700; z-index: 1;
}
.timeline-content {
    background: var(--white); border: 1px solid var(--gray-200);
    border-radius: var(--radius); padding: 22px; flex: 1;
    box-shadow: var(--shadow);
}
.timeline-content h3 {
    font-family: var(--heading); font-size: 18px; font-weight: 700;
    margin-bottom: 6px; color: var(--gray-900);
}
.timeline-content p { font-size: 14px; color: var(--gray-500); line-height: 1.7; }
.timeline-tip {
    background: var(--cyan-pale); border-radius: 6px;
    padding: 10px 14px; margin-top: 10px;
    font-size: 13px; color: var(--deep); font-weight: 500;
}

/* ========================================
   TWO-COL LAYOUT
   ======================================== */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }

/* ========================================
   CHECK LIST
   ======================================== */
.check-list li {
    padding: 7px 0 7px 28px; position: relative;
    font-size: 15px; color: var(--gray-700);
}
.check-list li::before {
    content: "✓"; position: absolute; left: 0;
    color: var(--cyan); font-weight: 800; font-size: 16px;
}

/* ========================================
   INFO BOX
   ======================================== */
.info-box {
    background: var(--white); border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg); padding: 28px;
    box-shadow: var(--shadow);
}
.info-box h4 {
    font-family: var(--heading); font-size: 17px; font-weight: 700;
    margin-bottom: 12px; color: var(--deep);
}
.info-box p { font-size: 14px; color: var(--gray-500); line-height: 1.7; margin-bottom: 10px; }

.callout {
    background: var(--cyan-pale); border-left: 3px solid var(--cyan);
    padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0;
}
.callout p { font-size: 14px; color: var(--deep); margin: 0; }

/* ========================================
   TRUST STRIP
   ======================================== */
.trust-strip {
    display: flex; justify-content: center; gap: 32px; flex-wrap: wrap;
    padding: 20px; background: var(--cyan-pale);
    border-top: 1px solid var(--cyan-bg);
}
.trust-strip span {
    font-size: 13px; color: var(--cyan); font-weight: 600;
    display: flex; align-items: center; gap: 6px;
}

/* ========================================
   AVOCAT SECTION
   ======================================== */
.avocat-card {
    background: var(--deep); color: var(--white);
    border-radius: var(--radius-lg); padding: 40px;
}
.avocat-card h2 {
    font-family: var(--heading); font-size: 28px; font-weight: 700;
    margin-bottom: 4px;
}
.avocat-role {
    font-size: 15px; color: var(--cyan-light); font-weight: 500;
    margin-bottom: 16px; display: block;
}
.avocat-card p { font-size: 15px; color: rgba(255,255,255,.65); line-height: 1.7; }
.avocat-card .check-list li { color: rgba(255,255,255,.8); }
.avocat-card .check-list li::before { color: var(--cyan-light); }

.photo-placeholder {
    width: 100%; max-width: 280px; aspect-ratio: 3/4;
    background: var(--deep-light); border-radius: var(--radius-lg);
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 4px; font-size: 15px;
    color: rgba(255,255,255,.3);
}

/* ========================================
   GOOGLE REVIEWS
   ======================================== */
.review-score {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 20px;
}
.review-score .score {
    font-family: var(--heading); font-size: 36px; font-weight: 700;
    color: var(--cyan-light);
}
.review-stars { font-size: 18px; color: var(--amber); }
.review-label { font-size: 13px; color: rgba(255,255,255,.5); }
.review-item {
    background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius); padding: 20px; margin-bottom: 12px;
}
.review-item p { font-size: 14px; color: rgba(255,255,255,.7); font-style: italic; line-height: 1.7; }
.review-author { font-size: 12px; color: rgba(255,255,255,.4); margin-top: 8px; font-style: normal; }

/* ========================================
   FAQ
   ======================================== */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
    border: 1px solid var(--gray-200); border-radius: var(--radius);
    overflow: hidden; transition: all .2s; background: var(--white);
}
.faq-item[open] { border-color: var(--cyan); box-shadow: var(--shadow); }
.faq-item summary {
    padding: 18px 22px; cursor: pointer;
    font-family: var(--heading); font-size: 15px; font-weight: 600;
    color: var(--gray-900); list-style: none;
    display: flex; align-items: center; justify-content: space-between;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 20px; color: var(--cyan); font-weight: 400; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p {
    padding: 0 22px 18px; font-size: 14px; color: var(--gray-500); line-height: 1.8;
}

/* ========================================
   CONTACT FORM
   ======================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block; font-size: 13px; font-weight: 600;
    color: var(--gray-700); margin-bottom: 5px;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%; padding: 11px 14px; border: 1px solid var(--gray-200);
    border-radius: 8px; font-size: 14px; font-family: var(--body);
    transition: border-color .2s; background: var(--white);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none; border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(22,104,176,.1);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.contact-info-card {
    background: linear-gradient(150deg, var(--deep-light) 0%, var(--deep-mid) 52%, var(--deep) 100%);
    color: var(--white);
    border-radius: var(--radius-lg); padding: 36px;
    box-shadow: 0 18px 50px rgba(14,44,74,.28);
}
.contact-info-card h3 {
    font-family: var(--heading); font-size: 22px; font-weight: 700;
    margin-bottom: 24px;
}
.contact-detail { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 20px; }
.contact-detail-icon { font-size: 22px; flex-shrink: 0; }
.contact-detail h4 { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.contact-detail p { font-size: 13px; color: rgba(255,255,255,.6); }
.contact-detail a { color: rgba(255,255,255,.6); }

/* ========================================
   PAGE HEADER
   ======================================== */
.page-header {
    background: linear-gradient(135deg, var(--deep) 0%, var(--deep-mid) 100%);
    color: var(--white); padding: 44px 0 36px; text-align: center;
    position: relative; overflow: hidden;
}
.page-header::before {
    content: ""; position: absolute; top: -60%; right: -20%;
    width: 400px; height: 400px; border-radius: 50%;
    background: radial-gradient(circle, rgba(22,104,176,.1) 0%, transparent 70%);
}
.page-header h1 {
    font-family: var(--heading); font-size: 38px; font-weight: 600;
    letter-spacing: -.012em; margin-bottom: 10px; position: relative;
    font-optical-sizing: auto;
}
.page-header p {
    font-size: 16px; color: rgba(255,255,255,.6);
    max-width: 520px; margin: 0 auto; position: relative;
}

/* ========================================
   TYPES PAGE
   ======================================== */
.type-section { padding: 40px 0; border-bottom: 1px solid var(--gray-200); }
.type-section:last-child { border-bottom: none; }
.type-header { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.type-icon { font-size: 36px; }
.type-header h2 {
    font-family: var(--heading); font-size: 24px; font-weight: 700;
    color: var(--gray-900);
}
.type-content { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.type-content h3 {
    font-family: var(--heading); font-size: 16px; font-weight: 700;
    color: var(--deep); margin-bottom: 10px;
}
.type-content p { font-size: 14px; color: var(--gray-500); line-height: 1.8; margin-bottom: 10px; }
.type-examples {
    background: var(--gray-50); border-radius: var(--radius);
    padding: 22px; border: 1px solid var(--gray-200);
}
.type-examples h4 {
    font-size: 12px; font-weight: 700; color: var(--gray-600);
    margin-bottom: 10px; text-transform: uppercase; letter-spacing: .5px;
}
.type-examples ul { list-style: disc; padding-left: 16px; }
.type-examples li { font-size: 13px; color: var(--gray-500); padding: 2px 0; }

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--gray-900); color: rgba(255,255,255,.6);
    padding: 56px 0 0;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.1fr; gap: 28px; }
.footer-col h3 {
    color: var(--white); font-family: var(--heading);
    font-size: 15px; font-weight: 700; margin-bottom: 14px;
}
.footer-col p { font-size: 13px; line-height: 1.7; }
.footer-col li { margin-bottom: 6px; }
.footer-col a { color: rgba(255,255,255,.5); font-size: 13px; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
    margin-top: 36px; padding: 18px 0;
    border-top: 1px solid rgba(255,255,255,.08);
    text-align: center; font-size: 12px; color: rgba(255,255,255,.75);
}
.footer-legal { display: flex; gap: 16px; justify-content: center; margin-top: 6px; }
.footer-legal a { font-size: 12px; color: rgba(255,255,255,.75); text-decoration: underline; }
.footer-legal a:hover { color: var(--white); }

/* ========================================
   COOKIE BANNER
   ======================================== */
.cookie-banner {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 999;
    background: var(--deep); color: var(--white);
    padding: 16px 20px; display: none;
    align-items: center; justify-content: space-between;
    gap: 16px; font-size: 13px;
    box-shadow: 0 -4px 20px rgba(0,0,0,.15);
}
.cookie-banner.show { display: flex; }
.cookie-banner p { flex: 1; color: rgba(255,255,255,.7); line-height: 1.5; }
.cookie-banner a { color: var(--cyan-light); }
.cookie-btns { display: flex; gap: 8px; flex-shrink: 0; }
.cookie-accept {
    padding: 8px 18px; background: var(--cyan); color: var(--white);
    border: none; border-radius: 6px; font-size: 13px; font-weight: 600;
    cursor: pointer;
}
.cookie-decline {
    padding: 8px 18px; background: transparent; color: rgba(255,255,255,.6);
    border: 1px solid rgba(255,255,255,.2); border-radius: 6px;
    font-size: 13px; cursor: pointer;
}

/* ========================================
   CHAT WIDGET
   ======================================== */
.chat-fab {
    position: fixed; bottom: 24px; right: 24px; z-index: 900;
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--cyan); color: var(--white);
    border: none; cursor: pointer; font-size: 24px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(22,104,176,.35);
    transition: all .3s;
}
.chat-fab:hover { transform: scale(1.08); background: var(--cyan-dark); }
.chat-popup {
    position: fixed; bottom: 92px; right: 24px; z-index: 900;
    width: 340px; max-height: 440px;
    background: var(--white); border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0,0,0,.15);
    border: 1px solid var(--gray-200);
    display: none; flex-direction: column; overflow: hidden;
}
.chat-popup.open { display: flex; }
.chat-header {
    background: var(--deep); color: var(--white);
    padding: 16px 20px; font-family: var(--heading);
    font-size: 15px; font-weight: 700;
    display: flex; justify-content: space-between; align-items: center;
}
.chat-close {
    background: none; border: none; color: rgba(255,255,255,.5);
    font-size: 20px; cursor: pointer;
}
.chat-body {
    flex: 1; padding: 16px; overflow-y: auto;
    font-size: 14px; color: var(--gray-600); line-height: 1.6;
}
.chat-msg {
    background: var(--cyan-pale); padding: 10px 14px;
    border-radius: 10px 10px 10px 2px; margin-bottom: 8px;
    font-size: 14px; color: var(--deep);
}
.chat-input-row {
    display: flex; border-top: 1px solid var(--gray-200);
}
.chat-input {
    flex: 1; padding: 12px 14px; border: none; font-size: 14px;
    font-family: var(--body); outline: none;
}
.chat-send {
    padding: 12px 16px; background: var(--cyan); color: var(--white);
    border: none; font-size: 16px; cursor: pointer;
}

/* ========================================
   BADGES (trust)
   ======================================== */
.badge-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.badge {
    background: var(--cyan-pale); border-radius: var(--radius);
    padding: 16px; text-align: center;
}
.badge-icon { font-size: 24px; margin-bottom: 6px; }
.badge p {
    font-size: 12px; font-weight: 600; color: var(--deep);
}

/* ========================================
   MOBILE NAV OVERLAY
   ======================================== */
.nav-links.open {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 64px; right: 0; bottom: 0;
    width: min(82vw, 330px);
    background: var(--white);
    z-index: 200;
    padding: 18px 18px calc(24px + env(safe-area-inset-bottom));
    gap: 4px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: -8px 0 32px rgba(15,44,74,.18);
    animation: slideRight .25s ease;
}
.nav-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(11,28,46,.45);
    z-index: 199;
}
@keyframes slideRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
.nav-links.open li { width: 100%; }
.nav-links.open a {
    display: block;
    width: 100%;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    padding: 14px 16px;
    border-radius: 10px;
    transition: background .15s ease, color .15s ease;
}
.nav-links.open a:hover,
.nav-links.open a:active,
.nav-links.open a.active {
    background: var(--cyan-pale);
    color: var(--cyan);
}
.nav-links.open .nav-cta {
    margin-top: 16px;
    text-align: center;
    background: var(--cyan) !important;
    color: #fff !important;
    padding: 15px 16px !important;
    border-radius: 12px !important;
    font-size: 16px;
    box-shadow: 0 6px 18px rgba(22,104,176,.30);
}
.nav-links.open .nav-cta:hover,
.nav-links.open .nav-cta:active { background: var(--cyan-dark) !important; color: #fff !important; }

/* ========================================
   RESPONSIVE
   ======================================== */
/* Menu hamburger : activé sur appareils tactiles OU sur fenêtres < 900 px
   (sous ce seuil la barre de navigation ne tient plus sur une ligne et les
   libellés se chevauchent). Le bug d'origine — overlay bloquant les clics —
   venait d'une règle `.mobile-menu { display: inline-flex }` posée hors de
   toute media query plus bas dans le fichier ; corrigé. */
@media (hover: none) and (pointer: coarse), (max-width: 900px) {
    /* backdrop-filter piège les enfants position:fixed → on le retire
       pour que le panneau du menu couvre bien tout l'écran. */
    .navbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; z-index: 300; }
    .nav-links { display: none; }
    .mobile-menu { display: inline-flex; }
}

@media (max-width: 900px) {
    .hero h1 { font-size: 30px; }
    .hero-trust { flex-direction: column; gap: 16px; }

    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: 1fr 1fr; }
    .two-col { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .type-content { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }

    .section { padding: 26px 0; }
    .section-title { font-size: 26px; }
    .page-header h1 { font-size: 28px; }

    .chat-popup { width: calc(100vw - 32px); right: 16px; bottom: 84px; }
    .cookie-banner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .grid-4 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .badge-grid { grid-template-columns: 1fr; }
}

/* ========================================
   SEO PAGES — BREADCRUMBS
   ======================================== */
.breadcrumb {
    padding: 14px 0;
    font-size: 13px;
    color: var(--gray-400);
}
.breadcrumb a { color: var(--gray-400); }
.breadcrumb a:hover { color: var(--cyan-light); }
.breadcrumb span { margin: 0 6px; }

/* ========================================
   SEO PAGES — ARTICLE LAYOUT
   ======================================== */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    align-items: start;
}
.article-content h2 {
    font-family: var(--heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 36px 0 14px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
}
.article-content h2:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }
.article-content h3 {
    font-family: var(--heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--deep);
    margin: 24px 0 10px;
}
.article-content p {
    font-size: 15px;
    color: var(--gray-600);
    line-height: 1.8;
    margin-bottom: 14px;
}
.article-content ul, .article-content ol {
    padding-left: 20px;
    margin-bottom: 16px;
}
.article-content li {
    font-size: 15px;
    color: var(--gray-600);
    line-height: 1.8;
    padding: 3px 0;
}
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content blockquote {
    background: var(--cyan-pale);
    border-left: 3px solid var(--cyan);
    padding: 16px 20px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 20px 0;
    font-size: 14px;
    color: var(--deep);
}

/* Sidebar */
.article-sidebar { position: sticky; top: 80px; }
.sidebar-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}
.sidebar-card h4 {
    font-family: var(--heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--deep);
    margin-bottom: 14px;
}
.sidebar-card ul { list-style: none; padding: 0; }
.sidebar-card li { margin-bottom: 8px; }
.sidebar-card a {
    font-size: 13px;
    color: var(--gray-500);
    display: block;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all .2s;
}
.sidebar-card a:hover { background: var(--cyan-pale); color: var(--cyan); }
.sidebar-cta {
    background: var(--deep);
    color: var(--white);
    border: none;
}
.sidebar-cta h4 { color: var(--white); }
.sidebar-cta p {
    font-size: 13px;
    color: rgba(255,255,255,.6);
    line-height: 1.6;
    margin-bottom: 14px;
}
.sidebar-cta .btn { width: 100%; text-align: center; }
/* Le bouton CTA ne doit pas hériter du style des liens de la sidebar */
.sidebar-card a.btn { padding: 13px 26px; color: var(--white); }
.sidebar-card a.btn-primary { background: var(--cyan); color: var(--white); }
.sidebar-card a.btn-primary:hover { background: var(--cyan-dark); color: var(--white); }
.sidebar-card a.btn-ghost { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,.25); }
.sidebar-card a.btn-ghost:hover { background: rgba(255,255,255,.05); color: var(--white); }

/* Key figures */
.key-figures {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 20px 0;
}
.key-figure {
    background: var(--cyan-pale);
    border-radius: var(--radius);
    padding: 18px;
    text-align: center;
}
.key-figure .num {
    font-family: var(--heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--cyan);
    display: block;
}
.key-figure .label {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}

/* Related pages grid */
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
}
.related-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 20px;
    transition: all .25s;
    text-decoration: none;
    display: block;
}
.related-card:hover { border-color: var(--cyan); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.related-card .card-emoji { font-size: 28px; margin-bottom: 8px; }
.related-card h4 {
    font-family: var(--heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 6px;
}
.related-card p { font-size: 13px; color: var(--gray-500); line-height: 1.5; }

/* Section accent for article pages */
.section-accent { background: var(--cyan-pale); }

/* Hub page grid */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.hub-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all .25s;
    text-decoration: none;
    display: block;
}
.hub-card:hover { border-color: var(--cyan); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.hub-card .hub-icon { font-size: 36px; margin-bottom: 12px; }
.hub-card h3 {
    font-family: var(--heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}
.hub-card p { font-size: 14px; color: var(--gray-500); line-height: 1.6; margin-bottom: 10px; }
.hub-card .card-link { font-size: 13px; font-weight: 600; color: var(--cyan); }

@media (max-width: 900px) {
    .article-layout { grid-template-columns: 1fr; gap: 32px; }
    .article-sidebar { position: static; }
    .article-content h2 { font-size: 20px; margin: 28px 0 12px; }
    .article-content h3 { font-size: 16px; }
    .article-content p { font-size: 14px; }
    .related-grid { grid-template-columns: 1fr; }
    .hub-grid { grid-template-columns: 1fr 1fr; }
    .hub-card { padding: 20px; }
    .hub-card .hub-icon { font-size: 28px; margin-bottom: 8px; }
    .hub-card h3 { font-size: 16px; }
    .hub-card p { font-size: 13px; }
    .key-figures { grid-template-columns: 1fr 1fr; }
    .key-figure .num { font-size: 22px; }
    .breadcrumb { font-size: 12px; }
}
@media (max-width: 480px) {
    .key-figures { grid-template-columns: 1fr; }
    .hub-grid { grid-template-columns: 1fr; }
    .hub-card { padding: 18px; }
    .related-card { padding: 16px; }
}

/* ===== Lexique ===== */
.lex-index { display: flex; flex-wrap: wrap; gap: 8px; }
.lex-index a {
    font-size: 13px; padding: 6px 12px; background: var(--white);
    border: 1px solid var(--gray-200); border-radius: 999px;
    color: var(--gray-700); text-decoration: none; transition: all .2s;
}
.lex-index a:hover { border-color: var(--cyan); color: var(--cyan); }
.lexique { margin: 0; }
.lex-entry { padding: 22px 0; border-bottom: 1px solid var(--gray-200); scroll-margin-top: 90px; }
.lex-entry:first-child { padding-top: 0; }
.lex-entry dt {
    font-family: var(--heading); font-size: 18px; font-weight: 700;
    color: var(--gray-900); margin-bottom: 6px;
}
.lex-entry dd { margin: 0; font-size: 15px; color: var(--gray-600); line-height: 1.7; }
.lex-entry dd a, .law-explainer a {
    color: var(--cyan); text-decoration: none; border-bottom: 1px solid rgba(22,104,176,.35);
}
.lex-entry dd a:hover { border-color: var(--cyan); }
.lex-entry:target dt { color: var(--cyan); }

/* ===== Législations (bibliothèque) ===== */
.law-cat { margin-bottom: 40px; scroll-margin-top: 90px; }
.law-cat h3 {
    font-family: var(--heading); font-size: 20px; font-weight: 700; color: var(--gray-900);
    border-bottom: 2px solid var(--cyan); padding-bottom: 8px; margin-bottom: 16px;
}
.law-list { list-style: none; padding: 0; margin: 0; }
.law-list li { padding: 16px 0; border-bottom: 1px solid var(--gray-200); }
.law-list .law-title { font-weight: 600; color: var(--gray-900); text-decoration: none; }
.law-list .law-title:hover { color: var(--cyan); }
.law-list .law-sub { color: var(--gray-500); font-size: 14px; }
.law-list .law-explainer { font-size: 14px; color: var(--gray-600); margin-top: 8px; line-height: 1.6; max-width: 72ch; }
.law-numac {
    font-family: monospace; font-size: 12px; color: var(--cyan);
    background: var(--cyan-pale); padding: 2px 8px; border-radius: 4px; margin-right: 6px;
}

/* Liens internes vers le lexique dans le corps de texte */
.lex-link { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--cyan); cursor: help; }
.lex-link:hover { color: var(--cyan); border-bottom-style: solid; }

/* ===== Stepper procédure (5 étapes, centré) ===== */
.proc-steps {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 10px; max-width: 920px; margin: 0 auto;
}
.proc-step {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 14px; background: var(--white);
    border: 1px solid var(--gray-200); border-radius: 12px;
    text-decoration: none; box-shadow: var(--shadow); transition: all .2s ease;
}
.proc-step .n {
    width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%;
    background: var(--deep); color: var(--cyan-light);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--heading); font-weight: 700; font-size: 14px;
}
.proc-step .t { font-size: 14px; font-weight: 600; color: var(--gray-700); line-height: 1.25; }
.proc-step:hover { border-color: var(--cyan); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.proc-step:hover .t { color: var(--cyan); }
.proc-step:hover .n { background: var(--cyan); }

/* ===== Photos équipe (cadrage + filtre cohérent + hover dynamique) ===== */
.team-photo-wrap {
    position: relative; width: 100%; max-width: 300px; aspect-ratio: 3 / 4;
    border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg);
    background: var(--gray-100);
}
.team-photo-wrap img {
    width: 100%; height: 100%; object-fit: cover; object-position: top center;
    display: block; filter: grayscale(100%) contrast(1.04) brightness(1.02);
    transition: transform .6s cubic-bezier(.2,.6,.2,1), filter .4s ease;
}
.team-photo-wrap::before {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: var(--cyan); mix-blend-mode: color; opacity: .10; transition: opacity .4s ease;
}
.team-photo-wrap::after {
    content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background: linear-gradient(180deg, rgba(14,44,74,.12) 0%, transparent 35%, rgba(14,44,74,.45) 100%);
    mix-blend-mode: multiply; transition: opacity .4s ease;
}
.team-photo-wrap:hover img { transform: scale(1.04); filter: grayscale(100%) contrast(1.06) brightness(1.03); }
.team-photo-wrap:hover::before { opacity: .06; }
.team-photo-wrap:hover::after { opacity: .55; }

/* ===== Consentement cookies ===== */
.cookie-banner {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 2000;
    background: var(--deep); color: var(--white);
    box-shadow: 0 -4px 24px rgba(14,44,74,.28);
    animation: cookieUp .35s ease;
}
@keyframes cookieUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.cookie-banner-inner {
    max-width: 1100px; margin: 0 auto; padding: 18px 22px;
    display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
}
.cookie-banner-text { font-size: 13.5px; line-height: 1.6; margin: 0; flex: 1 1 320px; color: rgba(255,255,255,.92); }
.cookie-banner-text a { color: var(--cyan-light); text-decoration: underline; }
.cookie-banner-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-banner-btns .btn { padding: 9px 18px; font-size: 13px; }
.cookie-banner .btn-ghost { color: var(--white); border: 1px solid rgba(255,255,255,.45); }
.cookie-banner .btn-ghost:hover { background: rgba(255,255,255,.08); }

.cookie-modal-overlay {
    position: fixed; inset: 0; z-index: 2100; background: rgba(14,44,74,.55);
    display: flex; align-items: center; justify-content: center; padding: 20px;
    animation: cookieFade .25s ease;
}
@keyframes cookieFade { from { opacity: 0; } to { opacity: 1; } }
.cookie-modal {
    background: var(--white); border-radius: var(--radius-lg, 14px); max-width: 540px; width: 100%;
    padding: 28px; box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto;
}
.cookie-modal h2 { font-family: var(--heading); font-size: 22px; color: var(--gray-900); margin: 0 0 18px; }
.cookie-cat {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
    padding: 16px 0; border-top: 1px solid var(--gray-100);
}
.cookie-cat strong { display: block; font-size: 15px; color: var(--gray-900); margin-bottom: 4px; }
.cookie-cat p { font-size: 12.5px; color: var(--gray-500); margin: 0; line-height: 1.55; }
.cookie-toggle-fixed { font-size: 12px; color: var(--green); font-weight: 700; white-space: nowrap; padding-top: 2px; }
.cookie-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.cookie-switch input { opacity: 0; width: 0; height: 0; }
.cookie-switch span {
    position: absolute; inset: 0; cursor: pointer; background: var(--gray-300, #cbd5e1);
    border-radius: 26px; transition: background .25s;
}
.cookie-switch span::before {
    content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px;
    background: #fff; border-radius: 50%; transition: transform .25s;
}
.cookie-switch input:checked + span { background: var(--cyan); }
.cookie-switch input:checked + span::before { transform: translateX(20px); }
.cookie-modal-btns { margin-top: 22px; text-align: right; }
.cookie-manage-link { cursor: pointer; color: #fff; text-decoration: underline; }

@media (max-width: 600px) {
    .cookie-banner-inner { padding: 16px; }
    .cookie-banner-btns { width: 100%; }
    .cookie-banner-btns .btn { flex: 1 1 auto; text-align: center; }
}

/* Placeholder de contenu tiers en attente de consentement */
.consent-embed { position: relative; }
.consent-ph {
    border: 1px dashed var(--gray-300, #cbd5e1); border-radius: var(--radius, 10px);
    background: var(--off-white); padding: 28px 22px; text-align: center;
}
.consent-ph p { font-size: 13px; color: var(--gray-600); margin: 0 0 14px; line-height: 1.55; }
.consent-ph .btn { font-size: 13px; padding: 9px 18px; }

/* ===== Menu déroulant "Outils" ===== */
.nav-dropdown { position: relative; }
.nav-dropdown-label { padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--gray-600); cursor: default; display: inline-block; user-select: none; }
.nav-dropdown:hover .nav-dropdown-label, .nav-dropdown:focus-within .nav-dropdown-label, .nav-dropdown-label.active { background: var(--cyan-pale); color: var(--cyan); }
.nav-dropdown-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 210px; background: #fff; border: 1px solid var(--gray-200); border-radius: 10px; box-shadow: 0 10px 28px rgba(15,44,74,.14); padding: 6px; margin-top: 4px; list-style: none; z-index: 120; }
.nav-dropdown:hover .nav-dropdown-menu, .nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
.nav-dropdown-menu li { width: 100%; }
.nav-dropdown-menu a { display: block; white-space: nowrap; }
@media (hover: none) and (pointer: coarse), (max-width: 900px) {
  .nav-links.open .nav-dropdown-label { display: block; width: 100%; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-500); padding: 14px 16px 4px; }
  .nav-links.open .nav-dropdown-menu { display: block; position: static; border: none; box-shadow: none; padding: 0; margin: 0; min-width: 0; }
}

/* ===== Annuaire des hôpitaux (recherche) ===== */
.annuaire-search { width:100%; padding:13px 16px; font-size:15px; font-family:var(--body); color:var(--gray-900); background:#fff; border:1px solid var(--gray-200); border-radius:10px; box-sizing:border-box; }
.annuaire-search:focus { outline:none; border-color:var(--cyan); box-shadow:0 0 0 3px rgba(22,104,176,.12); }
.annuaire-count { font-size:13px; color:var(--gray-500); margin:8px 0 20px; }
.annuaire-region { font-family:var(--heading); font-size:18px; font-weight:700; color:var(--gray-900); border-bottom:2px solid var(--cyan); padding-bottom:8px; margin:30px 0 6px; }
.annuaire-prov { font-size:14px; font-weight:700; color:var(--cyan); margin:16px 0 6px; }
.annuaire-item { padding:13px 0; border-bottom:1px solid var(--gray-200); }
.annuaire-item h4 { font-family:var(--heading); font-size:16px; font-weight:700; margin:0 0 3px; color:var(--gray-900); }
.annuaire-item h4 a { color:var(--gray-900); text-decoration:none; }
.annuaire-item h4 a:hover { color:var(--cyan); }
.annuaire-meta { font-size:14px; color:var(--gray-600); line-height:1.55; }
.annuaire-tags { margin-top:6px; display:flex; flex-wrap:wrap; gap:8px 16px; }
.annuaire-tag { font-size:13px; color:var(--cyan); text-decoration:none; }
.annuaire-tag:hover { text-decoration:underline; }
.annuaire-empty { color:var(--gray-500); padding:24px 0; }

/* ===== Bouton WhatsApp flottant ===== */
.wa-float {
    position: fixed;
    right: max(20px, env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
    z-index: 998;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    box-shadow: 0 6px 24px rgba(37, 211, 102, .35), 0 2px 6px rgba(0, 0, 0, .15);
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}
.wa-float:hover, .wa-float:focus-visible {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 10px 30px rgba(37, 211, 102, .45), 0 4px 10px rgba(0, 0, 0, .2);
    outline: none;
}
.wa-float svg { width: 32px; height: 32px; fill: #fff; }
.wa-float::after {
    content: "WhatsApp";
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gray-900);
    color: #fff;
    font-family: var(--body);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
.wa-float:hover::after, .wa-float:focus-visible::after { opacity: 1; }
@media (max-width: 768px) {
    .wa-float { width: 54px; height: 54px; right: 16px; bottom: 16px; }
    .wa-float svg { width: 28px; height: 28px; }
    .wa-float::after { display: none; }
}

/* Bouton WhatsApp inline (pour pages Contact / Dossier médical) */
.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 999px;
    font-family: var(--body);
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn-whatsapp:hover, .btn-whatsapp:focus-visible {
    background: #1ebe5a;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, .35);
    outline: none;
}
.btn-whatsapp svg { width: 20px; height: 20px; fill: #fff; }

/* Justification des textes de contenu */
.article-content p, .article-content li, .callout p, .callout li, .faq-item p, .lex-entry dd, .lex-entry dt, .law-explainer { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }

/* Blocs conditionnels du formulaire (mineur / décédé) — répétables et boutons
   « + Ajouter » sont stylés plus bas dans le bloc FORMULAIRE DE MANDAT */
.form-block { border-top: 1px solid var(--gray-200); margin-top: 18px; padding-top: 18px; }
.form-block-title { font-weight: 700; color: var(--gray-800); margin: 0 0 12px; }

/* Encadré « conditions du forfait » : vraie boîte bordée + puces */
.cond-box { border: 1px solid var(--cyan); border-radius: var(--radius-lg); }
.cond-box ul { list-style: disc; padding-left: 22px; margin: 8px 0 4px; }
.cond-box li { margin-bottom: 6px; }
/* Stepper responsive */
@media (max-width: 700px) { .proc-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 430px) { .proc-steps { grid-template-columns: 1fr; } }

/* ============================================================
   FORMULAIRE DE MANDAT — champs tranchés, autocomplétion, bandeau prix
   (tout est scopé sous .mandat-form pour ne pas toucher au formulaire de contact)
   ============================================================ */
.mandat-form { margin-top: 8px; }

/* --- Champs de saisie homogènes --- */
.mandat-form .form-group { margin-bottom: 18px; }
.mandat-form .form-group label {
    display: block; font-size: 13px; font-weight: 600;
    color: var(--gray-700); margin-bottom: 6px;
}
.mandat-form input:not([type="checkbox"]):not([type="hidden"]):not([type="radio"]),
.mandat-form select,
.mandat-form textarea {
    width: 100%; padding: 12px 14px; font-size: 14px; font-family: var(--body);
    color: var(--gray-900); border: 2px solid var(--gray-300); background: var(--gray-50);
    border-radius: 10px; transition: border-color .15s, background .15s, box-shadow .15s;
    -webkit-appearance: none;
}
.mandat-form select { -webkit-appearance: none; appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235f6f7e' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center; padding-right: 38px;
}
.mandat-form textarea { resize: vertical; min-height: 96px; line-height: 1.6; }
.mandat-form input:not([type="checkbox"]):not([type="radio"]):focus,
.mandat-form select:focus,
.mandat-form textarea:focus {
    outline: none; border-color: var(--cyan); background: var(--white);
    box-shadow: 0 0 0 3px rgba(22,104,176,.16);
}
.mandat-form input::placeholder, .mandat-form textarea::placeholder { color: var(--gray-400); }

/* --- Cartes d'option (mineur / personne décédée) --- */
.option-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.option-card {
    display: flex; align-items: center; gap: 12px; cursor: pointer;
    padding: 14px 16px; background: var(--gray-50);
    border: 2px solid var(--gray-300); border-radius: 12px;
    font-weight: 400; transition: border-color .15s, background .15s, box-shadow .15s;
}
.option-card:hover { border-color: var(--gray-400); }
.option-card input[type="checkbox"], .option-card input[type="radio"] {
    flex: none; width: 20px; height: 20px; margin: 0; cursor: pointer;
    accent-color: var(--cyan);
}
.option-card-text { font-size: 14px; color: var(--gray-800); line-height: 1.4; }
.option-card:has(input:checked) {
    border-color: var(--cyan); background: var(--cyan-pale);
    box-shadow: 0 0 0 3px rgba(22,104,176,.10);
}
.option-card:has(input:checked) .option-card-text strong { color: var(--cyan-dark); }

/* Encarts d'info conditionnels (mineur / décédé) */
.info-conditionnel { margin: 0 0 18px; border-left-color: var(--cyan); }

/* --- Titres de section --- */
.mandat-form .form-block-title {
    font-family: var(--heading); font-size: 17px; font-weight: 700;
    color: var(--gray-900); margin: 0 0 12px; padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-200);
}

/* --- Autocomplétion : liste déroulante flottante nette --- */
.ac-wrap { position: relative; display: block; }
.repeat-row .ac-wrap { flex: 1; }
.ac-menu {
    position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60;
    background: var(--white); border: 2px solid var(--cyan); border-radius: 12px;
    box-shadow: 0 16px 40px rgba(14,44,74,.22); max-height: 280px; overflow-y: auto; padding: 5px;
}
.ac-menu[hidden], .ac-menu:empty { display: none; }
.mandat-form [hidden] { display: none !important; }

/* Focus clavier visible (préserve l'absence d'outline à la souris via :focus-visible) */
:focus-visible { outline: 3px solid rgba(22,104,176,.55); outline-offset: 2px; border-radius: 4px; }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline-offset: 3px; }

/* Skip link : invisible sauf au focus clavier */
.skip-link {
    position: absolute; left: -9999px; top: auto;
    width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
    position: fixed; left: 12px; top: 12px; width: auto; height: auto;
    z-index: 9999; padding: 10px 16px;
    background: var(--cyan); color: #fff; text-decoration: none;
    border-radius: 8px; font-weight: 700;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.ac-item {
    display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--gray-800);
}
.ac-item:hover, .ac-item.active { background: var(--cyan-pale); }
.ac-item-main { font-weight: 500; }
.ac-item-sub { font-size: 12px; color: var(--gray-500); flex-shrink: 0; white-space: nowrap; }

/* --- Hôpital : adresse de l'annuaire (connu) ou saisie libre (inconnu) --- */
.hopital-row { margin-top: 12px; }
.hopital-row:first-child { margin-top: 0; }
.hopital-known {
    display: flex; flex-direction: column; gap: 3px;
    margin: 10px 0 2px; padding: 10px 14px;
    background: var(--cyan-pale); border-left: 4px solid var(--cyan); border-radius: 8px;
}
.hopital-known-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--cyan); }
.hopital-known-text { font-size: 13px; color: var(--gray-700); }
.hopital-unknown {
    margin: 10px 0 2px; padding: 12px 14px;
    background: #fdf6ec; border: 1px solid #f0d3a0; border-left: 4px solid var(--amber);
    border-radius: 8px;
}
.hopital-unknown label { display: block; font-size: 12px; font-weight: 700; color: #a86a08; margin-bottom: 6px; }
.pds-row { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--gray-200); }
.pds-row:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.pds-adresse { margin-top: 8px; }
.pds-adresse .form-group { margin-bottom: 8px; }
.pds-adresse .form-group:last-child { margin-bottom: 0; }

/* --- Boutons « + Ajouter » --- */
.btn-add {
    margin-top: 10px; background: none; border: 1px dashed var(--gray-300); color: var(--cyan);
    border-radius: 10px; padding: 10px 16px; cursor: pointer; font-size: 14px; font-weight: 600;
    transition: background .15s, border-color .15s;
}
.btn-add:hover { background: var(--cyan-pale); border-color: var(--cyan); }

/* --- Champs répétables (lignes hôpital / praticien) --- */
.repeat-row { display: flex; gap: 10px; margin-top: 10px; }
.repeat-row input { flex: 1; }
.repeat-del {
    flex: none; width: 46px; min-height: 44px; align-self: stretch;
    border: 2px solid var(--gray-300); background: var(--white);
    border-radius: 10px; cursor: pointer; font-size: 22px; line-height: 1; color: var(--gray-500);
    transition: background .15s, color .15s, border-color .15s;
}
.repeat-del:hover { background: #fbeaea; color: var(--red); border-color: #e7b7b7; }

/* --- Consentements en bas du formulaire --- */
.consent-list {
    display: flex; flex-direction: column; gap: 4px;
    background: var(--gray-50); border: 1px solid var(--gray-200);
    border-radius: 12px; padding: 8px 16px; margin-bottom: 16px;
}
.consent-item {
    display: flex; align-items: flex-start; gap: 12px; cursor: pointer;
    padding: 12px 0; font-weight: 400; line-height: 1.55;
}
.consent-item + .consent-item { border-top: 1px solid var(--gray-200); }
.consent-item input[type="checkbox"], .consent-item input[type="radio"] {
    flex: none; width: 20px; height: 20px; margin: 2px 0 0; cursor: pointer;
    accent-color: var(--cyan);
}
.consent-item span { font-size: 14px; color: var(--gray-800); }

/* --- Bouton d'envoi --- */
.mandat-submit { width: 100%; text-align: center; margin-top: 14px; padding: 15px 26px; font-size: 16px; }

/* --- Bandeau de prix figé en bas de fenêtre --- */
.prix-bandeau {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
    background: var(--white); border-top: 2px solid var(--cyan);
    box-shadow: 0 -10px 32px rgba(14,44,74,.18);
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
}
.prix-bandeau-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.prix-bandeau-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.prix-bandeau-total { font-size: 13px; color: var(--gray-700); display: flex; align-items: baseline; gap: 6px; }
.prix-bandeau-total strong { color: var(--cyan); font-weight: 800; font-size: 22px; line-height: 1; letter-spacing: -.01em; }
.prix-bandeau-detail { font-size: 11.5px; color: var(--gray-500); }
.prix-bandeau-erreur { font-size: 12px; font-weight: 600; color: var(--red); }
.prix-bandeau #prix-payer { flex: none; padding: 10px 22px; font-size: 14px; }
@media (max-width: 600px) {
    .prix-bandeau-inner { flex-direction: column; align-items: stretch; gap: 8px; }
    .prix-bandeau-total { justify-content: flex-start; }
    .prix-bandeau #prix-payer { width: 100%; }
}
body.has-prix-bandeau { padding-bottom: 80px; }
@media (max-width: 600px) { body.has-prix-bandeau { padding-bottom: 140px; } }

/* --- Cartes d'option : empilées sur mobile --- */
@media (max-width: 560px) { .option-cards { grid-template-columns: 1fr; } }

/* --- Variante 3 colonnes (ex. Genre Homme/Femme/Indéterminé) --- */
.option-cards.option-cards-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 560px) { .option-cards.option-cards-3 { grid-template-columns: 1fr; } }

/* ============================================================ */
/* CORRECTIONS RESPONSIVE & TACTILE MOBILE (audit AG2 mai 2026)  */
/* ============================================================ */

/* Safe-area iOS (encoche) pour la navbar sticky */
@supports (padding: env(safe-area-inset-top)) {
    .navbar {
        padding-top: max(0px, env(safe-area-inset-top));
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
}

/* Menu hamburger : cible tactile 44×44 minimum.
   IMPORTANT : on ne force PAS `display` ici — il reste piloté par les règles
   plus haut (`display: none` par défaut, `display: block` uniquement dans la
   media query tactile). Sinon le bouton apparaîtrait aussi sur PC et,
   au clic, transformerait la nav desktop en panneau flottant avec overlay
   bloquant les clics. */
.mobile-menu {
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

/* Couleur d'accent native sur cases et radios */
input[type="checkbox"], input[type="radio"] { accent-color: var(--cyan); }

/* Cibles tactiles agrandies sur mobile */
@media (max-width: 768px) {
    input[type="checkbox"], input[type="radio"] {
        transform: scale(1.25);
        transform-origin: center;
        margin: 0 4px 0 2px;
    }
    .btn-add { min-height: 44px; }
    .footer-col a { padding: 6px 0; display: inline-block; }
}

/* Interlignage des titres sur très petits écrans (anti-chevauchement) */
@media (max-width: 480px) {
    h1 { line-height: 1.2; }
    h2 { line-height: 1.3; }
}

/* ============================================================
   ANTI-DÉBORDEMENT HORIZONTAL & ANTI-WOBBLE AU PINCH-ZOOM iOS
   ============================================================
   Sur iOS Safari, le pinch-zoom révèle le moindre élément sortant
   du viewport (skip-link / honeypot à left:-9999px, pseudo-éléments
   décoratifs à droites/gauches négatives, etc.) en laissant la page
   « flotter » horizontalement. On combine plusieurs ceintures :
   1) overflow-x:clip sur html et body (n'interfère PAS avec
      position:sticky, contrairement à overflow:hidden qui peut
      créer un containing block dans certains contextes).
   2) Le skip-link et le honeypot passent à une technique
      « visually hidden » qui n'étend PAS la zone scrollable.
   3) Les conteneurs décoratifs (.hero, .page-header) reçoivent
      overflow-x:clip en plus de overflow:hidden, pour bétonner
      le clip des pseudo-éléments à position négative.
   4) Garde-fous : les médias et le contenu d'article ne peuvent
      pas dépasser leur conteneur (objets longs cassables).
   ============================================================ */

/* 1. Verrouillage horizontal au niveau racine.
      On pose le clip sur <html> (élément scrollable racine sur tous
      les navigateurs modernes) PUIS sur <body> en filet de sécurité.
      `overflow-x: clip` est préféré à `hidden` car il ne crée pas
      de containing block et reste 100% compatible avec position:sticky.
      Le fallback `hidden` est conservé pour Safari < 16 (déclaration
      ignorée par les navigateurs qui ne comprennent pas `clip`). */
html { overflow-x: hidden; overflow-x: clip; }
body { overflow-x: hidden; overflow-x: clip; max-width: 100%; }

/* 2. Skip-link : remplacer left:-9999px (étend la zone scrollable
      au pinch-zoom iOS) par la technique « visually hidden » moderne
      qui clippe l'élément à 1px sans affecter le viewport. */
.skip-link {
    position: absolute;
    left: 0; top: 0;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}
/* Au focus, on rétablit la visibilité (override les valeurs ci-dessus). */
.skip-link:focus {
    position: fixed;
    left: 12px; top: 12px;
    width: auto; height: auto;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
    z-index: 9999; padding: 10px 16px;
    background: var(--cyan); color: #fff; text-decoration: none;
    border-radius: 8px; font-weight: 700;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
}

/* 3. Honeypot anti-spam du formulaire : style inline left:-9999px.
      On le neutralise via une règle ciblée (inputs cachés via
      aria-hidden et tabindex=-1 dans les formulaires). Le sélecteur
      est suffisamment spécifique pour battre le style="" inline grâce
      au !important — uniquement sur les propriétés de positionnement. */
form input[aria-hidden="true"][tabindex="-1"] {
    position: absolute !important;
    left: 0 !important; top: 0 !important;
    width: 1px !important; height: 1px !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

/* 4. Conteneurs avec pseudo-éléments décoratifs en position négative :
      on renforce le clip horizontal pour iOS Safari. */
.hero, .page-header { overflow-x: clip; }

/* 5. Garde-fous de contenu : empêcher les chaînes longues
      (URLs, e-mails, codes monospace) de pousser leur parent. */
.article-content, .lex-entry dd, .law-explainer,
.annuaire-item, .annuaire-meta, .annuaire-tag,
.contact-detail, .footer-col, .faq-item p, .callout p {
    overflow-wrap: anywhere;
    word-wrap: break-word;
}

/* 6. Garde-fou supplémentaire : les éléments <code> et la balise NUMAC
      (monospace) doivent pouvoir casser au besoin. */
code, .law-numac { overflow-wrap: anywhere; word-break: break-word; }

/* 7. Sécurité images / médias (déjà max-width:100% sur img global,
      on étend aux iframes éventuelles et vidéos). */
iframe, video, embed, object { max-width: 100%; }

/* 8. Le nettoyage du bandeau prix résiduel : la classe n'est plus
      utilisée dans le HTML mais on s'assure que son padding orphelin
      ne s'applique pas. (Inerte tant que .has-prix-bandeau n'est pas
      ajouté au body, mais on documente l'état.) */
body:not(.has-prix-bandeau) { padding-bottom: 0; }

/* ============================================================
   COMPACITÉ DES CHAMPS DU FORMULAIRE SUR PETIT ÉCRAN
   ============================================================
   Gagne de l'espace vertical visible entre le clavier mobile
   (+ AutoFill bar iOS) et la zone utile. On réduit paddings
   et taille du bouton submit sur ≤ 560px sans toucher au
   layout desktop. */
@media (max-width: 560px) {
    .mandat-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    .mandat-form select,
    .mandat-form textarea {
        padding: 10px 12px;
        font-size: 14px;
    }
    .mandat-form textarea { min-height: 80px; }
    .option-card { padding: 12px 14px; }
    .consent-item { padding: 10px 0; }
    .mandat-submit { padding: 13px 22px; font-size: 15px; }
}
