/* ============================================================
   Labo Anapath Alger — Feuille de style
   Palette : bleu médical / teal, blanc, gris doux
   ============================================================ */
:root {
    --primary: #0e7490;
    --primary-dark: #155e75;
    --primary-deep: #0b3c50;
    --accent: #14b8a6;
    --text: #1e293b;
    --text-light: #64748b;
    --bg: #ffffff;
    --bg-alt: #f1f5f9;
    --border: #e2e8f0;
    --radius: 14px;
    --shadow: 0 8px 30px rgba(15, 42, 67, .08);
    --shadow-hover: 0 14px 40px rgba(15, 42, 67, .14);
    --header-h: 76px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

[dir="rtl"] body, [dir="rtl"] {
    font-family: 'Cairo', 'Inter', 'Segoe UI', system-ui, sans-serif;
    letter-spacing: 0 !important;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
ul { list-style: none; }

.container {
    width: 100%;
    max-width: 1180px;
    margin-inline: auto;
    padding-inline: 22px;
}

.skip-link {
    position: absolute;
    inset-inline-start: -9999px;
    top: 0;
    background: var(--primary-deep);
    color: #fff;
    padding: 10px 18px;
    z-index: 999;
}
.skip-link:focus { inset-inline-start: 10px; top: 10px; }

/* ---------- Boutons ---------- */
.btn {
    display: inline-block;
    padding: 13px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: .98rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all .25s ease;
    text-align: center;
}
.btn-primary {
    background: var(--primary);
    color: #fff !important;
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(14, 116, 144, .35);
}
.btn-outline {
    border-color: var(--primary);
    color: var(--primary);
    background: transparent;
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-light {
    background: #fff;
    color: var(--primary-deep) !important;
}
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.2); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    height: var(--header-h);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    height: var(--header-h);
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-deep);
    flex-shrink: 0;
}
.brand-logo { color: var(--primary); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1.08rem; font-weight: 800; }
.brand-text small { font-size: .72rem; color: var(--text-light); font-weight: 500; }

.main-nav ul { display: flex; gap: 6px; }
.main-nav a {
    display: block;
    padding: 9px 14px;
    border-radius: 8px;
    color: var(--text);
    font-weight: 500;
    font-size: .95rem;
    transition: background .2s, color .2s;
}
.main-nav a:hover { background: var(--bg-alt); color: var(--primary); }
.main-nav a.active { color: var(--primary); font-weight: 700; position: relative; }
.main-nav a.active::after {
    content: '';
    position: absolute;
    inset-inline: 14px;
    bottom: 3px;
    height: 3px;
    border-radius: 3px;
    background: var(--accent);
}

.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.btn-header { padding: 10px 20px; font-size: .88rem; }

.lang-switcher {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 50px;
    overflow: hidden;
    background: #fff;
}
.lang-switcher a {
    padding: 7px 13px;
    font-size: .82rem;
    font-weight: 700;
    color: var(--text-light);
    transition: all .2s;
}
.lang-switcher a:hover { color: var(--primary); }
.lang-switcher a.active { background: var(--primary); color: #fff; }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    padding: 10px;
}
.nav-toggle span {
    display: block;
    height: 2.5px;
    width: 100%;
    background: var(--primary-deep);
    border-radius: 2px;
    transition: transform .3s, opacity .3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(160deg, #f0f9fb 0%, #fff 60%);
    padding: 64px 0 72px;
    overflow: hidden;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 52px;
    align-items: center;
}
.hero-badge {
    display: inline-block;
    background: rgba(20, 184, 166, .12);
    color: var(--primary-dark);
    font-weight: 600;
    font-size: .82rem;
    padding: 7px 16px;
    border-radius: 50px;
    margin-bottom: 20px;
    border: 1px solid rgba(20, 184, 166, .3);
}
.hero h1 {
    font-size: clamp(1.9rem, 4vw, 2.9rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--primary-deep);
    margin-bottom: 18px;
}
.hero-subtitle {
    font-size: 1.08rem;
    color: var(--text-light);
    max-width: 520px;
    margin-bottom: 30px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-media img {
    border-radius: 22px;
    box-shadow: var(--shadow-hover);
    object-fit: cover;
    aspect-ratio: 16 / 9.5;
    width: 100%;
}

/* ---------- Trust / cartes ---------- */
.trust-section { margin-top: -34px; position: relative; z-index: 5; }
.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.trust-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px 22px;
    box-shadow: var(--shadow);
    transition: transform .25s, box-shadow .25s;
}
.trust-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.trust-icon {
    width: 50px; height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
}
.trust-card h2, .trust-card h3 { font-size: 1.02rem; font-weight: 700; margin-bottom: 8px; color: var(--primary-deep); }
.trust-card p { font-size: .9rem; color: var(--text-light); line-height: 1.55; }

/* ---------- Sections ---------- */
.section { padding: 76px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head h2 {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 800;
    color: var(--primary-deep);
    margin-bottom: 12px;
}
.section-head p { color: var(--text-light); font-size: 1.02rem; }

.page-hero {
    background: linear-gradient(135deg, var(--primary-deep), var(--primary) 70%, var(--accent));
    color: #fff;
    padding: 66px 0;
    text-align: center;
}
.page-hero h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; margin-bottom: 12px; }
.page-hero p { opacity: .92; max-width: 620px; margin: 0 auto; }

/* ---------- Services ---------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.service-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    box-shadow: var(--shadow);
    transition: transform .25s, box-shadow .25s;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.service-icon {
    width: 60px; height: 60px;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
}
.service-card h3 { font-size: 1.16rem; font-weight: 700; color: var(--primary-deep); margin-bottom: 10px; }
.service-card p { color: var(--text-light); font-size: .95rem; margin-bottom: 16px; }
.card-link { font-weight: 600; font-size: .92rem; }
.card-link span { display: inline-block; transition: transform .2s; }
.card-link:hover span { transform: translateX(4px); }
[dir="rtl"] .card-link span { transform: scaleX(-1); }
[dir="rtl"] .card-link:hover span { transform: scaleX(-1) translateX(4px); }

.services-detail { display: flex; flex-direction: column; gap: 26px; }
.service-detail-card {
    display: flex;
    gap: 26px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 34px;
    box-shadow: var(--shadow);
    align-items: flex-start;
}
.service-detail-icon {
    flex-shrink: 0;
    width: 74px; height: 74px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
}
.service-detail-body h2 { font-size: 1.3rem; font-weight: 700; color: var(--primary-deep); margin-bottom: 10px; }
.service-detail-body > p { color: var(--text-light); margin-bottom: 16px; }
.services-note {
    text-align: center;
    background: var(--bg-alt);
    border-radius: var(--radius);
    padding: 34px 26px;
}
.services-note p { color: var(--text-light); margin-bottom: 16px; }

/* ---------- Check list ---------- */
.check-list li {
    position: relative;
    padding-inline-start: 30px;
    margin-bottom: 10px;
    color: var(--text);
    font-size: .95rem;
}
.check-list li::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: 4px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--accent);
    -webkit-mask: none;
}
.check-list li::after {
    content: '';
    position: absolute;
    inset-inline-start: 5px;
    top: 9px;
    width: 8px; height: 4.5px;
    border-inline-start: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg);
}
[dir="rtl"] .check-list li::after { transform: rotate(45deg); border-inline-start: none; border-inline-end: 2px solid #fff; }

/* ---------- Split (image + texte) ---------- */
.split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 52px;
    align-items: center;
}
.split-media img { border-radius: 20px; box-shadow: var(--shadow-hover); }
.split-content h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 800; color: var(--primary-deep); margin-bottom: 16px; }
.split-content p { color: var(--text-light); margin-bottom: 18px; }
.split-content .check-list { margin-bottom: 24px; }
.split-content .btn { margin-top: 6px; }
.lead { font-size: 1.1rem; }

/* ---------- Étapes / timeline ---------- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    counter-reset: step;
}
.step-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 22px;
    box-shadow: var(--shadow);
    position: relative;
}
.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 16px;
}
.step-card h3 { font-size: 1.02rem; font-weight: 700; color: var(--primary-deep); margin-bottom: 8px; }
.step-card p { font-size: .88rem; color: var(--text-light); line-height: 1.55; }

.timeline { max-width: 760px; margin: 0 auto; position: relative; }
.timeline::before {
    content: '';
    position: absolute;
    inset-inline-start: 27px;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 3px;
    background: linear-gradient(var(--primary), var(--accent));
}
.timeline-item {
    position: relative;
    padding-inline-start: 82px;
    padding-bottom: 44px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker {
    position: absolute;
    inset-inline-start: 0;
    top: 0;
}
.timeline-marker span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px; height: 56px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--primary);
    color: var(--primary-deep);
    font-weight: 800;
    font-size: 1.25rem;
    box-shadow: var(--shadow);
}
.timeline-content {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px 28px;
    box-shadow: var(--shadow);
}
.timeline-content h2 { font-size: 1.2rem; font-weight: 700; color: var(--primary-deep); margin-bottom: 8px; }
.timeline-content p { color: var(--text-light); font-size: .96rem; }

.info-note {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    max-width: 760px;
    margin: 48px auto 0;
    background: rgba(20, 184, 166, .09);
    border: 1px solid rgba(20, 184, 166, .35);
    border-radius: var(--radius);
    padding: 22px 26px;
    color: var(--primary-deep);
}
.info-note svg { flex-shrink: 0; color: var(--accent); margin-top: 3px; }
.info-note p { color: var(--text-light); font-size: .94rem; margin-top: 4px; }
.center-cta { text-align: center; margin-top: 44px; }

/* ---------- CTA band ---------- */
.cta-band {
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 76px 0;
    text-align: center;
}
.cta-inner h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; margin-bottom: 14px; }
.cta-inner p { max-width: 560px; margin: 0 auto 28px; opacity: .93; }

/* ---------- Contact ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 44px;
    align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 18px; }
.contact-item {
    display: flex;
    gap: 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}
.contact-icon {
    flex-shrink: 0;
    width: 46px; height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
}
.contact-item h2 { font-size: 1rem; font-weight: 700; color: var(--primary-deep); margin-bottom: 4px; }
.contact-item p { color: var(--text-light); font-size: .93rem; }

.contact-form-wrap {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 34px;
    box-shadow: var(--shadow);
}
.contact-form-wrap h2 { font-size: 1.3rem; font-weight: 800; color: var(--primary-deep); margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--text); }
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: .95rem;
    color: var(--text);
    background: #fbfdff;
    transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 116, 144, .14);
}
.hp-field { position: absolute; inset-inline-start: -9999px; height: 0; overflow: hidden; }

.alert {
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 18px;
    font-size: .93rem;
    font-weight: 500;
}
.alert-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

.map-embed {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-hover);
    border: 1px solid var(--border);
}
.map-embed iframe { display: block; width: 100%; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--primary-deep);
    color: #cbd5e1;
    margin-top: 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
    gap: 38px;
    padding: 62px 22px 44px;
}
.brand-footer { color: #fff; margin-bottom: 16px; }
.brand-footer .brand-text small { color: #94a3b8; }
.footer-brand p { font-size: .9rem; color: #94a3b8; line-height: 1.6; }
.footer-col h3 {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(20, 184, 166, .5);
    display: inline-block;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { color: #cbd5e1; font-size: .92rem; transition: color .2s; }
.footer-col ul a:hover { color: var(--accent); }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.footer-contact svg { flex-shrink: 0; color: var(--accent); margin-top: 4px; }
.footer-contact a { color: #cbd5e1; }
.footer-contact a:hover { color: var(--accent); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 18px 0;
    text-align: center;
    font-size: .85rem;
    color: #94a3b8;
}

/* ---------- WhatsApp flottant ---------- */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    inset-inline-end: 24px;
    width: 56px; height: 56px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(37, 211, 102, .45);
    z-index: 90;
    transition: transform .25s, box-shadow .25s;
}
.whatsapp-float:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 26px rgba(37, 211, 102, .6);
    color: #fff;
}

/* ---------- Galerie photos ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    aspect-ratio: 4 / 3;
    background: #fff;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item:first-child {
    grid-column: span 2;
    aspect-ratio: 2.9 / 1;
    align-self: center;
}

/* ---------- Mini-carte footer ---------- */
.footer-map {
    display: block;
    margin-top: 16px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.15);
    transition: border-color .25s, box-shadow .25s;
}
.footer-map:hover {
    border-color: var(--accent);
    box-shadow: 0 6px 20px rgba(20, 184, 166, .25);
}
.footer-map iframe { display: block; width: 100%; }
.footer-map-label {
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(20, 184, 166, .14);
    color: var(--accent);
    font-size: .83rem;
    font-weight: 600;
    padding: 9px 13px;
}

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: 110px 0; }
.error-page h1 { font-size: 5rem; font-weight: 800; color: var(--primary); margin-bottom: 14px; }
.error-page p { color: var(--text-light); margin-bottom: 26px; font-size: 1.1rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .trust-grid { grid-template-columns: repeat(2, 1fr); }
    .steps-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
    .btn-header { display: none; }
}

@media (max-width: 860px) {
    .hero-grid { grid-template-columns: 1fr; gap: 36px; }
    .hero { padding: 44px 0 60px; }
    .hero-subtitle { max-width: none; }
    .services-grid { grid-template-columns: 1fr; }
    .split-grid { grid-template-columns: 1fr; gap: 30px; }
    .split-media { order: -1; }
    .contact-grid { grid-template-columns: 1fr; gap: 30px; }
    .service-detail-card { flex-direction: column; }

    /* Menu mobile */
    .nav-toggle { display: flex; }
    .main-nav {
        position: fixed;
        top: var(--header-h);
        inset-inline: 0;
        background: #fff;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-hover);
        padding: 14px 22px 22px;
        transform: translateY(-130%);
        transition: transform .35s ease;
        z-index: 99;
    }
    .main-nav.open { transform: translateY(0); }
    .main-nav ul { flex-direction: column; gap: 4px; }
    .main-nav a { padding: 13px 14px; font-size: 1rem; }
    .main-nav a.active::after { display: none; }
    .main-nav a.active { background: var(--bg-alt); }
}

@media (max-width: 560px) {
    .trust-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-item:first-child { grid-column: span 2; }
    .form-row { grid-template-columns: 1fr; }
    .section { padding: 54px 0; }
    .hero-actions .btn { width: 100%; }
    .brand-text small { display: none; }
    .timeline::before { inset-inline-start: 21px; }
    .timeline-marker span { width: 45px; height: 45px; font-size: 1.05rem; }
    .timeline-item { padding-inline-start: 64px; }
}

/* Accessibilité : réduire les animations */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
    html { scroll-behavior: auto; }
}
