/* ============================================================
   BAPTÊME - Site de Réservation
   Palette : ivoire, or doux, blush rose, vert sauge
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Jost:wght@300;400;500&display=swap');

/* ── Variables ── */
:root {
  --ivory:     #faf7f2;
  --cream:     #f3ede3;
  --gold:      #c9a96e;
  --gold-light:#e8d5b0;
  --blush:     #e8c4b8;
  --blush-dark:#c9907e;
  --sage:      #8a9e8c;
  --sage-dark: #5f7261;
  --ink:       #2c2a26;
  --ink-light: #6b6560;
  --white:     #ffffff;
  --shadow:    rgba(44,42,38,.12);
  --radius:    12px;
  --transition:.35s cubic-bezier(.4,0,.2,1);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Jost', sans-serif;
  background: var(--ivory);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
}

h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 3vw, 2rem); }
h4 { font-size: 1.15rem; }

p { color: var(--ink-light); font-weight: 300; }

a { color: inherit; text-decoration: none; }

/* ── Utility ── */
.hidden { display: none !important; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-center { text-align: center; }

.gold-line {
  display: block;
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 1.2rem auto;
}

/* ── Boutons ── */
.btn {
  display: inline-block;
  padding: .75rem 2rem;
  border-radius: 40px;
  font-family: 'Jost', sans-serif;
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--gold);
  color: var(--white);
  box-shadow: 0 4px 18px rgba(201,169,110,.35);
}
.btn-primary:hover {
  background: #b8924f;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,169,110,.45);
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid var(--gold);
}
.btn-outline:hover {
  background: var(--gold);
  color: var(--white);
}

.btn-sage {
  background: var(--sage);
  color: var(--white);
}
.btn-sage:hover { background: var(--sage-dark); }

.btn-danger {
  background: #d9534f;
  color: var(--white);
  padding: .5rem 1.2rem;
  font-size: .8rem;
}
.btn-danger:hover { background: #c0392b; }

/* ── Navigation ── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(250,247,242,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gold-light);
  transition: var(--transition);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-style: italic;
  color: var(--gold);
  letter-spacing: .04em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-admin-btn {
  font-size: .78rem;
  padding: .5rem 1.2rem;
}
#nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

#nav-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--ink);
  border-radius: 2px;
  transition: var(--transition);
}

/* Animation en croix */
#nav-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
#nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
#nav-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ── Login Overlay ── */
#login-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn .4s ease;
}

.login-card {
  background: var(--white);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  width: min(420px, 90vw);
  box-shadow: 0 20px 60px var(--shadow);
  text-align: center;
  border: 1px solid var(--gold-light);
}

.login-icon {
  font-size: 3rem;
  margin-bottom: .5rem;
}

.login-card h2 { margin-bottom: .3rem; }
.login-card p  { font-size: .9rem; margin-bottom: 1.8rem; }

.login-error {
  background: #fdecea;
  color: #c0392b;
  border-radius: 8px;
  padding: .7rem 1rem;
  font-size: .85rem;
  margin-bottom: 1rem;
  border: 1px solid #f1c0bb;
}

/* ── Pages (SPA) ── */
.page { display: none; padding-top: 64px; min-height: 100vh; }
.page.active { display: block; animation: fadeIn .4s ease; }

/* ── Page Accueil ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(160deg, var(--cream) 0%, var(--ivory) 60%, #ede8df 100%);
}

.hero-petals {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.petal {
  position: absolute;
  width: 8px;
  height: 14px;
  border-radius: 50% 50% 50% 0 / 60% 60% 40% 40%;
  background: var(--blush);
  opacity: .45;
  animation: fall linear infinite;
}

@keyframes fall {
  0%   { transform: translateY(-40px) rotate(0deg); opacity: .5; }
  100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}

.hero-content { position: relative; z-index: 2; padding: 2rem 1rem; }

.hero-badge {
  display: inline-block;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold-light);
  border-radius: 40px;
  padding: .4rem 1.2rem;
  margin-bottom: 1.5rem;
  background: rgba(255,255,255,.6);
}

.hero h1 {
  font-style: italic;
  margin-bottom: .5rem;
}

.hero-name {
  color: var(--gold);
  font-size: clamp(3rem, 8vw, 6rem);
  display: block;
}

.hero-date {
  font-size: 1rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin: 1.5rem 0 2.5rem;
}

.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Décorations florales SVG inline */
.floral-deco {
  position: absolute;
  opacity: .18;
  pointer-events: none;
}
.floral-deco.top-left  { top: 80px;  left: -30px; width: 280px; transform: rotate(-10deg); }
.floral-deco.bot-right { bottom: 0; right: -40px; width: 320px; transform: rotate(170deg); }

/* Section intro */
.section-intro {
  padding: 6rem 0;
  background: var(--white);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.intro-text { }
.intro-text .section-label {
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 500;
  margin-bottom: .8rem;
}
.intro-text h2 { margin-bottom: 1rem; }
.intro-text p  { margin-bottom: 1.2rem; font-size: .97rem; }

.intro-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .8rem;
}

.intro-card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 1.5rem 1.2rem;
  text-align: center;
  border: 1px solid var(--gold-light);
  transition: var(--transition);
}
.intro-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px var(--shadow); }
.intro-card .ic-icon { font-size: 2rem; margin-bottom: .5rem; }
.intro-card h4 { font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; margin-bottom: .3rem; }
.intro-card p  { font-size: .82rem; }

/* Timeline */
.section-timeline {
  padding: 6rem 0;
  background: var(--ivory);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 680px;
  margin: 3rem auto 0;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 32px; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--gold-light) 10%, var(--gold-light) 90%, transparent);
}

.tl-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.2rem 0;
}

.tl-dot {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 14px var(--shadow);
  position: relative;
  z-index: 1;
}

.tl-body { padding-top: .6rem; }
.tl-time {
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: .2rem;
}
.tl-body h4 { margin-bottom: .3rem; }
.tl-body p  { font-size: .88rem; }

/* ── Page Lieux ── */
.lieux-header {
  background: linear-gradient(135deg, var(--cream) 0%, var(--ivory) 100%);
  padding: 5rem 0 3rem;
  text-align: center;
}

.lieux-grid {
  padding: 4rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.lieu-card {
  background: var(--white);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 24px var(--shadow);
  border: 1px solid var(--gold-light);
  transition: var(--transition);
}
.lieu-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(44,42,38,.18); }

.lieu-thumb {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  position: relative;
  overflow: hidden;
}

.lieu-thumb.church { background: linear-gradient(135deg, #e8e0d5, #d4c9b5); }
.lieu-thumb.garden { background: linear-gradient(135deg, #d6e8d4, #b8d4b6); }
.lieu-thumb.salle  { background: linear-gradient(135deg, #e8d5e0, #d4b8c9); }

.lieu-badge {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--gold);
  color: var(--white);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .3rem .8rem;
  border-radius: 40px;
}

.lieu-body { padding: 1.5rem; }
.lieu-body h3 { margin-bottom: .3rem; }
.lieu-body .lieu-sub {
  font-size: .78rem;
  color: var(--gold);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .8rem;
}

.lieu-info-list {
  list-style: none;
  margin: 1rem 0;
}
.lieu-info-list li {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .88rem;
  color: var(--ink-light);
  margin-bottom: .5rem;
}
.lieu-info-list .li-icon { flex-shrink: 0; }

.lieu-map-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  color: var(--sage-dark);
  font-weight: 500;
  margin-top: .8rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}
.lieu-map-link:hover { color: var(--gold); }

/* ── Page Réservation ── */
.resa-header {
  background: linear-gradient(135deg, #f0e8f0, var(--ivory));
  padding: 5rem 0 3rem;
  text-align: center;
}

.resa-layout {
  padding: 4rem 0;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 3rem;
  align-items: start;
}

/* Formulaire */
.form-card {
  background: var(--white);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 8px 32px var(--shadow);
  border: 1px solid var(--gold-light);
}

.form-section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  color: var(--ink);
  border-bottom: 1px solid var(--cream);
  padding-bottom: .6rem;
  margin: 1.8rem 0 1.2rem;
}
.form-section-title:first-of-type { margin-top: 0; }

.form-group {
  margin-bottom: 1.2rem;
}

label {
  display: block;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: .4rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: .75rem 1rem;
  border: 1.5px solid var(--cream);
  border-radius: var(--radius);
  font-family: 'Jost', sans-serif;
  font-size: .95rem;
  color: var(--ink);
  background: var(--ivory);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,169,110,.15);
  background: var(--white);
}

textarea { resize: vertical; min-height: 100px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-check {
  display: flex;
  align-items: center;
  gap: .6rem;
  cursor: pointer;
  font-size: .9rem;
  color: var(--ink-light);
}
.form-check input[type="checkbox"] {
  width: 18px; height: 18px;
  border-radius: 4px;
  accent-color: var(--gold);
  cursor: pointer;
}

.form-note {
  font-size: .78rem;
  color: var(--ink-light);
  margin-top: .3rem;
}

.submit-area {
  margin-top: 2rem;
  text-align: center;
}

.btn-submit {
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1rem;
  border-radius: 12px;
  letter-spacing: .12em;
}

/* Sidebar infos */
.resa-sidebar {}

.sidebar-card {
  background: var(--white);
  border-radius: 18px;
  padding: 1.8rem;
  box-shadow: 0 6px 24px var(--shadow);
  border: 1px solid var(--gold-light);
  margin-bottom: 1.5rem;
}
.sidebar-card h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.sidebar-event {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-bottom: .8rem;
}
.se-icon { font-size: 1.4rem; }
.se-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); }
.se-value { font-size: .92rem; color: var(--ink); font-weight: 400; }

/* Confirmation */
.confirm-box {
  background: linear-gradient(135deg, #f0f8f0, #e8f5e8);
  border: 1.5px solid #a8d5a8;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  margin-top: 2rem;
}
.confirm-box .cb-icon { font-size: 3rem; margin-bottom: .8rem; }
.confirm-box h3 { color: var(--sage-dark); margin-bottom: .5rem; }
.confirm-box p { font-size: .9rem; }

/* ── Page Admin ── */
.admin-header {
  background: linear-gradient(135deg, #2c2a26, #3d3a34);
  padding: 5rem 0 2.5rem;
  color: var(--white);
  text-align: center;
}
.admin-header h1 { color: var(--gold-light); font-style: italic; }
.admin-header p  { color: rgba(255,255,255,.65); margin-top: .5rem; }

.admin-logout {
  position: absolute;
  top: 80px; right: 1.5rem;
  font-size: .8rem;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.2rem;
  margin: 2.5rem 0;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.4rem;
  text-align: center;
  box-shadow: 0 4px 14px var(--shadow);
  border: 1px solid var(--gold-light);
}
.stat-card .stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: .2rem;
}
.stat-card .stat-label {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-light);
}

.admin-section { padding: 3rem 0; }
.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-table-wrap {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 24px var(--shadow);
  border: 1px solid var(--gold-light);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}

thead tr {
  background: linear-gradient(135deg, #2c2a26, #3d3a34);
  color: var(--gold-light);
}

thead th {
  padding: 1rem 1.2rem;
  text-align: left;
  font-weight: 500;
  letter-spacing: .06em;
  font-size: .8rem;
  text-transform: uppercase;
}

tbody tr {
  border-bottom: 1px solid var(--cream);
  transition: background var(--transition);
}
tbody tr:hover { background: var(--ivory); }
tbody tr:last-child { border-bottom: none; }

tbody td {
  padding: .9rem 1.2rem;
  color: var(--ink);
  vertical-align: top;
}

.badge-event {
  display: inline-block;
  font-size: .72rem;
  padding: .2rem .7rem;
  border-radius: 40px;
  font-weight: 500;
  margin: .15rem;
  letter-spacing: .06em;
}
.badge-eglise  { background: #e8e0d5; color: #6b5e4e; }
.badge-jardin  { background: #d6e8d4; color: #3d6b3a; }
.badge-salle   { background: #e8d5e0; color: #6b3a5e; }

.table-empty {
  text-align: center;
  padding: 3rem;
  color: var(--ink-light);
  font-size: .95rem;
}

.admin-actions { display: flex; gap: .6rem; flex-wrap: wrap; }

/* Export */
.export-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: .5rem;
}

/* ── Footer ── */
footer {
  background: var(--ink);
  color: rgba(255,255,255,.55);
  text-align: center;
  padding: 2rem 1rem;
  font-size: .82rem;
  letter-spacing: .06em;
}
footer span { color: var(--gold-light); }

/* ── Animations ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes floatUp {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

.float-anim { animation: floatUp 4s ease-in-out infinite; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .intro-grid    { grid-template-columns: 1fr; }
  .resa-layout   { grid-template-columns: 1fr; }
  .resa-sidebar  { order: -1; }
}

@media (max-width: 1024px) { /* On cache le menu horizontal */
  .nav-links {
    position: absolute;
    top: 64px;
    right: 1rem;
    background: rgba(250,247,242,.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--gold-light);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
  }

  /* Quand ouvert */
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  /* Le bouton burger apparaît */
  #nav-toggle {
    display: flex;
  }

  /* On garde Admin + burger visibles */
  .nav-inner {
    position: relative;
  }
  .form-row  { grid-template-columns: 1fr; }
  .lieux-grid { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  thead { display: none; }
  tbody tr { display: block; border-bottom: 2px solid var(--cream); padding: .5rem; }
  tbody td { display: flex; justify-content: space-between; border-bottom: 1px solid var(--ivory); padding: .5rem .8rem; }
  tbody td::before { content: attr(data-label); font-weight: 500; color: var(--ink-light); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; flex-shrink: 0; margin-right: .5rem; }
}

/* ── Admin login modal ── */
#admin-login-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(44,42,38,.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
}
#admin-login-modal .login-card { max-width: 380px; }
