/* ═══════════════════════════════════════════
   SMA Advisory — Shared Stylesheet
   ═══════════════════════════════════════════ */

:root {
  --sand: #E8DCC8;
  --sand-light: #F3EDE2;
  --sand-pale: #FAF7F2;
  --gold-muted: #C9A84C;
  --gold-dark: #B8922E;
  --brown-deep: #3D2B1F;
  --brown-warm: #5C3D2E;
  --charcoal: #0D1F33;
  --charcoal-soft: #1A3A5C;
  --green-dark: #4A7A5C;
  --green-muted: #A0C4A8;
  --cream: #FDFBF7;
  --text-primary: #0D1F33;
  --text-secondary: #4A5568;
  --text-muted: #8A8275;
  --border-light: rgba(201, 168, 76, 0.15);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  background-color: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.serif { font-family: 'Playfair Display', Georgia, serif; }

/* ── Navigation ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.4s ease;
  background: rgba(13, 31, 51, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
nav.scrolled {
  background: rgba(13, 31, 51, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(201, 168, 76, 0.2);
  padding: 0.85rem 2rem;
}
.nav-logo { text-decoration: none; display: flex; align-items: center; }
.nav-logo svg { height: 110px; width: auto; }

.nav-links { display: flex; gap: 2.5rem; list-style: none; align-items: center; }
.nav-links a {
  color: rgba(232, 220, 200, 0.7);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}
.nav-links a:hover, .nav-links a.nav-active { color: var(--gold-muted); }

.nav-cta {
  padding: 0.55rem 1.4rem;
  border: 1px solid var(--gold-muted);
  color: var(--gold-muted) !important;
  transition: all 0.3s ease !important;
}
.nav-cta:hover { background: var(--gold-muted); color: var(--charcoal) !important; }

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.mobile-toggle span {
  display: block; width: 24px; height: 1.5px;
  background: var(--sand-light);
  transition: all 0.3s ease;
}

/* ── Language Switcher ── */
.lang-switcher { display: flex; gap: 0.4rem; margin-left: 1.5rem; align-items: center; }
.lang-switcher button {
  background: none;
  border: 1px solid rgba(201, 168, 76, 0.3);
  color: rgba(232, 220, 200, 0.5);
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.55rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}
.lang-switcher button:hover { color: var(--gold-muted); border-color: var(--gold-muted); }
.lang-switcher button.active { background: var(--gold-muted); color: var(--charcoal); border-color: var(--gold-muted); }

/* ── Page Header (for inner pages) ── */
.page-header {
  padding: 9rem 2rem 5rem;
  background: linear-gradient(165deg, rgba(13,31,51,0.97) 0%, rgba(26,58,92,0.95) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(196,162,101,0.07), transparent);
}
.page-header-content { position: relative; z-index: 2; }
.page-header .section-label { color: var(--gold-muted); }
.page-header .section-title { color: var(--sand-light); margin-bottom: 1rem; }
.page-header p { color: rgba(232,220,200,0.6); font-size: 1rem; max-width: 600px; margin: 0 auto; }

/* ── RTL Support ── */
html[dir="rtl"] body { direction: rtl; text-align: right; }
html[dir="rtl"] .hero-content { text-align: center; }
html[dir="rtl"] .about-text p:first-of-type::first-letter { float: right; margin-right: 0; margin-left: 0.5rem; }
html[dir="rtl"] .about-aside { border-left: none; border-right: 2px solid var(--gold-muted); }
html[dir="rtl"] .btn-secondary { margin-left: 0; margin-right: 1rem; }
html[dir="rtl"] .contact-form button { align-self: flex-end; }
html[dir="rtl"] .diff-item { text-align: right; }
html[dir="rtl"] nav { direction: ltr; }
html[dir="rtl"] .nav-links { direction: ltr; }

/* ── Section Shared ── */
section { padding: 7rem 2rem; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-label {
  font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold-dark); margin-bottom: 1rem;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 400; line-height: 1.25;
  color: var(--charcoal); margin-bottom: 1.5rem;
}
.section-divider {
  width: 50px; height: 1px;
  background: var(--gold-muted);
  margin-bottom: 2rem;
}

/* ── Hero Section ── */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  position: relative; overflow: hidden;
  background:
    linear-gradient(165deg, rgba(253,251,247,0.88) 0%, rgba(243,237,226,0.85) 50%, rgba(232,220,200,0.82) 100%),
    url('https://images.unsplash.com/photo-1509316785289-025f5b846b35?w=1800&fit=crop&q=70') center/cover no-repeat;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 75% 40%, rgba(196,162,101,0.08), transparent),
    radial-gradient(ellipse 50% 80% at 20% 80%, rgba(61,43,31,0.04), transparent);
}
.hero::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 40%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23C4A265' fill-opacity='0.06' d='M0,224L48,213.3C96,203,192,181,288,186.7C384,192,480,224,576,234.7C672,245,768,235,864,208C960,181,1056,139,1152,138.7C1248,139,1344,181,1392,202.7L1440,224L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") no-repeat bottom center;
  background-size: cover;
}
.hero-geo {
  position: absolute; top: 10%; right: 5%;
  width: 300px; height: 300px; opacity: 0.035;
}
.hero-geo svg { width: 100%; height: 100%; }
.hero-content {
  position: relative; z-index: 2;
  max-width: 820px; padding: 0 2rem;
  margin: 0 auto; text-align: center;
}
.hero-logo {
  margin: 0 auto 2.5rem;
  max-width: 460px;
  width: 100%;
  display: flex;
  justify-content: center;
}
.hero-logo svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 14px rgba(184, 146, 46, 0.18));
}

.hero-eyebrow {
  font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--gold-dark); margin-bottom: 2rem;
  display: flex; align-items: center; justify-content: center; gap: 1rem;
}
.hero-eyebrow::before, .hero-eyebrow::after {
  content: ''; width: 40px; height: 1px; background: var(--gold-muted);
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 400; line-height: 1.2;
  color: var(--charcoal); margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}
.hero h1 em { font-style: italic; color: var(--brown-warm); }
.hero-sub {
  font-size: 1.05rem; color: var(--text-secondary);
  max-width: 580px; margin: 0 auto 2.5rem;
  line-height: 1.8; font-weight: 300;
}
.btn-primary {
  display: inline-block; padding: 0.9rem 2.5rem;
  background: var(--charcoal); color: var(--cream);
  text-decoration: none; font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  transition: all 0.4s ease; border: 1px solid var(--charcoal);
}
.btn-primary:hover { background: transparent; color: var(--charcoal); }
.btn-secondary {
  display: inline-block; padding: 0.9rem 2.5rem;
  background: transparent; color: var(--charcoal);
  text-decoration: none; font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  border: 1px solid var(--gold-muted); transition: all 0.4s ease;
  margin-left: 1rem;
}
.btn-secondary:hover { border-color: var(--charcoal); }

/* ── About Section ── */
.about {
  background:
    linear-gradient(rgba(253,251,247,0.93), rgba(253,251,247,0.93)),
    url('https://images.unsplash.com/photo-1610375461246-83df859d849d?w=1800&fit=crop&q=70') center/cover no-repeat;
  position: relative;
}
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }
.about-text p { color: var(--text-secondary); margin-bottom: 1.5rem; font-size: 0.98rem; line-height: 1.85; }
.about-text p:first-of-type::first-letter {
  font-family: 'Playfair Display', serif;
  font-size: 3.2rem; float: left; line-height: 1;
  margin-right: 0.5rem; margin-top: 0.1rem; color: var(--gold-dark);
}
.about-aside { padding: 2.5rem; border-left: 2px solid var(--gold-muted); background: var(--sand-pale); }
.about-aside blockquote {
  font-family: 'Playfair Display', serif;
  font-style: italic; font-size: 1.2rem; line-height: 1.7;
  color: var(--brown-warm); margin-bottom: 1.5rem;
}
.about-aside cite {
  font-family: 'Inter', sans-serif; font-style: normal;
  font-size: 0.75rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-muted);
}

/* ── Services Section ── */
.services {
  background:
    linear-gradient(rgba(26,26,26,0.88), rgba(26,26,26,0.88)),
    url('https://images.unsplash.com/photo-1497436072909-60f360fe1ce9?w=1800&fit=crop&q=70') center/cover no-repeat;
  color: var(--sand-light); position: relative; overflow: hidden;
}
.services::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 20%, rgba(196,162,101,0.06), transparent 70%);
}
.services .section-label { color: var(--gold-muted); }
.services .section-title { color: var(--sand-light); }
.services-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1px; background: rgba(196,162,101,0.1);
  position: relative; z-index: 1; margin-top: 3rem;
}
.service-card { background: var(--charcoal); padding: 2.5rem; transition: background 0.4s ease; }
.service-card:hover { background: var(--charcoal-soft); }
.service-num { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.1em; color: var(--gold-muted); margin-bottom: 1.2rem; }
.service-card h3 { font-family: 'Playfair Display', serif; font-size: 1.25rem; font-weight: 400; color: var(--sand); margin-bottom: 1rem; }
.service-card p { font-size: 0.88rem; color: rgba(232,220,200,0.6); line-height: 1.75; }

/* ── Differentiation Section ── */
.differentiators { background: var(--sand-pale); position: relative; }
.diff-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; margin-top: 3rem; }
.diff-item { padding: 2rem 1.5rem; border-top: 2px solid var(--gold-muted); transition: border-color 0.3s ease; }
.diff-item:hover { border-color: var(--charcoal); }
.diff-item h4 { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 400; margin-bottom: 0.8rem; color: var(--charcoal); }
.diff-item p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.75; }

/* ── Publications / Nos Travaux ── */
.publications { background: var(--cream); position: relative; }
.pub-card {
  border: 1px solid var(--border-light); background: var(--sand-pale);
  transition: all 0.4s ease; overflow: hidden; cursor: pointer;
}
.pub-card:hover { border-color: var(--gold-muted); box-shadow: 0 8px 30px rgba(201,168,76,0.1); }
.pub-card-body { padding: 1.8rem; }
.pub-card-tag {
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gold-dark);
  margin-bottom: 0.6rem; display: inline-block;
}
.pub-card h3 { font-family: 'Playfair Display', serif; font-size: 1.15rem; font-weight: 400; color: var(--charcoal); margin-bottom: 0.6rem; line-height: 1.4; }
.pub-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 1rem; }
.pub-card-meta { font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.05em; }

/* Dashboard embed */
.dashboard-embed {
  background: var(--charcoal);
  border: 1px solid rgba(201,168,76,0.2);
  position: relative; overflow: hidden; margin-top: 3rem;
}
.dashboard-embed iframe { width: 100%; height: 800px; border: none; display: block; }
.dashboard-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.2rem 1.8rem; background: var(--charcoal);
  border-bottom: 1px solid rgba(201,168,76,0.15);
}
.dashboard-header-left h3 {
  font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 400;
  color: var(--sand-light); margin-bottom: 0.2rem;
}
.dashboard-header-left span { font-size: 0.68rem; color: var(--gold-muted); letter-spacing: 0.1em; text-transform: uppercase; }
.dashboard-expand {
  padding: 0.5rem 1.2rem;
  border: 1px solid rgba(201,168,76,0.3);
  background: none; color: var(--gold-muted);
  font-family: 'Inter', sans-serif; font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  cursor: pointer; text-decoration: none; transition: all 0.3s ease;
}
.dashboard-expand:hover { background: var(--gold-muted); color: var(--charcoal); }

/* ── Geographic Focus ── */
.geography {
  background:
    linear-gradient(rgba(253,251,247,0.92), rgba(253,251,247,0.92)),
    url('https://images.unsplash.com/photo-1559827291-72ebf3ece634?w=1800&fit=crop&q=70') center/cover no-repeat;
  position: relative; overflow: hidden;
}
.geo-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }
.geo-text p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.85; margin-bottom: 1.5rem; }
.geo-visual { display: flex; align-items: center; justify-content: center; position: relative; min-height: 420px; }
.geo-visual svg { width: 100%; max-width: 320px; height: auto; }

/* ── Contact Section ── */
.contact { background: var(--charcoal); color: var(--sand-light); position: relative; }
.contact .section-label { color: var(--gold-muted); }
.contact .section-title { color: var(--sand-light); }
.contact-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 5rem; align-items: start; }
.contact-text p { color: rgba(232,220,200,0.6); font-size: 0.92rem; line-height: 1.8; margin-bottom: 2rem; }
.contact-email { display: block; color: var(--gold-muted); text-decoration: none; font-size: 0.95rem; letter-spacing: 0.02em; transition: color 0.3s ease; }
.contact-email:hover { color: var(--sand); }

.contact-socials {
  display: flex;
  gap: 0.85rem;
  margin-top: 1.8rem;
  flex-wrap: wrap;
}
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.15rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(196,162,101,0.25);
  color: var(--sand);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.3s ease;
}
.social-btn svg { transition: transform 0.3s ease; }
.social-btn:hover { border-color: var(--gold-muted); transform: translateY(-1px); }
.social-btn:hover svg { transform: scale(1.1); }
.social-whatsapp:hover { color: #25D366; border-color: #25D366; }
.social-linkedin:hover { color: #0A66C2; border-color: #0A66C2; }
html[dir="rtl"] .contact-socials { justify-content: flex-end; }
.contact-form { display: flex; flex-direction: column; gap: 1.2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 0.95rem 1.2rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(196,162,101,0.15);
  color: var(--sand-light); font-family: 'Inter', sans-serif;
  font-size: 0.85rem; transition: border-color 0.3s ease; outline: none;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: rgba(232,220,200,0.3); font-size: 0.82rem; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--gold-muted); }
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form button {
  align-self: flex-start; padding: 0.9rem 2.5rem;
  background: var(--gold-muted); color: var(--charcoal);
  border: 1px solid var(--gold-muted); font-family: 'Inter', sans-serif;
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  cursor: pointer; transition: all 0.4s ease;
}
.contact-form button:hover { background: transparent; color: var(--gold-muted); }
.form-note { font-size: 0.72rem; color: rgba(232,220,200,0.3); margin-top: 0.5rem; }

/* ── Footer ── */
footer { background: var(--charcoal); border-top: 1px solid rgba(196,162,101,0.1); padding: 2.5rem 2rem; }
.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
footer p { font-size: 0.72rem; color: rgba(232,220,200,0.3); letter-spacing: 0.05em; }
.footer-locale { font-size: 0.72rem; color: rgba(232,220,200,0.25); letter-spacing: 0.05em; }
.footer-legal {
  width: 100%; text-align: center;
  margin-top: 1rem; padding-top: 1rem;
  border-top: 1px solid rgba(196,162,101,0.08);
  font-size: 0.65rem; color: rgba(232,220,200,0.18);
  letter-spacing: 0.04em; line-height: 1.7;
}

/* ── Animations ── */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ── */
@media (max-width: 968px) {
  /* Logo nav réduit pour laisser place au menu hamburger + langues */
  .nav-logo svg { height: 60px; }
  nav { padding: 0.85rem 1rem; }
  nav.scrolled { padding: 0.7rem 1rem; }

  /* Menu mobile : overlay plein écran */
  .nav-links {
    display: none; position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(13,31,51,0.98); backdrop-filter: blur(20px);
    flex-direction: column; justify-content: flex-start; align-items: center;
    gap: 1.8rem;
    padding: 7rem 2rem 3rem;
    overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1.05rem; }
  /* Cache le lang-switcher principal quand menu ouvert (évite chevauchement) */
  nav:has(.nav-links.open) .lang-switcher { opacity: 0; pointer-events: none; }

  /* Lang switcher dans le menu mobile (injecté via JS) */
  .mobile-lang-switcher {
    list-style: none;
    display: flex;
    gap: 0.6rem;
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(201,168,76,0.2);
    width: 60%;
    justify-content: center;
  }
  .mobile-lang-switcher button {
    background: none;
    border: 1px solid rgba(201,168,76,0.4);
    color: rgba(232,220,200,0.7);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    min-width: 50px;
  }
  .mobile-lang-switcher button:hover { color: var(--gold-muted); border-color: var(--gold-muted); }
  .mobile-lang-switcher button.active { background: var(--gold-muted); color: var(--charcoal); border-color: var(--gold-muted); }

  /* Hamburger visible en mobile */
  .mobile-toggle { display: flex; position: relative; z-index: 101; }

  /* Lang switcher : reste accessible à droite à côté du hamburger */
  .lang-switcher {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    z-index: 101;
  }
  .lang-switcher button {
    padding: 0.25rem 0.45rem;
    font-size: 0.6rem;
  }

  .about-grid, .geo-layout, .contact-layout { grid-template-columns: 1fr; gap: 3rem; }
  .diff-grid { grid-template-columns: 1fr 1fr; }
  .hero-geo { display: none; }
  .btn-secondary { margin-left: 0; margin-top: 0.8rem; }
  .hero-content { padding: 0 1.5rem; }
  .hero-logo { max-width: 320px; }
}

/* Cache le mobile-lang-switcher en desktop */
@media (min-width: 969px) {
  .mobile-lang-switcher { display: none !important; }
}

@media (max-width: 600px) {
  section { padding: 4.5rem 1.25rem; }
  .nav-logo svg { height: 52px; }
  nav { padding: 0.75rem 0.85rem; }
  .lang-switcher button {
    padding: 0.22rem 0.4rem;
    font-size: 0.58rem;
  }
  .lang-switcher { gap: 0.25rem; }
  .diff-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 1rem; text-align: center; }
  .hero h1 { font-size: 2rem; }
  .hero-logo { max-width: 280px; }
  .contact-socials { gap: 0.55rem; }
  .social-btn { padding: 0.55rem 0.9rem; font-size: 0.7rem; }
}

@media (max-width: 380px) {
  .nav-logo svg { height: 44px; }
  .lang-switcher button { padding: 0.2rem 0.35rem; font-size: 0.55rem; }
}
