
:root {
  --green: #0f5a2f;
  --green-2: #14663a;
  --green-dark: #0a3f21;
  --red: #b31217;
  --red-2: #cf2a2f;
  --bg: #f4f7f2;
  --bg-2: #fbfcfa;
  --card: rgba(255, 255, 255, 0.9);
  --card-strong: rgba(255, 255, 255, 0.96);
  --text: #18212f;
  --muted: #5d6675;
  --border: rgba(15, 90, 47, 0.12);
  --border-2: rgba(0, 0, 0, 0.08);
  --shadow: 0 16px 40px rgba(8, 18, 31, 0.12);
  --shadow-soft: 0 8px 24px rgba(8, 18, 31, 0.06);
  --shadow-strong: 0 20px 48px rgba(8, 18, 31, 0.16);
  --radius: 24px;
  --radius-lg: 28px;
  --max: 1180px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(216, 179, 106, 0.22), transparent 28%),
    radial-gradient(circle at top right, rgba(15, 90, 47, 0.08), transparent 24%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body[dir="rtl"] {
  direction: rtl;
  text-align: right;
  font-family: Cairo, Inter, system-ui, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
textarea {
  font: inherit;
}

button {
  appearance: none;
  border: 0;
}

:focus-visible {
  outline: 3px solid rgba(15, 90, 47, 0.26);
  outline-offset: 3px;
}

.container {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.hidden {
  display: none !important;
}

.topbar {
  background: linear-gradient(90deg, var(--green-dark), var(--green));
  color: #fff;
  font-size: 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 0;
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-badge {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--green), var(--red));
  box-shadow: var(--shadow);
  flex: 0 0 auto;
}

.brand-text {
  display: grid;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 16px;
}

.brand-text small {
  color: var(--muted);
  margin-top: 3px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-links a,
.nav-cta {
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  color: var(--green-dark);
  transition:
    background 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease;
}

.nav-links a:hover,
.nav-cta:hover {
  background: rgba(15, 90, 47, 0.08);
  transform: translateY(-1px);
}

.nav-cta {
  background: rgba(179, 18, 23, 0.94);
  color: #fff !important;
  box-shadow: 0 12px 26px rgba(179, 18, 23, 0.18);
}

.nav-cta:hover {
  background: rgba(179, 18, 23, 1);
  box-shadow: 0 16px 30px rgba(179, 18, 23, 0.22);
}

.lang-switch {
  position: relative;
  width: 150px;
  height: 48px;
  padding: 4px;
  border: 1px solid rgba(15, 90, 47, 0.16);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f7f2 100%);
  box-shadow:
    0 10px 24px rgba(8, 18, 31, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
  cursor: pointer;
  flex: 0 0 auto;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.lang-switch:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 90, 47, 0.22);
  box-shadow:
    0 14px 30px rgba(8, 18, 31, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.lang-switch:active {
  transform: translateY(0);
}

.lang-pill {
  position: relative;
  z-index: 2;
  width: 50%;
  height: 100%;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--muted);
  user-select: none;
  transition:
    color 0.22s ease,
    transform 0.22s ease;
}

.lang-pill.active {
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
}

.lang-knob {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  box-shadow:
    0 8px 18px rgba(15, 90, 47, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition:
    transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.2s ease;
  z-index: 1;
}

.lang-switch:hover .lang-knob {
  box-shadow:
    0 10px 22px rgba(15, 90, 47, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

html[dir="rtl"] .lang-knob {
  transform: translateX(100%);
}

.hero {
  padding: 34px 0 18px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto -8% -30% -8%;
  height: 280px;
  background: linear-gradient(135deg, rgba(15, 90, 47, 0.12), rgba(179, 18, 23, 0.08));
  transform: skewY(-6deg);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
}

.hero-copy h1 {
  margin: 12px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--green-dark);
}

.lead {
  margin: 0;
  font-size: 18px;
  color: var(--muted);
  max-width: 62ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--green-dark);
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 16px;
  border: 1px solid transparent;
  font-weight: 800;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #fff;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  box-shadow: var(--shadow-strong);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(15, 90, 47, 0.16);
  color: var(--green-dark);
}

.btn-outline:hover {
  background: #fff;
  border-color: rgba(15, 90, 47, 0.24);
}

.hero-card,
.card {
  background: var(--card);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 18px;
}

.poster {
  border-radius: 22px;
  overflow: hidden;
  background: #0f5a2f;
}

.poster img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.stat {
  padding: 14px 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(0, 0, 0, 0.06);
  text-align: center;
}

.stat b {
  display: block;
  font-size: 24px;
  line-height: 1.1;
  color: var(--green-dark);
}

.stat span {
  font-size: 13px;
  color: var(--muted);
}

.section {
  padding: 72px 0;
}

.section-alt {
  background: rgba(238, 244, 238, 0.72);
}

.section-title {
  margin-bottom: 24px;
}

.section-title h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  color: var(--green-dark);
}

.section-title p {
  margin: 0;
  color: var(--muted);
  max-width: 78ch;
}

.grid {
  display: grid;
  gap: 22px;
}

.two-cols {
  grid-template-columns: 0.9fr 1.1fr;
}

.cards-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, 1fr);
}

.media-card {
  overflow: hidden;
}

.media-img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  display: block;
}

.content-card {
  padding: 24px;
}

.lang-block {
  display: none;
}

.lang-block.active {
  display: block;
  animation: fade 0.18s ease;
}

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

.list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.list li {
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(15, 90, 47, 0.1);
  box-shadow: 0 6px 18px rgba(8, 18, 31, 0.04);
}

.list.compact li {
  padding: 12px 14px;
}

.mission-columns {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 18px;
}

.mission-box {
  padding: 18px;
  border-radius: 18px;
  background: rgba(15, 90, 47, 0.03);
  border: 1px solid rgba(15, 90, 47, 0.10);
}

.mission-box h3 {
  margin: 0 0 12px;
  color: var(--green-dark);
  font-size: 18px;
}

.missions-closing {
  margin: 18px 0 0;
  font-weight: 700;
  color: var(--green-dark);
}

.video-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, 1fr);
}

.video-card {
  overflow: hidden;
  padding: 12px;
}

.video-card video {
  width: 100%;
  display: block;
  border-radius: 18px;
  background: #000;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.media-caption {
  padding: 12px 10px 2px;
  font-weight: 700;
  color: var(--green-dark);
}


.list strong {
  color: var(--green-dark);
}

.program-item {
  padding: 20px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: var(--shadow);
}

.num {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--red));
  color: #fff;
  font-weight: 900;
  margin-bottom: 14px;
  box-shadow: 0 10px 18px rgba(15, 90, 47, 0.18);
}

.program-item h3 {
  margin: 0 0 8px;
  color: var(--green-dark);
  line-height: 1.25;
}

.program-item p {
  margin: 0;
  color: var(--muted);
}

.mt-24 {
  margin-top: 24px;
}

.gallery-grid {
  grid-template-columns: repeat(3, 1fr);
}

.gallery-card {
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.gallery-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 22px;
}

.contact-box {
  padding: 24px;
}

.contact-box h3 {
  margin-top: 0;
  color: var(--green-dark);
}

.contact-link {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(15, 90, 47, 0.12);
  margin-top: 12px;
  transition:
    background 0.18s ease,
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
  box-shadow: 0 6px 18px rgba(8, 18, 31, 0.04);
}

.contact-link:hover {
  background: rgba(15, 90, 47, 0.04);
  transform: translateY(-1px);
  border-color: rgba(15, 90, 47, 0.18);
}

form {
  display: grid;
  gap: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

input,
textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  color: var(--text);
  outline: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

input::placeholder,
textarea::placeholder {
  color: #8b94a3;
}

input:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(15, 90, 47, 0.08);
}

textarea {
  min-height: 150px;
  resize: vertical;
}

.form-note {
  margin: 0;
  min-height: 24px;
  color: var(--muted);
  font-size: 14px;
}

.footer {
  background: linear-gradient(180deg, #0c2d18, #07150c);
  color: #fff;
  padding: 26px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.footer-inner div:last-child {
  opacity: 0.8;
}

html[dir="rtl"] .nav-links,
html[dir="rtl"] .hero-actions,
html[dir="rtl"] .footer-inner {
  direction: rtl;
}

@media (max-width: 1120px) {
  .hero-grid {
    grid-template-columns: 1fr 0.95fr;
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .two-cols,
  .contact-grid,
  .cards-grid,
  .gallery-grid,
  .mission-columns,
  .video-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    gap: 14px;
  }

  .nav-actions {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 760px) {
  .section {
    padding: 62px 0;
  }

  .content-card,
  .contact-box {
    padding: 20px;
  }

  .hero {
    padding: 26px 0 14px;
  }

  .hero-copy h1 {
    font-size: clamp(30px, 9vw, 48px);
  }

  .lead {
    font-size: 17px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .gallery-card img {
    height: 240px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(var(--max), calc(100% - 24px));
  }

  .topbar-inner {
    justify-content: center;
    text-align: center;
  }

  .nav {
    flex-direction: column;
    align-items: stretch;
  }

  .brand {
    justify-content: center;
  }

  .nav-actions {
    justify-content: center;
    gap: 12px;
  }

  .nav-links {
    justify-content: center;
  }

  .lang-switch {
    align-self: center;
    width: 146px;
  }

  .hero-actions {
    justify-content: center;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    justify-content: center;
    text-align: center;
  }
}


.lang-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-btn {
  width: 72px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(15, 90, 47, 0.16);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(8, 18, 31, 0.08);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.lang-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 90, 47, 0.28);
  box-shadow: 0 12px 26px rgba(8, 18, 31, 0.12);
}

.lang-btn.active {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(15, 90, 47, 0.12);
}

.lang-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.programme-card {
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 24px;
}

.programme-image {
  display: block;
  width: 100%;
  height: auto;
  transition: transform .35s ease;
}

.programme-image:hover {
  transform: scale(1.02);
}

.programme-media {
  overflow: hidden;
}

.programme-img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* ou cover si tu préfères remplir complètement */
  display: block;
  background: #fff;
}

/* ===== POPUP SILANCE ===== */
#popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
}

#popup-overlay.hidden {
  display: none;
}

#popup-box {
  position: relative;
  max-width: 520px;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: scaleIn 0.3s ease;
}

#popup-box img {
  display: block;
  width: 100%;
  height: auto;
}

#popup-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}

#popup-close:hover {
  background: rgba(0,0,0,0.85);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.88); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
/* ===== /POPUP ===== */
