/*
 * Majestia · styles de la page d'accueil (thème enfant Flatsome)
 * Emplacement : wp-content/themes/flatsome-child/assets/css/majestia-accueil.css
 * Chargé par functions.php (voir majestia-functions-snippet.php).
 * Les classes .mj-* se saisissent dans le champ « Class » des éléments UX Builder.
 * Couleurs et polices de base : Flatsome > Options du thème > Style (voir le guide).
 */

:root {
  --mj-ivoire: #F5EEE3;
  --mj-ivoire-clair: #FBF7F0;
  --mj-sable: #EBE0CF;
  --mj-filet: #CDBB9F;
  --mj-encre: #1C1A1D;
  --mj-encre-douce: #4A4448;
  --mj-emeraude: #0E5A48;
  --mj-emeraude-nuit: #0A3F33;
  --mj-or: #D9BE86;       /* ornement, et texte uniquement sur fond sombre */
  --mj-titre: "Cormorant Garamond", Georgia, serif;
  --mj-texte: "Jost", system-ui, sans-serif;
}

/* ---------- Typographie ---------- */
.mj-surtitre,
.mj-surtitre p {
  font: 500 13px/1.4 var(--mj-texte);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mj-emeraude);
  margin-bottom: 12px;
}
.mj-sombre .mj-surtitre,
.mj-sombre .mj-surtitre p { color: var(--mj-or); }

.mj-h1 h1 { display: flex; flex-direction: column; gap: 18px; margin: 0; }
.mj-h1 .mj-h1-kicker {
  font: 500 14px/1.4 var(--mj-texte);
  letter-spacing: .16em; text-transform: uppercase; color: var(--mj-emeraude);
}
.mj-h1 .mj-h1-promesse {
  font: 500 clamp(40px, 5.6vw, 80px)/1.03 var(--mj-titre);
  color: var(--mj-encre); text-wrap: balance;
}
.mj-h1 em { font-style: italic; color: var(--mj-emeraude); }

.mj-intro p { font-size: 19px; line-height: 1.6; color: var(--mj-encre-douce); max-width: 32em; }
.mj-note p, p.mj-note { font-size: 14px; line-height: 1.5; color: var(--mj-encre-douce); }

/* ---------- Repères du hero (dl 2 × 2) ---------- */
.mj-reperes dl {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--mj-filet); margin: 0;
}
.mj-reperes dl > div { padding: 16px 20px 16px 0; border-bottom: 1px solid var(--mj-filet); }
.mj-reperes dl > div:nth-child(odd) { border-right: 1px solid var(--mj-filet); }
.mj-reperes dl > div:nth-child(even) { padding-left: 22px; padding-right: 0; }
.mj-reperes dt { font: 600 26px/1.1 var(--mj-titre); color: var(--mj-encre); }
.mj-reperes dd { margin: 4px 0 0; font-size: 14px; color: var(--mj-encre-douce); }

/* ---------- Photo en arche (hero, showroom) ---------- */
.mj-arche .img-inner,
.mj-arche img { border-radius: 999px 999px 0 0; overflow: hidden; }

/* ---------- Cartes de la sélection ---------- */
.mj-robe .img-inner { background: #F1E6D4; }
.mj-robe .mj-robe-dos { position: absolute; inset: 0; opacity: 0; transition: opacity .35s ease; }
@media (hover: hover) {
  .mj-robe:hover .mj-robe-dos, .mj-robe:focus-within .mj-robe-dos { opacity: 1; }
}
.mj-robe .mj-categorie { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--mj-emeraude); }
.mj-robe h3 { font: 500 26px/1.15 var(--mj-titre); margin: 6px 0; }
.mj-robe .mj-meta { font-size: 15px; color: var(--mj-encre-douce); }

/* Rail horizontal sur mobile (défilement au doigt, jamais automatique) */
@media (max-width: 549px) {
  .mj-rail > .row-inner, .mj-rail.row {
    display: flex; flex-wrap: nowrap; overflow-x: auto;
    scroll-snap-type: x mandatory; scroll-padding-inline: 15px; scrollbar-width: none;
  }
  .mj-rail .col { flex: 0 0 72%; max-width: 72%; scroll-snap-align: start; }
}

/* ---------- Étapes (section sombre) ---------- */
.mj-sombre, .mj-sombre h2, .mj-sombre h3 { color: var(--mj-ivoire); }
.mj-sombre p { color: #D8CFC0; }
.mj-etapes ol { list-style: none; margin: 0; padding: 0; counter-reset: etape; }
.mj-etapes li {
  counter-increment: etape;
  display: grid; grid-template-columns: 80px 1fr; gap: 20px;
  padding: 28px 0; border-top: 1px solid #3C6A5E; margin: 0;
}
.mj-etapes li:last-child { border-bottom: 1px solid #3C6A5E; }
.mj-etapes li::before { content: counter(etape); font: 500 60px/.9 var(--mj-titre); color: var(--mj-or); }
.mj-etapes h3 { font: 500 28px/1.15 var(--mj-titre); margin: 0 0 8px; }
@media (max-width: 549px) {
  .mj-etapes li { grid-template-columns: 40px 1fr; gap: 12px; }
  .mj-etapes li::before { font-size: 40px; }
  .mj-etapes h3 { font-size: 22px; }
}

/* ---------- Tableau des montants ---------- */
.mj-montants table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; border: 0; }
.mj-montants caption { text-align: left; font-size: 14px; color: var(--mj-encre-douce); padding-bottom: 12px; }
.mj-montants tr { border-top: 1px solid var(--mj-filet); }
.mj-montants tr:last-child { border-bottom: 1px solid var(--mj-filet); }
.mj-montants th, .mj-montants td { border: 0; padding: 14px 12px 14px 0; vertical-align: baseline; }
.mj-montants th { font-weight: 500; text-align: left; }
.mj-montants td.mj-montant { font: 600 22px/1.2 var(--mj-titre); white-space: nowrap; }
.mj-montants td:last-child { color: var(--mj-encre-douce); }
.mj-sombre .mj-montants caption { font: 500 26px/1.2 var(--mj-titre); color: var(--mj-ivoire); }
.mj-sombre .mj-montants td, .mj-sombre address { color: #D8CFC0; font-style: normal; }
.mj-sombre .mj-montants tr { border-color: #45404A; }
@media (max-width: 549px) {
  .mj-montants tr { display: grid; grid-template-columns: 1fr auto; padding: 12px 0; }
  .mj-montants th, .mj-montants td { padding: 0; }
  .mj-montants td:last-child { grid-column: 1 / -1; font-size: 13px; }
}

/* ---------- FAQ (élément Accordion de Flatsome) ---------- */
.mj-faq .accordion-title {
  font: 500 24px/1.25 var(--mj-titre); color: var(--mj-encre);
  border-top: 1px solid var(--mj-filet); padding: 20px 40px 20px 0;
}
.mj-faq .accordion-title.active { color: var(--mj-emeraude); }
.mj-faq .accordion-inner { padding: 0 0 20px; font-size: 16px; line-height: 1.65; color: var(--mj-encre-douce); }
.mj-faq .accordion-title .toggle { left: auto; right: 0; color: var(--mj-emeraude); }

/* ---------- Boutons ---------- */
.mj-cta.button { border-radius: 2px; letter-spacing: 0; text-transform: none; font-weight: 500; }
.mj-cta-clair.button { background: var(--mj-ivoire); color: var(--mj-emeraude-nuit); border-color: var(--mj-ivoire); }
.mj-cta-clair.button:hover { background: #FFFFFF; color: var(--mj-emeraude-nuit); }

/* Focus visible au clavier sur toute la page */
.mj-page a:focus-visible, .mj-page button:focus-visible, .mj-page summary:focus-visible,
.mj-page .accordion-title:focus-visible { outline: 2px solid var(--mj-emeraude); outline-offset: 3px; }

/* ---------- Barre de réservation mobile ---------- */
.mj-barre-resa { display: none; }
@media (max-width: 849px) {
  .mj-barre-resa {
    display: flex; gap: 10px; align-items: center;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 990; /* sous les bandeaux de consentement habituels (z-index ≥ 9999) */
    padding: 10px 15px calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--mj-ivoire); border-top: 1px solid var(--mj-filet);
    transition: transform .25s ease;
  }
  .mj-barre-resa.is-hidden { transform: translateY(110%); }
  .mj-barre-resa .mj-barre-principal {
    flex: 1 1 auto; background: var(--mj-emeraude); color: #FFFFFF; text-align: center;
    padding: 14px 12px; font: 500 15px/1.2 var(--mj-texte); border-radius: 2px;
  }
  .mj-barre-resa .mj-barre-wa {
    flex: 0 0 52px; height: 50px; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--mj-encre); color: var(--mj-encre); border-radius: 2px;
  }
  body.mj-avec-barre { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  /* Remonte les boutons flottants de chat au-dessus de la barre (adapter le sélecteur au widget réel) */
  body.mj-avec-barre .mj-chat-flottant { bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important; }
}

@media (prefers-reduced-motion: reduce) {
  .mj-page *, .mj-barre-resa { transition: none !important; }
}

/* ===== Correctifs après premier aperçu (29/09) ===== */
.mj-page h2 { font-size: clamp(32px, 4vw, 50px); line-height: 1.08; margin-bottom: 20px; }
.mj-h1 { margin-bottom: 24px; }
.mj-intro { margin-bottom: 8px; }
.mj-reperes { margin: 8px 0 12px; }
.mj-reperes dt, .mj-reperes dd,
.mj-montants th, .mj-montants td, .mj-montants caption,
.mj-robe h3, .mj-page .accordion-title { text-transform: none; letter-spacing: 0; }
.mj-reperes dt { font-weight: 600; }
.mj-robe h3 a { color: var(--mj-encre); }
.mj-robe h3 a:hover { color: var(--mj-emeraude); }
.mj-page .mj-reperes dt, .mj-page .mj-montant, .mj-etapes li::before { font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }
.mj-sombre .button.mj-cta-clair,
.mj-sombre .button.mj-cta-clair span { background-color: #F5EEE3 !important; color: #0A3F33 !important; border-color: #F5EEE3 !important; }
.mj-sombre .button.mj-cta-clair:hover { background-color: #FFFFFF !important; }
.mj-page .button.mj-cta { margin: 0 12px 12px 0; }

/* ===== Correctif mobile (29/09) ===== */
@media (max-width: 549px) {
  .mj-page .text-right, .mj-page .col[class*="text-right"] { text-align: left !important; }
}

/* ===== Sélection empilée sur mobile (29/09) ===== */
@media (max-width: 549px) {
  .mj-rail.row, .mj-rail > .row-inner { flex-wrap: wrap !important; overflow-x: visible !important; scroll-snap-type: none !important; }
  .mj-rail .col { flex: 0 0 100%; max-width: 100%; padding-bottom: 36px; }
}

/* ===== Horaires sur une ligne (29/09) ===== */
.mj-montants th { white-space: nowrap; }

/* ===== Page réservation : photo (29/09) ===== */
.mj-resa-intro { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.mj-resa-photo { margin: 0; }
.mj-resa-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.mj-resa-photo figcaption { font-size: 13px; color: #4A4448; padding-top: 8px; }
@media (max-width: 849px) {
  .mj-resa-intro { grid-template-columns: 1fr; gap: 20px; }
  .mj-resa-photo img { aspect-ratio: 16 / 10; }
}