/* ============================================================
   Site de mariage - styles
   Palette douce, typographie serif elegante, responsive mobile-first.
   ============================================================ */

:root {
  --bg: #f5f2e6;           /* creme mediterraneen */
  --surface: #ffffff;
  --ink: #163f4a;          /* bleu-vert profond (texte) */
  --muted: #6f8a86;        /* sauge grisee */
  --accent: #1f86a8;       /* bleu mer Amalfi */
  --accent-dark: #124f68;  /* bleu profond */
  --lemon: #f2c53d;        /* jaune citron */
  --lemon-soft: #fbefc2;   /* citron pale */
  --sage: #9db58c;         /* vert sauge */
  --sage-soft: #e7eee0;    /* sauge pale */
  --line: #e2e5da;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --script: 'Parisienne', 'Cormorant Garamond', cursive;
  --maxw: 900px;
}

* { box-sizing: border-box; }

/* Garantit que l'attribut HTML "hidden" masque toujours l'element,
   meme si une classe (.field, etc.) definit display. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; }

a { color: inherit; }

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  z-index: 50;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.nav--scrolled {
  background: rgba(250, 247, 242, 0.95);
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(6px);
}
.nav__brand {
  font-family: var(--serif);
  font-size: 1.3rem;
  letter-spacing: 0.5px;
  text-decoration: none;
  color: var(--ink);
}
.nav__links { display: flex; gap: 26px; }
.nav__links a {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-decoration: none;
  color: var(--ink);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.nav__links a:hover { color: var(--accent-dark); border-color: var(--accent); }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav__toggle span {
  width: 26px; height: 2px; background: var(--ink);
  transition: 0.3s;
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 90px 22px 40px;
  background:
    linear-gradient(rgba(250,247,242,0.55), rgba(250,247,242,0.85)),
    radial-gradient(circle at 50% 20%, #fff 0%, var(--bg) 70%);
  position: relative;
}
.hero__tagline {
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 18px;
}
.hero__names {
  font-size: clamp(2.8rem, 9vw, 5.5rem);
  line-height: 1.05;
  color: var(--ink);
}
.hero__date {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 3.5vw, 1.7rem);
  color: var(--accent-dark);
  margin: 22px 0 4px;
}
.hero__venue { color: var(--muted); margin: 0 0 34px; letter-spacing: 0.5px; }

.hero__cta, .btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-decoration: none;
  color: #fff;
  background: var(--accent);
  padding: 15px 34px;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.15s ease;
}
.hero__cta:hover, .btn:hover { background: var(--accent-dark); transform: translateY(-2px); }

.hero__scroll {
  position: absolute;
  bottom: 26px;
  font-size: 1.6rem;
  color: var(--muted);
  text-decoration: none;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* --- Sections --- */
.section { padding: 90px 22px; }
.section__inner { max-width: var(--maxw); margin: 0 auto; }
.section__title {
  font-size: clamp(2rem, 6vw, 3rem);
  text-align: center;
  color: var(--ink);
}
.section__title::after {
  content: '';
  display: block;
  width: 60px; height: 2px;
  background: var(--accent);
  margin: 18px auto 0;
}
.section__subtitle {
  text-align: center;
  color: var(--muted);
  margin: 12px 0 50px;
  letter-spacing: 0.5px;
}

/* --- Timeline programme --- */
.timeline { list-style: none; margin: 0 auto; padding: 0; max-width: 620px; }
.timeline__item {
  display: flex;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.timeline__item:last-child { border-bottom: 0; }
.timeline__time {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--accent-dark);
  min-width: 84px;
  text-align: right;
}
.timeline__content { flex: 1; }
.timeline__event { font-size: 1.35rem; color: var(--ink); }
.timeline__location { margin: 4px 0 0; color: var(--muted); font-size: 0.92rem; }

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 60px 22px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.footer__names { font-family: var(--serif); font-size: 1.8rem; color: var(--ink); margin: 0 0 6px; }
.footer__date { color: var(--muted); margin: 0; letter-spacing: 0.5px; }

/* --- Responsive : menu mobile --- */
@media (max-width: 680px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(250, 247, 242, 0.98);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav__links--open { max-height: 320px; }
  .nav__links a {
    padding: 16px 22px;
    border-bottom: 1px solid var(--line);
  }
  .timeline__item { gap: 16px; }
  .timeline__time { min-width: 64px; font-size: 1.25rem; }
}

/* ============================================================
   Pages internes (RSVP, Plan) : nav pleine, cartes, formulaires
   ============================================================ */

/* Nav toujours visible (fond plein) sur les pages internes */
.nav--solid {
  position: sticky;
  background: rgba(250, 247, 242, 0.97);
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(6px);
}

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 22px 80px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 38px 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
}
.card__title { font-size: clamp(1.8rem, 5vw, 2.4rem); text-align: center; }
.card__title::after {
  content: '';
  display: block;
  width: 50px; height: 2px;
  background: var(--accent);
  margin: 14px auto 0;
}
.card__intro { text-align: center; color: var(--muted); margin: 14px 0 28px; }

/* Boite de statut / messages */
.statusbox {
  padding: 14px 16px;
  border-radius: 4px;
  margin-bottom: 22px;
  font-size: 0.92rem;
}
.statusbox--info   { background: #f0eee9; color: var(--ink); }
.statusbox--success{ background: #e8f2e8; color: #2f6b34; border: 1px solid #cfe3cf; }
.statusbox--warn   { background: #fbf3e2; color: #8a6d1f; border: 1px solid #efdfbf; }
.statusbox--error  { background: #f7e9e7; color: #9a3b32; border: 1px solid #eccbc6; }

/* Champs de formulaire */
.field { display: block; border: 0; padding: 0; margin: 0 0 20px; }
.field legend { font-family: var(--serif); font-size: 1.25rem; margin-bottom: 12px; }
.field__label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; letter-spacing: 0.3px; }
.field__note { font-size: 0.82rem; color: var(--muted); text-align: center; margin-top: 14px; }

input[type="number"], input[type="text"], input[type="password"],
input[type="email"], input[type="tel"], textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; }

.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 4px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.choice:hover { border-color: var(--accent); background: #fdfbf7; }
.choice input { accent-color: var(--accent); width: 18px; height: 18px; }

#rsvpForm .btn, .card .btn { width: 100%; margin-top: 8px; }

/* Bloc plan */
.plan__map {
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  margin: 8px 0 22px;
  background: #f0eee9;
}
.plan__map img, .plan__map iframe { width: 100%; height: 100%; border: 0; object-fit: cover; display: block; }
.plan__address { text-align: center; color: var(--muted); margin-bottom: 20px; }
.plan__points { list-style: none; padding: 0; margin: 0 0 26px; }
.plan__points li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.plan__points li:last-child { border-bottom: 0; }
.plan__actions { text-align: center; }

/* Section cagnotte / variantes de section */
.section--alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__inner--center { text-align: center; }
.section__inner--center .section__subtitle { max-width: 520px; margin-left: auto; margin-right: auto; }

/* ============================================================
   Espace admin
   ============================================================ */
.page--wide { max-width: 1040px; }

.admin__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 16px; }
.admin__block { margin-bottom: 24px; }
.admin__blocktitle { font-size: 1.4rem; margin-bottom: 16px; }
.admin__row { display: flex; flex-wrap: wrap; gap: 12px; }

.btn--ghost {
  background: transparent;
  color: var(--accent-dark);
  border: 1px solid var(--accent);
}
.btn--ghost:hover { background: var(--accent); color: #fff; }
.btn--sm { padding: 9px 16px; font-size: 0.72rem; }

/* Cartes de stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px;
  text-align: center;
}
.stat__num { display: block; font-family: var(--serif); font-size: 2.4rem; color: var(--accent-dark); line-height: 1; }
.stat__label { display: block; margin-top: 6px; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }

/* Campagnes */
.campaign { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.campaign:last-child { border-bottom: 0; }
.campaign__label { font-family: var(--serif); font-size: 1.2rem; min-width: 130px; }
.campaign input[type="date"] { width: auto; }

/* Tableau */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); }
.table tbody tr:hover { background: #fdfbf7; }

/* En-tete de jour dans le programme multi-jours */
.timeline__day {
  list-style: none;
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--ink);
  text-align: center;
  padding: 26px 0 8px;
  margin-top: 8px;
  border-bottom: 0;
  letter-spacing: 0.5px;
}
.timeline__day:first-child { padding-top: 0; }

/* ============================================================
   Inscription (save the date) + Hebergement
   ============================================================ */

/* Video responsive 16:9 */
.video { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 0 0 26px; border-radius: 6px; overflow: hidden; background: #000; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Lignes de formulaire cote a cote (2 colonnes sur large ecran) */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
select {
  width: 100%; font-family: var(--sans); font-size: 1rem; color: var(--ink);
  padding: 11px 13px; border: 1px solid var(--line); border-radius: 4px; background: #fff;
}
select:focus { outline: none; border-color: var(--accent); }

/* Cartes hebergement */
.lodging { display: grid; gap: 18px; }
.lodging__item { border: 1px solid var(--line); border-radius: 6px; padding: 22px 24px; background: #fff; }
.lodging__name { font-size: 1.4rem; color: var(--ink); }
.lodging__meta { color: var(--accent-dark); font-size: 0.9rem; margin: 4px 0 10px; letter-spacing: 0.3px; }
.lodging__desc { margin: 0 0 8px; }
.lodging__note { margin: 0 0 14px; font-size: 0.9rem; color: var(--muted); font-style: italic; }
.lodging__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Blocs conditionnels du formulaire save the date */
.branch { margin: 4px 0 8px; }
.branch--nested {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 16px;
  margin: 0 0 16px;
}
.branch__title { font-family: var(--serif); font-size: 1.1rem; margin: 0 0 10px; color: var(--ink); }
.branch__message {
  background: #fbf3e2;
  border: 1px solid #e6d3a8;
  border-radius: 6px;
  padding: 28px 24px;
  font-family: var(--serif);
  font-size: 1.7rem;
  line-height: 1.35;
  color: var(--accent-dark);
  text-align: center;
  margin: 10px 0 20px;
}

/* ============================================================
   Theme "La Dolce Vita" - cote amalfitaine
   ============================================================ */

/* Lisero tricolore (bleu mer / citron / sauge) en haut de page */
body {
  border-top: 6px solid;
  border-image: linear-gradient(90deg, var(--accent) 0%, var(--accent) 33%, var(--lemon) 33%, var(--lemon) 66%, var(--sage) 66%, var(--sage) 100%) 1;
  /* Rayures verticales jaune et blanc (facade amalfitaine) */
  background: repeating-linear-gradient(90deg, #ffffff 0 46px, #f7e6a0 46px 92px);
}

/* Carte bien detachee sur les rayures */
.card { position: relative; overflow: hidden; box-shadow: 0 14px 44px rgba(18,79,104,0.12); }

/* Decor citronnier sur la carte (epure) : deux brins qui encadrent le haut.
   Places derriere le contenu, donc le texte reste parfaitement lisible. */
.card::before, .card::after {
  content: '';
  position: absolute;
  top: 4px;
  width: 116px;
  height: 92px;
  background: url('../assets/lemon-branch.svg') no-repeat center / contain;
  pointer-events: none;
  opacity: 0.85;
  z-index: 0;
}
.card::before { left: 4px; }
.card::after { right: 4px; transform: scaleX(-1); }

/* Le contenu passe au-dessus du decor */
.card > * { position: relative; z-index: 1; }

@media (max-width: 640px) {
  .card::before, .card::after { width: 74px; height: 60px; opacity: 0.8; }
}

/* Prenoms calligraphies */
.hero__names,
.card__title[data-couple],
.footer__names {
  font-family: var(--script);
  font-weight: 400;
  color: var(--accent-dark);
  letter-spacing: 0.5px;
}
.card__title[data-couple] { font-size: clamp(3rem, 11vw, 5rem); line-height: 1.05; }
.nav__brand { color: var(--accent-dark); }

/* Barre de nav : fond legerement marin */
.nav--solid, .nav--scrolled {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
}

/* Soulignes des titres en citron */
.section__title::after, .card__title::after { background: var(--lemon); }

/* Hero (site complet) : ciel/mer d'Amalfi */
.hero {
  background:
    linear-gradient(180deg, rgba(31,134,168,0.14), rgba(157,181,140,0.10) 60%, var(--bg) 100%);
}
.hero__tagline { color: var(--accent); }
.hero__date { color: var(--accent-dark); }

/* Boutons : bleu mer, ombre douce */
.hero__cta, .btn { box-shadow: 0 6px 16px rgba(18,79,104,0.18); }

/* Choix / radios : accent bleu, survol cite */
.choice input { accent-color: var(--accent); }
.choice:hover { border-color: var(--accent); background: #f2f8fa; }

/* Cartes / timeline : petites touches */
.stat__num, .timeline__time, .timeline__event, .lodging__name { color: var(--accent-dark); }
.timeline__day { color: var(--accent); }

/* Bloc "+1" : liestet sauge */
.branch--nested { border-left-color: var(--sage); }

/* Messages (absent / incertain) : ambiance citron doux */
.branch__message {
  background: var(--lemon-soft);
  border-color: #ecd98c;
  color: var(--accent-dark);
}

/* Focus champs : bleu mer */
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31,134,168,0.12); }

/* Cadre video arrondi facon carte postale */
.video { box-shadow: 0 10px 30px rgba(18,79,104,0.18); }
