/* Domiciliation Afrique : feuille de style. Polices système, aucune ressource externe. */

:root {
  --bg: #fbf9f4;
  --ink: #1b1b19;
  --muted: #5a5850;
  --line: #ddd8ca;
  --green: #0a7646;
  --green-dark: #07603a;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1.0625rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

/* Bande aux couleurs du drapeau du pays : uniquement sur les pages d'une ville (body[data-site]).
   L'accueil, les pages légales et la page 404 n'ont pas de bande. Une classe theme-xx par ville. */
:root { --flag: linear-gradient(90deg, #008751 0 33.34%, #fcd116 0 66.67%, #e8112d 0); }
body.theme-ci { --flag: linear-gradient(90deg, #f77f00 0 33.34%, #ffffff 0 66.67%, #009e60 0); }
body.theme-tg { --flag: linear-gradient(90deg, #d21034 0 14%, #006a4e 0 38%, #ffce00 0 62%, #006a4e 0 86%, #ffce00 0); }
body.theme-sn { --flag: linear-gradient(90deg, #00853f 0 33.34%, #fdef42 0 66.67%, #e31b23 0); }
body.theme-gn { --flag: linear-gradient(90deg, #ce1126 0 33.34%, #fcd116 0 66.67%, #009460 0); }
body.theme-cm { --flag: linear-gradient(90deg, #007a5e 0 33.34%, #ce1126 0 66.67%, #fcd116 0); }
body.theme-ga { --flag: linear-gradient(90deg, #009e60 0 33.34%, #fcd116 0 66.67%, #3a75c4 0); }
body.theme-cd { --flag: linear-gradient(90deg, #007fff 0 36%, #f7d618 0 42%, #ce1021 0 58%, #f7d618 0 64%, #007fff 0); }
body.theme-cg { --flag: linear-gradient(90deg, #009543 0 33.34%, #fbde4a 0 66.67%, #dc241f 0); }
body.theme-td { --flag: linear-gradient(90deg, #002664 0 33.34%, #fecb00 0 66.67%, #c60c30 0); }
body[data-site]::before {
  content: "";
  display: block;
  height: 5px;
  background: var(--flag);
}

h1, h2, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2 { line-height: 1.15; letter-spacing: -.02em; }
img { display: block; max-width: 100%; }
a { color: var(--green); text-underline-offset: .2em; }
a:hover { color: var(--green-dark); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 46rem; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: .5rem .9rem;
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
}
.skip-link:focus { top: .75rem; color: #fff; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  padding: .7rem 1.25rem;
  border: 0;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  font: inherit;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--green-dark); color: #fff; }
.btn-small { padding: .45rem .9rem; font-size: .95rem; }
.btn-outline {
  display: inline-block;
  padding: .7rem 1.25rem;
  border: 1px solid var(--green);
  border-radius: 6px;
  background: transparent;
  color: var(--green);
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}
.btn-outline:hover { background: var(--green); color: #fff; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; }

/* ---------- En-tête ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 1.5rem; min-height: 4rem; }
.brand {
  position: relative;
  margin-right: auto;
  padding-left: 2.85rem;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.2;
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
/* Logo « DA » (images/favicon.svg) devant le nom, sur toutes les pages. */
.brand::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2.15rem;
  height: 2.15rem;
  transform: translateY(-50%);
  background: url("../images/favicon.svg") center / contain no-repeat;
}
.brand-city {
  display: block;
  margin-top: .1rem;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 400;
  letter-spacing: 0;
}
/* Lien « Changer de ville » sous le nom : renvoie à l'accueil (choix de la ville). Sur mobile, il passe sur sa propre ligne. */
.brand-change { margin-left: .5rem; color: var(--green); text-decoration: underline; text-underline-offset: .2em; }
.brand-change::before { content: "\00b7"; display: inline-block; margin-right: .5rem; color: var(--muted); text-decoration: none; }
.brand:hover .brand-change { color: var(--green-dark); }
.site-nav { display: flex; gap: 1.5rem; }
.site-nav a { color: var(--muted); font-size: .98rem; text-decoration: none; }
.site-nav a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Accueil ---------- */
.hero { padding: 3.5rem 0 4rem; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
  gap: 3.5rem;
  align-items: center;
}
.hero h1 { max-width: 12em; font-size: clamp(2rem, 4.8vw, 3rem); }
.lead { margin-top: 1.25rem; max-width: 34rem; color: var(--muted); font-size: 1.15rem; }
.lead strong { color: var(--ink); }
.price { margin-top: 1.5rem; }
.price strong { font-size: 1.3rem; }
.price-note { margin-top: .3rem; color: var(--muted); font-size: .95rem; }
.hero .actions { margin-top: 1.5rem; }

.photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 2px;
  background: #e9e2d0;
}

/* ---------- Sections ---------- */
.section { padding: 3.25rem 0; border-top: 1px solid var(--line); }
.section-grid { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 1rem 3rem; }
.section h2 { font-size: 1.3rem; }
.section-body { max-width: 40rem; }
.section-body > * + * { margin-top: 1.25rem; }

.items { padding: 0; list-style: none; }
.items li { padding: .85rem 0; }
.items li:first-child { padding-top: 0; }
.items li:last-child { padding-bottom: 0; }
.items li + li { border-top: 1px solid var(--line); }
.note { color: var(--muted); font-size: .98rem; }

.steps { padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding-left: 2.25rem; counter-increment: step; }
.steps li + li { margin-top: .9rem; }
.steps li::before {
  content: counter(step) ".";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--green);
  font-weight: 700;
}

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative;
  padding: .9rem 2.25rem .9rem 0;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: .2rem;
  top: .55rem;
  color: var(--green);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.5;
}
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover { color: var(--green-dark); }
.faq .answer { padding: 0 2.25rem 1rem 0; }
.faq .answer p + p { margin-top: .6rem; }

/* ---------- Formulaire ---------- */
.form { display: grid; gap: 1rem; max-width: 30rem; margin-top: 1.75rem; }
.field { display: grid; gap: .3rem; }
.field label { font-size: .95rem; font-weight: 600; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .65rem .75rem;
  border: 1px solid #b5af9e;
  border-radius: 4px;
  background: #fff;
  color: inherit;
  font: inherit;
}
.field textarea { min-height: 7rem; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--green); outline: 2px solid var(--green); outline-offset: 0; }
.consent {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.5;
}
.consent input { flex: none; width: 1.1rem; height: 1.1rem; margin: .2rem 0 0; accent-color: var(--green); }
.form .btn { justify-self: start; }
.small { color: var(--muted); font-size: .9rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Pied de page ---------- */
.site-footer { margin-top: auto; padding: 1.75rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.footer-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; }

/* ---------- Pages secondaires ---------- */
.page { padding: 3rem 0 4.5rem; }
.page h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.page .lead { max-width: none; }
.page .actions { margin-top: 1.75rem; }
.meta { margin-top: .6rem; color: var(--muted); font-size: .95rem; }

.legal h2 { margin: 2.25rem 0 .4rem; font-size: 1.2rem; }
.legal p, .legal ul, .legal dl { margin-top: .6rem; }
.legal ul { padding-left: 1.2rem; }
.legal li + li { margin-top: .35rem; }
.legal dl { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: .4rem 1.5rem; }
.legal dt { font-weight: 600; }

mark.todo {
  padding: .05em .4em;
  border-radius: 3px;
  background: #fff0b3;
  color: #5c3b00;
  font-weight: 600;
}

/* ---------- Forfaits, paiement et options (page Cotonou) ---------- */
.section-intro { margin-top: .75rem; max-width: 40rem; color: var(--muted); }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-top: 2rem; }
.plan { display: flex; flex-direction: column; padding: 1.6rem 1.5rem 1.5rem; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.plan h3 { margin: 0; font-size: 1.15rem; letter-spacing: -.01em; }
.plan-tagline { margin-top: .2rem; color: var(--muted); font-size: .95rem; }
.plan-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .45rem; margin-top: 1.1rem; }
.plan-price strong { font-size: 2.1rem; line-height: 1.1; letter-spacing: -.02em; }
.plan-price span { color: var(--muted); font-size: .95rem; }
.plan-includes { margin-top: 1.25rem; font-size: .95rem; font-weight: 600; }
.plan-list { margin: .6rem 0 1.5rem; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.plan-list li { position: relative; padding: .6rem 0 .6rem 1.5rem; border-bottom: 1px solid var(--line); font-size: .98rem; line-height: 1.45; }
.plan-list li::before {
  content: "";
  position: absolute;
  left: .1rem;
  top: .85rem;
  width: .7rem;
  height: .38rem;
  border-bottom: 2px solid var(--green);
  border-left: 2px solid var(--green);
  transform: rotate(-45deg);
}
.plan .btn-outline { margin-top: auto; }

.section-body h3 { margin: 2.5rem 0 0; font-size: 1.05rem; letter-spacing: -.01em; }
.section-body > h3:first-child { margin-top: 0; }
.section-body h3 + * { margin-top: .75rem; }

.pricing { width: 100%; border-collapse: collapse; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.pricing th, .pricing td { padding: .7rem 0 .7rem .75rem; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.pricing thead th { color: var(--muted); font-size: .9rem; font-weight: 600; white-space: normal; }
.pricing th:first-child, .pricing td:first-child { padding-left: 0; text-align: left; }
.pricing tbody th { font-weight: 700; }

.price-list { border-top: 1px solid var(--line); }
.price-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 0 1.5rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.price-list dd { flex: none; font-weight: 700; text-align: right; white-space: nowrap; }
.price-list .detail { display: block; color: var(--muted); font-size: .9rem; }

/* ---------- Choix de la ville ---------- */
.cities { margin: 2rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.cities li { border-bottom: 1px solid var(--line); }
.city-link {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1.15rem 0;
  color: var(--ink);
  text-decoration: none;
}
a.city-link:hover .city-name { color: var(--green-dark); text-decoration: underline; }
.city-name { display: block; font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }
.city-meta { display: block; margin-top: .1rem; color: var(--muted); font-size: .95rem; }
.city-go { color: var(--green); font-weight: 600; white-space: nowrap; }

/* Ville pas encore ouverte : ligne grisée, non cliquable (div au lieu de lien), avec « À venir en 2028 » */
.city-link.is-soon { padding: .95rem 0; cursor: default; }
.is-soon .flag { filter: grayscale(1); opacity: .5; }
.is-soon .city-name { color: #75726a; font-weight: 600; }
.is-soon .city-go { padding: .2rem .8rem; border: 1px solid var(--line); border-radius: 999px; color: #75726a; font-size: .9rem; }
.region { margin: 2.25rem 0 0; color: var(--muted); font-size: .85rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.region + .cities { margin-top: .6rem; }
.flag { position: relative; display: block; width: 3rem; height: 2rem; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(27, 27, 25, .12); }
.flag::after { content: none; position: absolute; width: .6rem; height: .6rem; transform: translate(-50%, -50%); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.flag-bj { background: linear-gradient(90deg, #008751 0 40%, transparent 40%), linear-gradient(180deg, #fcd116 0 50%, #e8112d 50%); }
.flag-ci { background: linear-gradient(90deg, #f77f00 0 33.34%, #ffffff 33.34% 66.67%, #009e60 66.67%); }
.flag-tg { background: linear-gradient(90deg, #d21034 0 40%, transparent 40% 100%) 0 0 / 100% 60% no-repeat, repeating-linear-gradient(180deg, #006a4e 0 20%, #ffce00 20% 40%); }
.flag-tg::after { content: ""; left: 20%; top: 30%; background: #ffffff; }
.flag-sn { background: linear-gradient(90deg, #00853f 0 33.34%, #fdef42 33.34% 66.67%, #e31b23 66.67%); }
.flag-sn::after { content: ""; left: 50%; top: 50%; background: #00853f; }
.flag-gn { background: linear-gradient(90deg, #ce1126 0 33.34%, #fcd116 33.34% 66.67%, #009460 66.67%); }
.flag-cm { background: linear-gradient(90deg, #007a5e 0 33.34%, #ce1126 33.34% 66.67%, #fcd116 66.67%); }
.flag-cm::after { content: ""; left: 50%; top: 50%; background: #fcd116; }
.flag-ga { background: linear-gradient(180deg, #009e60 0 33.34%, #fcd116 33.34% 66.67%, #3a75c4 66.67%); }
.flag-cd { background: linear-gradient(to bottom right, #007fff 0 41%, #f7d618 41% 45%, #ce1021 45% 55%, #f7d618 55% 59%, #007fff 59%); }
.flag-cd::after { content: ""; left: 20%; top: 26%; background: #f7d618; }
.flag-cg { background: linear-gradient(to bottom right, #009543 0 33%, #fbde4a 33% 67%, #dc241f 67%); }
.flag-td { background: linear-gradient(90deg, #002664 0 33.34%, #fecb00 33.34% 66.67%, #c60c30 66.67%); }

.credit { color: var(--muted); font-size: .85rem; }
.theme-ci .photo img { object-position: 50% 0; }

/* ---------- Vérification d'une attestation (fenêtre ouverte par l'onglet « Vérification ») ---------- */
.verif { width: min(26rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); padding: 0; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); box-shadow: 0 16px 48px rgba(27, 27, 25, .28); }
.verif::backdrop { background: rgba(27, 27, 25, .5); }
body:has(dialog.verif[open]) { overflow: hidden; }
.verif-box { padding: 1.5rem 1.5rem 1.6rem; }
.verif-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.verif-head h2 { font-size: 1.25rem; }
.verif-close { flex: none; width: 2.2rem; height: 2.2rem; margin: -.4rem -.5rem 0 0; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font: inherit; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.verif-close:hover { background: #f1ede2; color: var(--ink); }
.verif-intro { margin-top: .6rem; color: var(--muted); font-size: .95rem; }
.verif .form { max-width: none; margin-top: 1.1rem; }
#verif-matricule { text-transform: uppercase; letter-spacing: .08em; }
.verif-result { margin-top: 1rem; padding: .85rem 1rem; border-left: 4px solid var(--line); border-radius: 3px; background: #f6f3ea; font-size: .98rem; }
.verif-result:empty { display: none; }
.verif-result strong { display: block; margin-bottom: .15rem; }
.verif-result.is-ok { border-color: var(--green); background: #e9f4ee; }
.verif-result.is-warn { border-color: #b7791f; background: #fbf2de; }
.verif-result.is-ko { border-color: #b3261e; background: #fbeceb; }

/* ---------- Tablette et mobile ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) 17rem; gap: 2.5rem; }
}

@media (max-width: 760px) {
  .site-nav { display: none; }
  .site-nav.keep-mobile { display: flex; }
  .brand-change { display: block; margin-left: 0; }
  .brand-change::before { content: none; }
  .hero { padding: 2rem 0 2.5rem; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .photo img { aspect-ratio: 1 / 1; }
  .section { padding: 2.25rem 0; }
  .section-grid { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .page { padding: 2rem 0 3rem; }
  .city-go { display: none; }
  .city-link { grid-template-columns: 2.5rem minmax(0, 1fr); gap: .85rem; }
  .city-link.is-soon { grid-template-areas: "flag name" "flag soon"; row-gap: .1rem; padding: .85rem 0; }
  .is-soon .flag { grid-area: flag; }
  .is-soon .city-name { grid-area: name; align-self: end; }
  .is-soon .city-go { display: block; grid-area: soon; align-self: start; justify-self: start; padding: 0; border: 0; font-size: .95rem; }
  .flag { width: 2.5rem; height: 1.7rem; }
  .legal dl { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  .legal dd { margin-bottom: .75rem; }
}

@media (max-width: 860px) {
  .plans { grid-template-columns: minmax(0, 1fr); max-width: 34rem; }
}

@media (max-width: 520px) {
  .plan { padding: 1.4rem 1.25rem 1.25rem; }
  .pricing { font-size: .92rem; }
  .pricing th, .pricing td { padding-left: .5rem; }
  .price-list > div { flex-direction: column; gap: .15rem; }
  .price-list dd { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
