:root{
  --green:#198754;
  --green-dark:#157347;
  --yellow:#FFD54F;
  --text:#16302b;
  --bg:#f6f7f8;
  --card:#fff;
  --radius:18px;
  --shadow:0 10px 30px rgba(22,48,43,.08);
  --border:#e6e8ea;
  --overlay: rgba(0,0,0,.58);
}
*,*::before,*::after{box-sizing:border-box}
html,body{
  margin:0;
  padding:0;
  background:var(--bg);
  color:var(--text);
  font:16px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Inter,Arial,sans-serif;
}
img{max-width:100%;display:block}

.wrap{
  max-width:860px;
  margin:clamp(14px,5vw,40px) auto;
  padding:0 16px;
}
.card{
  background:var(--card);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
}

/* ===== HERO avec image + overlay ===== */
.hero{
  position:relative;
  color:#fff;
  min-height: clamp(220px, 32vw, 360px);
  display:flex;
  align-items:flex-start;
  justify-content:center;
  background:#16302b;
  overflow:hidden;
}
.hero-bg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  z-index:0;
}
.hero::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(0deg,var(--overlay),var(--overlay));
  z-index:0.5;
}
.hero-content{
  position:relative;
  z-index:1;
  padding:clamp(12px,3.5vw,24px) clamp(18px,5vw,36px);
}


.hero-highlight{
  background:transparent;     /* plus de fond sombre */
  padding:18px 0 16px;        /* tu peux garder 18px si tu préfères */
  border-radius:0;
  display:inline-block;
  max-width:720px;
  margin:0 auto;
}

/* Logo + Titre */
.brand-logo{
  width:clamp(150px,26vw,260px);
  margin:2px auto 6px;
  display:block;
  height:auto;
}
h1{
  font-size:clamp(20px,5.2vw,30px);
  line-height:1.15;
  margin-top:2px;
  margin-bottom:16px;
  text-shadow:0 2px 10px rgba(0,0,0,.25);
  text-align:center;
}

/* ===== Ligne jaune (badge) — icône centrée dans un contour rond ===== */
/* ===== Ligne jaune (badge) alignée avec les points ===== */
.point-badge{
  color:var(--yellow);
  font-weight:800;
  display:flex;
  align-items:center;
  gap:10px;
  text-align:left;
  line-height:1.3;
  max-width:700px;
  margin:0 auto 8px 0;            /* aligné à gauche sur desktop */
  justify-content:flex-start;     /* texte aligné à gauche */
}

.icon-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:var(--yellow);
  flex-shrink:0;
  margin-top:2px;                 /* ajustement fin vertical */
}

.icon-badge svg{
  width:22px;
  height:22px;
  display:block;
}

/* En mobile : recentrer tout */
@media (max-width:768px){
  .point-badge{
    justify-content:center;
    text-align:center;
    margin:0 auto 8px auto;       /* centré */
  }
}

/* ===== Bénéfices ===== */
.points-inline{
  display:flex;
  flex-wrap:wrap;
  gap:10px 20px;
  margin-top:6px;
  justify-content:flex-start;
}
.points-inline .point{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:0;
  color:#fff;
  font-weight:600;
}
.icon{
  color:#fff;
  flex:0 0 20px;
}
.icon svg{
  width:20px;
  height:20px;
  display:block;
}

/* Mobile : 3 lignes, bloc centré visuellement */
@media (max-width:768px){
  .point-badge{
    justify-content:center;
    text-align:center;
    margin:0 auto 8px auto;
    max-width:90%;
  }
  .points-inline{
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:4px;
    margin-top:6px;
  }
  .points-inline .point{
    width:100%;
    max-width:340px;
    justify-content:flex-start;
  }
}

/* ===== STEPPER ===== */
.steps{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:14px 24px 4px;
  gap:10px;
}
.step-item{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
  min-width:80px;
}
.step-circle{
  width:40px;
  height:40px;
  border-radius:50%;
  border:2px solid #cfd4da;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  color:#6c757d;
  background:#fff;
  box-shadow:0 4px 10px rgba(0,0,0,0.04);
}
.step-label{
  font-size:.9rem;
  color:#6c757d;
}
.step-line{
  flex:1;
  height:3px;
  background:#e6e8ea;
  border-radius:99px;
}
.step-item.is-active .step-circle{
  border-color:var(--green);
  color:var(--green);
  box-shadow:0 6px 16px rgba(25,135,84,0.22);
}
.step-item.is-active .step-label{
  color:var(--green-dark);
  font-weight:700;
}
.step-item.is-complete .step-circle{
  background:var(--green);
  color:#fff;
  border-color:var(--green);
}
.step-item.is-complete .step-label{
  color:#2d6a4f;
}

/* ===== FORM ===== */
form.form{
  padding:clamp(12px,3.6vw,24px) clamp(18px,5vw,36px) 22px;
  display:grid;
  gap:18px;
}
.fieldset{
  border:1px solid var(--border);
  border-radius:14px;
  padding:16px;
  background:#fff;
  margin-bottom:16px;
}
/* =======================================
   TITRES DE FIELDSET — STYLE PREMIUM CENTRÉ
   ======================================= */

/* Cible uniquement les <legend> de tes fieldsets */
.legend {
  width: 100%;
  text-align: left;
  font-size: 22px;           /* augmenté pour hiérarchie visuelle */
  font-weight: 800;          /* extra-bold pour un style premium */
  color: var(--green);            /* vert sombre, élégant, lisible */
  margin: 0 0 22px 0;        /* espace sous le titre */
  padding: 0;
  line-height: 1.25;
}

/* Desktop et tablette : déjà centré + grande taille */

/* ---------------------------------------
   MOBILE : on réduit légèrement la taille
   --------------------------------------- */
@media (max-width: 768px) {
.legend {
    font-size: 20px;        /* un peu plus petit pour mobile */
    margin-bottom: 22px;
  }
}
.row{
  display:grid;
  gap:12px;
}
@media (min-width:720px){
  .row.two{grid-template-columns:1fr 1fr}
}

label{
  font-weight:600;
  margin-bottom:8px;
  display:block;
}

/* Inputs */
.input{
  width:100%;
  background:#f8f9fa;
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px 14px;
  outline:none;
  transition:border-color .2s,box-shadow .2s,background-color .2s;
}
.input:focus{
  border-color:var(--green);
  box-shadow:0 0 0 4px rgba(25,135,84,.12);
  background:#fff;
}
select.input{
  appearance:none;
  background-image:
    linear-gradient(45deg,transparent 50%, #8a8f94 50%),
    linear-gradient(135deg,#8a8f94 50%,transparent 50%);
  background-position:
    calc(100% - 18px) calc(1em - 2px),
    calc(100% - 14px) calc(1em - 2px);
  background-size:6px 6px,6px 6px;
  background-repeat:no-repeat;
}

/* Autofill */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill{
  -webkit-box-shadow:0 0 0px 1000px #f8f9fa inset!important;
  -webkit-text-fill-color:var(--text)!important;
  transition:background-color 5000s ease-in-out 0s;
}

/* Aides & erreurs */
.help{
  display:none;
  font-size:.9rem;
  margin-top:4px;
}
.help.error{display:block;color:#dc3545;}
small.help, small.note{display:block;margin-top:6px;}

/*  Rétabli : bordure colorée en bas pour erreurs et succès */
.input.error{
  border-color:var(--border);
  border-bottom-color:#dc3545;
  box-shadow:0 4px 0 -2px rgba(220,53,69,.35);
}
.input.valid{
  border-color:var(--border);
  border-bottom-color:#28a745;
  box-shadow:0 4px 0 -2px rgba(40,167,69,.22);
}

/* consent */
.consent{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:10px 0;
  margin-top:4px;
  margin-bottom:14px;
}
.consent input[type="checkbox"]{
  width:18px;
  height:18px;
  margin-top:2px;
  accent-color:var(--green);
}
.consent label{font-size:.95rem;line-height:1.35;}
.consent.error{
  border:1px solid #dc3545;
  border-radius:12px;
  padding:12px;
}
.consent input[type="checkbox"].error{
  outline:2px solid #dc3545;
  outline-offset:2px;
}

/* CTA */
.cta{
  background:var(--green);
  color:#fff;
  border:none;
  border-radius:12px;
  padding:14px 18px;
  font-weight:800;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 8px 20px rgba(25,135,84,.22);
  transition:transform .06s,background .2s;
  gap:8px;
  margin-bottom:14px;
}
.cta:active{transform:translateY(1px);}
.cta:hover{background:var(--green-dark);}
.cta .cta-icon{display:inline-flex;align-items:center;justify-content:center;line-height:0;}

.step-back{
  margin-top:2px;
  background:none;
  border:none;
  color:#6c757d;
  font-size:.9rem;
  cursor:pointer;
  padding:0;
}

/* Sticky CTA mobile */
@media (max-width:768px){
  .sticky-cta{
    position:fixed;
    left:0;right:0;bottom:0;
    padding:12px max(16px, env(safe-area-inset-left)) calc(12px + env(safe-area-inset-bottom));
    background:rgba(22,48,43,.92);
    backdrop-filter:saturate(1.2) blur(4px);
    box-shadow:0 -8px 30px rgba(0,0,0,.18);
    z-index:999;
    display:flex;
    justify-content:center;
    transition:opacity .3s ease, transform .3s ease;
  }
  .sticky-cta .cta{
    width:100%;
    max-width:540px;
    border-radius:14px;
    font-size:1rem;
    background:var(--green);
    margin-bottom:0;
  }
  body{padding-bottom:76px;}
}
@media (min-width:769px){.sticky-cta{display:none !important;}}
#stickyCta.is-hidden{opacity:0;pointer-events:none;transform:translateY(8px);}

/* ===== STEP ALIGNEMENT ===== */
.steps, .steps-note{
  max-width:960px;
  margin:0 auto;
  padding:0 clamp(18px,5vw,36px);
  box-sizing:border-box;
}
.steps{padding-top:20px;}
.steps-note{
  text-align:center;
  color:#6c757d;
  font-size:0.95rem;
  margin-top:16px;
  margin-bottom:0;
}

@media (max-width:768px){.steps-note{text-align:center;}}


/* ===== NOTE & BOUTON RETOUR (ÉTAPE 2) ===== */
.step-panel[data-step="2"] .steps-note{
  margin-top:10px;
  padding:0;
  max-width:100%;
  box-sizing:border-box;
  text-align:left;
  color:#6c757d;
  font-size:0.95rem;
}

/* Étape 1 : rangée de CTA (si utilisée) */
.step-panel[data-step="1"] .cta-row{
  display:flex;
  justify-content:flex-end;
  gap:10px;
}
.step-panel[data-step="1"] .cta-row .cta{margin:0;}

/* Étape 2 : bouton précédent style outline */
.step-panel[data-step="2"] .cta-secondary{
  grid-area:prev;
  justify-self:start;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:14px 18px;
  border-radius:12px;
  border:1px solid #d1d5db;
  background:#fff;
  color:#6b7280;
  font-weight:800;
  box-shadow:0 8px 20px rgba(15,23,42,.04);
  cursor:pointer;
  transition:background-color .15s, box-shadow .15s, transform .05s, color .15s;
}
.step-panel[data-step="2"] .cta-secondary:hover{
  background:#f9fafb;
  color:#4b5563;
  box-shadow:0 10px 24px rgba(15,23,42,.07);
  transform:translateY(-1px);
}
.step-panel[data-step="2"] .cta-secondary::before{
  content:"";
  width:20px;height:20px;
  display:inline-block;
  background:no-repeat center/contain url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='none'%3E%3Cpath d='M19 12H5m6 7-7-7 7-7' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ===== ÉTAPE 2 : layout boutons ===== */
.step-panel[data-step="2"]{
  grid-template-columns:1fr 1fr;
  grid-template-areas:
    "fs fs"
    "consent consent"
    "prev cta"
    "note note";
  gap:12px 16px;
  align-items:center;
}
.step-panel[data-step="2"] #fs-coords{grid-area:fs;}
.step-panel[data-step="2"] .consent{grid-area:consent;margin:6px 0 8px;}
.step-panel[data-step="2"] .cta-row{grid-area:cta;justify-self:end;}
.step-panel[data-step="2"] .cta-row .cta{margin:0;}
.step-panel[data-step="2"] .cta-subrow{display:contents;}

/* Étape 1 : bouton “Continuer” aligné à droite (desktop/tablette) */
.step-panel[data-step="1"] .cta-next{
  display:flex;
  align-items:center;
  gap:8px;
  width:auto;
  margin:0 0 14px auto;
}

/* Mobile : centré et pleine largeur (étape 1) */
@media (max-width:768px){
  .step-panel[data-step="1"] .cta-next{
    justify-content:center;
    width:100%;
    max-width:540px;
    margin:10px auto 14px;
  }
}

/* ===== VISIBILITÉ DES ÉTAPES ===== */
.step-panel{display:none;}
.step-panel.is-active{display:block;}
.step-panel[data-step="2"].is-active{display:grid;}

/* Mobile : stack & largeur 100% pour les boutons de l’étape 2 */
@media (max-width:768px){
  .step-panel[data-step="2"]{
    grid-template-columns:1fr;
    grid-template-areas:
      "fs"
      "consent"
      "cta"
      "prev"
      "note";
    justify-items:center;
    gap:10px;
  }
  .step-panel[data-step="2"] .cta-row,
  .step-panel[data-step="2"] .cta-secondary{
    width:100%;
    max-width:540px;
    justify-self:center;
    text-align:center;
  }
  .step-panel[data-step="2"] .steps-note{text-align:center;}
}

/* Aides & erreurs */
.help{
  display:none;              /* caché par défaut */
  font-size:.9rem;
  margin-top:4px;
}
.help.error{
  display:block;             /* visible seulement en erreur */
  color:#dc3545;
}
/* ne surtout pas forcer small.help en display:block ici */
small.note{
  display:block;
  margin-top:6px;
}
/* Séparateur entre la ligne "Département / Commune" et "Lieu-dit" */
#fs-terrain .row.two + .row{
  margin-top:16px;          /* même respiration que le reste */
}


/* Plus d’espace entre la ligne NOM/TÉLÉPHONE et la ligne EMAIL (étape 2) */
#fs-coords .row.two + .row {
  margin-top: 16px; /* ajuste 18–24px selon ton goût */
}

/* Par défaut, les messages d'aide (ex: format attendu) sont masqués */
small.help {
  display: none;
  font-size: 0.9rem;
  margin-top: 4px;
}

/* Lorsqu'il y a une erreur : on l'affiche en rouge */
small.help.error {
  display: block;
  color: #dc3545;
}

/* Exemple spécifique au téléphone pour harmoniser */
#telHelp {
  display: none;
}

#telHelp.error {
  display: block;
  color: #dc3545;
  margin-top: 6px;
}
@media (max-width: 768px) {
  /* Étape 2 : CTA final pleine largeur */
  .step-panel[data-step="2"] .cta-row .cta {
    width: 100%;
    max-width: 540px;
    justify-self: center;
    text-align: center;
  }
}
/* Step 2: keep grid placement via display: contents */
.step-panel[data-step="2"] .cta-subrow {
  display: contents; /* children become grid items: prev + note */
}

/* Step 2 note: span full width and center text */
.step-panel[data-step="2"] .steps-note {
  grid-area: note;            /* uses your "note note" row */
  text-align: center;         /* override earlier left align */
  justify-self: center;       /* center the grid item itself */
  margin: 16px 0 0 0;
  padding: 0;
  white-space: nowrap;        /* keep on one line on desktop/tablet */
}

/* Mobile: allow wrapping if needed */
@media (max-width: 768px) {
  .step-panel[data-step="2"] .steps-note {
    white-space: normal;
  }
}

/* Uniformise la largeur du fieldset "Vos coordonnées" avec les précédents */
.step-panel[data-step="2"] #fs-coords {
  grid-area: fs;
  width: 100%;
  max-width: none;           /* empêche la réduction interne */
  justify-self: stretch;     /* s'étend sur toute la largeur du container */
  box-sizing: border-box;    /* cohérent avec le padding global */
}

/* Pour homogénéité visuelle : même padding horizontal que les autres fieldsets */
.step-panel[data-step="2"] #fs-coords .fieldset {
  padding-left: clamp(16px,5vw,36px);
  padding-right: clamp(16px,5vw,36px);
}

/* ===== Ligne entre 1 et 2 : centrée, resserrée et animée ===== */

/* Resserre un peu l’espace global entre les éléments du stepper */
.steps { gap: 6px; }

/* La ligne : centrée verticalement, bords rapprochés des bulles */
.step-line{
  position: relative;
  flex: 1;
  height: 3px;                       /* épaisseur de la ligne */
  background: transparent;           /* on dessine via ::before/::after */
  align-self: center;                /* centre sur l’axe vertical */
  margin-left: -20px;
  margin-right: -23px;                     /* colle davantage aux bulles */
  transform: translateY(-2px);       /* léger “lift” pour tomber pile au centre visuel */
  border-radius: 999px;
  overflow: hidden;                   /* masque l’animation qui déborde */
}

/* Rail gris (base) */
.step-line::before,
.step-line::after{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.step-line::before{
  background: #e6e8ea;
}

/* Remplissage vert animé */
.step-line::after{
  background: var(--green);
  transform-origin: left;
  transform: scaleX(0);              /* caché au départ */
  transition: transform .45s ease;   /* animation de remplissage */
}

/* Quand l’étape 1 est validée -> on remplit la ligne vers la droite */
.step-item[data-step="1"].is-complete + .step-line::after{
  transform: scaleX(1);
}

/* Accessibilité : pas d’animation si l’utilisateur préfère réduire les mouvements */
@media (prefers-reduced-motion: reduce){
  .step-line::after{ transition: none; }
}