/* css/charte_acceptation.css */

.gal-charte-overlay {
  position: fixed;
  inset: 0;
  z-index: 300000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.72);
}

.gal-charte-modal {
  width: min(1180px, 98vw);
  max-height: 96vh;
  max-height: 96dvh;
  overflow-x: hidden;
  overflow-y: auto;
  border: 3px solid #1f5faa;
  border-radius: 10px;
  background: #ffffff;
  color: #1a1a1a;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
}

.gal-charte-entete {
  padding: 14px 18px;
  border-bottom: 1px solid #b8c5d8;
  background: #edf4ff;
}

.gal-charte-entete h1 {
  margin: 0;
  color: #153f78;
  font-size: 1.55rem;
}

.gal-charte-entete p {
  margin: 6px 0 0;
  color: #1a1a1a;
  font-weight: 700;
}

.gal-charte-document {
  padding: 24px clamp(16px, 4vw, 58px);
  border-bottom: 1px solid #c8c8c8;
  background: #f2f2f2;
}

.gal-charte-document > * {
  max-width: 210mm;
  margin-right: auto;
  margin-left: auto;
}

.gal-charte-document table {
  width: 100%;
  border-collapse: collapse;
}

.gal-charte-document img {
  max-width: 100%;
  height: auto;
}

.gal-charte-document .gal-charte-signature-attente {
  min-height: 44px;
  padding: 12px;
  border: 2px dashed #777777;
  background: #fafafa;
  color: #555555;
  text-align: center;
  font-style: italic;
}

.gal-charte-confirmation {
  padding: 14px 18px;
  border-bottom: 1px solid #c8c8c8;
  background: #ffffff;
}

.gal-charte-confirmation h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.gal-charte-confirmation p {
  margin: 0 0 8px;
  line-height: 1.45;
}

.gal-charte-confirmation p:last-child {
  margin-bottom: 0;
}

.gal-charte-modal button:focus,
.gal-charte-modal button:focus-visible,
.gal-charte-modal:focus,
.gal-charte-modal:focus-visible {
  outline: 3px solid #000000;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px #ffffff;
}

.gal-charte-erreur {
  padding: 10px 18px;
  background: #fff0f0;
  color: #8f1111;
  font-weight: 800;
}

.gal-charte-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: #f5f5f5;
}

.gal-charte-modal button {
  min-height: 44px;
  padding: 10px 16px;
  border: 2px solid #333333;
  border-radius: 6px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.gal-charte-modal button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.gal-charte-bouton-refus {
  background: #ffffff;
  color: #7e1515;
}

.gal-charte-bouton-accepter {
  background: #1f5faa;
  color: #ffffff;
}

@media (max-width: 700px) {
  .gal-charte-overlay {
    padding: 0;
  }

  .gal-charte-modal {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    border: 0;
    border-radius: 0;
  }

  .gal-charte-document {
    padding: 16px 10px;
  }

  .gal-charte-actions {
    flex-direction: column-reverse;
  }

  .gal-charte-actions button {
    width: 100%;
  }
}
