/* =========================================================
   Milad Tycoon — page du jeu (chateq.fr/milad/) et sa politique de confidentialité.
   Se charge APRÈS /styles.css : reprend l'en-tête, les conteneurs et le pied de page du site,
   et redéfinit les couleurs dans l'univers du jeu (nuit bleue, or, turquoise).
   Persan : Vazirmatn + dir="rtl" (propriétés logiques partout : margin-inline, inset-inline…).
   ========================================================= */
html.milad, html.milad[data-theme="dark"] {
  --bg: #0B1433;
  --surface: #121D45;
  --surface-2: #17245A;
  --border: #2A3A78;
  --accent: #E8B75A;          /* or */
  --accent-hover: #F3CB7C;
  --accent-strong: #E8B75A;
  --accent-strong-hover: #F3CB7C;
  --on-accent: #1A1330;
  --text: #F6F0E1;
  --text-soft: #BCC4E2;
  --turq: #37C6B4;
  --turq-soft: rgba(55, 198, 180, .14);
  --gold-line: rgba(232, 183, 90, .35);
  --shadow: 0 10px 30px rgba(3, 6, 20, .45);
  --shadow-lg: 0 24px 60px rgba(3, 6, 20, .6);
  color-scheme: dark;
}
html.milad body {
  background: var(--bg);
  background-image: radial-gradient(1200px 600px at 80% -10%, #1C2C6B 0%, transparent 60%);
}
html.milad[lang="fa"] body,
html.milad [lang="fa"],
html.milad .fa-name {
  font-family: "Vazirmatn", "Nunito", system-ui, sans-serif;
}
html.milad[lang="fa"] h1, html.milad[lang="fa"] h2, html.milad[lang="fa"] h3 {
  font-family: "Vazirmatn", system-ui, sans-serif; font-weight: 800; letter-spacing: 0;
}
html.milad[lang="fa"] body { line-height: 1.85; }
/* En persan, le nom persan est déjà le libellé : on ne le répète pas */
html.milad[lang="fa"] .fa-name { display: none; }

/* Lien d'évitement : en RTL, un décalage à gauche créerait un défilement horizontal */
html[dir="rtl"] .skip-link { left: auto; right: -999px; }
html[dir="rtl"] .skip-link:focus { right: 8px; }

/* ---------- En-tête ---------- */
.m-header { border-bottom-color: var(--border); }
.m-header__actions { display: flex; align-items: center; gap: 10px; }
.m-lang {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-pill);
}
.m-lang__btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; min-height: 36px; padding: 0 10px;
  font-weight: 700; font-size: 14px; color: var(--text-soft); line-height: 1;
  border-radius: var(--radius-pill); transition: color .2s, background .2s;
}
.m-lang__btn--fa { font-family: "Vazirmatn", sans-serif; font-size: 15px; }
.m-lang__btn:hover { color: var(--text); }
.m-lang__btn.is-active { background: var(--accent); color: var(--on-accent); }
.m-header__back { padding: 9px 16px; font-size: 15px; }
@media (max-width: 560px) {
  .m-header__back { display: none; }
  .m-lang__btn { min-width: 36px; padding: 0 8px; }
}

/* ---------- Éléments communs ---------- */
.m-eyebrow {
  display: inline-block; font-weight: 700; font-size: 14px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--turq); margin-bottom: 10px;
}
html[lang="fa"] .m-eyebrow { letter-spacing: 0; font-size: 15px; }
.m-eyebrow a { color: inherit; }
.m-eyebrow a:hover { color: var(--accent); }
.m-title { font-size: clamp(1.7rem, 3.4vw, 2.5rem); color: var(--text); letter-spacing: -.4px; }
.m-lead { color: var(--text-soft); font-size: 1.08rem; margin-top: 12px; }
.m-lead--small { font-size: .95rem; }
.m-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.m-section { padding: 80px 0; position: relative; }
.m-section--alt { background: linear-gradient(180deg, rgba(18, 29, 69, .75), rgba(18, 29, 69, .35)); border-block: 1px solid rgba(42, 58, 120, .55); }

.m-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px;
  padding: 12px 22px; border-radius: var(--radius-pill); font-weight: 700; font-size: 16px;
  border: 1px solid var(--gold-line); color: var(--text); transition: transform .25s var(--ease), border-color .25s;
}
.m-btn:hover { transform: translateY(-2px); border-color: var(--accent); }

/* Bouton Google Play (état « bientôt » tant que l'app n'est pas publiée) */
.m-play {
  display: inline-flex; align-items: center; gap: 12px; min-height: 58px;
  padding: 8px 22px 8px 16px; border-radius: 14px;
  background: #05070F; color: #fff; border: 1px solid #4A4F63;
  box-shadow: var(--shadow); transition: transform .25s var(--ease);
}
html[dir="rtl"] .m-play { padding: 8px 16px 8px 22px; }
.m-play:hover { transform: translateY(-2px); }
.m-play__logo { color: var(--turq); flex: none; }
.m-play__txt { display: flex; flex-direction: column; line-height: 1.15; text-align: start; }
.m-play__small { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: #C9CEDD; }
html[lang="fa"] .m-play__small { text-transform: none; font-size: 13px; letter-spacing: 0; }
.m-play__big { font-family: "Poppins", sans-serif; font-weight: 600; font-size: 21px; }
.m-play--soon { cursor: default; }
.m-play--soon:hover { transform: none; }

/* Cadre de téléphone */
.m-phone {
  border-radius: 30px; padding: 8px; background: #05070F;
  border: 1px solid #3A4270; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(232, 183, 90, .15) inset;
}
.m-phone img { border-radius: 23px; width: 100%; height: auto; }
.m-phone--sm { border-radius: 24px; padding: 6px; }
.m-phone--sm img { border-radius: 19px; }

/* ---------- Hero ---------- */
.m-hero {
  position: relative; overflow: hidden; padding: 72px 0 88px;
  background:
    linear-gradient(180deg, rgba(11, 20, 51, .55) 0%, rgba(11, 20, 51, .72) 45%, var(--bg) 96%),
    url("/milad/img/hero.webp") center 30% / cover no-repeat;
}
.m-hero__inner { display: grid; grid-template-columns: 1.25fr .75fr; gap: 56px; align-items: center; }
.m-hero__brand { display: flex; align-items: center; gap: 18px; }
.m-hero__icon { width: 88px; height: 88px; border-radius: 22px; box-shadow: var(--shadow-lg); border: 2px solid var(--gold-line); flex: none; }
.m-hero__title {
  font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: -1px; line-height: 1.02;
  color: var(--accent); text-shadow: 0 3px 18px rgba(3, 6, 20, .55);
}
html[lang="fa"] .m-hero__title { letter-spacing: 0; line-height: 1.3; }
.m-hero__fa { font-size: 1.35rem; font-weight: 600; color: var(--turq); margin-top: 2px; }
.m-hero__tagline { font-family: "Poppins", sans-serif; font-weight: 600; font-size: clamp(1.2rem, 2.3vw, 1.55rem); line-height: 1.3; margin-top: 22px; color: var(--text); text-shadow: 0 2px 12px rgba(3, 6, 20, .6); }
html[lang="fa"] .m-hero__tagline { font-family: "Vazirmatn", sans-serif; line-height: 1.6; }
.m-hero__lead { color: var(--text-soft); font-size: 1.08rem; margin-top: 14px; max-width: 580px; text-shadow: 0 1px 8px rgba(3, 6, 20, .7); }
.m-hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 28px; }
.m-chips { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.m-chips li {
  font-size: 14px; font-weight: 700; padding: 6px 13px; border-radius: var(--radius-pill);
  background: rgba(11, 20, 51, .7); border: 1px solid var(--gold-line); color: var(--text);
}
.m-hero__phone { justify-self: center; width: min(300px, 100%); transform: rotate(2deg); }
html[dir="rtl"] .m-hero__phone { transform: rotate(-2deg); }

/* ---------- La tour : étages et décors ---------- */
.m-floors {
  list-style: none; padding: 0; margin: 0 0 36px; counter-reset: floor;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.m-floors li {
  counter-increment: floor; position: relative;
  display: flex; flex-direction: column; justify-content: center; min-height: 64px;
  padding-block: 10px; padding-inline: 52px 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-weight: 700; line-height: 1.3;
}
.m-floors li::before {
  content: counter(floor); position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); font-size: 14px; font-weight: 800;
}
html[lang="fa"] .m-floors li::before { content: counter(floor, persian); }
.m-floors .fa-name { font-weight: 400; color: var(--turq); font-size: .95rem; }
.m-scenes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.m-scenes figure { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.m-scenes img { width: 100%; height: auto; aspect-ratio: 480 / 376; object-fit: cover; }
.m-scenes figcaption {
  position: absolute; inset-inline: 0; bottom: 0; padding: 22px 14px 10px; font-weight: 700;
  background: linear-gradient(180deg, transparent, rgba(5, 8, 22, .85));
}

/* ---------- Cartes ---------- */
.m-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.m-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.m-card h3 { font-size: 1.18rem; color: var(--accent); margin: 12px 0 8px; }
.m-card p { color: var(--text-soft); }
.m-card__num {
  display: inline-grid; place-items: center; min-width: 56px; height: 56px; padding: 0 8px; border-radius: 16px;
  background: var(--turq-soft); color: var(--turq); font-family: "Poppins", sans-serif; font-weight: 700; font-size: 1.5rem;
  border: 1px solid rgba(55, 198, 180, .4);
}
.m-card__ico { width: 56px; height: 56px; object-fit: contain; }
.m-card--eco { border-top: 3px solid var(--turq); }
.m-card--eco h3 { margin-top: 0; }
.m-card--gold { border-top-color: var(--accent); background: linear-gradient(160deg, #1B2657, #121D45 60%); }

/* ---------- Galerie ---------- */
.m-gallery {
  display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 6px max(24px, calc((100vw - var(--maxw)) / 2 + 24px)) 18px;
  scrollbar-color: var(--border) transparent;
}
.m-gallery figure { margin: 0; flex: 0 0 220px; scroll-snap-align: center; }
.m-gallery figcaption { margin-top: 12px; font-size: .95rem; color: var(--text-soft); text-align: center; }
.m-gallery:focus-visible { outline-offset: -3px; }

/* ---------- Managers ---------- */
.m-split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: center; }
.m-portraits { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.m-portraits li { width: 64px; height: 64px; border-radius: 50%; background: #F4E6C8; border: 2px solid var(--accent); overflow: hidden; }
.m-portraits img { width: 100%; height: 100%; object-fit: cover; }
.m-shot-wide { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }

/* ---------- Fêtes ---------- */
.m-fests { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.m-fest {
  text-align: center; padding: 26px 20px; border-radius: var(--radius);
  background: radial-gradient(160px 120px at 50% 0%, rgba(232, 183, 90, .16), transparent 70%), var(--surface);
  border: 1px solid var(--border);
}
.m-fest img, .m-fest__svg { height: 80px; width: auto; margin: 0 auto 14px; object-fit: contain; }
.m-fest h3 { font-size: 1.15rem; color: var(--accent); }
.m-fest h3 .fa-name { display: block; font-size: 1rem; color: var(--turq); font-weight: 600; margin-top: 2px; }
.m-fest p { color: var(--text-soft); margin-top: 8px; font-size: .98rem; }

/* ---------- Modèle économique ---------- */
.m-note { text-align: center; color: var(--text-soft); max-width: 760px; margin: 28px auto 0; font-size: .98rem; }
.m-note a, .m-contact a, .pp a, .pp-page .pp-versions a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.m-note a:hover, .m-contact a:hover, .pp a:hover { color: var(--accent-hover); }

/* ---------- CTA ---------- */
.m-cta { text-align: center; }
.m-cta__inner { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.m-cta__inner > img { width: 72px; height: auto; margin-bottom: 8px; }
.m-cta .m-play { margin-top: 20px; }
.m-contact { margin-top: 26px; color: var(--text-soft); }

/* ---------- Pied de page ---------- */
.m-footer { background: #080F28; }
.m-footer .footer__bottom { margin-top: 0; }
.m-footer a { text-decoration: underline; text-underline-offset: 2px; }
.m-footer a:hover { color: var(--accent); }

/* ---------- Politique de confidentialité ---------- */
.pp-page { padding-top: 48px; }
.pp-versions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 18px; color: var(--text-soft); }
.pp-versions a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 700; }
.pp-versions a.is-active { color: var(--text); text-decoration: none; border-bottom: 2px solid var(--accent); }
.pp-versions a[lang="fa"] { font-family: "Vazirmatn", sans-serif; }
.pp-prevails { color: var(--text-soft); font-size: .95rem; margin-top: 6px; }
.pp { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--border); }
.pp h2 { font-size: 1.5rem; color: var(--accent); }
.pp__date { color: var(--text-soft); font-size: .95rem; margin-top: 6px; }
.pp h3 { font-size: 1.18rem; margin: 30px 0 10px; color: var(--text); }
.pp p, .pp ul { color: var(--text-soft); margin: 0 0 12px; }
.pp ul { padding-inline-start: 22px; display: grid; gap: 6px; }
.pp strong { color: var(--text); }
.pp code { font-size: .88em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; unicode-bidi: isolate; }
.pp a { overflow-wrap: anywhere; }
.pp__note { border-inline-start: 3px solid var(--turq); padding-inline-start: 14px; }
.pp[lang="fa"] { font-family: "Vazirmatn", system-ui, sans-serif; line-height: 1.9; }
.pp[lang="fa"] h2, .pp[lang="fa"] h3 { font-family: "Vazirmatn", system-ui, sans-serif; font-weight: 800; }
/* Avec JS, seule la version de la langue choisie est affichée (sans JS : les trois, à la suite) */
html.js.milad[lang="fr"] .pp:not([lang="fr"]),
html.js.milad[lang="en"] .pp:not([lang="en"]),
html.js.milad[lang="fa"] .pp:not([lang="fa"]) { display: none; }
html.js .pp { border-top: 0; padding-top: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .m-hero { padding: 48px 0 64px; }
  .m-hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .m-hero__phone { width: min(260px, 80%); }
  .m-floors { grid-template-columns: repeat(2, 1fr); }
  .m-cards, .m-cards--3 { grid-template-columns: 1fr 1fr; }
  .m-fests { grid-template-columns: 1fr 1fr; }
  .m-split { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .m-section { padding: 56px 0; }
  .m-hero__icon { width: 64px; height: 64px; border-radius: 16px; }
  .m-scenes { grid-template-columns: 1fr 1fr; gap: 10px; }
  .m-scenes figcaption { font-size: .88rem; padding: 18px 10px 8px; }
  .m-cards, .m-cards--3, .m-fests { grid-template-columns: 1fr; }
  .m-floors li { padding-inline: 48px 10px; font-size: .95rem; }
  .m-gallery { padding-inline: 16px; gap: 16px; }
  .m-gallery figure { flex-basis: 64vw; }
  .m-play { width: 100%; justify-content: center; }
  .m-hero__ctas .m-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .m-play, .m-btn { transition: none; }
  .m-hero__phone { transform: none !important; }
}
