/* ===========================================================
   Clinique Médicale Joana — feuille de style principale
   Palette médicale : azur + teal santé + ardoise
   =========================================================== */

:root {
  --azur: #0B6FB8;
  --azur-dark: #084d80;
  --azur-soft: #E8F2FA;
  --teal: #15A39A;
  --teal-dark: #0E7B74;
  --ink: #14242F;
  --slate: #45596A;
  --muted: #7C8B98;
  --bg: #ffffff;
  --bg-soft: #F3F8FC;
  --line: #E2EAF1;
  --shadow-sm: 0 2px 10px rgba(16, 42, 67, .06);
  --shadow-md: 0 10px 30px rgba(16, 42, 67, .10);
  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --header-h: 76px;
  --font-head: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--slate);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.2; font-weight: 600; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
section { padding: 84px 0; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }
.eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 600;
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal-dark); background: rgba(21,163,154,.10);
  padding: 6px 14px; border-radius: 100px; margin-bottom: 18px;
}
.section-title { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 14px; }
.section-intro { max-width: 640px; margin: 0 auto 14px; color: var(--slate); font-size: 1.05rem; }
.center .section-intro { margin-inline: auto; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-head); font-weight: 500; font-size: .98rem;
  padding: 13px 26px; border-radius: 100px; cursor: pointer;
  border: 1.5px solid transparent; transition: all .2s ease; white-space: nowrap;
}
.btn-primary { background: var(--azur); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--azur-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--azur); color: var(--azur); }
.btn-light { background: #fff; color: var(--azur-dark); }
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-outline-light:hover { background: rgba(255,255,255,.14); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; min-height: var(--header-h); padding: 6px 0;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-head); font-weight: 600; color: var(--ink); font-size: 1.12rem; }
.brand .logo-mark {
  width: 42px; height: 42px; border-radius: 11px; background: var(--azur);
  color: #fff; display: grid; place-items: center; font-size: 1.35rem; flex: none;
}
.brand small { display: block; font-family: var(--font-head); font-style: italic; font-weight: 400; font-size: .62rem; color: var(--teal); letter-spacing: .01em; line-height: 1.25; max-width: 232px; }
.brand-logo { width: 46px; height: 46px; flex: none; object-fit: contain; border-radius: 10px; background: #fff; padding: 3px; box-shadow: 0 1px 4px rgba(16,42,67,.12); }
.site-footer .brand-logo { box-shadow: none; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  font-family: var(--font-head); font-weight: 500; font-size: .95rem; color: var(--slate);
  padding: 9px 14px; border-radius: 8px; transition: all .15s;
}
.nav-links a:hover { color: var(--azur); background: var(--azur-soft); }
.nav-links a.active { color: var(--azur); }
.nav-cta { margin-left: 10px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; font-size: 1.7rem; color: var(--ink); }

/* ---------- Hero slideshow ---------- */
.hero { position: relative; min-height: calc(100vh - var(--header-h)); display: flex; align-items: center; overflow: hidden; color: #fff; }
.hero-slides { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.4s ease, transform 7s ease; transform: scale(1.06);
}
.hero-slide.is-active { opacity: 1; transform: scale(1.14); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(110deg, rgba(8,77,128,.9) 0%, rgba(9,86,140,.62) 38%, rgba(12,110,150,.4) 68%, rgba(14,123,116,.34) 100%);
}
.hero .container { position: relative; z-index: 2; }
.hero-inner { max-width: 720px; padding: 60px 0; }
.hero .eyebrow { background: rgba(255,255,255,.16); color: #fff; }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 5.2vw, 3.7rem); font-weight: 700; margin-bottom: 20px; }
.hero p { font-size: clamp(1.05rem, 2vw, 1.25rem); color: rgba(255,255,255,.92); max-width: 560px; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-badge { position: absolute; bottom: 26px; right: 24px; z-index: 2; display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); padding: 9px 16px; border-radius: 100px; font-size: .85rem; backdrop-filter: blur(4px); }
.hero-dots { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 9px; }
.hero-dots button { width: 11px; height: 11px; border-radius: 50%; border: none; background: rgba(255,255,255,.45); cursor: pointer; transition: .2s; }
.hero-dots button.is-active { background: #fff; width: 28px; border-radius: 6px; }

/* ---------- Bandeau chiffres / quick facts ---------- */
.facts { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 0; }
.facts .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.fact { padding: 34px 20px; text-align: center; border-right: 1px solid var(--line); }
.fact:last-child { border-right: none; }
.fact i { font-size: 1.7rem; color: var(--teal); }
.fact strong { display: block; font-family: var(--font-head); font-size: 1.5rem; color: var(--ink); margin-top: 6px; }
.fact span { font-size: .92rem; color: var(--muted); }

/* ---------- Cartes ---------- */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; transition: all .25s ease; box-shadow: var(--shadow-sm);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: rgba(11,111,184,.25); }
.card .ic { width: 54px; height: 54px; border-radius: 13px; background: var(--azur-soft); color: var(--azur); display: grid; place-items: center; font-size: 1.5rem; margin-bottom: 18px; }
.card h3 { font-size: 1.22rem; margin-bottom: 9px; }
.card p { font-size: .98rem; }

/* ---------- Section "split" image + texte ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split .media { border-radius: var(--radius); overflow: hidden; min-height: 380px; background: var(--azur-soft) center/cover; box-shadow: var(--shadow-md); }
.split.bg-soft { } /* hook */
.feature-list { list-style: none; margin-top: 22px; display: grid; gap: 14px; }
.feature-list li { display: flex; gap: 12px; align-items: flex-start; }
.feature-list i { color: var(--teal); font-size: 1.2rem; margin-top: 3px; flex: none; }

/* ---------- Équipe ---------- */
.team-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: all .25s; }
.team-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.team-photo { aspect-ratio: 4/5; background: linear-gradient(160deg, var(--azur-soft), #dfeaf3); display: grid; place-items: center; color: var(--azur); position: relative; background-size: cover; background-position: center top; }
.team-photo .ph { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--azur); opacity: .65; }
.team-photo .ph i { font-size: 3rem; }
.team-photo .ph span { font-size: .8rem; }
.team-body { padding: 22px 24px; }
.team-body h3 { font-size: 1.2rem; margin-bottom: 2px; }
.team-role { color: var(--teal-dark); font-weight: 500; font-size: .92rem; font-family: var(--font-head); margin-bottom: 10px; }
.team-tag { display: inline-block; font-size: .75rem; background: var(--azur-soft); color: var(--azur-dark); padding: 3px 11px; border-radius: 100px; margin: 0 5px 6px 0; }

/* ---------- Vidéo ---------- */
.video-band { background: var(--ink); color: #fff; }
.video-band .section-title, .video-band h2 { color: #fff; }
.video-frame { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: #0c1820 center/cover; display: grid; place-items: center; box-shadow: var(--shadow-md); border: 1px solid rgba(255,255,255,.1); }
.video-frame .play { width: 84px; height: 84px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--azur); display: grid; place-items: center; font-size: 2rem; cursor: pointer; transition: .2s; }
.video-frame .play:hover { transform: scale(1.08); }
.video-frame .vlabel { position: absolute; bottom: 16px; left: 18px; font-size: .82rem; color: rgba(255,255,255,.8); }

/* ---------- CTA bande ---------- */
.cta-band { background: linear-gradient(120deg, var(--azur-dark), var(--azur) 60%, var(--teal-dark)); color: #fff; border-radius: var(--radius); padding: 56px 48px; text-align: center; }
.cta-band h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 12px; }
.cta-band p { color: rgba(255,255,255,.9); max-width: 540px; margin: 0 auto 26px; }

/* ---------- Formulaires ---------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 18px; }
.field label { display: block; font-family: var(--font-head); font-weight: 500; font-size: .9rem; color: var(--ink); margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  padding: 13px 15px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--azur); box-shadow: 0 0 0 3px rgba(11,111,184,.12); }
.field textarea { min-height: 130px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-note { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.form-success { display: none; background: rgba(21,163,154,.10); border: 1px solid rgba(21,163,154,.35); color: var(--teal-dark); padding: 14px 18px; border-radius: var(--radius-sm); margin-top: 14px; font-size: .95rem; }
.form-success.show { display: block; }

/* ---------- Mur de suggestions ---------- */
.wall { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 14px; }
.note-card { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: var(--radius-sm); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.note-card p { font-size: .97rem; color: var(--slate); font-style: italic; }
.note-card .who { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.note-card .who .av { width: 36px; height: 36px; border-radius: 50%; background: var(--azur-soft); color: var(--azur-dark); display: grid; place-items: center; font-family: var(--font-head); font-weight: 600; font-size: .85rem; }
.note-card .who b { font-family: var(--font-head); font-weight: 500; font-size: .9rem; color: var(--ink); }
.note-card .who span { font-size: .78rem; color: var(--muted); }

/* ---------- Page header (intérieur) ---------- */
.page-hero { background: linear-gradient(120deg, var(--azur-dark), var(--azur)); color: #fff; padding: 64px 0; text-align: center; position: relative; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 2.9rem); margin-bottom: 10px; }
.page-hero p { color: rgba(255,255,255,.9); max-width: 600px; margin: 0 auto; }
.breadcrumb { font-size: .85rem; color: rgba(255,255,255,.75); margin-bottom: 16px; }
.breadcrumb a:hover { color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.72); padding: 60px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 36px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.site-footer .brand { color: #fff; margin-bottom: 14px; }
.site-footer .brand small { color: rgba(255,255,255,.55); }
.footer-links { list-style: none; display: grid; gap: 9px; }
.footer-links a { font-size: .92rem; transition: color .15s; }
.footer-links a:hover { color: #fff; }
.foot-contact li { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; margin-bottom: 10px; }
.foot-contact i { color: var(--teal); margin-top: 3px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .85rem; color: rgba(255,255,255,.5); }
.placeholder-pill { display: inline-block; font-size: .7rem; background: rgba(255,200,80,.18); color: #ffd27a; padding: 1px 9px; border-radius: 100px; }

/* ---------- Reveal au scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Galerie partenariat ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.g-item { padding: 0; border: none; background: none; cursor: pointer; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm); }
.g-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; transition: transform .35s ease; }
.g-item:hover img { transform: scale(1.07); }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(8,20,28,.92); display: none; align-items: center; justify-content: center; padding: 24px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92%; max-height: 88%; border-radius: var(--radius-sm); box-shadow: var(--shadow-md); }
.video-embed { width: min(92vw, 960px); aspect-ratio: 16/9; }
.video-embed iframe { width: 100%; height: 100%; border: 0; border-radius: var(--radius-sm); box-shadow: var(--shadow-md); }
.lb-close { position: absolute; top: 18px; right: 22px; width: 46px; height: 46px; border-radius: 50%; border: none; background: rgba(255,255,255,.16); color: #fff; font-size: 1.3rem; cursor: pointer; transition: background .2s; }
.lb-close:hover { background: rgba(255,255,255,.3); }

/* ---------- Actualités ---------- */
.actu { display: grid; gap: 22px; max-width: 760px; margin: 0 auto; }
.actu-item .date { color: var(--teal-dark); font-family: var(--font-head); font-weight: 500; font-size: .85rem; margin-bottom: 4px; }
.actu-item h3 { font-size: 1.25rem; margin-bottom: 6px; }
.actu-item img { width: 100%; border-radius: var(--radius-sm); margin: 14px 0; }

/* ---------- Accents colorés (plus de couleur, ton pro) ---------- */
:root { --green: #2f9e44; --green-soft: #e7f6ec; --amber: #c97e0c; --amber-soft: #fbf0db; --coral: #e0560f; --coral-soft: #fbe9df; }
.grid-3 .card:nth-child(6n+1) .ic { background: var(--azur-soft); color: var(--azur); }
.grid-3 .card:nth-child(6n+2) .ic { background: var(--green-soft); color: var(--green); }
.grid-3 .card:nth-child(6n+3) .ic { background: #e1f5ee; color: var(--teal-dark); }
.grid-3 .card:nth-child(6n+4) .ic { background: var(--amber-soft); color: var(--amber); }
.grid-3 .card:nth-child(6n+5) .ic { background: var(--coral-soft); color: var(--coral); }
.grid-3 .card:nth-child(6n+6) .ic { background: var(--azur-soft); color: var(--azur); }
.facts .fact:nth-child(2) i { color: var(--coral); }
.facts .fact:nth-child(3) i { color: var(--green); }
.facts .fact:nth-child(4) i { color: var(--amber); }

/* ---------- Transitions de thème ---------- */
body, .site-header, .card, .team-card, .form-card, .note-card,
.field input, .field textarea, .field select { transition: background-color .25s ease, color .25s ease, border-color .25s ease; }

/* ---------- Bouton thème (injecté en JS) ---------- */
.theme-toggle { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: none; cursor: pointer; font-family: var(--font-head); font-weight: 500; font-size: .95rem; color: var(--slate); padding: 9px 14px; border-radius: 8px; transition: background .15s, color .15s; }
.theme-toggle:hover { background: var(--azur-soft); color: var(--azur); }
.theme-toggle i { font-size: 1.1rem; }
.theme-toggle .tt-label { display: none; }
@media (max-width: 720px) {
  .theme-toggle { width: 100%; justify-content: flex-start; padding: 13px 12px; }
  .theme-toggle .tt-label { display: inline; }
}

/* ---------- Mode sombre ---------- */
html[data-theme="dark"] {
  --azur-soft: rgba(11,111,184,.22);
  --green-soft: rgba(47,158,68,.20);
  --amber-soft: rgba(201,126,12,.20);
  --coral-soft: rgba(224,86,15,.20);
  --ink: #eef3f8;
  --slate: #b9c4cf;
  --muted: #8593a0;
  --bg: #0e1820;
  --bg-soft: #15212c;
  --line: rgba(255,255,255,.10);
  --shadow-sm: 0 2px 10px rgba(0,0,0,.45);
  --shadow-md: 0 12px 32px rgba(0,0,0,.55);
}
html[data-theme="dark"] .site-header { background: rgba(14,24,32,.90); }
html[data-theme="dark"] .card,
html[data-theme="dark"] .team-card,
html[data-theme="dark"] .form-card,
html[data-theme="dark"] .note-card { background: #18242f; }
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .field select { background: #101c26; color: var(--ink); }
html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .video-band { background: #0a131a; }
html[data-theme="dark"] .grid-3 .card:nth-child(6n+3) .ic { background: rgba(21,163,154,.22); }
html[data-theme="dark"] .eyebrow { color: #54d4ca; }
html[data-theme="dark"] .team-role { color: #54d4ca; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split .media { min-height: 280px; }
  .wall { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .facts .container { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(2) { border-right: none; }
}
@media (max-width: 720px) {
  section { padding: 60px 0; }
  .nav-links {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 14px 18px; gap: 2px;
    box-shadow: var(--shadow-md); display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 12px; border-radius: 8px; }
  .nav-cta { margin: 8px 0 0; }
  .nav-toggle { display: block; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .wall { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 40px 24px; }
  .hero-badge { display: none; }
}
