@font-face {
  font-family: 'Nadira Pro';
  src: url('../nadira/NF-Nadira-Pro-Regular.woff2') format('woff2'),
       url('../nadira/NF-Nadira-Pro-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: 'Nadira Pro';
  src: url('../nadira/NF-Nadira-Pro-Bold.woff2') format('woff2'),
       url('../nadira/NF-Nadira-Pro-Bold.woff') format('woff');
  font-weight: bold;
  font-style: normal;
  font-display: block;
}

:root {
  --color-bg: #fdf7f0;
  --color-bg-alt: #cfe0e4;
  --color-text: #14234b;
  --color-muted: #7d869c;
  --color-accent: #3a6daf;
  --color-accent-warm: #e57d37;
  --color-gold: #ebad62;
  --color-steel: #94bac4;
  --font-title: 'Nadira Pro', cursive;
  --font-body: 'Cormorant Garamond', serif;
  --font-script: 'Nadira Pro', cursive;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  font-weight: 500;
}

h1, h2, h3 {
  font-family: var(--font-title);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--color-text);
}

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

main a {
  color: var(--color-accent-warm);
  text-decoration: underline;
}

main a:hover { opacity: 0.75; }

/* --- Navigation --- */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(253, 247, 240, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

/* Sur l'accueil, la frise de vagues est fixée au-dessus de la nav : on pousse la nav vers le bas d'autant.
   Classe explicite plutôt que body:has(.hero-frieze) : ce sélecteur n'est pas supporté par tous les
   navigateurs mobiles, et son absence masquait le bouton menu (caché sous la frise, nav restée à top:0). */
body.has-frieze #navbar { top: 34px; }

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
}

.nav-brand {
  font-family: var(--font-script);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

#nav-links {
  list-style: none;
  display: flex;
  gap: 1.8rem;
}

#nav-links a {
  font-family: var(--font-script);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

#nav-links a:hover,
#nav-links a.active,
.nav-dropdown-trigger:hover,
.nav-dropdown-trigger.active { color: var(--color-accent-warm); }

/* RSVP se distingue du reste du menu, en bouton plein */
#nav-links a.nav-cta {
  background: var(--color-accent-warm);
  color: #fff;
  padding: 0.4rem 1.1rem;
  border-radius: 20px;
}

#nav-links a.nav-cta:hover,
#nav-links a.nav-cta.active {
  color: #fff;
  opacity: 0.88;
}

.has-dropdown { position: relative; }

.nav-dropdown-trigger {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-script);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--color-text);
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.2s;
}

.nav-dropdown-trigger::after {
  content: '▾';
  font-size: 0.7em;
}

.dropdown {
  list-style: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-bg);
  box-shadow: 0 10px 24px rgba(20, 35, 75, 0.14);
  border-radius: 6px;
  padding: 0.8rem 0 0.6rem;
  min-width: 190px;
  margin-top: 0;
  display: none;
  flex-direction: column;
  z-index: 200;
}

.has-dropdown:focus-within .dropdown {
  display: flex;
}

/* Le survol n'ouvre le sous-menu que sur les appareils qui ont un vrai pointeur (souris) :
   sur tactile, un :hover sur un ancêtre force iOS Safari à exiger un premier tap "pour
   activer le survol" avant que les liens en dessous ne deviennent cliquables. */
@media (hover: hover) and (pointer: fine) {
  .has-dropdown:hover .dropdown {
    display: flex;
  }
}

.dropdown a {
  display: block;
  padding: 0.5rem 1.2rem;
  white-space: nowrap;
}

#nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
}

#nav-toggle span {
  display: block;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
}

/* --- Hero (accueil) --- */
#hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--color-bg);
  color: var(--color-text);
  padding: 7.7rem 2rem 1.4rem;
}

.hero-photo {
  max-width: 700px;
  margin: 0 auto;
  aspect-ratio: 1365 / 768; /* ratio réel de l'aquarelle : jamais rognée, quelle que soit la largeur d'écran */
  overflow: hidden;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Frise grecque (méandre), fixée au-dessus de la nav sur l'accueil --- */
.hero-frieze {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 34px;
  z-index: 110;
  background-color: var(--color-bg);
  background-image: url('../images/icons/frieze-meander.svg');
  background-repeat: repeat-x;
  background-size: auto 34px;
  background-position: left center;
}

/* --- Frise grecque (méandre), utilisée avec parcimonie en pied de bannière --- */
.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 34px;
  background-image: url('../images/icons/frieze-meander.svg');
  background-repeat: repeat-x;
  background-size: auto 34px;
  background-position: bottom left;
  opacity: 0.9;
}

.laurel {
  display: block;
  margin: 0 auto 0.8rem;
  width: 140px;
  height: auto;
}

/* --- Petits ornements grecs, utilisés au compte-goutte --- */
.ornament {
  display: block;
  margin: 0 auto 1.5rem;
  width: 90px;
  height: auto;
  opacity: 0.9;
}

.ornament-tall {
  width: 44px;
  margin: 3rem auto 0;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-bottom: 1rem;
}

#hero h1 {
  font-family: var(--font-script);
  font-size: clamp(2.8rem, 9vw, 6rem);
  line-height: 1.1;
  color: var(--color-text);
}

.hero-subtitle {
  margin-top: 0.8rem;
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hero-date,
.hero-location {
  font-size: 1.65rem;
  letter-spacing: 0.05em;
  color: var(--color-accent-warm);
  -webkit-text-stroke: 0.6px var(--color-accent-warm);
}

.hero-sep {
  font-size: 1.3rem;
  color: var(--color-muted);
}

.btn {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.9rem 2.2rem;
  background: var(--color-accent-warm);
  color: #fff;
  border-radius: 2px;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.12); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--color-accent-warm);
  color: var(--color-accent-warm);
}

/* --- Page hero (sous-pages) --- */
.page-hero {
  position: relative;
  padding: 9rem 1.5rem 3.5rem;
  text-align: center;
  background: var(--color-bg-alt);
}

.page-hero .hero-kicker { margin-bottom: 0.6rem; }

.page-hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
}

/* --- Sections --- */
.section {
  max-width: 900px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
}

.section.alt { background: var(--color-bg-alt); max-width: 100%; }
.section.alt > * { max-width: 900px; margin-left: auto; margin-right: auto; }

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

.section-tight-top { padding-top: 2rem; }
.section-tight-bottom { padding-bottom: 2rem; }

.section h2 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-title-row h2 { margin-bottom: 0; }

.title-icon {
  width: 56px;
  height: auto;
  opacity: 0.9;
}

.section h3 {
  font-size: 1.4rem;
  margin: 2rem 0 0.8rem;
}

.section-text {
  color: var(--color-text);
  max-width: 640px;
  margin: 0 auto 1.5rem;
  font-size: 1.25rem;
}

.section.centered .section-text { margin-left: auto; margin-right: auto; }
.section-text-wide { max-width: 700px; }

/* Hors des sections centrées, le texte courant s'étire sur toute la largeur (comme les listes et
   encadrés à côté desquels il apparaît) et se justifie, plutôt que de rester bloqué à 640px */
.section:not(.centered) .section-text {
  max-width: none;
  margin-left: 0;
  text-align: justify;
}

/* Exception : le chapeau d'introduction (avec la carte juste en dessous) reste un bloc centré et plus étroit */
.section:not(.centered) .section-text.intro-lede {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section:not(.centered) .info-image.intro-map {
  margin-left: auto;
  margin-right: auto;
}

.section p + p { margin-top: 1rem; }

.section ul {
  color: var(--color-text);
  padding-left: 1.2rem;
  margin: 1rem 0;
}

.section ul li { margin-bottom: 0.5rem; }

.callout {
  background: rgba(235, 173, 98, 0.15);
  border: 1.5px solid var(--color-gold);
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
  color: var(--color-text);
}

.info-box {
  background: rgba(148, 186, 196, 0.12);
  border: 1.5px solid var(--color-steel);
  padding: 1.5rem 1.8rem;
  margin: 2rem 0;
}

.info-box h3:first-child { margin-top: 0; }

/* --- Photo grid --- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.photo-placeholder,
.photo-grid img {
  aspect-ratio: 3 / 4;
  background: #e2e9ec;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: 0.9rem;
  border-radius: 4px;
}

.photo-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Images informatives (carte, illustrations) --- */
.info-image {
  max-width: 480px;
  margin: 2rem auto;
  text-align: center;
}

.info-image img {
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.info-image figcaption {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--color-muted);
  font-style: italic;
}

/* Dans les sections non centrées, aligner l'image à gauche comme le texte au-dessus (sinon le texte colle à gauche et l'image se retrouve centrée, décalage visuel) */
.section:not(.centered) .info-image {
  margin-left: 0;
  margin-right: auto;
}

/* --- Timeline (programme) --- */
.day-group { margin-bottom: 3rem; }
.day-group:last-child { margin-bottom: 0; }

.day-title {
  font-family: var(--font-title);
  font-size: 1.6rem;
  color: var(--color-accent);
  margin-bottom: 0.6rem;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  padding-bottom: 0.5rem;
}

.dress-code {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--color-accent-warm);
  margin-top: 0.6rem;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.timeline-item h3 {
  font-size: 1.25rem;
  margin: 0 0 0.2rem;
}

.timeline-item p { color: var(--color-text); }

/* --- Card grid (hébergements, activités, navigation home) --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.2rem;
  margin-top: 2rem;
}

.card {
  background: rgba(148, 186, 196, 0.15);
  border: 1.5px solid var(--color-steel);
  padding: 1.6rem;
  text-align: left;
}

.card h3 {
  font-size: 1.3rem;
  margin: 0 0 0.4rem;
}

.card p {
  color: var(--color-text);
  font-size: 0.92rem;
  margin: 0;
}

.card .card-link {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.85rem;
  color: var(--color-accent-warm);
  text-decoration: underline;
}

/* --- Placeholders (form / map) --- */
.placeholder-box {
  border: 1px dashed rgba(0,0,0,0.2);
  border-radius: 6px;
  padding: 4rem 1.5rem;
  color: var(--color-muted);
  font-style: italic;
  text-align: center;
}

/* --- RSVP --- */
.rsvp-embed { margin-top: 2rem; }

.rsvp-embed iframe {
  width: 100%;
  min-height: 950px;
  border: none;
  background: #fff;
  border-radius: 6px;
}

/* --- Footer --- */
footer {
  text-align: center;
  padding: 1.75rem 1.5rem 2.5rem;
  color: var(--color-muted);
  font-size: 0.9rem;
  background: var(--color-bg-alt);
}

/* --- Mobile --- */
@media (max-width: 900px) {
  #nav-toggle { display: flex; }

  #nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    align-items: center;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  #nav-links.open { max-height: 700px; }

  #nav-links li { width: 100%; text-align: center; }

  #nav-links a.nav-cta { border-radius: 0; }

  #nav-links a,
  .nav-dropdown-trigger {
    display: block;
    width: 100%;
    padding: 1rem;
    border-top: 1px solid rgba(0,0,0,0.06);
  }

  .nav-dropdown-trigger { justify-content: center; }

  /* La flèche vit uniquement au niveau d'"À propos d'Hydra" : elle pivote pour
     montrer si le sous-menu est déplié ou replié. */
  .nav-dropdown-trigger::after {
    display: inline-block;
    transition: transform 0.2s ease;
  }

  .has-dropdown.open .nav-dropdown-trigger::after {
    transform: rotate(180deg);
  }

  .has-dropdown { position: static; }

  /* Le sous-menu est un vrai accordéon sur mobile : replié par défaut, déplié
     au clic sur "À propos d'Hydra" (voir script.js) — même principe que
     #nav-links (max-height animée plutôt que display, pour la transition). */
  .dropdown {
    display: flex;
    position: static;
    transform: none;
    box-shadow: none;
    background: var(--color-bg-alt);
    border-radius: 0;
    padding: 0;
    margin: 0;
    min-width: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .has-dropdown.open .dropdown { max-height: 300px; }

  .dropdown a {
    padding: 0.9rem 1rem 0.9rem 2rem;
    font-size: 0.95rem;
  }

  .photo-grid { grid-template-columns: 1fr; }

  /* Date et lieu passent sur deux lignes en mobile : le séparateur devient inutile */
  .hero-sep { display: none; }
  .hero-subtitle { row-gap: 0.2rem; }
}
