/* ================================================
   modale-audit.css
   Modale Audit d'accessibilité — RGAA / WCAG 2.1 AA
   Responsive dès 320 px
   Harmonisé avec le thème du site (Poppins, dark mode onyx)
   ================================================ */

/* --- Utilitaire : visually hidden (RGAA) ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ================================================
   BOUTON DÉCLENCHEUR "Voir les tarifs"
   ================================================ */
.btn-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--orange-yellow-crayola);
  border: 1px solid var(--orange-yellow-crayola);
  border-radius: 14px;
  padding: 9px 18px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  margin-top: 10px;
}

.btn-open:hover {
  background: var(--orange-yellow-crayola);
  color: var(--smoky-black);
}

.btn-open:focus-visible {
  outline: 3px solid var(--orange-yellow-crayola);
  outline-offset: 3px;
}

/* ================================================
   OVERLAY (fond sombre)
   ================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.is-open {
  display: flex;
}

/* ================================================
   MODALE
   ================================================ */
.modal {
  background: var(--eerie-black-1);
  border: 1px solid var(--jet);
  border-radius: 20px;
  width: 100%;
  max-width: 90%;
  max-height: 90dvh;
  overflow-y: auto;
  position: relative;
  padding: 1.75rem 1.5rem 1.5rem;
  color: var(--white-1);
  font-family: 'Poppins', sans-serif;
  /* Bordure subtile dégradée façon site */
  box-shadow: 0 0 0 1px hsla(0, 0%, 25%, 0.4),
              0 24px 48px rgba(0, 0, 0, 0.5);
}

/* Scroll personnalisé */
.modal::-webkit-scrollbar { width: 6px; }
.modal::-webkit-scrollbar-track { background: var(--eerie-black-2); }
.modal::-webkit-scrollbar-thumb {
  background: var(--jet);
  border-radius: 3px;
}

/* --- En-tête ------------------------------------ */
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--jet);
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 600;
  /* Dégradé orange-rouge façon site */
  background: var(--text-gradient-yellow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.3;
}

/* --- Bouton fermeture --------------------------- */
.btn-close {
  flex-shrink: 0;
  background: var(--jet);
  border: 1px solid hsla(0, 0%, 25%, 0.5);
  border-radius: 10px;
  width: 38px;
  height: 38px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--light-gray);
  transition: background 0.2s, color 0.2s;
  font-family: 'Poppins', sans-serif;
}

.btn-close:hover {
  background: var(--bittersweet-shimmer);
  color: var(--white-1);
  border-color: var(--bittersweet-shimmer);
}

.btn-close:focus-visible {
  outline: 3px solid var(--orange-yellow-crayola);
  outline-offset: 2px;
}

/* --- Description intro -------------------------- */
.modal-intro {
  font-size: 0.875rem;
  color: var(--light-gray-70);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* ================================================
   SECTIONS TARIFS
   ================================================ */
.tarif-section {
  margin-bottom: 1.5rem;
}

.tarif-section h3 {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--white-2);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* Badge "Objectif Papillon" */
.badge {
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
  background: hsla(29, 100%, 72%, 0.15);
  color: var(--orange-yellow-crayola);
  border: 1px solid hsla(29, 100%, 72%, 0.3);
}

/* --- Grille tarifs ------------------------------ */
.tarif-grid {
  display: grid;
  gap: 10px;
}

@media (min-width: 440px) {
  .tarif-grid.two-col {
    grid-template-columns: 1fr 1fr;
  }
}

/* --- Carte tarif individuelle ------------------- */
.tarif-card {
  background: var(--bg-gradient-jet);
  border: 1px solid var(--jet);
  border-radius: 14px;
  padding: 1rem 1.125rem;
  transition: border-color 0.2s;
}

.tarif-card:hover {
  border-color: hsla(29, 100%, 72%, 0.35);
}

.tarif-card-label {
  font-size: 0.75rem;
  color: var(--light-gray-70);
  margin-bottom: 0.35rem;
}

.tarif-card-price {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--orange-yellow-crayola);
}

.tarif-card-note {
  font-size: 0.75rem;
  color: var(--light-gray-70);
  margin-top: 0.35rem;
  line-height: 1.5;
}

/* --- Séparateur --------------------------------- */
.separator {
  border: none;
  border-top: 1px solid var(--jet);
  margin: 1.25rem 0;
}

/* --- Note référentiels -------------------------- */
.ref-note {
  font-size: 0.8125rem;
  color: var(--light-gray-70);
  line-height: 1.6;
  padding: 0.875rem 1rem;
  background: var(--bg-gradient-jet);
  border-radius: 12px;
  border-left: 3px solid var(--orange-yellow-crayola);
}

.ref-note strong {
  color: var(--white-2);
}

/* ================================================
   PIED DE MODALE
   ================================================ */
.modal-footer {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--jet);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

/* Bouton principal : "Me contacter pour un devis" */
.btn-contact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--light-gray);
  border: 1px solid var(--jet);
  border-radius: 14px;
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-contact:hover {
  opacity: 0.88;
}

.btn-contact:focus-visible {
  outline: 3px solid var(--orange-yellow-crayola);
  outline-offset: 2px;
}

/* Bouton secondaire : "Fermer" */
.btn-cancel {
  background: transparent;
  color: var(--light-gray);
  border: 1px solid var(--jet);
  border-radius: 14px;
  padding: 10px 18px;
  font-size: 0.875rem;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-cancel:hover {
  background: var(--jet);
  color: var(--white-1);
}

.btn-cancel:focus-visible {
  outline: 3px solid var(--orange-yellow-crayola);
  outline-offset: 2px;
}

/* ================================================
   RESPONSIVE — ajustements sous 400 px
   ================================================ */
@media (max-width: 400px) {
  .modal {
    padding: 1.25rem 1rem 1rem;
    border-radius: 16px;
  }

  .modal-footer {
    flex-direction: column-reverse;
  }

  .btn-contact,
  .btn-cancel {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}
