:root {
  --green: #2F4F3E;
  --green-dark: #233B2E;
  --cream: #F5EFE6;
  --cream-deep: #EDE4D6;
  --gold: #B8860B;
  --ink: #1F2A24;
  --muted: #4A564F;
  --white: #FFFDF9;
  --radius: 10px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --arabic: "Noto Naskh Arabic", "Geeza Pro", "Traditional Arabic", "Simplified Arabic", "Times New Roman", serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--green);
  line-height: 1.25;
  margin: 0 0 .6em;
  overflow-wrap: break-word;
}

html[lang="ar"] body { font-family: var(--arabic); font-size: 1.08rem; line-height: 1.8; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { font-family: var(--arabic); }

a { color: var(--green); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1rem;
}

.skip-link {
  position: absolute;
  inset-inline-start: .5rem;
  top: -3rem;
  background: var(--green);
  color: var(--white);
  padding: .5rem 1rem;
  border-radius: var(--radius);
  z-index: 100;
}
.skip-link:focus { top: .5rem; }

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding-top: .6rem;
  padding-bottom: .4rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  min-width: 0;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  color: var(--cream);
  font-family: var(--serif);
  font-weight: 700;
}
.brand-name {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--green);
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.lang-switch {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
}
.lang-btn {
  font: inherit;
  font-size: .85rem;
  padding: .3rem .6rem;
  min-height: 2.25rem;
  border: 1px solid var(--green);
  background: transparent;
  color: var(--green);
  border-radius: 999px;
  cursor: pointer;
}
.lang-btn[aria-pressed="true"] {
  background: var(--green);
  color: var(--white);
}

/* Nav : passe à la ligne, jamais de défilement horizontal */
.main-nav { background: var(--white); }
.nav-list {
  list-style: none;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .25rem .5rem;
  padding-top: .25rem;
  padding-bottom: .5rem;
}
.nav-list li { max-width: 100%; }
.nav-list a {
  display: inline-block;
  padding: .35rem .6rem;
  font-size: .9rem;
  text-decoration: none;
  color: var(--green);
  border-radius: 6px;
  white-space: normal;
  text-align: center;
}
.nav-list a:hover { background: var(--cream-deep); }

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-deep) 100%);
  padding: 3rem 0 3.5rem;
  text-align: center;
}
.eyebrow {
  margin: 0 0 .5rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
}
html[lang="ar"] .eyebrow { letter-spacing: 0; text-transform: none; font-size: .95rem; }
.hero h1 { font-size: clamp(1.8rem, 7vw, 3rem); }
.hero h1::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  background: var(--gold);
  margin: .6em auto 0;
}
.slogan {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
}
html[lang="ar"] .slogan { font-family: var(--arabic); font-style: normal; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
}

/* Buttons */
.btn {
  display: inline-block;
  max-width: 100%;
  font: inherit;
  font-weight: 600;
  padding: .7rem 1.2rem;
  border-radius: var(--radius);
  text-decoration: none;
  border: 2px solid var(--green);
  cursor: pointer;
  text-align: center;
}
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-dark); }
.btn-ghost { background: transparent; color: var(--green); }
.btn-ghost:hover { background: var(--white); }
.btn[disabled] {
  background: #C9C3B8;
  border-color: #C9C3B8;
  color: #2E332F;
  cursor: not-allowed;
}

/* Sections */
.section { padding: 3rem 0; }
.section-alt { background: var(--white); }
.section h2 { font-size: clamp(1.5rem, 5vw, 2.1rem); }
.section h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  background: var(--gold);
  margin-top: .4em;
}
.lead { font-size: 1.1rem; max-width: 60ch; }

.card {
  background: var(--white);
  border: 1px solid var(--cream-deep);
  border-inline-start: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.25rem;
  min-width: 0;
}
.section-alt .card { background: var(--cream); }
.card h3 { font-size: 1.2rem; }
.card p:last-child { margin-bottom: 0; }

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

.feature-slot {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border: 1px dashed var(--green);
  border-radius: var(--radius);
}
.feature-slot h3 { font-size: 1.15rem; }

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 720px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .brand-name { font-size: 1.15rem; }
  .nav-list a { font-size: 1rem; }
}

.info-list { margin: 0; }
.info-list > div { margin-bottom: .6rem; }
.info-list dt { font-weight: 600; color: var(--green); }
.info-list dd { margin: 0; }
.break { overflow-wrap: anywhere; word-break: break-word; }

/* Footer */
.site-footer {
  background: var(--green);
  color: var(--cream);
  text-align: center;
  padding: 1rem 0;
  font-size: .8rem;
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--cream); }
