:root {
  --ink: #14221c;
  --muted: #4a5c54;
  --sand: #e8efe9;
  --leaf: #1a6b4a;
  --leaf-deep: #0f4a34;
  --clay: #c45c26;
  --cream: #f4f7f5;
  --line: rgba(20, 34, 28, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: 'Source Sans 3', 'Cairo', sans-serif;
  color: var(--ink);
  background: var(--cream);
}

html[dir='rtl'] body {
  font-family: 'Cairo', 'Source Sans 3', sans-serif;
}

.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.landing-top {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  z-index: 5;
}

.lang-btn {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(15, 74, 52, 0.35);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  font-family: inherit;
}

.lang-btn:hover {
  background: rgba(15, 74, 52, 0.55);
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 72px 20px 48px;
  overflow: hidden;
  color: #fff;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(165deg, rgba(15, 74, 52, 0.88) 0%, rgba(20, 34, 28, 0.72) 55%, rgba(196, 92, 38, 0.45) 100%),
    radial-gradient(900px 500px at 15% 20%, rgba(255, 255, 255, 0.18), transparent 60%),
    radial-gradient(700px 420px at 90% 80%, rgba(196, 92, 38, 0.35), transparent 55%);
  filter: saturate(1.05);
  transform: scale(1.02);
  overflow: hidden;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/assets/logo-bg.png') center 38% / min(70vw, 520px) no-repeat;
  opacity: 0.22;
  pointer-events: none;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 36, 26, 0.28);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  text-align: center;
  animation: rise 0.8s ease-out both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-logo {
  width: min(200px, 46vw);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.95);
  padding: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  margin-bottom: 22px;
  animation: float 5s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.hero-brand {
  margin: 0 0 6px;
  font-family: 'Fraunces', 'Cairo', serif;
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

html[dir='rtl'] .hero-brand {
  font-family: 'Cairo', 'Fraunces', sans-serif;
}

.hero-title {
  margin: 0 0 12px;
  font-size: clamp(1.15rem, 3vw, 1.55rem);
  font-weight: 600;
  color: #fde7d4;
}

.hero-lead {
  margin: 0 auto 28px;
  max-width: 36rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
}

.hero-lead .lead-places {
  display: inline-block;
  font-family: 'Cairo', sans-serif;
  font-weight: 600;
}

.hero-lead .lead-slogan {
  display: inline-block;
  margin-top: 6px;
  font-style: italic;
  opacity: 0.95;
}

.hero-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 920px;
  margin: 0 auto;
  animation: rise 0.9s 0.15s ease-out both;
}
@media (max-width: 900px) {
  .hero-actions {
    grid-template-columns: 1fr;
  }
}

.portal {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 4px;
  text-align: start;
  text-decoration: none;
  color: inherit;
  padding: 18px 18px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.portal-icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  padding: 6px;
  margin-bottom: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.portal:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.portal-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.8;
  font-weight: 600;
}

.portal-name {
  font-family: 'Fraunces', 'Cairo', serif;
  font-size: 1.45rem;
  font-weight: 700;
}

html[dir='rtl'] .portal-name {
  font-family: 'Cairo', sans-serif;
}

.portal-desc {
  font-size: 0.92rem;
  opacity: 0.88;
  line-height: 1.35;
}

.portal-women {
  border-color: rgba(253, 231, 212, 0.45);
}

.about {
  padding: 48px 20px;
  background: var(--sand);
}

.about-inner {
  width: min(720px, 100%);
  margin: 0 auto;
  text-align: center;
}

.about h2 {
  margin: 0 0 10px;
  font-family: 'Fraunces', 'Cairo', serif;
  font-size: 1.6rem;
  color: var(--leaf-deep);
}

html[dir='rtl'] .about h2 {
  font-family: 'Cairo', sans-serif;
}

.about p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.landing-foot {
  padding: 18px 20px 28px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

@media (max-width: 640px) {
  .hero {
    min-height: auto;
    padding-top: 64px;
    padding-bottom: 36px;
  }
  .hero-actions {
    grid-template-columns: 1fr;
  }
  .hero-logo {
    width: min(148px, 52vw);
  }
}

/* ——— Première visite : choix de langue ——— */
body.lang-pending {
  overflow: hidden;
}

body.lang-pending .landing {
  opacity: 0;
  pointer-events: none;
}

.lang-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 28px 18px;
  color: #fff;
}

.lang-gate[hidden] {
  display: none;
}

.lang-gate-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(155deg, #0a2e22 0%, #143528 42%, #3d2818 100%);
}

.lang-gate-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/assets/logo-bg.png') center 42% / min(78vw, 560px) no-repeat;
  opacity: 0.12;
  animation: gateBreath 7s ease-in-out infinite;
}

.lang-gate-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  pointer-events: none;
  opacity: 0.55;
}

.lang-gate-orb-a {
  width: min(420px, 70vw);
  height: min(420px, 70vw);
  top: -8%;
  inset-inline-start: -10%;
  background: radial-gradient(circle, rgba(42, 140, 98, 0.55), transparent 68%);
  animation: orbDrift 9s ease-in-out infinite;
}

.lang-gate-orb-b {
  width: min(380px, 65vw);
  height: min(380px, 65vw);
  bottom: -12%;
  inset-inline-end: -8%;
  background: radial-gradient(circle, rgba(196, 92, 38, 0.45), transparent 68%);
  animation: orbDrift 11s ease-in-out infinite reverse;
}

@keyframes gateBreath {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.1;
  }
  50% {
    transform: scale(1.06);
    opacity: 0.16;
  }
}

@keyframes orbDrift {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(18px, -22px);
  }
}

.lang-gate-inner {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  text-align: center;
  animation: gateRise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes gateRise {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.lang-gate-logo {
  width: min(160px, 38vw);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  margin: 0 auto 10px;
  filter: drop-shadow(0 16px 36px rgba(0, 0, 0, 0.4));
  animation: float 5s ease-in-out infinite;
}

.lang-gate-brand {
  margin: 0 0 22px;
  font-family: 'Fraunces', 'Cairo', serif;
  font-size: clamp(2.2rem, 8vw, 3.2rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-indent: 0.12em;
  line-height: 1;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.35);
}

.lang-gate-ask {
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 1.05rem;
  opacity: 0.92;
}

.lang-gate-ask-ar {
  font-family: 'Cairo', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
}

.lang-gate-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 480px) {
  .lang-gate-choices {
    grid-template-columns: 1fr;
  }
}

.lang-pick {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  color: #fff;
  border-radius: 20px;
  padding: 22px 18px 18px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.lang-pick:hover,
.lang-pick:focus-visible {
  transform: translateY(-4px) scale(1.02);
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  outline: none;
}

.lang-pick:active {
  transform: translateY(-1px) scale(0.99);
}

.lang-pick-code {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 1.15rem;
  background: rgba(255, 255, 255, 0.95);
  color: var(--leaf-deep);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

#pickAr .lang-pick-code {
  font-family: 'Cairo', sans-serif;
  font-size: 1.35rem;
}

.lang-pick-name {
  font-size: 1.25rem;
  font-weight: 700;
}

#pickAr .lang-pick-name {
  font-family: 'Cairo', sans-serif;
  font-size: 1.4rem;
}

.lang-pick-hint {
  font-size: 0.88rem;
  opacity: 0.78;
}

.lang-gate-foot {
  margin: 28px 0 0;
  font-family: 'Cairo', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  opacity: 0.75;
  letter-spacing: 0.02em;
}

.lang-gate.is-leaving {
  animation: gateOut 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: none;
}

.lang-gate.is-leaving .lang-gate-inner {
  animation: gateInnerOut 0.65s ease forwards;
}

@keyframes gateOut {
  to {
    opacity: 0;
  }
}

@keyframes gateInnerOut {
  to {
    opacity: 0;
    transform: translateY(-36px) scale(1.04);
  }
}

body.lang-ready .landing {
  animation: landingIn 0.75s 0.15s ease both;
}

@keyframes landingIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
