/**
 * ============================================================================
 * STYLE.CSS — Fondations visuelles de Nord Mariage Studio
 * ============================================================================
 * Les valeurs de couleur ci-dessous en `:root` sont des FALLBACKS. La vérité
 * vient de js/config.js (COLORS), injectée au runtime par ui.js. Si le JS
 * est désactivé, ces valeurs par défaut s'appliquent quand même.
 * ============================================================================
 */

:root {
  --color-white: #FFFFFF;
  --color-off-white: #FAF9F7;
  --color-border: #E7E4DE;
  --color-anthracite: #2A2A2E;
  --color-gray-soft: #6E6D6A;
  --color-gold: #B8964F;
  --color-gold-soft: #EFE6D2;
  --color-danger: #B3453D;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-card: 0 1px 2px rgba(42, 42, 46, 0.04), 0 8px 24px rgba(42, 42, 46, 0.06);
  --shadow-card-hover: 0 2px 4px rgba(42, 42, 46, 0.06), 0 16px 40px rgba(42, 42, 46, 0.10);

  --content-max-width: 640px;
}

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

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--color-off-white);
  color: var(--color-anthracite);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
}

p {
  margin: 0;
}

button {
  font-family: inherit;
  cursor: pointer;
}

a {
  color: inherit;
}

/* ------------------------------------------------------------------------ */
/* LAYOUT                                                                    */
/* ------------------------------------------------------------------------ */

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  position: relative;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--color-border);
}

.app-brand {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  color: var(--color-anthracite);
}

.app-back {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--color-gray-soft);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.app-back:hover,
.app-back:focus-visible {
  color: var(--color-gold);
}

@media (max-width: 480px) {
  .app-back {
    font-size: 0;
  }
  .app-back::before {
    content: "\2190";
    font-size: 1rem;
  }
}

.app-main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 40px 20px 120px;
}

.step-container {
  width: 100%;
  max-width: var(--content-max-width);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.step-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-title {
  font-size: 1.6rem;
  color: var(--color-anthracite);
}

.step-subtitle {
  font-size: 0.98rem;
  color: var(--color-gray-soft);
}

/* ------------------------------------------------------------------------ */
/* BARRE DE PROGRESSION — élément signature : un fil doré qui se dessine     */
/* ------------------------------------------------------------------------ */

.progress-track {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-border);
  z-index: 40;
}

.progress-fill {
  height: 100%;
  background: var(--color-gold);
  width: 0%;
  transition: width 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.progress-label {
  font-size: 0.78rem;
  color: var(--color-gray-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------------------ */
/* CARTES (thèmes, options, choix multiples)                                */
/* ------------------------------------------------------------------------ */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.choice-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.choice-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}

.choice-card:active {
  transform: scale(0.99);
}

.choice-card.is-selected {
  border-color: var(--color-gold);
  background: var(--color-gold-soft);
}

.choice-card-label {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--color-anthracite);
}

.choice-card-description {
  font-size: 0.88rem;
  color: var(--color-gray-soft);
}

.choice-card-price {
  font-size: 0.82rem;
  color: var(--color-gold);
  font-weight: 600;
  margin-top: 4px;
}

/* ------------------------------------------------------------------------ */
/* VIGNETTES DE THÈME — vraie photo (assets/images/theme-*.jpg), fournie    */
/* par js/config.js -> THEMES[].image. Pas d'image pour "Autre" et         */
/* "Je ne sais pas encore" : la carte reste texte seul.                     */
/* ------------------------------------------------------------------------ */

.theme-visual {
  width: 100%;
  height: 96px;
  object-fit: cover;
  display: block;
  border-radius: calc(var(--radius-md) - 4px);
  margin-bottom: 4px;
  background: var(--color-off-white);
}

/* ------------------------------------------------------------------------ */
/* VIGNETTES D'OPTIONS — page options.js. Format nettement plus grand que    */
/* .theme-visual pour que la photo soit lisible (l'option se "voit" mieux). */
/* Ratio ~4:3, calé sur assets/images/option-*.jpg (397x298).               */
/* ------------------------------------------------------------------------ */

.option-visual {
  width: 100%;
  aspect-ratio: 397 / 298;
  height: auto;
  object-fit: cover;
  display: block;
  border-radius: calc(var(--radius-md) - 4px);
  margin-bottom: 6px;
  background: var(--color-off-white);
}

/* ------------------------------------------------------------------------ */
/* CATÉGORIES D'OPTIONS — page options.js, regroupement par config.OPTION_ */
/* CATEGORIES.                                                              */
/* ------------------------------------------------------------------------ */

.option-category-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.option-category {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-category-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--color-anthracite);
}

.options-total {
  text-align: right;
}

/* ------------------------------------------------------------------------ */
/* ESTIMATION DE PRIX — version courte sur pages/options.js (mise à jour en */
/* direct), version complète sur pages/summary.js (juste avant l'envoi).    */
/* Voir config.TEXTS.priceEstimate pour les textes.                         */
/* ------------------------------------------------------------------------ */

.price-estimate {
  background: var(--color-gold-soft);
  border: 1px solid var(--color-gold);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.price-estimate--compact {
  padding: 14px 18px;
}

.price-estimate-lead {
  font-size: 0.95rem;
  color: var(--color-anthracite);
}

.price-estimate-line {
  font-size: 0.9rem;
  color: var(--color-anthracite);
}

.price-estimate-options {
  margin: 4px 0 0;
  padding-left: 18px;
  font-size: 0.88rem;
  color: var(--color-gray-soft);
}

.price-estimate-total {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--color-anthracite);
  margin-top: 2px;
}

.price-estimate-disclaimer {
  font-size: 0.78rem;
  color: var(--color-gray-soft);
}

/* ------------------------------------------------------------------------ */
/* RÉSEAUX SOCIAUX — écran de confirmation, pages/summary.js               */
/* ------------------------------------------------------------------------ */

.social-invite {
  font-size: 0.98rem;
  color: var(--color-anthracite);
  max-width: 440px;
}

.social-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-anthracite);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.btn-social:hover {
  border-color: var(--color-gold);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}

.btn-social svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ------------------------------------------------------------------------ */
/* FORMULAIRES                                                               */
/* ------------------------------------------------------------------------ */

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 0.85rem;
  color: var(--color-gray-soft);
}

.field-input {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 13px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-white);
  color: var(--color-anthracite);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-input:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px var(--color-gold-soft);
}

.field-error {
  font-size: 0.8rem;
  color: var(--color-danger);
  min-height: 1em;
}

/* ------------------------------------------------------------------------ */
/* BOUTONS                                                                   */
/* ------------------------------------------------------------------------ */

.btn {
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: var(--color-anthracite);
  color: var(--color-white);
}

.btn-primary:hover {
  box-shadow: 0 8px 20px rgba(42, 42, 46, 0.18);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  background: transparent;
  color: var(--color-gray-soft);
  padding: 14px 12px;
}

.btn-secondary:hover {
  color: var(--color-anthracite);
}

.btn-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
}

/* ------------------------------------------------------------------------ */
/* ÉCRAN D'ACCUEIL                                                          */
/* ------------------------------------------------------------------------ */

.welcome-screen {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding-top: 8vh;
}

.welcome-title {
  font-size: 2.1rem;
  max-width: 480px;
}

.welcome-subtitle {
  font-size: 1.05rem;
  color: var(--color-gray-soft);
  max-width: 440px;
}

.welcome-meta {
  font-size: 0.8rem;
  color: var(--color-gray-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
