/*
 * Trempim - site officiel (statique).
 * Une seule feuille pour les 5 langues : proprietes logiques (inline/block)
 * pour que la mise en page s'inverse automatiquement en hebreu et en arabe.
 * Aucune ressource externe (polices systeme uniquement).
 */

:root {
  --green-deep: #0c3826;
  --green: #145524;
  --mint: #54ffb3;
  --blue: #007aff;

  --bg: #fbfbfd;
  --surface: #ffffff;
  --surface-alt: #f2f2f7;
  --text: #0b0b0f;
  --text-soft: #4b5563;
  --border: rgba(60, 60, 67, 0.14);
  --accent: #145524;
  --accent-soft: #e7f5ec;
  --focus: #007aff;

  --radius: 18px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(12, 56, 38, 0.06);
  --max: 1080px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0f;
    --surface: #1c1c1e;
    --surface-alt: #2c2c2e;
    --text: #f2f2f7;
    --text-soft: #a1a1aa;
    --border: rgba(255, 255, 255, 0.12);
    --accent: #54ffb3;
    --accent-soft: rgba(84, 255, 179, 0.12);
    --focus: #54ffb3;
    --shadow: none;
  }
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Hebrew",
    "Noto Sans Arabic", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

:lang(ar) body,
body:lang(ar) {
  font-family: "Segoe UI", Tahoma, "Noto Naskh Arabic", "Noto Sans Arabic", system-ui, Arial,
    sans-serif;
  line-height: 1.8;
}

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

a {
  color: var(--accent);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

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

/* Lien d'evitement : visible uniquement au clavier. */
.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- En-tete ---------- */

.site-header {
  background: var(--green-deep);
  color: #ffffff;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
}

.lang-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lang-nav a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9375rem;
  text-decoration: none;
}

.lang-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.lang-nav a[aria-current="page"] {
  background: var(--mint);
  color: var(--green-deep);
  font-weight: 700;
}

.lang-nav a:focus-visible,
.hero :focus-visible {
  outline-color: var(--mint);
}

/* ---------- Bandeau principal ---------- */

.hero {
  background: linear-gradient(160deg, var(--green-deep) 0%, var(--green) 100%);
  color: #ffffff;
  padding-block: 56px 72px;
}

.hero-inner {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 860px) {
  .hero-inner {
    grid-template-columns: 1.25fr 1fr;
  }
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--mint);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

:lang(en) .eyebrow,
:lang(fr) .eyebrow,
:lang(ru) .eyebrow {
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 5.5vw, 3.25rem);
  line-height: 1.15;
}

.lead {
  max-width: 36em;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.1875rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 28px;
  padding: 6px 14px;
  border: 1px solid rgba(84, 255, 179, 0.5);
  border-radius: 999px;
  color: var(--mint);
  font-size: 0.9375rem;
  font-weight: 600;
}

.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.btn-primary {
  background: var(--mint);
  color: var(--green-deep);
}

.btn-primary:hover {
  background: #7dffc6;
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.6);
  color: #ffffff;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hero-art {
  max-width: 380px;
  margin-inline: auto;
}

/* ---------- Sections ---------- */

.section {
  padding-block: 64px;
}

.section-alt {
  background: var(--surface-alt);
}

.section h2 {
  margin: 0 0 12px;
  font-size: clamp(1.625rem, 3.5vw, 2.125rem);
  line-height: 1.25;
}

.section-intro {
  max-width: 42em;
  margin: 0 0 32px;
  color: var(--text-soft);
}

/* Etapes numerotees */
.steps {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

@media (min-width: 760px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.steps li {
  position: relative;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-block-end: 14px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
}

.steps h3,
.card h3 {
  margin: 0 0 6px;
  font-size: 1.125rem;
}

.steps p,
.card p {
  margin: 0;
  color: var(--text-soft);
}

/* Fonctionnalites */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-block-end: 14px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}

.icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Mise en relation */
.points {
  display: grid;
  gap: 14px;
  max-width: 46em;
  margin: 0;
  padding: 0;
  list-style: none;
}

.points li {
  position: relative;
  padding-inline-start: 34px;
}

.points li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.3em;
  width: 20px;
  height: 20px;
  border: 6px solid var(--accent-soft);
  border-radius: 50%;
  background: var(--accent);
}

/* Contact */
.contact-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 32px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--green-deep) 0%, var(--green) 100%);
  color: #ffffff;
}

.contact-card h2 {
  margin-block-end: 6px;
}

.contact-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

.contact-card .email {
  direction: ltr;
  unicode-bidi: isolate;
  color: var(--mint);
  font-weight: 600;
}

.contact-card :focus-visible {
  outline-color: var(--mint);
}

/* ---------- Pied de page ---------- */

.site-footer {
  padding-block: 28px;
  border-top: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.9375rem;
}

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

.footer-inner p {
  margin: 0;
}

/* ---------- Page de choix de langue (racine) ---------- */

.chooser {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: linear-gradient(160deg, var(--green-deep) 0%, var(--green) 100%);
  color: #ffffff;
  text-align: center;
}

.chooser img {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
}

.chooser h1 {
  margin: 0 0 24px;
  font-size: 2rem;
}

.chooser ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chooser a {
  display: block;
  min-width: 220px;
  padding: 12px 20px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
}

.chooser a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.chooser a:focus-visible {
  outline-color: var(--mint);
}
