/* ============ RESET & BASE ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black: #0a0a0a;
  --white: #ffffff;
  --font-serif: 'DM Serif Display', Georgia, serif;
  --font-sans: 'IBM Plex Sans', system-ui, sans-serif;
}

html { overflow-x: hidden; scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }

/* ============ SCROLLBAR CUSTOM ============ */
.c-scrollbar {
  position: fixed;
  right: 18px;
  top: 12vh;
  height: 76vh;
  width: 1px;
  background: rgba(10,10,10,0.1);
  z-index: 50;
  cursor: pointer;
}
.c-scrollbar__thumb {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  background: var(--black);
  cursor: grab;
}
.c-scrollbar__thumb:hover,
.c-scrollbar__thumb.dragging { cursor: grabbing; }
.c-scrollbar:hover .c-scrollbar__thumb { background: #333; }

body {
  font-family: var(--font-sans);
  color: var(--black);
  background: var(--white);
  padding-bottom: 40vh;
}

.page-content {
  position: relative;
  z-index: 1;
  background: var(--white);
  min-height: 100vh;
}

/* Texte visible uniquement par les lecteurs d'écran */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============ NAVIGATION ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 48px;
  background: transparent;
  transition: background 0.3s, box-shadow 0.3s;
}

.nav.scrolled {
  background: transparent;
}

.nav__logo { text-decoration: none; display: flex; align-items: center; }
/* Logo en blanc : il repose sur la photo sombre de gauche */
.nav__logo-img { height: 44px; width: auto; display: block; object-fit: contain; filter: invert(1); }
.nav__links { display: flex; gap: 40px; list-style: none; }

.nav__link {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--black);
  text-transform: capitalize;
  position: relative;
  padding-bottom: 2px;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--black);
  transition: width 0.3s ease;
}

.nav__link:hover::after { width: 100%; }

/* ============ CONTACT LAYOUT ============ */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ============ LEFT SIDE — image ============ */
.contact__left {
  position: sticky;
  top: 0;
  height: 100vh;
}

.contact__img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #b8a99a 0%, #9c8878 30%, #6b5c50 60%, #3a2e28 100%);
  object-fit: cover;
  /* cadre sur le haut pour garder la mariée entière (fleurs dans les cheveux comprises) */
  object-position: 50% 0%;
}

/* ============ FORM ============ */
.contact__form {
  padding: 160px 80px 100px 80px;
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.form__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form__label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #999;
}

.form__input {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 300;
  color: var(--black);
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(10,10,10,0.2);
  padding: 10px 0;
  outline: none;
  width: 100%;
  transition: border-color 0.25s;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
}

.form__input::placeholder { color: #767676; }

.form__input:focus { border-bottom-color: var(--black); }

.form__select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230a0a0a' stroke-width='1.2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  padding-right: 24px;
}

.form__textarea {
  resize: none;
  height: 120px;
  padding-top: 10px;
  line-height: 1.6;
}

.form__rgpd {
  font-size: 11.5px;
  font-weight: 300;
  line-height: 1.7;
  color: #9a9a9a;
  max-width: 56ch;
  margin-top: -8px;
}
.form__rgpd a { color: #6a6a6a; text-decoration: underline; text-underline-offset: 2px; }
.form__rgpd a:hover { color: var(--black); }

.form__submit {
  display: flex;
  align-items: center;
  gap: 12px;
  align-self: flex-start;
  background: var(--black);
  color: var(--white);
  border: none;
  padding: 14px 32px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s;
}

.form__submit:hover { opacity: 0.75; }

.form__submit svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.form__submit:hover svg { transform: translateX(4px); }

.form__submit.loading { opacity: 0.5; pointer-events: none; }

/* ============ SUCCESS MESSAGE ============ */
.form__success {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 160px 80px 100px 80px;
}

.form__success.visible { display: flex; }

.form__success-title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 4vw, 64px);
  font-weight: 400;
  line-height: 1.1;
}

.form__success-text {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 300;
  color: #666;
  letter-spacing: 0.04em;
}

.form__back-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  margin-top: 16px;
  text-decoration: none;
  color: var(--black);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--black);
  padding-bottom: 4px;
  transition: opacity 0.2s;
}

.form__back-btn:hover { opacity: 0.5; }

.form__back-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.form__back-btn:hover svg { transform: translateX(-4px); }

/* ============ FOOTER ============ */
.footer {
  position: fixed;
  bottom: 0; left: 0;
  width: 100%; z-index: 0;
  background: #0f0f0f;
  overflow: hidden;
  color: var(--black);
  padding: 0 0 60px;
  display: flex;
  flex-direction: column;
  height: 40vh;
}

.footer__main {
  display: inline-block;
  align-self: flex-start;
  margin-right: -3.5vw;
}

.footer__logo {
  font-family: var(--font-serif);
  font-size: 11.5vw;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 0.82;
  margin: 0; padding: 0;
  color: var(--black);
  display: block;
  -webkit-font-smoothing: antialiased;
}

.footer__phone {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 0.28em;
  color: var(--black);
  text-align: right;
  margin-top: 4px;
  display: block;
  text-decoration: none;
}

.footer__bottom {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 48px;
}

.footer__socials { display: flex; gap: 36px; align-items: center; }

.footer__social-link {
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-decoration: none;
  color: #888;
  text-transform: capitalize;
}

.footer__nav { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; }

.footer__nav-link {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--black);
  text-decoration: none;
  text-transform: uppercase;
  transition: opacity 0.2s;
}

/* --- Footer : fond photo noir & blanc --- */
.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url(../assets/cat-mariages.jpg) center 30% / cover no-repeat;
  filter: grayscale(1) contrast(1.06) brightness(0.82);
  z-index: 0;
}
.footer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0.34) 0%, rgba(10,10,10,0.66) 55%, rgba(10,10,10,0.8) 100%);
  z-index: 0;
}
.footer__main,
.footer__bottom { position: relative; z-index: 1; }
.footer__logo { color: #fff; }
.footer__phone { color: rgba(255,255,255,0.9); }
.footer__nav-link { color: #fff; font-weight: 400; text-transform: capitalize; }
.footer__social-link { color: rgba(255,255,255,0.6); }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .nav { padding: 16px 24px; }
  .nav__links { gap: 20px; }
  .nav__link { font-size: 12px; }
  .contact { grid-template-columns: 1fr; }
  /* iPhone : empêche la page de glisser sur les côtés. `clip` (et non
     `hidden`) ne crée pas de conteneur de défilement sur body. */
  body { overflow-x: clip; }
  /* 16px minimum dans les champs : en dessous, Safari iOS zoome au toucher
     et la page zoomée peut alors glisser latéralement */
  .form__input { font-size: 16px; }
  .contact__left { position: static; height: 32vh; }
  /* Bande basse : cadrage centré sur les deux fillettes et le mouvement de
     la robe (la tête de la mariée passerait sous le logo de toute façon) */
  .contact__img-placeholder { object-position: 50% 42%; }
  .contact__form { padding: 60px 32px 80px; }
  .form__row { grid-template-columns: 1fr; }
  .form__success { padding: 120px 32px 60px; }
  .footer__main { padding-top: 24px; }
  .footer__bottom { flex-direction: column; align-items: center; text-align: center; gap: 20px; padding: 24px 24px 0; }
  .footer__phone { text-align: left; }
}


/* Nav compacte sur petit écran : logo au-dessus, liens en dessous */
@media (max-width: 480px) {
  .nav { flex-direction: column; gap: 10px; padding: 12px 16px; }
  .nav__logo-img { height: 36px; }
  .nav__links { gap: 14px; }
  .nav__link { font-size: 11px; letter-spacing: 0.04em; }
}

/* ============ HEADER ESCAMOTABLE — caché pendant le scroll, revient à l'arrêt ============ */
.nav {
  transition: transform 0.35s ease, opacity 0.35s ease, background 0.3s;
}
.nav--hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}
