/* ==========================================================================
   rues.tmaps.tn : charte TMaps
   Tokens repris de https://www.tmaps.tn/ (Tailwind v4 theme)
   ========================================================================== */

:root {
  /* On declare les deux themes : le navigateur suit alors le reglage du
     systeme pour les champs, les barres de defilement et les menus natifs,
     et il n'applique pas son assombrissement automatique par-dessus. */
  color-scheme: light dark;

  --primary: #006bff;
  --primary-foreground: #ffffff;
  --primary-dark: #0054c9;
  --accent: #1e3a8a;
  --accent-light: #38bdf8;

  --background: #f8f9ff;
  --foreground: #181c31;
  --card: #ffffff;
  --card-foreground: #181c31;
  --muted: #f3f4f6;
  --muted-foreground: #757693;
  --border: #eeeeee;
  --ring: #006bff;

  --success: #059669;
  --success-soft: #ecfdf5;

  --radius: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;

  --font-sans: "Geist", "Geist Sans", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 36px rgba(15, 23, 42, 0.12);

  --wrap: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --background: #181c31;
    --foreground: #f9fafb;
    --card: #1c2136;
    --card-foreground: #f9fafb;
    --muted: #252a42;
    --muted-foreground: #999aa1;
    --border: #2d2f40;
    --accent: #38bdf8;
    --success-soft: #0d2b22;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  --background: #181c31;
  --foreground: #f9fafb;
  --card: #1c2136;
  --card-foreground: #f9fafb;
  --muted: #252a42;
  --muted-foreground: #999aa1;
  --border: #2d2f40;
  --accent: #38bdf8;
  --success-soft: #0d2b22;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.5);
}

/* --- reset ---------------------------------------------------------------- */

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 700;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* --- layout --------------------------------------------------------------- */

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

.section { padding-block: 72px; }
.section--tight { padding-block: 56px; }

.section__head {
  max-width: 660px;
  margin: 0 auto 48px;
  text-align: center;
}

.section__head h2 {
  font-size: clamp(1.625rem, 4vw, 2.25rem);
}

.section__head p {
  color: var(--muted-foreground);
  font-size: 1.0625rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

/* --- header --------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: color-mix(in srgb, var(--background) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
.brand img { height: 34px; width: auto; display: block; }
.brand .logo-dark { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand .logo-light { display: none; }
  :root:not([data-theme="light"]) .brand .logo-dark { display: block; }
}
:root[data-theme="dark"] .brand .logo-light { display: none; }
:root[data-theme="dark"] .brand .logo-dark { display: block; }

.brand__sep {
  width: 1px;
  height: 22px;
  background: var(--border);
}

.brand__tag {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--muted-foreground);
  white-space: nowrap;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  border-radius: var(--radius);
}
.nav-link:hover {
  text-decoration: none;
  color: var(--primary);
  background: var(--muted);
}

@media (max-width: 720px) {
  .brand__sep, .brand__tag { display: none; }
  .nav-link--hide-sm { display: none; }
}

/* --- boutons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease,
    box-shadow 0.18s ease, color 0.18s ease;
  text-align: center;
}
.btn:hover { text-decoration: none; }

.btn--primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 6px 20px rgba(0, 107, 255, 0.28);
}
.btn--primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(0, 107, 255, 0.34);
}
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  background: transparent;
  color: var(--foreground);
  border-color: var(--border);
}
.btn--ghost:hover { background: var(--muted); color: var(--primary); }

.btn--sm { padding: 9px 18px; font-size: 0.875rem; }
.btn--lg { padding: 17px 34px; font-size: 1.0625rem; }

.btn svg { flex: none; }

/* --- hero ----------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: 72px 80px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(60rem 30rem at 82% -10%, rgba(0, 107, 255, 0.10), transparent 62%),
    radial-gradient(44rem 26rem at 8% 108%, rgba(56, 189, 248, 0.10), transparent 60%);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding-block: 48px 56px; }
}

.hero h1 {
  font-size: clamp(2rem, 5.2vw, 3.125rem);
  margin-bottom: 1rem;
}

.hero h1 .hl {
  color: var(--primary);
  white-space: nowrap;
}

.hero__lead {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 34rem;
  margin-bottom: 1.75rem;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 1rem;
}

.hero__reassure {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin: 0;
}

.hero__reassure span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero__reassure svg { color: var(--success); flex: none; }

.hero__art {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-lg);
}
.hero__art svg { display: block; width: 100%; height: auto; }

@media (max-width: 520px) {
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { width: 100%; }
}

/* --- bandeau de confiance ------------------------------------------------- */

.trust {
  border-bottom: 1px solid var(--border);
  background: var(--card);
  padding-block: 20px;
}

.trust__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 32px;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.trust__item { display: inline-flex; align-items: center; gap: 8px; }
.trust__item svg { color: var(--primary); flex: none; }
.trust__item strong { color: var(--foreground); font-weight: 600; }

/* --- cartes --------------------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  gap: 22px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(0, 107, 255, 0.10);
  color: var(--primary);
  margin-bottom: 16px;
}

.card h3 { font-size: 1.125rem; }
.card p { color: var(--muted-foreground); font-size: 0.9375rem; margin: 0; }

/* --- étapes --------------------------------------------------------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 28px;
  counter-reset: step;
}

.step { position: relative; padding-top: 8px; }

.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 1.0625rem;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(0, 107, 255, 0.28);
}

.step h3 { font-size: 1.0625rem; }
.step p { color: var(--muted-foreground); font-size: 0.9375rem; margin: 0; }

/* --- section confidentialité --------------------------------------------- */

.privacy {
  background: var(--card);
  border-block: 1px solid var(--border);
}

.privacy__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 880px) {
  .privacy__grid { grid-template-columns: 1fr; gap: 32px; }
}

.privacy h2 { font-size: clamp(1.5rem, 3.6vw, 2rem); }
.privacy__grid > div > p { color: var(--muted-foreground); }

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

.checklist li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 14px;
  align-items: start;
}

.checklist svg { margin-top: 3px; color: var(--success); flex: none; }
.checklist strong { display: block; margin-bottom: 2px; }
.checklist span { color: var(--muted-foreground); font-size: 0.9375rem; }

/* --- à propos ------------------------------------------------------------- */

.about__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 880px) {
  .about__grid { grid-template-columns: 1fr; gap: 32px; }
}

.about__box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.about__box dl { margin: 0; display: grid; gap: 14px; }
.about__box dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.about__box dd { margin: 2px 0 0; font-weight: 500; }

/* --- FAQ ------------------------------------------------------------------ */

.faq { max-width: 780px; margin-inline: auto; display: grid; gap: 12px; }

.faq details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 20px;
  transition: border-color 0.18s ease;
}
.faq details[open] { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 32px 16px 0;
  font-weight: 600;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted-foreground);
  border-bottom: 2px solid var(--muted-foreground);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }

.faq details > p {
  padding: 0 0 18px;
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.9375rem;
}
.faq details > p + p { padding-top: 0; margin-top: -8px; }

/* --- CTA final ------------------------------------------------------------ */

.cta-final {
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
  color: #fff;
  text-align: center;
  padding-block: 64px;
}

.cta-final h2 { color: #fff; font-size: clamp(1.625rem, 4vw, 2.25rem); }

.cta-final p {
  color: rgba(255, 255, 255, 0.88);
  max-width: 34rem;
  margin: 0 auto 28px;
  font-size: 1.0625rem;
}

.cta-final .btn--primary {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}
.cta-final .btn--primary:hover { background: #eef4ff; color: var(--accent); }

.cta-final small { display: block; margin-top: 18px; color: rgba(255,255,255,0.75); font-size: 0.8125rem; }

/* --- footer --------------------------------------------------------------- */

.site-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding-block: 48px 32px;
  font-size: 0.9375rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}

@media (max-width: 760px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: 28px; }
}

.site-footer h3 {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 14px;
}

.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: var(--foreground); }
.site-footer a:hover { color: var(--primary); }
.site-footer p { color: var(--muted-foreground); max-width: 32rem; }
.site-footer .brand { margin-bottom: 14px; }

.site-footer__bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* --- pages de contenu ----------------------------------------------------- */

.doc { max-width: 760px; margin-inline: auto; padding-block: 56px 72px; }
.doc h1 { font-size: clamp(1.75rem, 4.5vw, 2.5rem); margin-bottom: 0.5rem; }
.doc__meta { color: var(--muted-foreground); font-size: 0.875rem; margin-bottom: 2.5rem; }
.doc h2 {
  font-size: 1.25rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.doc h3 { font-size: 1.0625rem; margin-top: 1.75rem; }
.doc p, .doc li { color: var(--foreground); }
.doc ul, .doc ol { padding-left: 1.25rem; display: grid; gap: 8px; margin: 0 0 1rem; }

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.9375rem;
}
.doc th, .doc td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.doc th { font-weight: 600; background: var(--muted); }
.table-scroll { overflow-x: auto; }

.callout {
  background: var(--muted);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 20px;
  margin: 1.5rem 0;
}
.callout p { margin: 0; font-size: 0.9375rem; }
.callout p + p { margin-top: 0.75rem; }

/* --- page désinscription -------------------------------------------------- */

.unsub {
  min-height: 60vh;
  display: grid;
  place-items: center;
  padding-block: 64px;
}

.unsub__card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 40px;
  max-width: 540px;
  width: 100%;
  text-align: center;
}

@media (max-width: 520px) { .unsub__card { padding: 28px 22px; } }

.unsub__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(0, 107, 255, 0.10);
  color: var(--primary);
  margin-bottom: 20px;
}

.unsub__icon--ok { background: var(--success-soft); color: var(--success); }

.unsub__card h1 { font-size: 1.5rem; }
.unsub__card p { color: var(--muted-foreground); }

.unsub__email {
  display: inline-block;
  background: var(--muted);
  border-radius: var(--radius);
  padding: 8px 14px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 1.5rem;
  word-break: break-all;
}

.unsub__actions { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }

/* --- carte de Tunisie (hero) ---------------------------------------------- */

.tn-map { display: block; width: 100%; height: auto; }
.tn-map__land { fill: rgba(0, 107, 255, 0.13); stroke: var(--primary); stroke-width: 1.4; }
.tn-map__isle { fill: rgba(0, 107, 255, 0.13); stroke: var(--primary); stroke-width: 1; }
.tn-map__dot  { fill: var(--primary); opacity: .55; }
.tn-map__label { fill: var(--muted-foreground); font-size: 8.5px; font-weight: 600; }
.tn-map__zoom { fill: var(--card); stroke: var(--border); stroke-width: 1.2; }
.tn-map__cone { stroke: var(--primary); stroke-width: 1; stroke-dasharray: 3 3; opacity: .5; fill: none; }

/* --- couverture nationale : gouvernorats ---------------------------------- */

.coverage__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 900px) {
  .coverage__grid { grid-template-columns: 1fr; gap: 32px; }
}

.govs {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.govs li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  box-shadow: var(--shadow-sm);
}

.coverage__note {
  margin-top: 22px;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.coverage__art .tn-map { max-width: 218px; margin-inline: auto; }

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

/* --- fil d'Ariane --------------------------------------------------------- */

.crumbs { font-size: 0.8125rem; color: var(--muted-foreground); margin-bottom: 1.5rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumbs li::after { content: "›"; margin-left: 6px; opacity: .6; }
.crumbs li:last-child::after { content: ""; }

/* --- divers --------------------------------------------------------------- */

address { font-style: normal; }

.sr-heading {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin: 28px 0 0;
}
