:root {
  /* Palette de la DA « Osez la couleur ! » */
  --fond: #f1efeb;
  --carte: #ffffff;
  --encre: #37404e;
  --encre-douce: #6d7482;
  --marine: #2c3e63;
  --bleu: #5b79b4;
  --bleu-clair: #7ba3d4;
  --sauge: #8b8b70;
  --chartreuse: #c3bf74;
  --moutarde: #e3a63e;
  --peche: #f2ae87;
  --corail: #f28265;
  --corail-rouge: #e2604f;
  --vermillon: #f04a2d;
  --bordure: #e4e1d8;
  --ombre: 0 10px 30px rgba(44, 62, 99, 0.08);
}

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

body {
  font-family: 'Jost', 'Segoe UI', sans-serif;
  font-weight: 300;
  background: var(--fond);
  color: var(--encre);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.6rem 1.25rem 0;
  width: 100%;
  flex: 1;
}

/* ---- onglets ---- */

.onglets {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.2rem;
  flex-wrap: wrap;
}

.onglets a {
  padding: 0.65rem 1.3rem;
  border-radius: 99px;
  text-decoration: none;
  font-weight: 400;
  font-size: 0.92rem;
  color: var(--marine);
  border: 1.5px solid transparent;
  transition: border-color 0.15s, background 0.15s;
}

.onglets a:hover { border-color: var(--peche); background: rgba(242, 174, 135, 0.12); }

.onglets a.actif {
  background: var(--corail-rouge);
  color: #fff;
  box-shadow: 0 4px 14px rgba(226, 96, 79, 0.35);
}

/* Trois onglets sur un écran de téléphone : on resserre horizontalement
   sans jamais descendre sous 44 px de hauteur au doigt. */
@media (max-width: 430px) {
  .onglets { gap: 0.3rem; }
  .onglets a { padding: 0.65rem 0.7rem; font-size: 0.8rem; }
}

@media (max-width: 350px) {
  .onglets a { padding: 0.65rem 0.5rem; font-size: 0.73rem; }
}

/* ---- entête ---- */

.hero { text-align: center; margin-bottom: 2.4rem; }

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--marine);
  margin-bottom: 0.4rem;
}

.ornement { height: 58px; margin: 0.2rem auto; }
.ornement img { height: 100%; }

h1 {
  font-family: 'Ms Madi', 'Caveat', cursive;
  font-weight: 400;
  font-size: clamp(3.2rem, 12vw, 4.6rem);
  line-height: 1.15;
  color: var(--encre);
}

h1 .esperluette { color: var(--corail-rouge); }

.hero-date {
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--corail-rouge);
  margin-top: 0.5rem;
}

.hero-lieu { margin-top: 0.8rem; font-size: 1.02rem; color: var(--encre); font-weight: 400; }
.hero-adresse { font-size: 0.9rem; color: var(--encre-douce); font-weight: 300; }
.hero-heure { margin-top: 0.2rem; font-size: 0.95rem; color: var(--encre-douce); }

/* ---- cartes ---- */

.carte {
  background: var(--carte);
  border: 1px solid var(--bordure);
  border-radius: 18px;
  box-shadow: var(--ombre);
  padding: 1.8rem 1.6rem;
  margin-bottom: 1.5rem;
}

#carte-message { text-align: center; }
.message { font-size: 1.12rem; font-weight: 400; color: var(--marine); }
.deadline { margin-top: 0.8rem; font-size: 0.9rem; color: var(--encre-douce); }

.dresscode {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--bordure);
  font-size: 0.95rem;
}
.dresscode .titre-dc {
  font-family: 'Ms Madi', 'Caveat', cursive;
  font-size: 1.7rem;
  color: var(--vermillon);
  display: block;
  line-height: 1.2;
}

h2 {
  font-family: 'Ms Madi', 'Caveat', cursive;
  font-weight: 400;
  font-size: 2.4rem;
  text-align: center;
  margin-bottom: 1.2rem;
  color: var(--marine);
}

/* ---- formulaire ---- */

form label { display: block; font-size: 0.95rem; font-weight: 400; margin-bottom: 1.1rem; }
.deux-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 480px) { .deux-colonnes { grid-template-columns: 1fr; } }

.requis { color: var(--vermillon); }

input[type="text"], input[type="tel"], textarea {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.85rem;
  font: inherit;
  font-size: 1rem; /* jamais sous 16 px : sinon Safari iOS zoome à la saisie */
  font-weight: 400;
  color: var(--encre);
  background: #fff;
  border: 1.5px solid var(--bordure);
  border-radius: 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--bleu);
  box-shadow: 0 0 0 3px rgba(91, 121, 180, 0.18);
}

textarea { resize: vertical; }

.aide { display: block; font-size: 0.8rem; font-weight: 300; color: var(--encre-douce); margin-top: 0.3rem; }

fieldset { border: none; margin: 0.4rem 0 1.3rem; }
legend { font-size: 0.95rem; font-weight: 400; margin-bottom: 0.7rem; }

.choix-presence { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
@media (max-width: 480px) { .choix-presence { grid-template-columns: 1fr; } }

.choix input { position: absolute; opacity: 0; }

.choix-carte {
  display: block;
  text-align: center;
  padding: 1rem 0.8rem;
  border: 2px solid var(--bordure);
  border-radius: 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.choix-carte:hover { transform: translateY(-2px); }

.choix input:focus-visible + .choix-carte {
  box-shadow: 0 0 0 3px rgba(91, 121, 180, 0.35);
}

.choix-oui input:checked + .choix-carte {
  border-color: var(--corail-rouge);
  background: rgba(242, 130, 101, 0.1);
}

.choix-non input:checked + .choix-carte {
  border-color: var(--bleu);
  background: rgba(91, 121, 180, 0.08);
}

.choix-emoji { display: block; font-size: 1.7rem; margin-bottom: 0.3rem; }
.choix-titre { display: block; font-weight: 500; font-size: 1rem; }
.choix-detail { display: block; font-size: 0.82rem; color: var(--encre-douce); }

.erreur {
  background: rgba(240, 74, 45, 0.08);
  border: 1px solid rgba(240, 74, 45, 0.35);
  color: #c23a20;
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 400;
  margin-bottom: 1rem;
}

button {
  display: block;
  width: 100%;
  padding: 1.05rem;
  font-size: 1rem;
  font: inherit;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #fff;
  background: linear-gradient(120deg, var(--vermillon), var(--corail-rouge));
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(226, 96, 79, 0.35);
  transition: filter 0.15s, transform 0.1s;
}

button:hover { filter: brightness(1.06); transform: translateY(-1px); }
button:disabled { opacity: 0.6; cursor: wait; transform: none; }

button.secondaire {
  background: transparent;
  color: var(--marine);
  border: 1.5px solid var(--bordure);
  box-shadow: none;
  width: auto;
  margin: 1.2rem auto 0;
  padding: 0.6rem 1.4rem;
}
button.secondaire:hover { background: rgba(91, 121, 180, 0.06); filter: none; }

/* ---- confirmation ---- */

.confirmation { text-align: center; }

.confirmation-icone {
  width: 64px;
  height: 64px;
  margin: 0.4rem auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #fff;
  background: var(--sauge);
  border-radius: 50%;
}

.confirmation-icone.absent { background: var(--bleu); }

.confirmation h2 { margin-bottom: 0.6rem; }
.conf-note { margin-top: 1.1rem; font-size: 0.85rem; color: var(--encre-douce); }

/* ---- hébergements ---- */

.intro-hebergements { text-align: center; margin-bottom: 1.6rem; }
.intro-hebergements p { font-size: 1rem; color: var(--encre); }
.intro-hebergements .note-prix { font-size: 0.82rem; color: var(--encre-douce); margin-top: 0.5rem; }

.grille-hebergements { display: grid; gap: 1rem; margin-bottom: 1.5rem; }

.hebergement {
  background: var(--carte);
  border: 1px solid var(--bordure);
  border-radius: 18px;
  box-shadow: var(--ombre);
  padding: 1.2rem 1.3rem;
  position: relative;
}

.hebergement.sur-place { border: 2px solid var(--corail-rouge); }

.badge-sur-place {
  position: absolute;
  top: -0.8rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--vermillon);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.9rem;
  border-radius: 99px;
  white-space: nowrap;
}

.hebergement-entete { display: flex; align-items: baseline; gap: 0.6rem; }
.hebergement-icone { font-size: 1.4rem; }
.hebergement h3 { font-size: 1.08rem; font-weight: 500; color: var(--marine); line-height: 1.3; }

.hebergement-infos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.7rem 0 0.9rem;
}

.puce {
  font-size: 0.8rem;
  font-weight: 400;
  padding: 0.22rem 0.7rem;
  border-radius: 99px;
  white-space: nowrap;
}

.puce-note { background: rgba(227, 166, 62, 0.16); color: #9a6b12; }
.puce-couchages { background: rgba(139, 139, 112, 0.14); color: #5c5c46; }
.puce-distance { background: rgba(91, 121, 180, 0.13); color: var(--marine); }
.puce-prix { background: rgba(242, 130, 101, 0.15); color: #b04430; }

.hebergement-liens { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.lien-resa {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  color: #fff;
  background: var(--bleu);
  padding: 0.68rem 1.15rem; /* ~44 px : confortable au pouce */
  border-radius: 99px;
  transition: filter 0.15s, transform 0.1s;
}

.lien-resa:hover { filter: brightness(1.1); transform: translateY(-1px); }
.lien-resa.booking { background: var(--marine); }
.lien-resa.airbnb { background: var(--corail-rouge); }
.lien-resa.gdf { background: var(--sauge); }

/* ---- pied de page fleuri ---- */

footer {
  margin-top: auto;
  text-align: center;
}

.signature {
  font-family: 'Ms Madi', 'Caveat', cursive;
  font-size: 1.9rem;
  color: var(--marine);
  margin-bottom: 0.2rem;
}

.frise-fleurs {
  display: block;
  width: 100%;
  max-height: 130px;
  margin: 0 auto;
}

/* ---- adresse : autocomplétion ---- */

.bloc-adresse { margin-bottom: 1.1rem; }
.bloc-adresse label { margin-bottom: 0.8rem; }
.aide-adresse { margin-top: -0.4rem; margin-bottom: 0.2rem; }

.champ-autocomplete { position: relative; }

.suggestions {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  margin-top: 0.25rem;
  padding: 0.3rem;
  list-style: none;
  background: #fff;
  border: 1.5px solid var(--bordure);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(44, 62, 99, 0.16);
  max-height: 15rem;
  overflow-y: auto;
}

.suggestions li {
  padding: 0.7rem 0.75rem;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--encre);
  cursor: pointer;
}

.suggestions li:hover,
.suggestions li.active {
  background: rgba(242, 130, 101, 0.14);
  color: #b04430;
}

/* ---- notre histoire : l'album ---- */

/* les tirages sont inclinés : on empêche tout débordement latéral */
.page-album { overflow-x: clip; }

.intro-histoire {
  text-align: center;
  margin-bottom: 2.2rem;
  color: var(--encre);
}

.album {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding-bottom: 1rem;
}

.tirage {
  display: block;
  width: 100%;
  max-width: 420px;
  padding: 11px 11px 4px;
  margin: 0;
  background: #fff;
  border: none;
  border-radius: 3px;
  box-shadow: 0 8px 24px rgba(44, 62, 99, 0.17);
  cursor: pointer;
  transform: rotate(var(--angle, 0deg));
  transition: transform 0.18s, box-shadow 0.18s;
}

/* léger chevauchement : la pile de tirages */
.tirage + .tirage { margin-top: -0.35rem; }

.tirage:hover {
  transform: rotate(0deg) scale(1.02);
  box-shadow: 0 16px 34px rgba(44, 62, 99, 0.24);
  filter: none;
}

.tirage:focus-visible {
  outline: 3px solid var(--bleu);
  outline-offset: 3px;
}

.tirage-cadre {
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--bordure);
  overflow: hidden;
}

.tirage-cadre.portrait { aspect-ratio: 3 / 4; }

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

.tirage-legende {
  display: block;
  padding: 0.55rem 0.25rem 0.4rem;
  font-family: 'Caveat', cursive;
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--marine);
  text-align: left;
}

@media (max-width: 400px) {
  .tirage { padding: 9px 9px 3px; }
  .tirage-legende { font-size: 1.2rem; }
}

/* ---- visionneuse plein écran ---- */

.visionneuse {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  background: rgba(24, 28, 38, 0.94);
}

.visionneuse[hidden] { display: none; }

.v-scene {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.v-scene img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.v-scene figcaption {
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.85);
}

.v-fermer, .v-nav {
  flex: none;
  width: 48px;
  height: 48px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: none;
  border-radius: 50%;
  box-shadow: none;
  cursor: pointer;
}

.v-fermer:hover, .v-nav:hover { background: rgba(255, 255, 255, 0.26); filter: none; transform: none; }

.v-fermer {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.2rem;
  z-index: 2;
}

@media (max-width: 560px) {
  .v-nav { position: absolute; bottom: 1.2rem; }
  .v-prec { left: 1.5rem; }
  .v-suiv { right: 1.5rem; }
  .v-scene img { max-height: 70vh; }
}
