/* =========================================================
   Mirabelle Market — site vitrine
   Charte reprise du jeu : Nunito + bois / or / crème
   ========================================================= */

/* ---------- Polices auto-hébergées (RGPD : aucun appel externe) ---------- */
@font-face {
  font-family: "Nunito";
  src: url("../fonts/Nunito-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/Nunito-SemiBold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/Nunito-Bold.woff2") format("woff2");
  font-weight: 800; font-style: normal; font-display: swap;
}

/* ---------- Palette du jeu ---------- */
:root {
  --gold:        #d4a847;
  --gold-bright: #ffe68c;
  --gold-deep:   #b8863a;
  --wood:        #8b5e3c;
  --wood-deep:   #4a2e1a;
  --panel:       #291a0e;
  --panel-2:     #3a2414;
  --cream:       #f6eac9;
  --cream-bg:    #fbf4e4;
  --cream-bg-2:  #f4e7cd;
  --ink:         #2a1b0e;
  --muted:       #8a744f;

  --radius: 16px;
  --radius-lg: 26px;
  --maxw: 1140px;
  --shadow: 0 12px 34px rgba(41, 26, 14, .16);
  --shadow-soft: 0 6px 18px rgba(41, 26, 14, .10);
  --ring: 0 0 0 4px rgba(212, 168, 71, .35);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream-bg);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-weight: 800; line-height: 1.1; margin: 0 0 .4em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: 84px 0; position: relative; }
.section--wood {
  background:
    linear-gradient(180deg, rgba(41,26,14,.94), rgba(41,26,14,.94)),
    url("../img/planks.svg");
  background-size: auto, 380px;
  color: var(--cream);
}
.section--alt { background: var(--cream-bg-2); }

.eyebrow {
  display: inline-block;
  font-weight: 800;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  background: rgba(212, 168, 71, .16);
  border: 1px solid rgba(212, 168, 71, .4);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.section--wood .eyebrow { color: var(--gold-bright); background: rgba(212,168,71,.14); }

.section-title { font-size: clamp(1.8rem, 4vw, 2.7rem); }
.section-lead { font-size: 1.08rem; color: var(--muted); max-width: 620px; }
.section--wood .section-lead { color: #d9c39a; }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1rem;
  padding: 14px 24px; border-radius: 14px;
  border: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn--gold {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: var(--wood-deep);
  box-shadow: 0 6px 0 var(--gold-deep), var(--shadow-soft);
}
.btn--gold:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--gold-deep), var(--shadow); }
.btn--gold:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--gold-deep); }

/* Badge « Google Play » */
.btn-store {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 22px 12px 18px;
  border-radius: 14px;
  background: linear-gradient(180deg, #34210f, var(--panel));
  color: var(--cream);
  border: 2px solid var(--gold);
  box-shadow: var(--shadow-soft);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-store:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-store:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-store .store-ico { width: 30px; height: 30px; flex: 0 0 auto; }
.btn-store .store-txt { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.btn-store .store-txt small { font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.btn-store .store-txt strong { font-size: 1.15rem; font-weight: 800; }
.btn-store--disabled { opacity: .55; filter: grayscale(.4); cursor: not-allowed; border-color: var(--muted); }
.btn-store--disabled:hover { transform: none; box-shadow: var(--shadow-soft); }
.store-badge {
  font-size: .62rem; font-weight: 800; letter-spacing: .05em;
  background: var(--gold); color: var(--wood-deep);
  padding: 2px 7px; border-radius: 999px; text-transform: uppercase;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* ---------- En-tête / navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 244, 228, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(139, 94, 60, .18);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; }
.brand img { width: 32px; height: 32px; }
.brand span b { color: var(--gold-deep); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-weight: 600; color: var(--wood-deep); transition: color .15s ease; }
.nav-links a:hover { color: var(--gold-deep); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
/* Le libellé est composé de 2 éléments (span masquable en mobile + texte) :
   sans ceci, le gap du .btn insère un double espace au milieu du texte. */
.nav-cta .btn--gold { gap: 0; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2.5px; background: var(--wood-deep); border-radius: 2px; margin: 5px 0; transition: .2s; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 64px 0 40px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(120% 90% at 78% 8%, rgba(255, 230, 140, .55), transparent 55%),
    radial-gradient(90% 80% at 8% 90%, rgba(212, 168, 71, .28), transparent 60%),
    var(--cream-bg);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5.6vw, 4rem); }
.hero h1 .accent { color: var(--gold-deep); }
.hero .tagline { font-size: 1.22rem; font-weight: 600; color: var(--wood); margin-bottom: 14px; }
.hero p.pitch { font-size: 1.06rem; color: var(--muted); max-width: 520px; }
.hero .microcopy { font-size: .9rem; color: var(--muted); margin-top: 14px; display: flex; gap: 16px; flex-wrap: wrap; }
.hero .microcopy span { display: inline-flex; align-items: center; gap: 6px; }
.hero .microcopy b { color: var(--gold-deep); }

/* Visuel héros : téléphone + mascotte + pièces */
.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; min-height: 460px; }
.hero-visual .mascot {
  position: absolute; left: -6%; bottom: 4%; width: 190px; z-index: 3;
  filter: drop-shadow(0 12px 18px rgba(41,26,14,.28));
  animation: bob 4.5s ease-in-out infinite;
}
.coin-float { position: absolute; width: 46px; z-index: 4; filter: drop-shadow(0 6px 8px rgba(41,26,14,.3)); }
.coin-float.c1 { top: 6%;  right: 14%; animation: bob 3.6s ease-in-out infinite; }
.coin-float.c2 { top: 40%; right: 2%;  width: 34px; animation: bob 4.2s ease-in-out .4s infinite; }
.coin-float.c3 { bottom: 12%; right: 20%; width: 28px; animation: bob 3.2s ease-in-out .8s infinite; }

/* ---------- Téléphone (mockup) ---------- */
.phone {
  position: relative;
  width: 260px; aspect-ratio: 659 / 1173;
  background: #1c130a;
  border-radius: 38px;
  padding: 10px;
  box-shadow: 0 26px 50px rgba(41,26,14,.34), inset 0 0 0 2px rgba(212,168,71,.35);
  z-index: 2;
}
.phone::before {
  content: ""; position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 92px; height: 20px; background: #1c130a; border-radius: 0 0 14px 14px; z-index: 2;
}
.phone .screen {
  width: 100%; height: 100%; border-radius: 28px; overflow: hidden;
  background: var(--panel);
}
.phone .screen img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Features ---------- */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 46px;
}
.feature {
  background: #fff;
  border: 1px solid rgba(139, 94, 60, .16);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-soft);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  text-align: center;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(212,168,71,.5); }
.feature .ico {
  width: 62px; height: 62px; border-radius: 14px;
  display: grid; place-items: center; margin: 0 auto 16px;
  background: linear-gradient(180deg, #fff6dd, #f3e2b6);
  border: 1px solid rgba(212, 168, 71, .5);
}
.feature .ico img { width: 40px; height: 40px; object-fit: contain; }
.feature h3 { font-size: 1.2rem; }
.feature p { color: var(--muted); font-size: .98rem; margin: 0; }

/* ---------- Galerie d'aperçus ---------- */
.gallery {
  display: flex; gap: 26px; margin-top: 44px;
  overflow-x: auto; padding: 8px 4px 24px;
  scroll-snap-type: x mandatory;
}
.gallery::-webkit-scrollbar { height: 8px; }
.gallery::-webkit-scrollbar-thumb { background: rgba(212,168,71,.5); border-radius: 999px; }
.gallery .shot { flex: 0 0 auto; scroll-snap-align: center; text-align: center; }
.gallery .shot .phone { width: 236px; margin: 0 auto 14px; }
.gallery .shot figcaption { font-weight: 700; color: var(--wood-deep); font-size: .98rem; }
.section--wood .gallery .shot figcaption { color: var(--cream); }

/* ---------- Histoire ---------- */
.story-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 44px; align-items: center; }
.story-portrait { position: relative; text-align: center; }
.story-portrait .halo {
  position: absolute; inset: 0; margin: auto; width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,230,140,.4), transparent 65%); z-index: 0;
}
.story-portrait img { position: relative; z-index: 1; width: 260px; margin: 0 auto; filter: drop-shadow(0 14px 20px rgba(0,0,0,.4)); }
.story blockquote {
  margin: 0 0 18px; font-size: 1.35rem; font-weight: 700; color: var(--gold-bright);
  border-left: 4px solid var(--gold); padding-left: 18px; line-height: 1.4;
}
.story p { color: #e6d3ab; font-size: 1.05rem; }

/* ---------- Bande de téléchargement ---------- */
.download {
  text-align: center;
  background:
    radial-gradient(120% 130% at 50% -20%, var(--gold-bright), var(--gold) 55%, var(--gold-deep));
  color: var(--wood-deep);
}
.download h2 { font-size: clamp(2rem, 5vw, 3rem); color: var(--wood-deep); }
.download p { color: #5c3f1e; font-size: 1.12rem; font-weight: 600; max-width: 560px; margin-left: auto; margin-right: auto; }
.download .btn-row { justify-content: center; margin-top: 28px; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--panel); color: #cdb98f; padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.site-footer .brand { color: var(--cream); margin-bottom: 12px; }
.site-footer h4 { color: var(--gold-bright); font-size: .95rem; letter-spacing: .05em; text-transform: uppercase; margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a:hover { color: var(--gold-bright); }
.footer-bottom {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(212,168,71,.2);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: .86rem; color: #a68d63;
}

/* ---------- Pages légales / documents ---------- */
.doc { max-width: 820px; padding: 60px 22px 90px; }
.doc h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.doc h2 { font-size: 1.35rem; margin-top: 1.6em; color: var(--wood-deep); }
.doc p, .doc li { color: #4a3a24; }
.doc a { color: var(--gold-deep); font-weight: 700; text-decoration: underline; }
.doc .back { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--gold-deep); margin-bottom: 26px; }
.doc .updated { color: var(--muted); font-size: .9rem; }
.doc .callout { background: #fff; border: 1px solid rgba(212,168,71,.5); border-left: 5px solid var(--gold); border-radius: 12px; padding: 16px 20px; margin: 20px 0; }

/* ---------- Formulaire de contact ---------- */
.contact-form { display: flex; flex-direction: column; gap: 18px; margin-top: 28px; }
.contact-form .field { display: flex; flex-direction: column; gap: 7px; }
.contact-form label { font-weight: 700; color: var(--wood-deep); font-size: .98rem; }
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%; font: inherit; color: var(--ink);
  background: #fff; border: 1.5px solid rgba(139, 94, 60, .35);
  border-radius: 12px; padding: 13px 15px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.contact-form select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238b5e3c' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; padding-right: 42px;
}
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus { outline: none; border-color: var(--gold); box-shadow: var(--ring); }
.contact-form textarea { min-height: 150px; resize: vertical; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.contact-form .form-note { font-size: .85rem; color: var(--muted); }
.form-alert { border-radius: 12px; padding: 14px 18px; margin: 20px 0; font-weight: 600; }
.form-alert--ok { background: #eaf7ea; border: 1px solid #7bbf7b; color: #2f6d2f; }
.form-alert--err { background: #fdecea; border: 1px solid #e0897f; color: #a3352a; }

/* ---------- Animations ---------- */
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .hero-visual .mascot, .coin-float { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero .btn-row, .hero .microcopy { justify-content: center; }
  .hero p.pitch { margin-left: auto; margin-right: auto; }
  .hero-visual { min-height: 420px; margin-top: 10px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .story-grid { grid-template-columns: 1fr; text-align: center; }
  .story blockquote { border-left: none; padding-left: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .section { padding: 62px 0; }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0;
    background: var(--cream-bg); padding: 18px 22px 24px; gap: 18px;
    border-bottom: 1px solid rgba(139,94,60,.2); box-shadow: var(--shadow);
  }
  .nav-cta .nav-store-label { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-visual .mascot { width: 140px; left: 0; }
}
