/* Créateur Valeur — Royal Edition + luxe */
:root {
  --bg-deep: #05060a;
  --bg-panel: #0b0d14;
  --bg-elevated: #111321;
  --gold-1: #f3e0a6;
  --gold-2: #d9b76a;
  --gold-3: #a78140;
  --gold-4: #5c4520;
  --ivory: #f1ecdf;
  --taupe: #b7ad96;
  --muted: #7f7a6b;
  --danger: #c45c5c;
  --radius: 14px;
  --radius-sm: 10px;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-ui: "Inter", system-ui, sans-serif;
  --font-ar: "Tajawal", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ivory);
  background: var(--bg-deep);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(217, 183, 106, 0.18);
}

img,
svg {
  max-width: 100%;
  height: auto;
}

html[lang="ar"] body {
  font-family: var(--font-ar);
}

html[lang="ar"] .hero h1,
html[lang="ar"] .section-title,
html[lang="ar"] .card h3,
html[lang="ar"] .form-panel h2,
html[lang="ar"] .logo-text strong {
  font-family: var(--font-ar);
}

/* Fond royal + image luxe */
.bg-royal {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--bg-deep);
  background-image:
    linear-gradient(180deg, rgba(5, 6, 10, 0.88) 0%, rgba(5, 6, 10, 0.72) 35%, rgba(5, 6, 10, 0.92) 100%),
    radial-gradient(ellipse 90% 60% at 70% 20%, rgba(217, 183, 106, 0.14), transparent 55%),
    url("../images/bg-hero.png");
  background-size: cover, cover, cover;
  background-position: center, center, center;
  background-repeat: no-repeat;
}

.bg-royal::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(217, 183, 106, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 183, 106, 0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 35%, black 0%, transparent 78%);
  pointer-events: none;
}

.wrap {
  width: min(1120px, 100% - 40px);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  background: linear-gradient(180deg, rgba(5, 6, 10, 0.88) 0%, rgba(5, 6, 10, 0.65) 100%);
  border-bottom: 1px solid rgba(217, 183, 106, 0.14);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 20px;
  flex-wrap: wrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(217, 183, 106, 0.22);
  gap: 2px;
}

.lang-btn {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 8px 12px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  background: transparent;
  color: var(--taupe);
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.lang-btn:hover {
  color: var(--ivory);
}

.lang-btn.is-active {
  background: linear-gradient(135deg, var(--gold-2), var(--gold-3));
  color: #1a1407;
  box-shadow: 0 2px 12px rgba(217, 183, 106, 0.35);
}

html[lang="ar"] .lang-btn {
  font-family: var(--font-ar);
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

/* Crest — identique à la carte de visite */
.crest {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  padding: 3px;
  background: linear-gradient(135deg, var(--gold-2), var(--gold-4) 45%, var(--gold-3));
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(255, 240, 200, 0.32);
  display: block;
  flex-shrink: 0;
}

.crest__inner {
  width: 100%;
  height: 100%;
  border-radius: 5px;
  background:
    radial-gradient(120% 120% at 30% 20%, rgba(217, 183, 106, 0.18), transparent 55%),
    linear-gradient(160deg, #0c0e14, #060709);
  border: 1px solid rgba(217, 183, 106, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.crest__cv {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.95rem;
  line-height: 1;
  letter-spacing: -0.06em;
  padding-bottom: 2px;
  background: linear-gradient(145deg, var(--gold-1) 0%, var(--gold-2) 45%, var(--gold-3) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.5));
}

.crest__ornament {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-2), transparent);
}

.crest__ornament--top { top: 6px; }
.crest__ornament--bottom { bottom: 6px; }

html[lang="ar"] .crest__cv {
  font-family: var(--font-display);
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-text strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: linear-gradient(100deg, var(--gold-1), var(--gold-2) 55%, var(--gold-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-text span {
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--taupe);
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  color: var(--taupe);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}

.nav a:hover {
  color: var(--ivory);
  background: rgba(217, 183, 106, 0.08);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

html[lang="ar"] .btn {
  font-family: var(--font-ar);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-1), var(--gold-2) 40%, var(--gold-3));
  color: #1a1407;
  box-shadow: 0 4px 24px rgba(217, 183, 106, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(217, 183, 106, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--gold-2);
  border: 1px solid rgba(217, 183, 106, 0.35);
}

.btn-ghost:hover {
  background: rgba(217, 183, 106, 0.08);
  border-color: rgba(217, 183, 106, 0.55);
}

.btn-lg {
  padding: 16px 28px;
  font-size: 0.95rem;
}

.btn-block {
  width: 100%;
}

/* Hero */
.hero {
  position: relative;
  padding: clamp(56px, 10vw, 120px) 0 clamp(72px, 12vw, 110px);
  text-align: center;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  width: min(900px, 140vw);
  height: min(520px, 80vh);
  background: radial-gradient(ellipse at center, rgba(217, 183, 106, 0.12) 0%, transparent 65%);
  pointer-events: none;
  animation: hero-pulse 8s ease-in-out infinite;
}

@keyframes hero-pulse {
  0%,
  100% {
    opacity: 0.85;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.04);
  }
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-quote {
  margin: 0 auto clamp(28px, 5vw, 44px);
  max-width: 760px;
  padding: clamp(18px, 3vw, 26px) clamp(22px, 4vw, 38px);
  position: relative;
  background: linear-gradient(135deg, rgba(20, 22, 36, 0.62), rgba(8, 9, 14, 0.78));
  border: 1px solid rgba(217, 183, 106, 0.28);
  border-radius: 18px;
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(217, 183, 106, 0.06) inset,
    0 0 80px rgba(217, 183, 106, 0.06);
  animation: quote-rise 0.9s ease-out both;
}

.hero-quote::before,
.hero-quote::after {
  content: "";
  position: absolute;
  height: 1px;
  width: 38%;
  background: linear-gradient(90deg, transparent, var(--gold-2), transparent);
  opacity: 0.55;
}

.hero-quote::before {
  top: -1px;
  left: 31%;
}

.hero-quote::after {
  bottom: -1px;
  left: 31%;
}

.hero-quote-mark {
  position: absolute;
  top: -22px;
  left: clamp(18px, 4vw, 32px);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 4.5rem;
  line-height: 1;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-2) 50%, var(--gold-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 12px rgba(217, 183, 106, 0.35));
  pointer-events: none;
}

html[dir="rtl"] .hero-quote-mark {
  left: auto;
  right: clamp(18px, 4vw, 32px);
}

.hero-quote blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.2rem, 2.6vw, 1.7rem);
  line-height: 1.45;
  color: #ece4cf;
  text-align: center;
  letter-spacing: 0.01em;
}

html[lang="ar"] .hero-quote blockquote {
  font-family: var(--font-ar);
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0;
}

@keyframes quote-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin-bottom: 20px;
}

.hero-kicker::before,
.hero-kicker::after {
  content: "·";
  margin: 0 10px;
  opacity: 0.6;
}

html[lang="ar"] .hero-kicker {
  letter-spacing: 0.15em;
}

html[lang="ar"] .hero-kicker::before,
html[lang="ar"] .hero-kicker::after {
  display: none;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.5rem, 6vw, 3.85rem);
  line-height: 1.08;
  margin: 0 0 22px;
  max-width: 20ch;
  margin-inline: auto;
  background: linear-gradient(100deg, var(--gold-1) 0%, var(--gold-2) 45%, var(--gold-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.45));
}

.hero-lead {
  font-size: clamp(1rem, 2.2vw, 1.18rem);
  color: #d8d2c4;
  max-width: 44ch;
  margin: 0 auto 38px;
  font-weight: 400;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

/* Sections */
section {
  padding: clamp(56px, 8vw, 96px) 0;
  position: relative;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.65rem);
  font-weight: 600;
  text-align: center;
  margin: 0 0 14px;
  color: var(--ivory);
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.35);
}

.section-sub {
  text-align: center;
  color: #a8a296;
  max-width: 54ch;
  margin: 0 auto 48px;
  font-size: 0.96rem;
  line-height: 1.65;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 24px;
}

.card {
  background: linear-gradient(155deg, rgba(22, 24, 38, 0.92), rgba(8, 9, 14, 0.96));
  border: 1px solid rgba(217, 183, 106, 0.18);
  border-radius: var(--radius);
  padding: 30px 26px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  backdrop-filter: blur(8px);
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-2), transparent);
  opacity: 0.55;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 100% 0%, rgba(217, 183, 106, 0.06), transparent 50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover {
  border-color: rgba(217, 183, 106, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(217, 183, 106, 0.1);
}

.card:hover::after {
  opacity: 1;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.38rem;
  margin: 0 0 12px;
  color: var(--gold-2);
}

.card p {
  margin: 0;
  color: #b8b0a0;
  font-size: 0.92rem;
  line-height: 1.58;
}

.card-num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 600;
  opacity: 0.12;
  position: absolute;
  right: 18px;
  top: 16px;
  color: var(--gold-2);
  line-height: 1;
}

html[dir="rtl"] .card-num {
  right: auto;
  left: 18px;
}

/* Form */
.form-section {
  padding-bottom: clamp(72px, 12vw, 120px);
}

.form-panel {
  max-width: 660px;
  margin: 0 auto;
  background: linear-gradient(160deg, rgba(20, 22, 36, 0.94), rgba(6, 7, 11, 0.98));
  border: 1px solid rgba(217, 183, 106, 0.22);
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(30px, 5vw, 48px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 50px 100px rgba(0, 0, 0, 0.5),
    0 0 80px rgba(217, 183, 106, 0.04);
  position: relative;
}

.form-panel::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(217, 183, 106, 0.07);
  pointer-events: none;
}

.form-panel h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.15rem);
  margin: 0 0 10px;
  text-align: center;
  color: var(--ivory);
}

.form-panel .hint {
  text-align: center;
  color: #9a9488;
  font-size: 0.9rem;
  margin: 0 0 32px;
  line-height: 1.55;
}

.field {
  margin-bottom: 22px;
}

.field label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin-bottom: 8px;
}

html[lang="ar"] .field label {
  letter-spacing: 0.02em;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(217, 183, 106, 0.22);
  background: rgba(4, 5, 8, 0.75);
  color: var(--ivory);
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--gold-2) 50%),
    linear-gradient(135deg, var(--gold-2) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) 22px,
    calc(100% - 16px) 22px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 42px;
}

html[dir="rtl"] .field select {
  background-position:
    22px 22px,
    16px 22px;
  padding-right: 16px;
  padding-left: 42px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
  opacity: 0.85;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold-3);
  box-shadow: 0 0 0 3px rgba(217, 183, 106, 0.14);
}

.field textarea {
  min-height: 108px;
  resize: vertical;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 560px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

.form-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin: -4px 0 24px;
  text-align: center;
  line-height: 1.5;
}

.wa-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.error-msg {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 10px;
  text-align: center;
  display: none;
}

.error-msg.is-visible {
  display: block;
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(217, 183, 106, 0.14);
  padding: 44px 0;
  text-align: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.35), transparent);
}

.site-footer .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.footer-line {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.65;
}

.footer-line a {
  color: var(--gold-2);
  text-decoration: none;
}

.footer-line a:hover {
  text-decoration: underline;
}

.footer-quote {
  font-family: var(--font-ar);
  direction: rtl;
  font-size: 1rem;
  font-weight: 500;
  color: #e4dcc8;
  max-width: 38ch;
  margin: 0;
  line-height: 1.6;
}

html[lang="fr"] .footer-quote,
html[lang="en"] .footer-quote {
  font-family: var(--font-display);
  font-style: italic;
  direction: ltr;
}

/* RTL layout */
html[dir="rtl"] .header-inner {
  flex-direction: row-reverse;
}

html[dir="rtl"] .logo {
  flex-direction: row-reverse;
}

html[dir="rtl"] .nav {
  flex-direction: row-reverse;
}

html[dir="rtl"] .header-actions {
  flex-direction: row-reverse;
}

/* ============== MOBILE ============== */
@media (max-width: 900px) {
  html[dir="rtl"] .header-inner,
  html[dir="rtl"] .header-actions {
    flex-direction: column;
  }
}

@media (max-width: 820px) {
  .header-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 14px 0;
  }

  .nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    order: 2;
    gap: 4px;
  }

  .header-actions {
    width: 100%;
    justify-content: center;
    order: 3;
    gap: 10px;
  }

  html[dir="rtl"] .header-inner,
  html[dir="rtl"] .header-actions,
  html[dir="rtl"] .nav,
  html[dir="rtl"] .logo {
    flex-direction: row;
  }

  html[dir="rtl"] .header-inner {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .wrap {
    width: min(1120px, 100% - 28px);
  }

  .crest {
    width: 50px;
    height: 50px;
  }

  .crest__cv {
    font-size: 1.7rem;
  }

  .logo-text strong {
    font-size: 1.2rem;
  }

  .logo-text span {
    font-size: 0.6rem;
    letter-spacing: 0.22em;
  }

  .nav a {
    padding: 7px 11px;
    font-size: 0.82rem;
  }

  .lang-btn {
    padding: 7px 10px;
    font-size: 0.7rem;
  }

  .btn {
    padding: 11px 18px;
    font-size: 0.88rem;
  }

  .btn-lg {
    padding: 14px 22px;
    font-size: 0.92rem;
  }

  .hero {
    padding: 40px 0 60px;
  }

  .hero-quote {
    padding: 18px 18px;
    border-radius: 14px;
  }

  .hero-quote-mark {
    font-size: 3.4rem;
    top: -16px;
    left: 14px;
  }

  html[dir="rtl"] .hero-quote-mark {
    right: 14px;
  }

  .hero-quote blockquote {
    font-size: 1.05rem;
    line-height: 1.45;
  }

  .hero h1 {
    font-size: 2.1rem;
    max-width: 100%;
  }

  .hero-lead {
    font-size: 1rem;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta .btn {
    width: 100%;
  }

  section {
    padding: 48px 0;
  }

  .section-title {
    font-size: 1.7rem;
  }

  .section-sub {
    font-size: 0.92rem;
  }

  .card {
    padding: 24px 22px;
  }

  .card h3 {
    font-size: 1.25rem;
  }

  .form-panel {
    padding: 24px 20px;
    border-radius: var(--radius);
  }

  .form-panel::after {
    inset: 8px;
  }

  .form-panel h2 {
    font-size: 1.5rem;
  }

  .form-panel .hint {
    font-size: 0.86rem;
    margin-bottom: 22px;
  }

  .field {
    margin-bottom: 18px;
  }

  .footer-line {
    font-size: 0.82rem;
  }

  .footer-line a {
    display: inline-block;
    padding: 4px 0;
  }

  .footer-quote {
    font-size: 0.95rem;
  }
}

@media (max-width: 380px) {
  .nav a {
    padding: 6px 9px;
    font-size: 0.78rem;
  }

  .hero h1 {
    font-size: 1.85rem;
  }

  .hero-quote blockquote {
    font-size: 0.98rem;
  }
}

/* Performance mobile : éviter background fixed couteux */
@media (max-width: 820px) {
  .bg-royal {
    background-attachment: scroll;
  }

  .hero-glow {
    width: 120vw;
    height: 60vh;
    animation: none;
  }
}

/* Réduit les animations pour les utilisateurs sensibles */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
