/* Message CF7 natif, style "barre verte" */
.wpcf7 .wpcf7-response-output{
  margin:18px 0 0!important; padding:14px 18px!important; border:0!important;
  background:#20c1a3; color:#fff!important; text-transform:uppercase;
  letter-spacing:.06em; font-weight:600;
}

/* ===== Message CF7 modernisé ===== */
.wpcf7 .wpcf7-response-output {
  margin: 24px 0 0 !important;
  padding: 16px 20px !important;
  border: 0 !important;
  background: #0000ff; /* bleu principal */
  color: #fff !important;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  position: relative;
  overflow: hidden;
  animation: cf7SlideIn 0.4s ease;
}

/* Les miroirs du message (haut & juste au-dessus du bouton) */
.wpcf7 .js-cf7-status-top,
.wpcf7 .js-cf7-status-bottom {
  margin: 16px 0 !important;
}

/* Petite animation à l’arrivée */
@keyframes cf7SlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Icône animée à gauche */
.wpcf7 .wpcf7-response-output::before {
  content: "💬";
  position: relative;
  display: inline-block;
  margin-right: 10px;
  transform: scale(1.2);
}

/* Variantes */
.wpcf7 .wpcf7-response-output.is-success {
  background: #10b981; /* vert succès */
}
.wpcf7 .wpcf7-response-output.is-error {
  background: #ef4444; /* rouge erreur */
}
.wpcf7 .wpcf7-response-output.is-warn {
  background: #f59e0b; /* orange validation */
}
.wpcf7 .wpcf7-response-output.is-spam {
  background: #6366f1; /* violet */
}

/* Pour le cas général (sans classe) : fond bleu par défaut */
.wpcf7 .wpcf7-response-output:not(.is-success):not(.is-error):not(.is-warn):not(.is-spam) {
  background: #0000ff;
}

/* Bouton "Envoyer" — état de soumission */
.wpcf7 .wpcf7-submit.is-loading {
  position: relative;
  opacity: .85;
  pointer-events: none;
}
.wpcf7 .wpcf7-submit.is-loading::after {
  content: '';
  position: absolute;
  right: -28px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: cf7-spin 0.8s linear infinite;
}
@keyframes cf7-spin { to { transform: rotate(360deg); } }

/* Afficher uniquement nos deux blocs. Forcer l'override d'un style inline (display:block). */
.wpcf7 form > .wpcf7-response-output { display: none !important; }
.wpcf7 form > .js-cf7-status-top,
.wpcf7 form > .js-cf7-status-bottom { display: block !important; }
/* CF7 ajoute parfois un dernier output masqué/dupliqué */
.wpcf7 .wpcf7-response-output[aria-hidden="true"] { display: none !important; }


/* Accessible text hidden but readable by AT */
.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    border: 0;
}

/* Global (full-page) overlay while submitting */
.cf7-overlay-global {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999; /* above headers/menus */
    backdrop-filter: blur(1px);
}
.cf7-overlay-global.is-visible { display: flex; }
.cf7-overlay-global .cf7-spinner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid #ffffff;
    border-top-color: transparent;
    animation: cf7-spin 0.8s linear infinite;
    opacity: 0.95;
}

/* Prevent background scrolling while overlay is visible */
body.cf7-no-scroll { overflow: hidden; }

