/* Formulaire de contact — 16/11/2026. Chargé par la page contact seulement (après site.css). */
.formulaire { position: relative; margin-top: clamp(10px, 2vw, 20px); max-width: 920px; border-radius: 30px; padding: clamp(26px, 4.4vw, 58px);
  background: radial-gradient(90% 70% at 85% 0%, rgba(255,79,160,.09), transparent 60%), radial-gradient(80% 70% at 0% 100%, rgba(58,168,255,.08), transparent 60%), linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
  border: 1px solid var(--trait); overflow: hidden; isolation: isolate; }
.formulaire::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--obr); opacity: .8; }
.formulaire .vagues { position: absolute; left: -4%; right: -4%; width: 108%; top: 0; height: clamp(70px, 9vw, 110px); z-index: -1; opacity: .55; pointer-events: none; transition: opacity .8s var(--ease), height 1.2s var(--ease); }
.formulaire.envoi .vagues { opacity: 1; }
.formulaire.fini .vagues { opacity: .85; height: clamp(120px, 16vw, 190px); }
.etape-saisie { display: grid; gap: clamp(18px, 2.2vw, 26px); padding-top: clamp(26px, 4vw, 46px); }
.rangee { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 2.2vw, 30px); }

/* Champs à étiquette flottante, trait dégradé au focus */
.champ { position: relative; }
.champ input, .champ textarea { width: 100%; font: inherit; font-size: 17px; color: var(--texte); background: transparent; border: 0; border-bottom: 1px solid rgba(255,255,255,.16);
  padding: 26px 2px 10px; outline: none; border-radius: 0; transition: border-color .4s; -webkit-appearance: none; appearance: none; }
.champ textarea { resize: vertical; min-height: 150px; line-height: 1.55; display: block; }
.champ label { position: absolute; left: 2px; top: 24px; color: var(--doux); font-size: 17px; pointer-events: none; transform-origin: 0 0; transition: transform .45s var(--ease), color .35s; }
.champ label i { font-style: normal; font-size: .78em; opacity: .7; margin-left: 4px; }
.champ input:focus + label, .champ input:not(:placeholder-shown) + label,
.champ textarea:focus + label, .champ textarea:not(:placeholder-shown) + label { transform: translateY(-22px) scale(.74); color: #d8d9db; letter-spacing: .04em; }
/* Trait dégradé dessiné sous le champ, qui s'étire de gauche à droite au focus */
.champ input, .champ textarea { background-image: var(--obr); background-repeat: no-repeat; background-position: 0 100%; background-size: 0% 2px; transition: border-color .4s, background-size .7s var(--ease); }
.champ input:focus, .champ textarea:focus { background-size: 100% 2px; }
.champ.zone .erreur { min-height: 22px; }
.champ input:-webkit-autofill { -webkit-text-fill-color: var(--texte); transition: background-color 9999s; caret-color: var(--texte); }
.champ .compteur { position: absolute; right: 2px; bottom: 6px; font-size: 12px; color: var(--doux); font-variant-numeric: tabular-nums; transition: color .3s; }
.champ .compteur.presque { color: var(--jaune); }

/* Erreurs : message qui glisse, champ qui frissonne */
.erreur { font-size: 13.5px; color: #ff8a7a; min-height: 0; max-height: 0; opacity: 0; overflow: hidden; transform: translateY(-4px); transition: max-height .4s var(--ease), opacity .35s, transform .4s var(--ease); }
.erreur.vue { max-height: 60px; opacity: 1; transform: none; margin-top: 6px; }
.invalide input, .invalide textarea { border-bottom-color: #ff6a5a; }
.invalide { animation: frisson .45s var(--ease); }
@keyframes frisson { 20% { transform: translateX(-5px); } 45% { transform: translateX(4px); } 70% { transform: translateX(-2px); } }

/* Type de projet : puces */
.types { border: 0; }
.types legend { color: var(--doux); font-size: 13px; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 14px; }
.puces { display: flex; flex-wrap: wrap; gap: 10px; }
.puces label { position: relative; cursor: pointer; }
.puces input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.puces span { display: inline-block; padding: 10px 17px; border-radius: 999px; font-size: 14.5px; border: 1px solid rgba(255,255,255,.16); color: #d3d4d6; background: rgba(255,255,255,.03);
  position: relative; isolation: isolate; overflow: hidden; transition: color .35s, border-color .35s, transform .35s var(--ease); }
.puces span::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--obr); opacity: 0; transform: scale(.6); border-radius: inherit; transition: opacity .45s var(--ease), transform .55s var(--ease); }
.puces label:hover span { border-color: rgba(255,255,255,.34); transform: translateY(-2px); }
.puces input:checked + span { color: #111; border-color: transparent; font-weight: 600; }
.puces input:checked + span::before { opacity: 1; transform: none; }
.puces input:focus-visible + span { outline: 2px solid var(--turquoise); outline-offset: 3px; }

.note { font-size: 13.5px; color: var(--doux); margin-top: -10px; }

/* Champ piège : hors de l'écran, invisible pour les lecteurs d'écran */
.piege { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Case de consentement */
.accord { display: flex; gap: 14px; align-items: flex-start; font-size: 14.5px; color: #c9cacd; cursor: pointer; line-height: 1.5; max-width: 62ch; position: relative; }
.accord input { position: absolute; opacity: 0; width: 22px; height: 22px; margin: 0; cursor: pointer; }
.accord .case { flex: 0 0 22px; height: 22px; border-radius: 7px; border: 1.5px solid rgba(255,255,255,.3); display: grid; place-items: center; transition: background .35s, border-color .35s, transform .35s var(--ease); margin-top: 1px; }
.accord .case svg { width: 16px; height: 16px; fill: none; stroke: #111; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset .45s .1s var(--ease); }
.accord input:checked + .case { background: linear-gradient(135deg, var(--orange), var(--rose) 55%, var(--bleu)); border-color: transparent; transform: scale(1.06); }
.accord input:checked + .case svg { stroke-dashoffset: 0; }
.accord input:focus-visible + .case { outline: 2px solid var(--turquoise); outline-offset: 3px; }
.accord.invalide .case { border-color: #ff6a5a; }
#e-accord { margin-top: -14px; }

/* Bouton Envoyer : dégradé orange rose bleu, onde pendant l'envoi */
.pied-form { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 6px; }
.envoyer { padding: 16px 34px; font-size: 16px; }
.envoyer::before { background: var(--obr); }
.envoyer .onde { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); transform: translateX(-100%); }
.envoi .envoyer { pointer-events: none; color: #111; border-color: transparent; }
.envoi .envoyer::before { transform: translateY(0); }
.envoi .envoyer .onde { animation: onde 1.1s ease-in-out infinite; }
.envoi .envoyer .fleche { animation: fleche-envol 1.1s var(--ease) infinite; }
@keyframes onde { to { transform: translateX(100%); } }
@keyframes fleche-envol { 0% { transform: translateX(0); opacity: 1; } 55% { transform: translateX(14px); opacity: 0; } 56% { transform: translateX(-10px); opacity: 0; } 100% { transform: translateX(0); opacity: 1; } }
.etat-envoi { font-size: 14px; color: var(--doux); }
.etat-envoi.probleme { color: #ff8a7a; }

/* Passage de la saisie au merci */
.etape-saisie { transition: opacity .55s var(--ease), transform .7s var(--ease), filter .6s; }
.sortie .etape-saisie { opacity: 0; transform: translateY(-24px) scale(.98); filter: blur(6px); pointer-events: none; }
.etape-merci { display: grid; justify-items: start; gap: 22px; padding: clamp(110px, 14vw, 170px) 0 clamp(10px, 3vw, 30px); outline: none; }
.etape-merci[hidden], .etape-saisie[hidden] { display: none; }
.etape-merci > * { opacity: 0; transform: translateY(26px); }
.fini .etape-merci > * { animation: arrive 1s var(--ease) forwards; }
.fini .etape-merci > :nth-child(2) { animation-delay: .25s; }
.fini .etape-merci > :nth-child(3) { animation-delay: .4s; }
.fini .etape-merci > :nth-child(4) { animation-delay: .5s; }
.fini .etape-merci > :nth-child(5) { animation-delay: .6s; }
@keyframes arrive { to { opacity: 1; transform: none; } }
.etape-merci .titre { font-size: clamp(36px, 5.4vw, 74px); }
.coche { width: clamp(78px, 9vw, 110px); height: auto; fill: none; stroke: url(#g-coche); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.coche circle { stroke-dasharray: 330; stroke-dashoffset: 330; }
.coche path { stroke-dasharray: 70; stroke-dashoffset: 70; stroke-width: 6; }
.fini .coche circle { animation: trace-coche 1.1s .1s var(--ease) forwards; }
.fini .coche path { animation: trace-coche .7s .8s var(--ease) forwards; }
@keyframes trace-coche { to { stroke-dashoffset: 0; } }
.etape-merci .demo { font-size: 13px; letter-spacing: .04em; }

@media (max-width: 900px) {
  .rangee { grid-template-columns: 1fr; }
  .formulaire { border-radius: 24px; margin-left: calc(var(--marge) * -.4); margin-right: calc(var(--marge) * -.4); }
}
@media (max-width: 520px) {
  .puces span { padding: 9px 14px; font-size: 14px; }
  .envoyer { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .etape-merci > *, .coche circle, .coche path { opacity: 1 !important; transform: none !important; stroke-dashoffset: 0 !important; }
}

/* Formulaire à gauche, coordonnées à droite (ordinateur) ; l'un sous l'autre (téléphone) */
.contact-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: clamp(30px, 5vw, 80px); align-items: start; }
.contact-grille .formulaire { max-width: none; }
.contact-grille .coordonnees { grid-template-columns: 1fr; gap: 28px; margin-top: clamp(10px, 2vw, 20px); border-top: 0; padding-top: clamp(20px, 3vw, 40px); position: sticky; top: 110px; }
.contact-grille .coordonnees p { color: #d3d4d6; }
.contact-grille .coordonnees > div { border-top: 1px solid var(--trait); padding-top: 18px; }
@media (max-width: 900px) {
  .contact-grille { grid-template-columns: 1fr; }
  .contact-grille .coordonnees { position: static; padding-top: 0; }
}
.champ.zone .erreur { padding-right: 76px; }
