/**
 * Kev-Gruppe — fenetre du formulaire de subvention.
 *
 * Cette feuille ne porte QUE la coquille du fenetre : le formulaire lui-meme
 * reutilise les classes du theme (.quote, .step, .opts, .field, .consent,
 * .btn) et reste donc identique au formulaire de credit si la charte evolue.
 * Seuls les elements que le formulaire de credit n'a pas sont definis ici.
 */

/* =====================================================================
   Coquille de la fenetre

   L'etat ferme ne repose PAS sur le seul attribut hidden : un fenetre en
   position:fixed, inset:0, recouvre la page entiere et intercepte tous les
   clics si le masquage echoue. visibility + pointer-events le neutralisent
   meme avant que le script ne reponde.
   ===================================================================== */
.zmodal {
  position: fixed; inset: 0; z-index: 130;
  display: grid; place-items: center; padding: 24px;
  visibility: hidden; pointer-events: none;
  transition: visibility 0s linear .36s;
}
.zmodal[hidden] { display: none; }
.zmodal.est-ouvert { visibility: visible; pointer-events: auto; transition: visibility 0s; }

.zmodal__fond {
  position: absolute; inset: 0; border: 0; padding: 0;
  background: rgba(6, 34, 33, .6);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .32s ease; cursor: pointer;
}
.zmodal.est-ouvert .zmodal__fond { opacity: 1; }

.zmodal__boite {
  position: relative; width: 100%; max-width: 430px; max-height: 88vh;
  overflow-y: auto; border-radius: 14px;
  box-shadow: 0 34px 80px -22px rgba(6, 34, 33, .55);
  opacity: 0; transform: translateY(20px) scale(.985);
}
.zmodal.est-ouvert .zmodal__boite {
  opacity: 1; transform: none;
  transition: opacity .40s cubic-bezier(.22,1,.36,1),
              transform .40s cubic-bezier(.22,1,.36,1);
}

/* croix de fermeture, angle superieur droit */
.zmodal__x {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .16); color: #DCEAE6;
  cursor: pointer; display: grid; place-items: center; transition: .18s;
}
.zmodal__x:hover { background: #fff; color: #0D3C3E; }
.zmodal__x:focus-visible { outline: 2px solid #60D16A; outline-offset: 2px; }

/* la carte du formulaire remplit la boite : pas de double arrondi */
.zmodal .quote { box-shadow: none; border-radius: 14px; }

body.zfige { overflow: hidden; }

@media (max-width: 740px) {
  .zmodal { padding: 12px; }
  .zmodal__boite { max-height: 92vh; }
}
@media (prefers-reduced-motion: reduce) {
  .zmodal, .zmodal__boite, .zmodal__fond { transition: none; }
}

/* =====================================================================
   Champs propres au formulaire de subvention
   ===================================================================== */

/* zone de texte : meme registre que .field input du theme */
.zquote .field textarea {
  width: 100%; padding: 12px 13px; border: 1.5px solid #E6EAE8;
  border-radius: 8px; font: 400 14.5px Mulish, sans-serif; color: #16201F;
  background: #fff; resize: vertical; min-height: 104px; line-height: 1.55;
}
.zquote .field textarea:focus { outline: 0; border-color: #4C8672; }
.zquote .field textarea::placeholder { color: #B6BEBB; }

/* saisie d'un montant : le suffixe € est pose par le pseudo-element */
.zquote .z-euro { position: relative; }
.zquote .z-euro input { padding-right: 34px; }
.zquote .z-euro::after {
  content: '€'; position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
  font: 700 14.5px Mulish, sans-serif; color: #8C9794; pointer-events: none;
}

.zquote .field--mt { margin-top: 20px; }

.zquote .z-hint { font-size: 12px; color: #8C9794; margin: 6px 0 0; line-height: 1.5; }

.zquote .z-opt {
  font-weight: 600; font-size: 11.5px; color: #9AA5A2; text-transform: lowercase;
  margin-left: 6px; letter-spacing: .02em;
}

.zquote .z-zaehler { font-size: 11.5px; color: #9AA5A2; font-weight: 700; margin: 6px 0 0; text-align: right; }
.zquote .z-zaehler.est-trop { color: #8B2F2F; }

/* la case qui porte la mention juridique se distingue des deux autres :
   c'est elle qui fait la difference entre un don et un credit */
.zquote .consent--kasten {
  background: #F5FCF4; border: 1px solid #DCE8E2; border-radius: 8px;
  padding: 12px 14px; margin: 12px 0 14px; align-items: flex-start;
}

.zquote .z-recht {
  font-size: 11.5px; color: #9AA5A2; line-height: 1.55; margin-top: 14px; text-align: center;
}

/* ecran de remerciement, identique a celui du formulaire de credit */
.zquote .quote__merci { text-align: center; padding: 18px 4px 10px; }
.zquote .quote__merci-t { font: 800 18px/1.3 Mulish, sans-serif; color: #0D3C3E; margin-bottom: 10px; }
.zquote .quote__merci p { font-size: 14.5px; color: #6B7471; line-height: 1.6; }
