/* ==========================================================================
   Al Heera — landing page
   Palette : sable (palette boukhoor) + or du logo + charbon du logo
   Polices : Amiri (arabe, titre + texte) · Cormorant Garamond (anglais, sous-titre)
   ========================================================================== */

/* ---- Polices auto-hébergées ---------------------------------------------- */
@font-face {
  font-family: "Amiri";
  src: url("../assets/fonts/amiri-arabic-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Amiri";
  src: url("../assets/fonts/amiri-arabic-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../assets/fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../assets/fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../assets/fonts/cormorant-garamond-latin-600-italic.woff2") format("woff2");
  font-weight: 600; font-style: italic; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- Variables ------------------------------------------------------------ */
:root {
  --sand-50:  #F5EBE0;   /* base emballage / voile */
  --sand-200: #E3D5CA;
  --sand-400: #D5BDAF;   /* teinte du produit Al Heera */
  --gold:     #BFA664;   /* or du logo : ornements uniquement */
  --gold-deep:#7A622C;   /* or foncé : états actifs, texte */
  --ink:      #2B2B2B;   /* charbon du logo */
  --ink-soft: #4A4239;

  --font-ar: "Amiri", "Cormorant Garamond", "Geeza Pro", "Noto Naskh Arabic", serif;
  --font-en: "Cormorant Garamond", Georgia, "Times New Roman", serif;

  --veil: 245 235 224;   /* = --sand-50 en RGB, pour les dégradés */
}

/* ---- Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--sand-50);
  color: var(--ink);
  font-family: var(--font-ar);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
a { color: inherit; }

:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 3px; }

.en {
  font-family: var(--font-en);
  font-weight: 600;
  font-size: .86em;
  letter-spacing: .02em;
  color: var(--ink-soft);
}

/* ---- Hero : image + voile -------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  overflow: clip;
}

.hero__media {
  position: absolute;
  inset: 0 0 auto 0;
  height: 62svh;
  z-index: -2;
  /* mobile : la photo se fond dans le sable, le texte repose sur fond uni */
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
}

/* voile de lisibilité (mobile) : léger éclaircissement en haut pour le logo */
.hero__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom, rgb(var(--veil) / .62) 0%, rgb(var(--veil) / 0) 26%);
}

/* ---- Panneau de contenu ----------------------------------------------------- */
.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: max(1.25rem, env(safe-area-inset-top)) 1.5rem max(1.25rem, env(safe-area-inset-bottom));
  text-align: center;
}

.panel__top { width: 100%; display: flex; justify-content: center; }

.brand { display: inline-block; line-height: 0; }
.brand__logo {
  width: clamp(9rem, 44vw, 12rem);
  height: auto;
  mix-blend-mode: multiply;   /* neutralise un éventuel fond blanc du PNG */
}

.panel__main {
  width: 100%;
  max-width: 27rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  margin-top: 38svh;          /* laisse respirer le brûleur et sa fumée */
  padding-bottom: 2rem;
}

/* ---- Titre : l'arabe est l'élément principal --------------------------------- */
.title {
  margin: 0;
  font-family: var(--font-ar);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.32;
  text-wrap: balance;
}
.title__line { display: block; }
.title__line--main { font-size: clamp(3.6rem, 19vw, 5.6rem); }
.title__line--sub  { font-size: clamp(2rem, 10.5vw, 3rem); font-weight: 400; margin-top: .05em; }

/* ornement : deux filets et un point, écho aux points du logo */
.ornament {
  display: flex;
  align-items: center;
  gap: .9rem;
  width: min(12rem, 60%);
  margin: 1.1rem 0 .9rem;
}
.ornament::before, .ornament::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gold);
}
.ornament i {
  width: .5rem; height: .5rem;
  border-radius: 50%;
  background: var(--gold);
}

.subtitle {
  margin: 0;
  font-family: var(--font-en);
  font-weight: 600;
  font-size: clamp(1.05rem, 4.6vw, 1.3rem);
  letter-spacing: .1em;
  color: var(--ink);
}

/* ---- Formulaire --------------------------------------------------------------- */
.lead { width: 100%; margin-top: 2.25rem; }

.lead__form { display: grid; gap: 1.15rem; text-align: center; }

.lead__intro {
  margin: 0 0 .25rem;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.4;
}
.lead__intro .en { display: block; font-weight: 500; font-size: 1.02rem; margin-top: .1rem; }

.field { display: grid; gap: .1rem; }

.field label {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 .6rem;
  font-size: 1.05rem;
}

.field input {
  width: 100%;
  padding: .55rem 0 .5rem;
  border: 0;
  border-bottom: 1px solid rgb(43 43 43 / .55);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.2rem;           /* ≥ 16px : évite le zoom automatique sur iOS */
  text-align: center;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input[type="tel"] { font-family: var(--font-en); font-weight: 600; font-size: 1.3rem; letter-spacing: .04em; text-align: center; }
.field input::placeholder { color: rgb(43 43 43 / .42); font-weight: 500; }
.field input:focus { outline: none; border-color: var(--gold-deep); box-shadow: 0 1px 0 0 var(--gold-deep); }
.field input[aria-invalid="true"] { border-color: #8E2F2A; }

.field__error {
  min-height: 0;
  margin: .2rem 0 0;
  font-size: .98rem;
  line-height: 1.4;
  color: #8E2F2A;
}
.field__error:empty { display: none; }
.field__error .en { color: #8E2F2A; }

/* case de consentement */
.consent {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  gap: .75rem;
  font-size: .98rem;
  line-height: 1.5;
  cursor: pointer;
}
.consent input {
  position: absolute; inset-inline-start: 0; top: .2rem;
  width: 1.25rem; height: 1.25rem;
  margin: 0; opacity: 0; cursor: pointer;
}
.consent__box {
  flex: none;
  width: 1.25rem; height: 1.25rem;
  margin-top: .22rem;
  border: 1px solid var(--ink);
  background: transparent;
  transition: background-color .2s ease, border-color .2s ease;
}
.consent__box::after {
  content: "";
  display: block;
  width: .32rem; height: .62rem;
  margin: .1rem auto 0;
  border: solid var(--sand-50);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg) scale(0);
  transition: transform .18s ease;
}
.consent input:checked + .consent__box { background: var(--ink); }
.consent input:checked + .consent__box::after { transform: rotate(45deg) scale(1); }
.consent input:focus-visible + .consent__box { outline: 2px solid var(--gold-deep); outline-offset: 3px; }
.consent__text .en { display: block; font-weight: 500; }

/* piège anti-robots */
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* bouton */
.btn {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: .7rem;
  width: 100%;
  margin-top: .35rem;
  padding: .85rem 1.25rem .8rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--sand-50);
  font-family: var(--font-ar);
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .25s ease, border-color .25s ease;
}
.btn .en { color: var(--sand-200); font-weight: 500; }
.btn:hover { background: var(--gold-deep); border-color: var(--gold-deep); }
.btn[disabled] { opacity: .6; cursor: progress; }

.lead__status { margin: 0; min-height: 0; text-align: center; font-size: 1rem; line-height: 1.45; color: #8E2F2A; }
.lead__status:empty { display: none; }
.lead__status .en { color: #8E2F2A; }

/* remerciement */
.thanks { padding: 1.5rem 0; text-align: center; }
.thanks:focus { outline: none; }
.thanks__ar { margin: 0; font-size: 1.7rem; font-weight: 700; line-height: 1.45; }
.thanks__en { margin: .4rem 0 0; font-family: var(--font-en); font-weight: 600; font-size: 1.15rem; letter-spacing: .03em; }

/* ---- Pied : contacts + mention légale ------------------------------------------ */
.panel__foot {
  width: 100%;
  max-width: 34rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .7rem;
  padding-top: 1.25rem;
}

.contacts {
  display: flex;
  gap: 1rem;
  margin: 0; padding: 0;
  list-style: none;
}
.contacts a {
  display: grid;
  place-items: center;
  width: 2.75rem; height: 2.75rem;      /* cible tactile ≥ 44px */
  border: 1px solid rgb(43 43 43 / .6);
  border-radius: 50%;
  color: var(--ink);
  transition: color .25s ease, border-color .25s ease, background-color .25s ease;
}
.contacts a:hover { color: var(--sand-50); background: var(--gold-deep); border-color: var(--gold-deep); }

.mail {
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: .06em;
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 1px;
}
.mail:hover { color: var(--gold-deep); }

.legal {
  margin: .35rem 0 0;
  display: grid; gap: .1rem;
  font-family: var(--font-en);
  font-weight: 500;
  font-size: .92rem;
  line-height: 1.5;
  letter-spacing: .03em;
  color: var(--ink-soft);
  text-wrap: balance;
}

/* ---- Tablette portrait -------------------------------------------------------------- */
@media (min-width: 600px) and (max-width: 899.98px), (max-aspect-ratio: 5/4) and (min-width: 600px) {
  .hero__media { height: 62svh; -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%); mask-image: linear-gradient(to bottom, #000 72%, transparent 100%); }
  .hero__media img { object-position: 64% 50%; }
  .brand__logo { width: 13rem; }
  .panel__main { margin-top: 40svh; max-width: 30rem; }
  .title__line--main { font-size: 5.6rem; }
  .title__line--sub  { font-size: 3rem; }
  .subtitle { font-size: 1.35rem; }
}

/* ---- Laptop / desktop / tablette paysage : photo plein cadre, texte sur voile à gauche ---- */
@media (min-width: 900px) and (min-aspect-ratio: 5/4) {
  .hero__media { inset: 0; height: auto; -webkit-mask-image: none; mask-image: none; }
  .hero__media img { object-position: 62% 55%; }

  /* le mur (bas-gauche de l'image) est mi-sombre : on l'éclaircit avec le sable de la marque
     pour que le charbon du logo et du titre reste lisible (contraste >= 7:1) */
  .hero__veil {
    background: linear-gradient(90deg,
      rgb(var(--veil) / .94) 0%,
      rgb(var(--veil) / .95) 38%,
      rgb(var(--veil) / .74) 48%,
      rgb(var(--veil) / .28) 58%,
      rgb(var(--veil) / 0)   74%);
  }

  .hero { height: 100svh; min-height: 34rem; }
  .panel {
    width: clamp(34rem, 50vw, 54rem);
    margin-right: auto;
    height: 100%;
    min-height: 0;
    padding-inline: clamp(1.75rem, 3.4vw, 3.5rem);
    padding-block: clamp(.9rem, 3svh, 2rem) clamp(.8rem, 2.4svh, 1.6rem);
  }
  .brand__logo { width: clamp(8rem, min(12vw, 17svh), 13rem); }

  .panel__main { margin-top: 0; padding-bottom: 0; justify-content: center; max-width: 34rem; }
  .title { line-height: 1.22; }
  .title__line--main { font-size: clamp(3rem, min(6.2vw, 10svh), 6.8rem); }
  .title__line--sub  { font-size: clamp(1.7rem, min(3.4vw, 5.4svh), 3.6rem); }
  .ornament { margin: clamp(.5rem, 1.4svh, 1rem) 0 clamp(.4rem, 1.2svh, .8rem); }
  .subtitle { font-size: clamp(1rem, min(1.4vw, 2.8svh), 1.35rem); }
  .lead { margin-top: clamp(1rem, 3svh, 2rem); }

  .lead__form { grid-template-columns: 1fr 1fr; column-gap: 1.5rem; row-gap: clamp(.6rem, 1.6svh, 1rem); }
  .lead__intro, .consent, .btn, .lead__status, .lead__form > .field__error { grid-column: 1 / -1; }
  .lead__intro { font-size: 1.2rem; }
  .field input { padding: .35rem 0 .3rem; }

  .panel__foot { flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; gap: .5rem 1.25rem; padding-top: clamp(.4rem, 1.4svh, 1rem); }
  .contacts a { width: 2.5rem; height: 2.5rem; }
  .legal { flex-basis: 100%; margin: 0; font-size: .88rem; }
}

/* écrans très larges : le panneau ne grandit plus, la photo respire */
@media (min-width: 1900px) and (min-aspect-ratio: 5/4) {
  .panel { width: 50rem; }
}

/* ---- Petits téléphones ------------------------------------------------------------------ */
@media (max-width: 359.98px) {
  .panel { padding-inline: 1rem; }
  .field label { flex-wrap: wrap; gap: 0 .5rem; }
}

/* ---- Une seule entrée orchestrée : la photo se pose, le panneau apparaît ------------------- */
@media (prefers-reduced-motion: no-preference) {
  .hero__media img { animation: settle 2.6s cubic-bezier(.2, .6, .2, 1) both; }
  .panel { animation: appear 1.2s .2s ease-out both; }
  @keyframes settle { from { transform: scale(1.06); } to { transform: scale(1); } }
  @keyframes appear { from { opacity: 0; } to { opacity: 1; } }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; }
}
