/* Royza — site de la marque (/) et site Tunisie (/tn/).
   Charte : bleu nuit #0A1628, or #C9A84C, Montserrat (latin) et Cairo (arabe).
   Toutes les tailles de texte sont ≥ 16 px ; contrastes AA vérifiés (voir tools/README). */
:root {
  --navy: #0A1628;
  --navy-2: #13233E;
  --navy-3: #1D3A66;
  --gold: #C9A84C;          /* sur fond sombre : 7,9:1 */
  --gold-ink: #7A5E1A;      /* or lisible sur fond clair : ≥ 5,6:1 */
  --bg: #F4F6FB;
  --white: #FFFFFF;
  --ink: #0A1628;
  --muted: #4A5568;         /* sur #F4F6FB : 7:1 */
  --line: #D1D8E8;
  --on-dark: #F4F1E8;
  --on-dark-2: #D6DEEC;     /* sur bleu nuit : 13:1 */
  --fill-bg: #FFE066;
  --fill-ink: #1A1300;
  --radius: 18px;
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-ar: "Cairo", "Montserrat", system-ui, sans-serif;
  --wrap: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}
:lang(ar) { font-family: var(--font-ar); }
html[lang="ar"] body { line-height: 1.75; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 16px; top: 8px; transform: translateY(-300%); z-index: 50;
  background: var(--gold); color: var(--navy); padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip:focus { transform: none; }
.ico { width: 24px; height: 24px; flex: none; }
[dir="rtl"] .flip { transform: scaleX(-1); }

/* Champs à remplir et montants à valider par Chiheb */
mark.fill {
  background: var(--fill-bg); color: var(--fill-ink);
  font: 700 1rem/1.4 var(--font);
  padding: 1px 6px; border-radius: 5px;
  unicode-bidi: isolate; overflow-wrap: anywhere;
}
.tbc {
  display: inline-block; vertical-align: middle;
  font-size: 1rem; font-weight: 600; line-height: 1.3;
  padding: 1px 8px; border-radius: 999px;
  border: 1px dashed currentColor; color: var(--gold-ink); background: #FFF8E5;
}
.dark .tbc { color: var(--gold); background: rgba(201, 168, 76, .12); }

/* ───────── Bandeau de pays ───────── */
.geo {
  background: var(--gold); color: var(--navy);
  font-weight: 600;
}
.geo[hidden] { display: none; }
.geo .wrap { display: flex; align-items: center; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.geo p { flex: 1; }
.geo a { font-weight: 800; }
.geo button {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(10, 22, 40, .12); color: var(--navy);
  font: 700 1.4rem/1 var(--font); cursor: pointer;
}

/* ───────── En-tête ───────── */
.top { background: var(--navy); color: var(--on-dark); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(201, 168, 76, .25); }
.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--on-dark); margin-inline-end: auto; }
.brand img { width: 40px; height: 40px; border-radius: 50%; background: #F4F6FB; box-shadow: 0 0 0 2px var(--gold); }
.brand b { font: 800 1.25rem/1 var(--font); letter-spacing: .22em; }
.brand b span { color: var(--gold); }
.brand small { font: 700 1rem/1 var(--font); color: var(--gold); letter-spacing: .04em; }
:lang(ar) .brand small { font-family: var(--font-ar); letter-spacing: 0; }

.switch { display: flex; gap: 2px; padding: 3px; border: 1px solid rgba(201, 168, 76, .35); border-radius: 999px; }
.switch a {
  min-width: 44px; min-height: 40px; padding: 0 10px; border-radius: 999px;
  display: grid; place-items: center; text-decoration: none;
  font: 700 1rem/1 var(--font); color: var(--on-dark-2);
}
.switch a[lang="ar"] { font-family: var(--font-ar); }
.switch a[aria-current="true"] { background: var(--gold); color: var(--navy); }

.country { position: relative; }
.country summary {
  list-style: none; cursor: pointer;
  min-height: 44px; display: flex; align-items: center; gap: 6px; padding: 0 12px;
  border: 1px solid rgba(201, 168, 76, .35); border-radius: 999px; font-weight: 700; font-size: 1rem;
}
.country summary::-webkit-details-marker { display: none; }
.country[open] summary { background: var(--navy-2); }
.country .menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 30;
  width: min(300px, calc(100vw - 32px));
  background: var(--white); color: var(--ink); border-radius: 14px; padding: 8px;
  box-shadow: 0 16px 40px rgba(10, 22, 40, .25);
}
.country .menu a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px; border-radius: 10px; text-decoration: none; font-weight: 700; }
.country .menu a:hover, .country .menu a:focus-visible { background: var(--bg); }
.country .menu span { font-weight: 600; color: var(--muted); font-size: 1rem; }
.country .menu a[aria-current="true"] { box-shadow: inset 0 0 0 2px var(--gold); }

.anchors { background: var(--navy-2); }
.anchors ul { display: flex; gap: 6px; list-style: none; overflow-x: auto; scrollbar-width: none; padding: 8px 16px; max-width: var(--wrap); margin: 0 auto; }
.anchors ul::-webkit-scrollbar { display: none; }
.anchors a { display: block; white-space: nowrap; padding: 8px 14px; border-radius: 999px; color: var(--on-dark-2); text-decoration: none; font-weight: 600; font-size: 1rem; }
.anchors a:hover, .anchors a:focus-visible { background: rgba(255, 255, 255, .08); color: var(--white); }

/* ───────── Héros ───────── */
.hero { position: relative; color: var(--white); background: var(--navy); overflow: hidden; }
.hero .art { position: absolute; inset: 0; }
.hero .art svg { width: 100%; height: 100%; }
[dir="rtl"] .hero .art svg { transform: scaleX(-1); }
.hero .veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 22, 40, .94) 0%, rgba(10, 22, 40, .82) 55%, rgba(10, 22, 40, .55) 100%); }
.hero .wrap { position: relative; padding-top: 48px; padding-bottom: 56px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(201, 168, 76, .16); border: 1px solid rgba(201, 168, 76, .5);
  color: var(--gold); font-weight: 700; font-size: 1rem;
}
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.hero h1 { margin-top: 16px; font-size: clamp(2.3rem, 9vw, 4rem); font-weight: 800; line-height: 1.08; letter-spacing: -.02em; }
:lang(ar) .hero h1, :lang(ar) h2 { letter-spacing: 0; line-height: 1.35; }
.hero h1 span { color: var(--gold); }
.hero .lead { margin-top: 14px; max-width: 36em; font-size: clamp(1.0625rem, 3.6vw, 1.25rem); color: var(--on-dark-2); }
.hero .derja { margin-top: 6px; font-family: var(--font-ar); font-size: 1.2rem; font-weight: 700; color: var(--on-dark); }
.cta { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: 14px; border: 2px solid transparent;
  font: 700 1.0625rem/1.2 var(--font); text-decoration: none; cursor: pointer; text-align: center;
}
:lang(ar) .btn { font-family: var(--font-ar); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: #D8BA62; }
.btn-line { border-color: rgba(214, 222, 236, .6); color: var(--white); background: transparent; }
.btn-line:hover { border-color: var(--gold); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-3); }
.stores { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; }
.store {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 16px;
  border-radius: 12px; border: 1px solid rgba(214, 222, 236, .45); color: var(--on-dark-2);
  cursor: not-allowed;
}
.store b { display: block; color: var(--white); font-size: 1.0625rem; }
.store small { display: block; font-size: 1rem; }

/* ───────── Sections ───────── */
section { padding: 56px 0; scroll-margin-top: 120px; }
section.alt { background: var(--white); }
section.dark { background: var(--navy); color: var(--on-dark); }
h2 { font-size: clamp(1.6rem, 6vw, 2.2rem); font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.kicker { display: block; color: var(--gold-ink); font-weight: 800; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
:lang(ar) .kicker { text-transform: none; letter-spacing: 0; }
.dark .kicker { color: var(--gold); }
.intro { margin-top: 10px; max-width: 46em; color: var(--muted); }
.dark .intro { color: var(--on-dark-2); }
h3 { font-size: 1.2rem; font-weight: 700; line-height: 1.3; }

/* Grille des services (bento m11) */
.bento { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  position: relative; overflow: hidden; border-radius: var(--radius);
  min-height: 210px; padding: 72px 16px 16px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
  background: var(--white); border: 1px solid var(--line); color: var(--ink);
}
.tile.big { grid-column: 1 / -1; min-height: 260px; }
.tile .bg { position: absolute; inset: 0; }
.tile .bg svg { width: 100%; height: 100%; }
.tile .sh { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 22, 40, .25) 0%, rgba(10, 22, 40, .94) 62%); }
.tile.art { color: var(--white); border: 0; }
.tile > h3, .tile > p, .tile > .ar-name { position: relative; }
.tile .chip {
  position: absolute; top: 14px; inset-inline-start: 14px;
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--navy); color: var(--gold);
}
.tile .soon {
  position: absolute; top: 18px; inset-inline-end: 14px;
  font-size: 1rem; font-weight: 700; padding: 2px 10px; border-radius: 999px;
  background: var(--bg); color: var(--navy);
}
.tile h3 { font-size: 1.25rem; }
.tile .ar-name { font-family: var(--font-ar); font-weight: 700; font-size: 1.15rem; color: var(--gold-ink); }
.tile.art .ar-name { color: var(--gold); }
.tile p { font-size: 1rem; color: var(--muted); }
.tile.art p { color: #E6EAF2; }
.tile.plain { justify-content: flex-start; padding-top: 72px; }
@media (max-width: 420px) {
  .bento { grid-template-columns: 1fr; }
  .tile { min-height: 190px; }
}
@media (min-width: 900px) {
  .bento { grid-template-columns: 1.3fr 1fr 1fr; grid-auto-rows: minmax(230px, auto); }
  .tile.big { grid-column: auto; grid-row: span 2; }
}

/* Cartes génériques */
.cards { margin-top: 28px; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
section.alt .card { background: var(--bg); }
.dark .card { background: var(--navy-2); border-color: rgba(201, 168, 76, .25); }
.card .chip { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--navy); color: var(--gold); margin-bottom: 12px; }
.dark .card .chip { background: var(--navy-3); }
.card p { margin-top: 6px; color: var(--muted); }
.dark .card p { color: var(--on-dark-2); }
.card ul { margin-top: 10px; padding-inline-start: 1.2em; color: var(--muted); }
.card li { margin: 4px 0; }

/* Prix */
.price { display: flex; flex-direction: column; gap: 4px; }
.price .from { font-size: 1rem; font-weight: 600; color: var(--muted); }
.price .amount { font-size: 1.6rem; font-weight: 800; color: var(--navy); line-height: 1.2; unicode-bidi: isolate; }
.price .amount small { font-size: 1rem; font-weight: 600; color: var(--muted); }
.price .ex { align-self: flex-start; font-size: 1rem; font-weight: 700; color: var(--gold-ink); }
.note { margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: var(--white); border-inline-start: 5px solid var(--gold); color: var(--muted); }
section.alt .note { background: var(--bg); }

/* Pays (page marque) */
.countries { margin-top: 28px; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.country-card {
  display: flex; flex-direction: column; gap: 8px; text-decoration: none;
  border-radius: var(--radius); padding: 22px; background: var(--navy-2); color: var(--on-dark);
  border: 1px solid rgba(201, 168, 76, .3);
}
.country-card.on { border: 2px solid var(--gold); }
.country-card .code { font: 800 1rem/1 var(--font); letter-spacing: .1em; color: var(--gold); }
.country-card h3 { font-size: 1.4rem; }
.country-card .state { align-self: flex-start; font-weight: 700; font-size: 1rem; padding: 3px 12px; border-radius: 999px; background: var(--gold); color: var(--navy); }
.country-card .state.later { background: transparent; color: var(--on-dark-2); border: 1px solid rgba(214, 222, 236, .5); }
.country-card .go { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--gold); }

/* Étapes */
.steps { margin-top: 28px; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: s; list-style: none; }
.steps li { counter-increment: s; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: var(--navy); font-weight: 800; margin-bottom: 10px; }
.steps p { color: var(--muted); margin-top: 4px; }

/* Zones */
.zones { margin-top: 24px; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.zone { border-radius: var(--radius); padding: 20px; background: var(--white); border: 1px solid var(--line); }
.zone.first { border: 2px solid var(--gold); }
.zone h3 { display: flex; align-items: center; gap: 8px; }
.zone h3 .ico { color: var(--gold-ink); }
.zone ul { margin-top: 10px; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.zone li { padding: 4px 12px; border-radius: 999px; background: var(--bg); font-weight: 600; font-size: 1rem; }

/* Formulaires */
.form { margin-top: 24px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 14px; }
.dark .form { background: var(--navy-2); border-color: rgba(201, 168, 76, .3); }
.form .row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.field { display: grid; gap: 6px; }
.field label, .field legend { font-weight: 700; font-size: 1rem; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 10px 14px;
  border: 1.5px solid #8A97AE; border-radius: 12px;
  font: 500 1.0625rem/1.4 var(--font); color: var(--ink); background: var(--white);
}
:lang(ar) .field input, :lang(ar) .field select, :lang(ar) .field textarea { font-family: var(--font-ar); }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--gold); outline-offset: 1px; border-color: var(--navy); }
.form .hint { font-size: 1rem; color: var(--muted); }
.dark .form .hint { color: var(--on-dark-2); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 1rem; }
.consent input { width: 24px; height: 24px; margin-top: 2px; flex: none; accent-color: var(--navy); }
.dark .consent input { accent-color: var(--gold); }
.consent a { font-weight: 700; }
.form .out { font-weight: 600; color: var(--muted); }
.dark .form .out { color: var(--on-dark-2); }
.form .err { color: #B3261E; font-weight: 700; }
.dark .form .err { color: #FFB4AB; }

/* FAQ */
.faq { margin-top: 24px; display: grid; gap: 10px; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: 14px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 18px; font-weight: 700; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--gold-ink); flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq .a { padding: 0 18px 16px; color: var(--muted); }
.faq .a p + p { margin-top: 8px; }

/* Contact */
.contact { margin-top: 24px; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.contact .card { display: flex; gap: 12px; align-items: flex-start; }
.contact .card .chip { margin: 0; flex: none; }
.contact b { display: block; }
.contact a { font-weight: 700; color: var(--navy); overflow-wrap: anywhere; }

/* ───────── Pied ───────── */
.foot { background: var(--navy); color: var(--on-dark-2); padding: 40px 0 32px; }
.foot .cols { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.foot h2 { font-size: 1.1rem; color: var(--white); margin-bottom: 8px; }
.foot ul { list-style: none; }
.foot li { margin: 6px 0; }
.foot a { color: var(--on-dark-2); text-underline-offset: 3px; }
.foot a:hover { color: var(--gold); }
.foot .legal { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(201, 168, 76, .25); font-size: 1rem; }
.foot .legal p + p { margin-top: 6px; }

/* En-tête compact sur téléphone */
@media (max-width: 560px) {
  .top .wrap { gap: 8px; }
  .brand { gap: 8px; }
  .brand b { font-size: 1.1rem; letter-spacing: .14em; }
  .brand small { display: none; }
  .country summary { padding: 0 10px; }
  .country summary span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .switch a { min-width: 38px; padding: 0 6px; }
}
@media (max-width: 340px) {
  .brand b { display: none; }
}
@media (max-width: 560px) {
  .country .menu { position: fixed; top: 72px; inset-inline: 16px; width: auto; }
}
[dir="ltr"] .hero .derja { text-align: left; }
@media (min-width: 1000px) {
  .cards.five { grid-template-columns: repeat(5, 1fr); }
  .cards.three { grid-template-columns: repeat(3, 1fr); }
}
