/* ===================================================
   sehti.ma – Modern Responsive Stylesheet
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Nunito:wght@400;500;600;700&display=swap');

/* ── Design Tokens ───────────────────────────────── */
:root {
  --clr-bg:         #faf7f2;
  --clr-bg-alt:     #f0ebe0;
  --clr-surface:    #ffffff;
  --clr-primary:    #1b4332;
  --clr-primary-lt: #2d6a4f;
  --clr-text:       #1c1917;
  --clr-muted:      #6b7280;
  --clr-border:     #d8d0c4;

  --font-display:   'Playfair Display', Georgia, serif;
  --font-body:      'Nunito', 'Segoe UI', sans-serif;

  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-pill: 999px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow-md:  0 4px 16px rgba(27,67,50,.12), 0 2px 6px rgba(0,0,0,.05);
  --shadow-lg:  0 12px 40px rgba(27,67,50,.16);

  --t: 220ms cubic-bezier(.4,0,.2,1);
}

/* ── Reset ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body), sans-serif;
  background-color: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.65;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }

/* Decorative radial glow */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
          radial-gradient(ellipse 80% 55% at 50% -5%,  rgba(45,106,79,.13) 0%, transparent 65%),
          radial-gradient(ellipse 55% 45% at 92% 92%,  rgba(45,106,79,.07) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}

/* ── Page wrapper ────────────────────────────────── */
.page-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
  padding: clamp(2rem, 6vw, 4rem) clamp(1.25rem, 5vw, 2.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.5rem, 3.5vw, 2.5rem);
  flex: 1;
}

/* ── Logo ────────────────────────────────────────── */
#logo {
  width: clamp(100px, 26vw, 155px);
  filter: drop-shadow(0 2px 8px rgba(27,67,50,.2));
  transition: transform var(--t), filter var(--t);
}
#logo:hover {
  transform: scale(1.04);
  filter: drop-shadow(0 4px 14px rgba(27,67,50,.3));
}

/* ══════════════════════════════════════════════════
   LANGUAGE NAV BUTTONS
   ── Default: transparent bg, green border + text
   ── Active:  filled green bg, white text
   ── Hover on inactive: light green bg tint
   ══════════════════════════════════════════════════ */
.langues {
  width: 100%;
  text-align: center;
}

.langues h1 {
  font-size: 0; /* collapse inline gaps */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
}

.langues a {
  display: inline-block;
  font-family: var(--font-body), sans-serif;
  font-size: clamp(.8rem, 2.4vw, .92rem);
  font-weight: 700;
  padding: .45em 1.25em;
  border-radius: var(--radius-pill);
  border: 2px solid var(--clr-primary);
  background: transparent;
  color: var(--clr-primary);
  letter-spacing: .02em;
  white-space: nowrap;
  transition: background var(--t), color var(--t), transform var(--t), box-shadow var(--t);
  cursor: pointer;
}

/* Inactive hover — subtle tint */
.langues a:hover,
.langues a:focus-visible {
  background: rgba(27,67,50,.08);
  outline: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ── Active state: per-page body class ──────────── */
/* index.html has no body class → no button active  */
body.page-darija    .ldarija,
body.page-francais  .lfrench,
body.page-english   .lenglish,
body.page-business  .lbusiness {
  background: var(--clr-primary);
  color: #fff;
  box-shadow: 0 3px 12px rgba(27,67,50,.25);
  pointer-events: none;   /* can't re-click current page */
  transform: none;
}

/* Prevent hover style overriding active */
body.page-darija    .ldarija:hover,
body.page-francais  .lfrench:hover,
body.page-english   .lenglish:hover,
body.page-business  .lbusiness:hover {
  background: var(--clr-primary);
  color: #fff;
  transform: none;
  box-shadow: 0 3px 12px rgba(27,67,50,.25);
}

/* ── Video iframe ────────────────────────────────── */
.iframe {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #000;
  aspect-ratio: 16 / 9;
}

.iframe iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ── Subscribe CTA ───────────────────────────────── */
.subscribe { text-align: center; }

.lsubscribe {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-body), sans-serif;
  font-size: clamp(.88rem, 2.4vw, 1rem);
  font-weight: 700;
  background: var(--clr-primary);
  color: #fff;
  border-radius: var(--radius-pill);
  border: 2px solid var(--clr-primary);
  box-shadow: 0 4px 18px rgba(27,67,50,.28);
  transition: background var(--t), transform var(--t), box-shadow var(--t);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.lsubscribe::before { content: '\25B6'; font-size: .8em; }

.lsubscribe:hover, .lsubscribe:focus-visible {
  background: var(--clr-primary-lt);
  border-color: var(--clr-primary-lt);
  transform: translateY(-3px);
  box-shadow: 0 8px 26px rgba(27,67,50,.32);
  outline: none;
}

/* ── Content cards (all text pages) ─────────────── */
.english,
.french,
.darija,
.ardarija,
.business {
  width: 100%;
  background: var(--clr-surface);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 5vw, 2.5rem);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--clr-border);
}

.english p,
.french  p,
.darija  p,
.business p {
  font-size: clamp(.95rem, 2.4vw, 1.05rem);
  color: #374151;
  margin-bottom: .9em;
  line-height: 1.8;
}

.english p:last-child,
.french  p:last-child,
.darija  p:last-child,
.business p:last-child { margin-bottom: 0; }

/* Inline link inside business card */
.business a {
  color: var(--clr-primary);
  font-weight: 700;
  border-bottom: 2px solid rgba(27,67,50,.3);
  transition: border-color var(--t);
}
.business a:hover { border-color: var(--clr-primary); }

/* Arabic Darija block */
.ardarija {
  direction: rtl;
  text-align: right;
  font-size: clamp(.95rem, 2.4vw, 1.05rem);
  color: #374151;
  line-height: 2;
}

/* Page headings */
#h1english,
#h1darija,
#h1french,
#h1ardarija {
  font-family: var(--font-display), sans-serif;
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  font-weight: 700;
  color: var(--clr-primary);
  text-align: center;
  line-height: 1.25;
  letter-spacing: -.01em;
}

#h1ardarija { direction: rtl; }

/* ── Footer ──────────────────────────────────────── */
.liens-bas-de-page {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding-top: .5rem;
  border-top: 1px solid var(--clr-border);
}

.social-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

#yt, #ig, #fb {
  width: clamp(26px, 6.5vw, 34px);
  height: auto;
  opacity: .72;
  transition: opacity var(--t), transform var(--t);
}

#yt:hover, #ig:hover, #fb:hover {
  opacity: 1;
  transform: scale(1.15);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .3rem .7rem;
  font-size: .8rem;
  color: var(--clr-muted);
}

.footer-meta a {
  color: var(--clr-primary);
  font-weight: 700;
  border-bottom: 1px solid transparent;
  transition: border-color var(--t);
}
.footer-meta a:hover { border-color: var(--clr-primary); }
.footer-meta .sep { color: var(--clr-border); }

/* ── Back-to-top ─────────────────────────────────── */
#myBtn {
  display: none;
  align-items: center;
  justify-content: center;
  position: fixed;
  bottom: clamp(1.25rem, 4vw, 2rem);
  right:  clamp(1.25rem, 4vw, 2rem);
  z-index: 1000;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--clr-primary);
  color: #fff;
  font-size: 0;
  font-family: var(--font-body), sans-serif;
  box-shadow: var(--shadow-md);
  transition: background var(--t), transform var(--t);
}
#myBtn::after { content: '\2191'; font-size: 1.1rem; font-weight: 800; }
#myBtn:hover  { background: var(--clr-primary-lt); transform: translateY(-3px); }

/* ── Entrance animation ──────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-wrapper > * {
  animation: fadeUp .5s ease both;
}
.page-wrapper > *:nth-child(1) { animation-delay: .04s; }
.page-wrapper > *:nth-child(2) { animation-delay: .10s; }
.page-wrapper > *:nth-child(3) { animation-delay: .17s; }
.page-wrapper > *:nth-child(4) { animation-delay: .24s; }
.page-wrapper > *:nth-child(5) { animation-delay: .31s; }
.page-wrapper > *:nth-child(6) { animation-delay: .38s; }
.page-wrapper > *:nth-child(7) { animation-delay: .45s; }

/* ── Focus ring ──────────────────────────────────── */
:focus-visible {
  outline: 3px solid var(--clr-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Mobile tweaks ───────────────────────────────── */
@media (max-width: 480px) {
  .langues a  { padding: .4em 1em; }
  .lsubscribe { padding: .7em 1.5em; }
}