/* ==========================================================
   ATEC — Association Tahadi pour l'Égalité et la Citoyenneté
   Feuille de style principale
   ========================================================== */

:root {
  /* Couleurs reprises de l'ancien site et du logo */
  --green: #7abb57;
  --green-dark: #5f9d3e;
  --green-soft: #eef7e8;
  --blue: #1d6094;
  --blue-dark: #154a73;
  --blue-soft: #e8f0f7;
  --navy: #06163a;
  --navy-2: #0c2352;

  --ink: #14213d;
  --text: #4a5568;
  --muted: #718096;
  --line: #e5e9f0;
  --bg: #ffffff;
  --bg-alt: #f6f8fb;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(6, 22, 58, .08);
  --shadow-lg: 0 24px 60px rgba(6, 22, 58, .14);

  --font-head: "Cabin", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --container: 1200px;
  --header-h: 92px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 .5em;
}

p { margin: 0 0 1em; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.icon { width: 20px; height: 20px; flex: none; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  transition: background .25s, color .25s, border-color .25s, transform .25s, box-shadow .25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn .icon { width: 18px; height: 18px; transition: transform .25s; }
.btn:hover .icon { transform: translateX(3px); }

.btn-green { background: var(--green); color: #fff; box-shadow: 0 8px 20px rgba(122, 187, 87, .35); }
.btn-green:hover { background: var(--green-dark); }
.btn-blue { background: var(--blue); color: #fff; box-shadow: 0 8px 20px rgba(29, 96, 148, .3); }
.btn-blue:hover { background: var(--blue-dark); }
.btn-outline { border-color: var(--blue); color: var(--blue); background: transparent; }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-white { background: #fff; color: var(--blue); }
.btn-white:hover { background: var(--green-soft); }
.btn-ghost-light { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-ghost-light:hover { background: #fff; color: var(--blue); }

/* ---------- Barre supérieure ---------- */
.topbar {
  background: var(--navy);
  color: #fff;
  font-size: 14.5px;
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 28px; }
.topbar-item { display: inline-flex; align-items: center; gap: 9px; }
.topbar-item .icon { color: var(--green); width: 18px; height: 18px; }
.topbar a:hover { color: var(--green); }
.topbar-right a { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s, border-color .3s;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(6, 22, 58, .08); border-color: var(--line); }
.site-header .container {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}

.logo { display: flex; align-items: center; flex: none; }
.logo img { height: 66px; width: auto; }

.main-nav { margin-inline-start: auto; }
.main-nav > ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.main-nav a, .main-nav .nav-drop-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 16.5px;
  font-weight: 500;
  background: none;
  border: 0;
  transition: color .2s, background .2s;
}
.main-nav a:hover, .main-nav .nav-drop-btn:hover { color: var(--green-dark); background: var(--green-soft); }
.main-nav a.active, .main-nav .nav-drop-btn.active { color: var(--green-dark); }
.nav-drop-btn .icon { width: 16px; height: 16px; transition: transform .2s; }

.has-dropdown { position: relative; }
.dropdown {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-start: 0;
  min-width: 240px;
  list-style: none;
  margin: 0;
  padding: 10px;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.dropdown a { display: flex; width: 100%; border-radius: 10px; font-size: 15.5px; }
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown,
.has-dropdown.open .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.has-dropdown:hover .nav-drop-btn .icon,
.has-dropdown.open .nav-drop-btn .icon { transform: rotate(180deg); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.icon-btn {
  width: 44px; height: 44px;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--ink);
  transition: background .2s, color .2s;
}
.icon-btn:hover { background: var(--blue-soft); color: var(--blue); }
.icon-btn .icon { width: 22px; height: 22px; }
.header-actions .btn { padding: 13px 22px; }

.nav-toggle { display: none; }

/* ---------- Recherche ---------- */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(6, 22, 58, .85);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: start center;
  padding: 18vh 24px 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility .25s;
}
.search-overlay.open { opacity: 1; visibility: visible; }
.search-form {
  width: 100%;
  max-width: 720px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: 999px;
  padding-block: 8px;
  padding-inline: 26px 8px;
  box-shadow: var(--shadow-lg);
}
.search-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 18px;
  color: var(--ink);
  background: transparent;
}
.search-close {
  position: absolute;
  top: 28px; inset-inline-end: 28px;
  color: #fff;
}
.search-close:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ---------- Sections ---------- */
.section { padding: 110px 0; }
.section-alt { background: var(--bg-alt); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green-dark);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 3px;
  border-radius: 3px;
  background: var(--green);
}

.section-head { max-width: 680px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow::after {
  content: "";
  width: 28px; height: 3px;
  border-radius: 3px;
  background: var(--green);
}
.section-title { font-size: clamp(32px, 4.2vw, 48px); font-weight: 700; letter-spacing: -.01em; }
.section-title span { color: var(--blue); }
.section-head p { font-size: 18px; color: var(--muted); }

.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 56px;
}
.section-head-row .section-head { margin-bottom: 0; }

/* ---------- Héro (accueil) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 90px 0 150px;
  background:
    radial-gradient(900px 500px at 85% 10%, rgba(122, 187, 87, .16), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(29, 96, 148, .12), transparent 60%),
    var(--bg-alt);
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 64px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 8px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 26px;
}
.hero-badge b {
  background: var(--green);
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 600;
}
.hero h1 {
  font-size: clamp(40px, 5.4vw, 66px);
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 22px;
}
.hero h1 .hl-green { color: var(--green); }
.hero h1 .hl-blue { color: var(--blue); }
.hero-lead { font-size: 19px; max-width: 540px; margin-bottom: 36px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-langs {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 15px;
  color: var(--muted);
}
.hero-langs span[lang="ar"] { font-size: 18px; color: var(--blue); font-weight: 600; }
.hero-langs span[lang="zgh"] { color: var(--green-dark); font-weight: 600; }

.hero-visual {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.hero-visual figure {
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 1;
  background: #fff;
}
.hero-visual figure img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual .hero-tile {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  background: linear-gradient(150deg, var(--green) 0%, var(--green-dark) 100%);
  color: rgba(255,255,255,.92);
  font-size: 16px;
  line-height: 1.4;
}
.hero-tile .ico {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.2);
  color: #fff;
  margin-bottom: auto;
}
.hero-tile .ico .icon { width: 26px; height: 26px; }
.hero-tile strong { font-family: var(--font-head); font-size: clamp(34px, 4vw, 48px); line-height: 1; color: #fff; margin-bottom: 6px; }
.hero-visual figure:nth-child(1) { transform: translateY(36px); }
.hero-visual figure:nth-child(3) { transform: translateY(36px); }
.hero-visual::before {
  content: "";
  position: absolute;
  inset: -40px -40px auto auto;
  width: 220px; height: 220px;
  border-radius: 50%;
  border: 2px dashed rgba(29, 96, 148, .25);
  z-index: -1;
}

/* ---------- Cartes mises en avant (sous le héro) ---------- */
.feature-cards {
  position: relative;
  z-index: 3;
  margin-top: -90px;
}
.feature-cards .grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.feature-card {
  padding: 52px 56px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.feature-card .ico {
  width: 58px; height: 58px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: var(--blue-soft);
  color: var(--blue);
  margin-bottom: 24px;
}
.feature-card .ico .icon { width: 28px; height: 28px; }
.feature-card h3 { font-size: clamp(24px, 2.4vw, 32px); font-weight: 600; margin-bottom: 14px; }
.feature-card p { margin-bottom: 28px; }
.feature-card.is-green { background: var(--green); color: rgba(255,255,255,.92); }
.feature-card.is-green h3 { color: #fff; }
.feature-card.is-green .ico { background: rgba(255,255,255,.2); color: #fff; }

/* ---------- À propos (accueil) ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-media { position: relative; }
.about-card {
  position: relative;
  border-radius: 24px;
  padding: 56px 48px;
  background: linear-gradient(145deg, var(--blue) 0%, var(--navy-2) 100%);
  color: #fff;
  overflow: hidden;
}
.about-card::after {
  content: "";
  position: absolute;
  right: -80px; bottom: -80px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: rgba(122, 187, 87, .25);
}
.about-card .logo-white {
  background: #fff;
  border-radius: 16px;
  padding: 18px 22px;
  display: inline-block;
  margin-bottom: 32px;
}
.about-card .logo-white img { height: 90px; width: auto; }
.about-card blockquote {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--font-head);
  font-size: 23px;
  line-height: 1.45;
  font-weight: 500;
}
.about-year {
  position: absolute;
  inset-inline-end: -24px;
  top: -24px;
  background: var(--green);
  color: #fff;
  border-radius: 20px;
  padding: 20px 24px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  z-index: 2;
}
.about-year strong { display: block; font-family: var(--font-head); font-size: 40px; line-height: 1; }
.about-year span { font-size: 13.5px; font-weight: 500; }

.about-text .lead { font-size: 19px; color: var(--ink); }
.check-list { list-style: none; padding: 0; margin: 28px 0 36px; display: grid; gap: 14px; }
.check-list li { display: flex; gap: 14px; align-items: flex-start; }
.check-list .tick {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--green-soft);
  color: var(--green-dark);
  margin-top: 2px;
}
.check-list .tick .icon { width: 15px; height: 15px; }

/* ---------- Domaines d'action ---------- */
.domains {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.domain {
  padding: 34px 28px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.domain:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.domain .ico {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: grid; place-items: center;
  margin-bottom: 22px;
  background: var(--blue-soft);
  color: var(--blue);
}
.domain:nth-child(even) .ico { background: var(--green-soft); color: var(--green-dark); }
.domain .ico .icon { width: 26px; height: 26px; }
.domain h3 { font-size: 21px; font-weight: 600; margin-bottom: 8px; }
.domain p { margin: 0; font-size: 15.5px; }

/* ---------- Programmes ---------- */
.programs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}
.program {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .3s, box-shadow .3s;
}
.program:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.program-img { position: relative; aspect-ratio: 1; overflow: hidden; }
.program-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.program:hover .program-img img { transform: scale(1.06); }
.program-tag {
  position: absolute;
  top: 16px; inset-inline-start: 16px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.95);
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
}
.program-body { padding: 24px 24px 28px; display: flex; flex-direction: column; flex: 1; }
.program-body h3 { font-size: 21px; font-weight: 600; margin-bottom: 10px; color: var(--blue); transition: color .2s; }
.program:hover .program-body h3 { color: var(--green-dark); }
.program-body p { font-size: 15px; margin-bottom: 18px; }
.program-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--green-dark);
}
.program-link .icon { width: 18px; height: 18px; transition: transform .2s; }
.program:hover .program-link .icon { transform: translateX(4px); }

/* ---------- Actualités / Agenda ---------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.news-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .3s, transform .3s;
}
.news-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.news-thumb {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(45deg, var(--blue-soft), var(--blue-soft) 12px, #f1f6fb 12px, #f1f6fb 24px);
  color: var(--blue);
  font-size: 14px;
  font-weight: 500;
}
.news-body { padding: 24px 26px 28px; }
.news-meta { display: flex; gap: 12px; align-items: center; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.news-meta .cat { color: var(--green-dark); font-weight: 600; }
.news-body h3 { font-size: 20px; font-weight: 600; margin: 0; }

.agenda-list { display: grid; gap: 16px; }
.agenda-item {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 24px;
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.agenda-date {
  flex: none;
  width: 72px;
  text-align: center;
  padding: 10px 0;
  border-radius: 12px;
  background: var(--green);
  color: #fff;
  font-family: var(--font-head);
  line-height: 1.1;
}
.agenda-date strong { display: block; font-size: 28px; }
.agenda-date span { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.agenda-item h3 { font-size: 18px; margin: 0 0 4px; }
.agenda-item p { margin: 0; font-size: 14.5px; color: var(--muted); }

.placeholder-note {
  margin-top: 28px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--blue);
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 14.5px;
}

/* ---------- Appel à l'action ---------- */
.cta {
  position: relative;
  overflow: hidden;
  background: var(--green);
  color: #fff;
  padding: 90px 0;
}
.cta::before, .cta::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.cta::before { width: 420px; height: 420px; right: -120px; top: -180px; }
.cta::after { width: 260px; height: 260px; left: -80px; bottom: -140px; }
.cta .container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.cta h2 { color: #fff; font-size: clamp(30px, 3.6vw, 44px); margin-bottom: 10px; }
.cta p { margin: 0; font-size: 18px; color: rgba(255,255,255,.9); max-width: 620px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Bannière de page (pages internes) ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 100px 0 90px;
  background: linear-gradient(120deg, var(--navy) 0%, var(--blue) 100%);
  color: #fff;
}
.page-hero::after {
  content: "";
  position: absolute;
  right: -100px; top: -100px;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: rgba(122, 187, 87, .2);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; font-size: clamp(38px, 5vw, 60px); font-weight: 700; margin-bottom: 14px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 15.5px; color: rgba(255,255,255,.8); }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb .icon { width: 16px; height: 16px; }

/* ---------- Qui sommes-nous ---------- */
.prose-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
.prose h2 { font-size: 26px; color: var(--blue); margin-bottom: 4px; }
.prose .acronym { font-family: var(--font-head); font-size: 34px; font-weight: 700; color: var(--blue); margin-bottom: 26px; }
.prose .lead { font-size: 20px; color: var(--ink); line-height: 1.65; }

.timeline { position: relative; display: grid; gap: 28px; padding-inline-start: 36px; }
.timeline::before {
  content: "";
  position: absolute;
  inset-inline-start: 9px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--green), var(--blue));
}
.tl-item { position: relative; }
.tl-item::before {
  content: "";
  position: absolute;
  inset-inline-start: -36px; top: 4px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--green);
}
.tl-item:nth-child(even)::before { border-color: var(--blue); }
.tl-item .when { font-family: var(--font-head); font-weight: 700; color: var(--green-dark); font-size: 15px; letter-spacing: .04em; text-transform: uppercase; }
.tl-item h3 { font-size: 21px; margin: 4px 0 6px; }
.tl-item p { margin: 0; }

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

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 48px;
  align-items: start;
}
.contact-cards { display: grid; gap: 18px; }
.contact-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 24px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
}
.contact-card .ico {
  flex: none;
  width: 50px; height: 50px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--green-soft);
  color: var(--green-dark);
}
.contact-card h3 { font-size: 18px; margin: 0 0 2px; }
.contact-card p { margin: 0; }
.contact-card a { color: var(--blue); font-weight: 600; }

.form-card {
  padding: 44px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--bg-alt);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 0;
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(29, 96, 148, .12);
}
.form-status { margin-top: 16px; font-weight: 500; color: var(--green-dark); }

/* ---------- Pied de page ---------- */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.72);
  padding: 90px 0 0;
  font-size: 15.5px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: 48px;
  padding-bottom: 64px;
}
.footer-logo {
  display: inline-block;
  background: #fff;
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 22px;
}
.footer-logo img { height: 70px; width: auto; }
.site-footer h4 { color: #fff; font-size: 18px; margin-bottom: 20px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-links a { transition: color .2s, padding .2s; }
.footer-links a:hover { color: var(--green); padding-inline-start: 4px; }
.footer-contact { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.footer-contact li { display: flex; gap: 12px; align-items: flex-start; }
.footer-contact .icon { color: var(--green); margin-top: 3px; width: 18px; height: 18px; }
.footer-contact a:hover { color: var(--green); }
.socials { display: flex; gap: 10px; margin-top: 22px; }
.socials a {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.08);
  color: #fff;
  transition: background .2s, transform .2s;
}
.socials a:hover { background: var(--green); transform: translateY(-3px); }
.socials .icon { width: 18px; height: 18px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 24px 0;
  font-size: 14px;
}
.footer-bottom .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- Bouton retour en haut ---------- */
.to-top {
  position: fixed;
  inset-inline-end: 24px; bottom: 24px;
  z-index: 40;
  width: 50px; height: 50px;
  border-radius: 50%;
  border: 0;
  display: grid; place-items: center;
  background: var(--green);
  color: #fff;
  box-shadow: 0 10px 24px rgba(122, 187, 87, .45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s, transform .3s, visibility .3s, background .2s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--green-dark); }

/* ---------- Animations d'apparition ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: 0s !important; }
}

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1180px) {
  .main-nav a, .main-nav .nav-drop-btn { padding: 10px 10px; font-size: 15.5px; }
  .header-actions .btn { padding: 12px 18px; }
  .domains { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1024px) {
  :root { --header-h: 80px; }
  .logo img { height: 56px; }
  /* le flou crée un bloc conteneur qui piégerait le menu en position fixe */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }

  .nav-toggle { display: inline-grid; }
  .main-nav {
    position: fixed;
    top: 0; inset-inline-end: 0; bottom: 0;
    width: min(360px, 88vw);
    background: #fff;
    padding: 96px 24px 32px;
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform .35s ease;
    overflow-y: auto;
    z-index: 60;
  }
  .main-nav.open { transform: none; }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav a, .main-nav .nav-drop-btn { width: 100%; justify-content: space-between; padding: 14px 16px; font-size: 17px; border-radius: 12px; }
  .dropdown {
    position: static;
    box-shadow: none;
    border: 0;
    padding: 0;
    padding-inline-start: 12px;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }
  .has-dropdown:hover .dropdown { display: none; }
  .has-dropdown.open .dropdown { display: block; }
  .nav-backdrop {
    position: fixed; inset: 0;
    background: rgba(6, 22, 58, .5);
    z-index: 55;
    opacity: 0; visibility: hidden;
    transition: opacity .3s, visibility .3s;
  }
  .nav-backdrop.show { opacity: 1; visibility: visible; }
  .nav-close { position: absolute; top: 18px; inset-inline-end: 18px; }
  [dir="rtl"] .main-nav { transform: translateX(-100%); }
  [dir="rtl"] .main-nav.open { transform: none; }
  .header-actions { margin-inline-start: auto; }

  .hero { padding: 64px 0 140px; }
  .hero .container, .about-grid, .prose-grid, .contact-grid, .mission-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero-visual { max-width: 560px; }
  .news-grid, .values { grid-template-columns: 1fr 1fr; }
  .cta .container { flex-direction: column; align-items: flex-start; }
  .about-year { inset-inline-end: 16px; }
}

@media (min-width: 1025px) {
  .nav-close, .nav-backdrop { display: none; }
}

@media (max-width: 720px) {
  .topbar-left { gap: 16px; }
  .topbar .container { justify-content: space-between; }
  .topbar .topbar-hours, .topbar .topbar-questions, .lang-switch .icon { display: none; }
  .topbar { font-size: 13.5px; }
  .topbar-item { white-space: nowrap; }
  .topbar-right { gap: 0; }
  .topbar .lang-switch { padding-inline-start: 0; border: 0; gap: 2px; }
  .topbar .lang-switch a { padding: 3px 8px; }
  .header-actions .btn-membre { display: none; }

  .section { padding: 80px 0; }
  .feature-cards .grid, .domains, .news-grid, .values, .form-grid { grid-template-columns: 1fr; }
  .feature-card { padding: 40px 28px; }
  .section-head-row { flex-direction: column; align-items: flex-start; }
  .about-card { padding: 44px 28px; }
  .form-card { padding: 28px 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .agenda-item { align-items: flex-start; }
}

@media (max-width: 420px) {
  .container { padding: 0 16px; }
  .btn { padding: 13px 20px; }
}

/* Icônes (sprite SVG au trait) */
.icon { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Page Programmes : présentation détaillée ---------- */
.program-rows { display: grid; gap: 80px; }
.program-row {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 64px;
  align-items: center;
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.program-row:nth-child(even) .program-row-img { order: 2; }
.program-row-img {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 1;
  max-width: 480px;
  width: 100%;
}
.program-row:nth-child(even) .program-row-img { justify-self: end; }
.program-row-img img { width: 100%; height: 100%; object-fit: cover; }
.program-row .num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 56px;
  line-height: 1;
  color: var(--green);
  opacity: .35;
}
.program-row h2 { font-size: clamp(28px, 3vw, 38px); color: var(--blue); margin: 10px 0 16px; }
.program-row p { font-size: 17px; }
.program-row .program-tag { position: static; display: inline-block; background: var(--green-soft); color: var(--green-dark); }

[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

@media (max-width: 1024px) {
  .program-row { grid-template-columns: 1fr; gap: 32px; }
  .program-row:nth-child(even) .program-row-img { order: 0; justify-self: start; }
}

/* ---------- Sélecteur de langue (barre du haut) ---------- */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-inline-start: 22px;
  border-inline-start: 1px solid rgba(255,255,255,.2);
}
.lang-switch .icon { width: 16px; height: 16px; color: var(--green); margin-inline-end: 4px; }
.topbar .lang-switch a { padding: 3px 10px; border-radius: 999px; font-size: 13.5px; font-weight: 600; opacity: .85; line-height: 1.4; }
.topbar .lang-switch a:hover { opacity: 1; color: var(--green); }
.topbar .lang-switch a.current { background: var(--green); color: #fff; opacity: 1; }
.lang-switch a[lang="ar"] { font-family: "Cairo", "Segoe UI", Tahoma, sans-serif; font-size: 15px; }

/* ---------- Téléphone dans le héro (sous les boutons, ne cache plus d'image) ---------- */
.hero-phone {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
  padding-block: 12px;
  padding-inline: 12px 24px;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
}
.hero-phone:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.hero-phone .ico {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--green-soft);
  color: var(--green-dark);
}
.hero-phone strong { display: block; font-family: var(--font-head); color: var(--ink); font-size: 18px; line-height: 1.2; }
.hero-phone small { color: var(--muted); font-size: 13.5px; }

/* ---------- Notre mission ---------- */
.mission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.mission-media { position: relative; padding-bottom: 20%; padding-inline-end: 20%; max-width: 560px; }
.mission-media img { object-fit: cover; aspect-ratio: 1; }
.mission-media .m-main { width: 100%; border-radius: 24px; box-shadow: var(--shadow); }
.mission-media .m-second {
  position: absolute;
  bottom: 0;
  inset-inline-end: 0;
  width: 52%;
  border-radius: 20px;
  border: 6px solid #fff;
  box-shadow: var(--shadow-lg);
}
.mission-text .lead { font-size: 18.5px; color: var(--ink); }
.slogans { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 12px; }
.slogans li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--green-soft);
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.45;
}
.section-alt .slogans li { background: #fff; box-shadow: 0 4px 14px rgba(6, 22, 58, .05); }
.slogans .icon { color: var(--green-dark); margin-top: 3px; }
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 56px;
  margin-top: 30px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.stat { display: flex; align-items: center; gap: 14px; }
.stat strong { font-family: var(--font-head); font-size: 58px; font-weight: 600; line-height: 1; color: var(--green); }
.stat span { font-family: var(--font-head); font-weight: 600; font-size: 16.5px; line-height: 1.3; color: var(--ink); }

/* ---------- Page en construction / 404 ---------- */
.construction {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 40px;
  text-align: center;
  border-radius: 24px;
  background: var(--bg-alt);
  border: 1.5px dashed rgba(29, 96, 148, .3);
}
.construction-ico {
  width: 84px; height: 84px;
  margin: 0 auto 26px;
  border-radius: 24px;
  display: grid; place-items: center;
  background: var(--green);
  color: #fff;
  box-shadow: 0 12px 28px rgba(122, 187, 87, .4);
}
.construction-ico .icon { width: 40px; height: 40px; }
.construction .eyebrow::after { content: ""; width: 28px; height: 3px; border-radius: 3px; background: var(--green); }
.construction p { font-size: 18px; color: var(--muted); }
.construction-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 28px; }
.notfound-langs { margin-top: 32px; font-size: 15px; line-height: 2; }
.notfound-langs a { color: var(--blue); font-weight: 500; }

/* ==========================================================
   Version arabe (droite à gauche)
   ========================================================== */
[dir="rtl"] { --font-head: "Cairo", "Segoe UI", Tahoma, sans-serif; --font-body: "Cairo", "Segoe UI", Tahoma, sans-serif; }
[dir="rtl"] body { line-height: 1.85; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 { line-height: 1.4; }
/* l'espacement des lettres casse la liaison des lettres arabes */
[dir="rtl"] .eyebrow, [dir="rtl"] .tl-item .when, [dir="rtl"] .hero h1,
[dir="rtl"] .section-title { letter-spacing: 0; text-transform: none; }
/* flèches et chevrons tournés vers la gauche */
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }
[dir="rtl"] .btn:hover .icon.flip-rtl { transform: scaleX(-1) translateX(3px); }
[dir="rtl"] .program:hover .program-link .icon.flip-rtl { transform: scaleX(-1) translateX(4px); }
[dir="rtl"] input[type="email"], [dir="rtl"] input[type="tel"] { text-align: right; }

@media (max-width: 720px) {
  .stat strong { font-size: 46px; }
  .construction { padding: 40px 22px; }
}

/* ---------- Formulaire : champ piège anti-robots et messages ---------- */
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.form-status.is-error { color: #c53030; }
button[disabled] { opacity: .65; cursor: progress; transform: none; }
