/*
 Theme Name:   Malala Randriamizaka — Thème Enfant
 Theme URI:    https://www.essmalala.com
 Description:  Thème enfant pour Hello Elementor — Site Malala Randriamizaka
 Author:       Malala Randriamizaka
 Author URI:   https://www.essmalala.com
 Template:     hello-elementor
 Version:      1.0.0
 Text Domain:  malala-child
 Tags:         child-theme, elementor, dark, luxury, editorial
*/

/*
 ═══════════════════════════════════════════════════════
  MALALA RANDRIAMIZAKA — DESIGN SYSTEM
  Thème enfant Hello Elementor
 ═══════════════════════════════════════════════════════
*/

/* ── 1. IMPORT POLICES ── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,700;1,400;1,500&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&family=DM+Mono:wght@300;400&display=swap');

/* ── 2. VARIABLES GLOBALES ── */
:root {
  /* Palette */
  --brun:    #1C0F0A;
  --brun2:   #251409;
  --brun3:   #120A06;
  --creme:   #F7F1E4;
  --creme2:  #EDE5D0;
  --or:      #C9A227;
  --or2:     #A8862A;
  --or-glow: rgba(201,162,39,.15);
  --vert:    #172A1C;
  --noir:    #060402;

  /* Textes sur fond sombre */
  --txt-primary:   #F7F1E4;
  --txt-secondary: rgba(247,241,228,.88);
  --txt-muted:     rgba(247,241,228,.62);
  --txt-subtle:    rgba(247,241,228,.46);

  /* Textes sur fond clair */
  --txt-dark-primary:   #1C0F0A;
  --txt-dark-secondary: rgba(28,15,10,.65);
  --txt-dark-muted:     rgba(28,15,10,.42);

  /* Or UI */
  --or-border:     rgba(201,162,39,.15);
  --or-border-md:  rgba(201,162,39,.25);
  --or-border-str: rgba(201,162,39,.45);

  /* Layout */
  --max-w: 1180px;
  --nav-h: 78px;

  /* Typographie */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', -apple-system, sans-serif;
  --font-mono:    'DM Mono', monospace;
}

/* ── 3. RESET & BASE ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--brun);
  background: var(--creme);
  overflow-x: hidden;
  cursor: none; /* Custom cursor active */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Curseur personnalisé */
.m-cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--or);
  border-radius: 50% !important;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width .25s, height .25s;
  /* pas de mix-blend-mode — évite les artefacts de rendu */
  will-change: left, top;
}
.m-cursor-ring {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(201,162,39,.55);
  border-radius: 50% !important;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width .3s, height .3s, opacity .3s;
  opacity: .42;
  will-change: left, top;
}
.m-cursor.hover      { width: 14px; height: 14px; }
.m-cursor-ring.hover { width: 54px; height: 54px; }

/* ── 4. TYPOGRAPHIE GLOBALE ── */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.02em;
}

p {
  line-height: 1.85;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── 5. NAVIGATION ── */

.m-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
}

/* Barre principale */
.m-nav {
  height: var(--nav-h);
  padding: 0 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  transition: background .45s, border-color .4s, height .3s;
}

.m-header.scrolled .m-nav {
  background: rgba(12,7,4,.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(201,162,39,.12);
  height: 64px;
}

/* ── Logo ── */
.m-nav__logo {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 2px;
  color: var(--creme);
  text-decoration: none;
  font-weight: 400;
  font-style: italic;
  flex-shrink: 0;
  white-space: nowrap;
  margin-right: auto;
}
.m-nav__logo em { color: var(--or); font-style: normal; }

/* ── Liens centre — position absolue pour un vrai centrage ── */
.m-nav__links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 44px;
  list-style: none;
  align-items: center;
}
.m-nav__links a {
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: rgba(247,241,228,.72);
  text-decoration: none;
  font-weight: 400;
  transition: color .2s;
  position: relative;
  padding-bottom: 3px;
  white-space: nowrap;
}
.m-nav__links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: var(--or);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s ease;
}
.m-nav__links a:hover,
.m-nav__links a.current { color: var(--creme); }
.m-nav__links a:hover::after,
.m-nav__links a.current::after { transform: scaleX(1); transform-origin: left; }

/* ── Droite : CTA + switcher ── */
.m-nav__right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
  margin-left: auto;
}

/* Bouton CTA or */
.m-nav__cta {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--brun);
  background: var(--or);
  padding: 12px 28px;
  text-decoration: none;
  font-weight: 500;
  transition: opacity .2s;
  white-space: nowrap;
  line-height: 1;
}
.m-nav__cta:hover { opacity: .85; color: var(--brun); }

/* Switcher langue — directement à droite du bouton */
.m-lang-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
}
.m-lang {
  font-family: var(--font-body);
  font-size: 9.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(247,241,228,.62);
  text-decoration: none;
  font-weight: 400;
  transition: color .2s;
  line-height: 1;
}
.m-lang--active { color: var(--or); font-weight: 500; }
.m-lang:hover   { color: var(--creme); }
.m-lang-sep     { color: rgba(201,162,39,.3); font-size: 9px; }

/* ── Burger mobile (caché par défaut) ── */
.m-nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}
.m-nav__burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--creme);
  transition: transform .3s, opacity .3s;
}
.m-nav__burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.m-nav__burger.open span:nth-child(2) { opacity: 0; }
.m-nav__burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Menu mobile ── */
.m-nav-mobile {
  background: rgba(10,5,2,.99);
  border-top: 1px solid rgba(201,162,39,.1);
  padding: 28px 48px 36px;
}
.m-nav-mobile[hidden] { display: none; }
.m-nav-mobile ul { list-style: none; display: flex; flex-direction: column; }
.m-nav-mobile ul li { border-bottom: 1px solid rgba(247,241,228,.07); }
.m-nav-mobile ul a {
  display: block;
  padding: 16px 0;
  font-family: var(--font-body);
  font-size: 10.5px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(247,241,228,.72);
  text-decoration: none;
  transition: color .2s;
}
.m-nav-mobile ul a:hover,
.m-nav-mobile ul a.current { color: var(--creme); }
.m-nav-mobile__cta { color: var(--or) !important; }
.m-nav-mobile__lang {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

/* ── Responsive ── */
@media (max-width: 1200px) {
  .m-nav { padding: 0 40px; }
  .m-nav__links { gap: 28px; }
}
@media (max-width: 960px) {
  .m-nav__links { display: none; }
  .m-nav__right .m-nav__cta { display: none; }
  .m-nav__burger { display: flex; }
  .m-nav { padding: 0 28px; }
  .m-nav-mobile { padding: 24px 28px 32px; }
}

/* ── 6. FOOTER ── */

.m-footer {
  background: var(--noir);
  padding: 32px 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(201,162,39,.08);
}

.m-footer__logo {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 2.5px;
  color: var(--txt-subtle);
  text-decoration: none;
  font-style: italic;
}
.m-footer__logo em { color: var(--or); font-style: normal; }

.m-footer__links {
  display: flex;
  gap: 28px;
}
.m-footer__links a {
  font-size: 9.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(247,241,228,.55);
  text-decoration: none;
  transition: color .2s;
}
.m-footer__links a:hover { color: var(--or); }

.m-footer__copy {
  font-size: 9px;
  color: rgba(247,241,228,.42);
  letter-spacing: .5px;
}

/* ── 7. COMPOSANTS PARTAGÉS ── */

/* Tag section */
.m-tag {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--or);
  font-family: var(--font-body);
  font-weight: 400;
}
.m-tag::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--or);
  flex-shrink: 0;
}

/* Ligne or */
.m-or-line {
  display: block;
  width: 40px;
  height: 1px;
  background: linear-gradient(to right, var(--or), transparent);
}

/* Bouton principal */
.m-btn {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  font-family: var(--font-body);
  font-size: 10.5px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--brun);
  background: var(--or);
  padding: 17px 34px;
  text-decoration: none;
  font-weight: 500;
  transition: gap .3s, opacity .2s;
  width: fit-content;
}
.m-btn:hover { gap: 28px; opacity: .88; }

/* Bouton ghost */
.m-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--txt-muted);
  text-decoration: none;
  font-weight: 400;
  transition: color .25s, gap .3s;
}
.m-btn-ghost::before {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: currentColor;
  transition: width .25s, background .25s;
}
.m-btn-ghost:hover { color: var(--or); gap: 20px; }
.m-btn-ghost:hover::before { width: 28px; background: var(--or); }

/* Animations */
@keyframes m-fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

.m-anim { opacity: 0; }
.m-anim.visible {
  animation: m-fadeUp .85s ease forwards;
}

/* Delays */
.m-d1 { animation-delay: .1s; }
.m-d2 { animation-delay: .25s; }
.m-d3 { animation-delay: .4s; }
.m-d4 { animation-delay: .55s; }
.m-d5 { animation-delay: .7s; }
.m-d6 { animation-delay: .85s; }

/* Fond grain SVG réutilisable */
.m-grain::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='.045'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ── 8. PAGE HERO (pages internes) ── */

.m-page-hero {
  background: var(--brun3);
  padding: 136px 72px 80px;
  border-bottom: 1px solid var(--or-border);
  position: relative;
  overflow: hidden;
}
.m-page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(-52deg, transparent, transparent 80px, rgba(201,162,39,.015) 80px, rgba(201,162,39,.015) 81px);
  pointer-events: none;
}
.m-page-hero__inner {
  max-width: 780px;
  position: relative;
  z-index: 1;
}
.m-page-hero__tag {
  margin-bottom: 22px;
}
.m-page-hero__title {
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 62px);
  font-weight: 400;
  color: var(--creme);
  line-height: 1.08;
  letter-spacing: -.02em;
}
.m-page-hero__sub {
  margin-top: 18px;
  font-size: 11px;
  color: var(--txt-subtle);
  letter-spacing: 1.5px;
  font-family: var(--font-body);
}

/* ── 9. RESPONSIVE ── */

@media (max-width: 1024px) {
  .m-footer { padding: 28px 32px; flex-direction: column; gap: 18px; text-align: center; }
  .m-footer__links { flex-wrap: wrap; justify-content: center; }
  .m-page-hero { padding: 120px 32px 64px; }
}
