/* ==========================================================================
   NOUVEAU SYSTÈME DE MODALE V10 - PREMIUM & RESPONSIVE
   ========================================================================== */

/* Overlay d'arrière-plan sans floutage */
.fenetre-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(41, 18, 24, 0.15); /* Teinte bordeaux très légère */
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.fenetre-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Conteneur principal de la modale */
.fenetre-flottante {
  background: var(--bg-card, #fcfbf7);
  border: 1px solid var(--border-color, #e7e3d4);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(41, 18, 24, 0.2);
  width: 90%;
  max-width: 700px;
  height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 10001;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fenetre-overlay.active .fenetre-flottante {
  transform: scale(1) translateY(0);
}

/* En-tête de la modale */
.fenetre-entete {
  background-color: #291218; /* Bordeaux profond */
  color: #f5eef0;
  padding: 14px 20px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  font-family: var(--font-sans), sans-serif;
  border-bottom: 1px solid rgba(231, 227, 212, 0.1);
  font-size: 1.05rem;
}

/* Titre dans l'en-tête */
.fenetre-entete span {
  font-family: var(--font-sans), sans-serif;
  letter-spacing: 0.5px;
}

/* Bouton de fermeture premium */
.fenetre-entete button.close-modal-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #f5eef0;
  border: none;
  font-size: 0.85rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.fenetre-entete button.close-modal-btn:hover {
  background-color: var(--accent, #8b263e);
  transform: rotate(90deg);
}

/* Contenu (Iframe) de la modale */
.fenetre-contenu {
  width: 100%;
  flex-grow: 1;
  border: none;
  display: block;
  background-color: #fcfbf7;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   RESPONSIVE LAYOUT
   ========================================================================== */
@media screen and (max-width: 768px) {
  .fenetre-flottante {
    width: 100% !important;
    height: 100% !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  .confirm-modal-overlay {
    opacity: 0;
    visibility: hidden;
  }
}

/* ==========================================================================
   MODALE DE CONFIRMATION INLINE STANDARD (V10)
   ========================================================================== */
.confirm-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(41, 18, 24, 0.15); /* Teinte bordeaux très légère */
  z-index: 11000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.confirm-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.confirm-modal-box {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-color, #e7e3d4);
  border-radius: 12px;
  box-shadow: 0 15px 40px rgba(41, 18, 24, 0.15);
  padding: 30px;
  width: 90%;
  max-width: 500px;
  text-align: center;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: var(--font-sans), sans-serif;
}

.confirm-modal-overlay.active .confirm-modal-box {
  transform: scale(1);
}

.confirm-modal-box h4 {
  font-family: var(--font-serif), Georgia, serif;
  color: var(--sp-primary, #8b263e);
  font-size: 1.35rem;
  margin-top: 0;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
}

.confirm-modal-box p {
  font-size: 0.95rem;
  color: var(--text-main, #2d2926);
  line-height: 1.6;
  margin-bottom: 24px;
}

.confirm-modal-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.confirm-modal-buttons button, 
.confirm-modal-buttons a {
  padding: 10px 22px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  font-family: var(--font-sans), sans-serif;
}

.confirm-modal-btn-secondary {
  background-color: #ffffff;
  border-color: var(--border-color, #e7e3d4) !important;
  color: var(--text-main, #2d2926) !important;
}

.confirm-modal-btn-secondary:hover {
  background-color: #fcfbf7;
  border-color: #d7d1be !important;
}

.confirm-modal-btn-danger {
  background-color: #c62828 !important;
  color: #ffffff !important;
}

.confirm-modal-btn-danger:hover {
  background-color: #b71c1c !important;
}
