/* ==========================================================================
   Cabinet Dr Taoussi Sara — Design system
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500&family=Jost:wght@300;400;500;600;700&family=Cairo:wght@400;500;600;700&display=swap');

:root {
  /* Palette — extraite de l'identité visuelle du cabinet (logo, salle d'attente) */
  --cream: #f8f3ea;
  --cream-soft: #f1e9db;
  --paper: #fffdf9;
  --ink: #2c2620;
  --ink-soft: #5a5148;
  --terracotta: #c1673c;
  --terracotta-dark: #a6542e;
  --navy: #1f3a52;
  --navy-dark: #142838;
  --gold: #af8a4e;
  --gold-soft: #d9c194;
  --line: rgba(44, 38, 32, 0.12);
  --shadow: 0 20px 50px -20px rgba(44, 38, 32, 0.25);
  --shadow-soft: 0 10px 30px -15px rgba(44, 38, 32, 0.2);
  --radius: 18px;
  --radius-sm: 10px;
  --font-head: 'Playfair Display', 'Amiri', serif;
  --font-body: 'Jost', 'Cairo', sans-serif;
  --container: 1180px;
}

html[lang="ar"] {
  --font-head: 'Cairo', 'Playfair Display', serif;
  --font-body: 'Cairo', 'Jost', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; margin: 0; line-height: 1.15; }
p { line-height: 1.7; color: var(--ink-soft); margin: 0; }
section { position: relative; }

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

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color .25s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--terracotta); color: #fff; box-shadow: var(--shadow-soft); }
.btn-primary:hover { background: var(--terracotta-dark); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,0.55); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,0.12); }
.btn-outline { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-sm { padding: 10px 18px; font-size: 0.85rem; }

/* ---- Eyebrow / section headers ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 600;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1.5px;
  background: var(--terracotta);
}
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); color: var(--navy); }
.section-head p { margin-top: 16px; font-size: 1.05rem; }

.section-pad { padding: 100px 0; }
.bg-cream { background: var(--cream); }
.bg-navy { background: var(--navy); color: #fff; }
.bg-navy .section-head h2, .bg-navy h3 { color: #fff; }
.bg-navy p { color: rgba(255,255,255,0.75); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background 0.35s ease, padding 0.35s ease, box-shadow .35s ease;
}
.site-header.scrolled {
  background: rgba(248, 243, 234, 0.92);
  backdrop-filter: blur(10px);
  padding: 12px 0;
  box-shadow: 0 8px 24px -18px rgba(0,0,0,0.35);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--cream-soft);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  flex-shrink: 0;
}
.brand-mark img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text .name { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; color: var(--navy); }
.site-header.scrolled .brand-text .name,
.brand-text .name { color: var(--navy); }
.brand-text .role { font-size: 0.72rem; letter-spacing: 0.08em; color: var(--terracotta); text-transform: uppercase; }
.site-header:not(.scrolled) .brand-text .name { color: #fff; }
.site-header:not(.scrolled) .brand-text .role { color: var(--gold-soft); }

.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: #fff;
  position: relative;
  padding-bottom: 4px;
  transition: color .25s ease;
}
.site-header.scrolled .nav-links a { color: var(--ink); }
.nav-links a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--terracotta);
  transform: scaleX(0); transform-origin: right;
  transition: transform .3s ease;
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.header-actions { display: flex; align-items: center; gap: 14px; }
.lang-switch {
  display: flex; border: 1px solid rgba(255,255,255,0.4); border-radius: 100px; padding: 3px;
}
.site-header.scrolled .lang-switch { border-color: var(--line); }
.lang-switch button {
  border: none; background: transparent; padding: 5px 12px; border-radius: 100px;
  font-size: 0.78rem; font-weight: 600; cursor: pointer; color: inherit; opacity: .65;
}
.lang-switch button.active { background: var(--terracotta); color: #fff; opacity: 1; }
.site-header:not(.scrolled) .lang-switch button { color: #fff; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px;
}
.nav-toggle span { width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: all .3s ease; }
.site-header.scrolled .nav-toggle span { background: var(--ink); }

.mobile-panel {
  position: fixed; inset: 0; top: 0; background: var(--navy-dark);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px;
  transform: translateY(-100%); transition: transform .4s ease; z-index: 99;
}
.mobile-panel.open { transform: translateY(0); }
.mobile-panel a { color: #fff; font-size: 1.3rem; font-family: var(--font-head); }
.mobile-panel .btn { margin-top: 10px; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background: linear-gradient(180deg, rgba(20,40,56,0.72), rgba(20,40,56,0.82)), url('../images/bureau-consultation.jpeg') center 35%/cover no-repeat;
  color: #fff;
  padding-top: 100px;
}
.hero .container { position: relative; z-index: 2; }
.hero-content { max-width: 700px; }
.hero-content .eyebrow { color: var(--gold-soft); }
.hero-content .eyebrow::before { background: var(--gold-soft); }
.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 4rem);
  color: #fff;
  margin-bottom: 22px;
}
.hero h1 em { color: var(--gold-soft); font-style: normal; }
.hero-content p { font-size: 1.15rem; color: rgba(255,255,255,0.82); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 36px; }

.hero-badges {
  display: flex; gap: 28px; margin-top: 64px; flex-wrap: wrap;
}
.hero-badge { display: flex; align-items: center; gap: 12px; }
.hero-badge .num { font-family: var(--font-head); font-size: 1.6rem; color: var(--gold-soft); font-weight: 700; }
.hero-badge .label { font-size: 0.8rem; color: rgba(255,255,255,0.75); max-width: 120px; line-height: 1.3; }

.scroll-cue {
  position: absolute; bottom: 34px; inset-inline-start: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.65); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
  z-index: 2;
}
.scroll-cue .dot-track { width: 1px; height: 34px; background: rgba(255,255,255,0.35); position: relative; overflow: hidden; }
.scroll-cue .dot-track::after {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 10px; background: var(--gold-soft);
  animation: scrollcue 1.8s ease-in-out infinite;
}
@keyframes scrollcue { 0% { top: -10px; } 100% { top: 34px; } }

/* ==========================================================================
   Trust strip
   ========================================================================== */
.trust-strip { background: var(--navy-dark); padding: 26px 0; }
.trust-strip .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.trust-item { display: flex; align-items: center; gap: 12px; color: #fff; }
.trust-item .icon { width: 20px; height: 20px; flex-shrink: 0; color: var(--gold-soft); }
.trust-item span { font-size: 0.88rem; color: rgba(255,255,255,0.85); }
.trust-item strong { color: #fff; }

/* ==========================================================================
   Services
   ========================================================================== */
.services-tabs { display: flex; gap: 12px; margin-bottom: 44px; flex-wrap: wrap; }
.tab-btn {
  padding: 12px 26px; border-radius: 100px; border: 1px solid var(--line);
  background: var(--paper); font-family: var(--font-body); font-weight: 500; font-size: 0.92rem;
  cursor: pointer; color: var(--ink-soft); transition: all .25s ease;
}
.tab-btn.active { background: var(--navy); color: #fff; border-color: var(--navy); }

.service-panel { display: none; }
.service-panel.active { display: block; animation: fadein .4s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.service-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px;
}
.service-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); border-color: transparent; }
.service-card .icon-wrap {
  width: 52px; height: 52px; border-radius: 14px; background: var(--cream-soft);
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px; color: var(--terracotta);
}
.service-card .icon-wrap svg { width: 26px; height: 26px; }
.service-card h4 { font-size: 1.08rem; color: var(--navy); margin-bottom: 10px; }
.service-card p { font-size: 0.92rem; }

/* ==========================================================================
   About
   ========================================================================== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.about-media { position: relative; }
.about-media img { border-radius: var(--radius); box-shadow: var(--shadow); }
.about-media .float-card {
  position: absolute; bottom: -30px; inset-inline-end: -30px;
  background: var(--paper); border-radius: var(--radius-sm); box-shadow: var(--shadow);
  padding: 20px 24px; display: flex; align-items: center; gap: 14px; max-width: 260px;
}
.about-media .float-card .num { font-family: var(--font-head); font-size: 1.8rem; color: var(--terracotta); font-weight: 700; }
.about-media .float-card .txt { font-size: 0.8rem; color: var(--ink-soft); line-height: 1.3; }

.credential-list { margin-top: 30px; display: flex; flex-direction: column; gap: 18px; }
.credential-item { display: flex; gap: 16px; align-items: flex-start; }
.credential-item .dot {
  width: 30px; height: 30px; border-radius: 50%; background: var(--cream-soft); color: var(--terracotta);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px;
}
.credential-item .dot svg { width: 16px; height: 16px; }
.credential-item strong { display: block; color: var(--navy); font-size: 0.98rem; margin-bottom: 3px; }
.credential-item span { font-size: 0.9rem; color: var(--ink-soft); }

/* ==========================================================================
   Gallery
   ========================================================================== */
.gallery-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; gap: 16px;
}
.gallery-grid a { border-radius: var(--radius-sm); overflow: hidden; position: relative; display: block; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-grid a:hover img { transform: scale(1.08); }
.gallery-grid a::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(20,40,56,0.55));
  opacity: 0; transition: opacity .3s ease;
}
.gallery-grid a:hover::after { opacity: 1; }
.gallery-grid a span {
  position: absolute; inset-inline-start: 16px; bottom: 14px; color: #fff; font-size: 0.85rem; font-weight: 500;
  opacity: 0; transform: translateY(8px); transition: all .3s ease; z-index: 2;
}
.gallery-grid a:hover span { opacity: 1; transform: translateY(0); }
.gallery-grid a:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.gallery-grid a:nth-child(4) { grid-column: span 2; }

/* ==========================================================================
   Before / After
   ========================================================================== */
.ba-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.ba-card { background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); border: 1px solid var(--line); }
.ba-card img { width: 100%; }
.ba-card .ba-cap { padding: 18px 22px; }
.ba-card .ba-cap strong { color: var(--navy); font-size: 0.95rem; }

/* ==========================================================================
   Testimonials
   ========================================================================== */
.rating-summary {
  display: flex; align-items: center; gap: 22px; background: var(--paper); border-radius: var(--radius);
  padding: 26px 32px; box-shadow: var(--shadow-soft); margin-bottom: 46px; flex-wrap: wrap;
}
.rating-summary .score { font-family: var(--font-head); font-size: 2.6rem; font-weight: 700; color: var(--navy); }
.rating-summary .stars { color: var(--gold); font-size: 1.1rem; letter-spacing: 2px; }
.rating-summary .meta { font-size: 0.85rem; color: var(--ink-soft); }
.rating-summary .g-logo { margin-inline-start: auto; }

.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.testimonial-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; display: flex; flex-direction: column; gap: 18px;
}
.testimonial-card .stars { color: var(--gold); font-size: 0.95rem; letter-spacing: 2px; }
.testimonial-card p { font-size: 0.95rem; color: var(--ink); font-style: italic; }
.testimonial-card .author { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.testimonial-card .avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 600;
}
.testimonial-card .author strong { font-size: 0.88rem; color: var(--navy); }
.testimonial-card .author span { font-size: 0.75rem; color: var(--ink-soft); }

/* ==========================================================================
   Location / Contact
   ========================================================================== */
.location-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.location-map { min-height: 460px; }
.location-map iframe { width: 100%; height: 100%; min-height: 460px; border: 0; filter: grayscale(15%); }
.location-info { background: var(--navy); color: #fff; padding: 52px 46px; display: flex; flex-direction: column; gap: 28px; justify-content: center; }
.location-info h3 { font-size: 1.5rem; }
.info-row { display: flex; gap: 16px; align-items: flex-start; }
.info-row .icon { width: 22px; height: 22px; color: var(--gold-soft); flex-shrink: 0; margin-top: 2px; }
.info-row strong { display: block; font-size: 0.95rem; margin-bottom: 4px; }
.info-row span, .info-row a { font-size: 0.88rem; color: rgba(255,255,255,0.75); }
.info-row a:hover { color: var(--gold-soft); }
.hours-table { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.hours-table div { display: flex; justify-content: space-between; gap: 16px; font-size: 0.85rem; color: rgba(255,255,255,0.75); }
.hours-table strong { color: #fff; font-weight: 500; }
.location-info .btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--navy-dark); color: rgba(255,255,255,0.7); padding: 64px 0 26px; }
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-brand { max-width: 320px; }
.footer-brand .brand-text .name { color: #fff; }
.footer-brand p { margin-top: 16px; font-size: 0.88rem; color: rgba(255,255,255,0.55); }
.footer-cols { display: flex; gap: 60px; flex-wrap: wrap; }
.footer-col h5 { color: #fff; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 18px; font-family: var(--font-body); font-weight: 600; }
.footer-col a, .footer-col span { display: block; font-size: 0.88rem; margin-bottom: 12px; color: rgba(255,255,255,0.6); }
.footer-col a:hover { color: var(--gold-soft); }
.social-row { display: flex; gap: 12px; margin-top: 8px; }
.social-row a {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center; transition: all .25s ease;
}
.social-row a:hover { background: var(--terracotta); border-color: var(--terracotta); }
.social-row svg { width: 16px; height: 16px; }
.footer-bottom { padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.78rem; color: rgba(255,255,255,0.4); }

/* ==========================================================================
   Floating WhatsApp button
   ========================================================================== */
.float-whatsapp {
  position: fixed; bottom: 26px; inset-inline-end: 26px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%; background: #25D366;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 30px -8px rgba(37,211,102,0.6);
  animation: pulse 2.4s ease-in-out infinite;
}
.float-whatsapp svg { width: 28px; height: 28px; color: #fff; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* ==========================================================================
   Reveal on scroll
   ========================================================================== */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
[data-reveal].in-view { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   RTL overrides
   ========================================================================== */
html[dir="rtl"] .lang-switch button.active { }
html[dir="rtl"] .about-media .float-card { inset-inline-end: unset; inset-inline-start: -30px; }
html[dir="rtl"] .rating-summary .g-logo { margin-inline-start: 0; margin-inline-end: auto; }
html[dir="rtl"] .scroll-cue { transform: translateX(50%); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .about-grid, .location-grid { grid-template-columns: 1fr; }
  .location-info { padding: 40px 30px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .gallery-grid a:nth-child(1) { grid-column: span 2; grid-row: span 1; }
  .ba-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .header-actions { gap: 10px; }
  .header-actions > .btn { display: none; }
  .brand-text .role { display: none; }

  .hero-badges { gap: 20px; }
  .trust-strip .container { justify-content: center; text-align: center; }
}

@media (max-width: 640px) {
  .section-pad { padding: 70px 0; }
  .hero { padding-top: 120px; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .rating-summary { flex-direction: column; align-items: flex-start; }
  .rating-summary .g-logo { margin-inline: 0; }
  .footer-top { flex-direction: column; }
  .footer-cols { gap: 36px; }
}
