/* ==========================================================================
   Landing Parc Colbert — feuille de styles
   Fichier modifiable directement (pas de compilation).
   Attention : l’ordre des règles compte (certaines en surchargent d’autres).
   ========================================================================== */


/* --- Polices ------------------------------------------------------------- */

@font-face {
  font-family: Geom;
  src: url('./assets/geom-regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Geom;
  src: url('./assets/geom-semibold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: Montserrat;
  src: url('./assets/montserrat-medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}


/* --- Couleurs ------------------------------------------------------------
   --olive et --gold : couleurs de la charte.
   Les autres variables sont lues par les composants (bouton, case à cocher,
   champs). */

:root {
  --olive: #545745;
  --gold: #dda96f;
  --primary: #545745;
  --primary-foreground: white;
  --ring: #ad7b43;
  --input: #c9c9c9;
  --muted-foreground: #777;
  --destructive: #a12e28;
}


/* --- Base ---------------------------------------------------------------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fff;
  color: #191919;
  font: 500 13px/1.65 Montserrat, Arial, sans-serif;
}

button,
input {
  font: inherit;
}


/* --- Mise en page et décors latéraux ------------------------------------- */

.landing {
  min-height: 100vh;
  max-width: 1600px;
  margin: auto;
  position: relative;
  isolation: isolate;
  padding: 66px 24px 66px;
  text-align: center;
  overflow: hidden;
}

/* Illustrations décoratives à gauche et à droite de la page. */
.landing:before,
.landing:after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  height: 1060px;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
}

.landing:before {
  left: 0;
  width: 480px;
  background-image: url('./assets/decor-left.webp');
}

.landing:after {
  right: 0;
  width: 475px;
  background-image: url('./assets/decor-right.webp');
}


/* --- En-tête : titre illustré et introduction ---------------------------- */

.hero h1 {
  margin: 0 auto 34px;
  max-width: 645px;
}

.hero h1 img {
  display: block;
  width: 100%;
  height: auto;
}

.introduction {
  max-width: 636px;
  margin: auto;
  font: 400 16px/32px Geom, Arial, sans-serif;
  text-transform: uppercase;
  color: #656857;
}

.introduction p {
  margin: 0;
}

.gold {
  color: var(--gold);
}


/* --- Ornement, encadré « nouvel art de vivre », accroche ----------------- */

.ornament {
  display: block;
  margin: 29px auto 28px;
  width: 40px;
  height: 30px;
  object-fit: contain;
}

.story {
  border: 1px solid #e9c8a0;
  border-radius: 11px;
  max-width: 560px;
  margin: auto;
  padding: 17px 15px 18px;
}

.story p {
  margin: 0;
  line-height: 23px;
}

.story p + p {
  margin-top: 9px;
}

.reveal {
  font: 600 16px/32px Geom, Arial, sans-serif;
  text-transform: uppercase;
  color: var(--olive);
  max-width: 680px;
  margin: 46px auto 28px;
}


/* --- Formulaire de contact ----------------------------------------------- */

.contact-card {
  width: 540px;
  max-width: 100%;
  margin: auto;
  background: #fafafa;
  border-radius: 9px;
  padding: 25px 40px 20px;
  box-shadow: 0 0 11px #0002;
  scroll-margin-top: 20px;
}

.contact-card h2 {
  font-size: 12px;
  font-weight: 500;
  line-height: 21px;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 -14px 22px;
}

/* Champs sur deux colonnes ; l’email occupe toute la largeur. */
.form-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 29px;
  row-gap: 9px;
}

.field-email {
  grid-column: 1/-1;
}

/* Civilité : ligne de boutons radio, sur toute la largeur. */
.field-civility {
  grid-column: 1/-1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  margin: 0 0 4px;
  padding: 0;
  border: 0;
  text-align: left;
  font-size: 12px;
  color: #34372c;
}

.civility-label {
  color: #777;
}

.field-civility label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.field-civility input {
  margin: 0;
  accent-color: var(--olive);
}

.field-civility input:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 2px;
}

/* Champs soulignés, sans cadre. */
.field input {
  height: 36px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #c7c7c7;
  border-radius: 0;
  box-shadow: none;
  padding: 4px 0;
  background: transparent;
  font-size: 12px;
  color: #34372c;
}

.field input::placeholder {
  color: #777;
}

.field input:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 4px;
}

.submit-button {
  background: var(--olive);
  color: white;
  margin: 31px auto 8px;
  min-height: 38px;
  height: auto;
  padding: 8px 17px;
  border-radius: 5px;
  font-size: 13px;
  cursor: pointer;
}

.submit-button:hover {
  background: #3d4130;
}

/* Case de consentement et son texte. */
.consent {
  display: flex;
  gap: 9px;
  text-align: left;
  color: #a87740;
  font-size: 10px;
  line-height: 1.5;
}

.consent input[type=checkbox] {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  border: 1px solid #a87740;
}

.consent label {
  cursor: pointer;
}

/* Message de retour après envoi : encadré bien visible, vert en cas de
   succès, rouge en cas d’erreur (masqué tant qu’il est vide). */
.form-status {
  margin: 16px 0 0;
  padding: 12px 16px;
  border: 1px solid #a9c497;
  border-left-width: 5px;
  border-radius: 6px;
  background: #eef5e8;
  color: #2f4a22;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  scroll-margin: 20px; /* marge quand form.js fait défiler jusqu’au message */
}

.form-status:empty {
  display: none;
}

.form-status.is-error {
  border-color: #e3a9a5;
  background: #fbeceb;
  color: #a12e28;
}

.demo-note {
  color: #707568;
  font-size: 10px;
  margin: 14px 0 0;
}

/* Champ piège anti-robots : invisible pour les humains. */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}


/* --- Pied de page (logos partenaires) et lien d’évitement ---------------- */

footer {
  margin: 80px auto 0;
  width: 535px;
  max-width: 100%;
}

footer img {
  display: block;
  width: 100%;
  height: auto;
}

/* Lien « Aller au formulaire », visible uniquement au clavier. */
.skip-link {
  position: absolute;
  left: 16px;
  top: -70px;
  background: var(--olive);
  color: white;
  padding: 10px;
  z-index: 9;
}

.skip-link:focus {
  top: 10px;
}


/* --- Mobile (700 px et moins) -------------------------------------------- */

@media (max-width: 700px) {
  .landing {
    padding: 54px 24px 48px;
  }

  .landing:before {
    width: 220px;
    height: 486px;
    top: 100px;
    left: -100px;
  }

  .landing:after {
    width: 210px;
    height: 469px;
    right: -120px;
    top: 30px;
  }

  .hero h1 {
    margin-bottom: 45px;
    width: 100%;
    max-width: 500px;
  }

  .introduction {
    font-size: 16px;
    line-height: 1.85;
    max-width: 470px;
  }

  .introduction p + p {
    margin-top: 22px;
  }

  .ornament {
    margin: 36px auto 24px;
    width: 28px;
    height: 24px;
  }

  .story {
    padding: 20px 16px;
    font-size: 13px;
    max-width: 430px;
  }

  .story p {
    line-height: 1.8;
  }

  .story p + p {
    margin-top: 18px;
  }

  /* Retours à la ligne réservés au bureau. */
  .desktop-break {
    display: none;
  }

  .reveal {
    font-size: 17px;
    line-height: 1.7;
    max-width: 380px;
    margin: 42px auto 30px;
  }

  .contact-card {
    width: 430px;
    padding: 27px 27px 22px;
  }

  .contact-card h2 {
    font-size: 12px;
    line-height: 1.8;
    margin: 0 0 20px;
  }

  /* Champs sur une seule colonne. */
  .form-fields {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .field-email {
    grid-column: auto;
  }

  .field-civility {
    font-size: 14px;
    min-height: 32px;
  }

  /* 16 px minimum : évite le zoom automatique d’iOS sur les champs. */
  .field input {
    height: 43px;
    font-size: 16px;
  }

  .submit-button {
    font-size: 12px;
    min-height: 44px;
    margin-top: 28px;
  }

  .consent {
    font-size: 11px;
  }

  .consent input[type=checkbox] {
    width: 17px;
    height: 17px;
  }

  .demo-note {
    font-size: 10px;
  }

  footer {
    margin-top: 48px;
    max-width: 380px;
  }

  .landing:before,
  .landing:after {
    opacity: .7;
  }
}


/* --- Accessibilité : animations réduites --------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}


/* --- Compléments (placés en dernier : surchargent les règles ci-dessus) -- */

/* Texte lu par les lecteurs d’écran, invisible à l’é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;
}

.submit-button {
  border: 0;
  font-family: Montserrat, Arial, sans-serif;
}

.submit-button:disabled {
  opacity: .6;
  cursor: wait;
}

/* Case de consentement dessinée en CSS : fond olive et coche blanche une
   fois cochée (la coche est une petite image SVG intégrée). */
.consent input[type=checkbox] {
  appearance: none;
  -webkit-appearance: none;
  border-radius: 3px;
  background: white center / 12px 12px no-repeat;
  padding: 0;
  margin: 2px 0 0; /* annule les marges par défaut des cases natives */
  cursor: pointer;
}

.consent input[type=checkbox]:checked {
  background-color: var(--olive);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

.consent input[type=checkbox]:disabled {
  cursor: wait;
  opacity: .6;
}

.consent input:focus-visible,
.submit-button:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 4px;
}


/* --- Mentions légales du formulaire et politique de confidentialité ------ */

.legal-notice {
  margin-top: 14px;
  text-align: left;
  color: #707568;
  font-size: 10px;
  line-height: 1.5;
}

.legal-notice + .consent {
  margin-top: 14px;
}

/* Mini-menu sous le bloc formulaire, au-dessus des logos. */
.legal-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 12px;
  margin-top: 14px;
  color: #707568;
  font-size: 12px;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.link-button:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 2px;
}

body:has(.modal[open]) {
  overflow: hidden;
}

.modal {
  width: min(760px, calc(100% - 32px));
  max-height: calc(100% - 48px);
  padding: 0;
  border: 0;
  border-top: 5px solid var(--gold);
  border-radius: 6px;
  background: white;
  color: #191919;
  font-family: Arial, sans-serif;
  overflow: hidden;
}

.modal[open] {
  display: flex;
  flex-direction: column;
}

.modal::backdrop {
  background: rgba(25, 25, 25, .6);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid #e5e5e0;
}

.modal-header h2 {
  margin: 0;
  color: var(--olive);
  font-size: 22px;
  line-height: 1.3;
}

.modal-close {
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: var(--olive);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:focus-visible,
.modal-body:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: -2px;
}

.modal-body {
  padding: 8px 24px 28px;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.6;
  text-align: left;
}

.modal-body h3 {
  margin: 24px 0 8px;
  color: var(--olive);
  font-size: 16px;
}

.modal-body p,
.modal-body ul {
  margin: 0 0 12px;
}

.modal-body a {
  color: #8a5f2d;
}
