:root {
  --dm-red: #e30613;
  --dm-red-dark: #7a0010;
  --dm-black: #050505;
  --dm-white: #ffffff;
  --dm-text-soft: rgba(255, 255, 255, 0.74);
  --dm-border: rgba(255, 255, 255, 0.14);
  --dm-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  background: #ebeff5;
}

body.dm-lock {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

button,
input {
  font: inherit;
}

.dm-page {
  min-height: 100vh;
}

.dm-layout {
  display: grid;
  grid-template-columns: 56% 44%;
  min-height: 100vh;
  height: 100vh;
}

/* =========================
   VISUEL
========================= */

.dm-visual-panel {
  background: #000;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dm-visual-wrap {
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: hidden;
}

.dm-visual-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  transform: scale(1.08);
}

/* =========================
   FORMULAIRE
========================= */

.dm-form-panel {
  background:
    radial-gradient(
      circle at top left,
      rgba(227, 6, 19, 0.26),
      transparent 30%
    ),
    radial-gradient(
      circle at top right,
      rgba(255, 255, 255, 0.08),
      transparent 16%
    ),
    linear-gradient(145deg, rgba(179, 0, 22, 0.98), rgba(8, 8, 8, 0.99) 62%);
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.dm-form-shell {
  max-width: 640px;
  margin: 0 auto;
  padding: 26px 34px 28px;
}

.dm-form-header {
  margin-bottom: 16px;
}

.dm-field input.error {
  border-color: #ff3b3b;
  box-shadow: 0 0 0 0.2rem rgba(255, 59, 59, 0.2);
}

.dm-field input.error {
  border-color: #ff4d4f !important;
  box-shadow: 0 0 0 0.18rem rgba(255, 77, 79, 0.18) !important;
}

.dm-consent-box.error,
.dm-consent input.error + .dm-consent-mark {
  border-color: #ff4d4f !important;
}

.dm-error {
  margin-top: 7px;
  color: #ff6b6b;
  font-size: 0.92rem;
  line-height: 1.45;
  font-weight: 600;
}

.dm-field-help {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.8rem;
  line-height: 1.45;
}

.dm-field input.error {
  border-color: #ff4d4f !important;
  box-shadow: 0 0 0 0.18rem rgba(255, 77, 79, 0.18) !important;
}

.dm-consent-box.error {
  border-color: #ff4d4f !important;
  box-shadow: 0 0 0 0.18rem rgba(255, 77, 79, 0.12) !important;
}

.dm-error {
  margin-top: 7px;
  color: #ff6b6b;
  font-size: 0.92rem;
  line-height: 1.45;
  font-weight: 600;
}

.dm-form-message {
  margin-top: 4px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.45;
  font-weight: 600;
}

.dm-form-message--error {
  color: #ffd5d5;
  background: rgba(255, 77, 79, 0.14);
  border: 1px solid rgba(255, 77, 79, 0.24);
}

.dm-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.dm-form-header h1 {
  margin: 0;
  color: #fff;
  font-size: 3.2rem;
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: -1.2px;
  max-width: 320px;
}

.dm-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dm-field label {
  display: inline-block;
  margin-bottom: 7px;
  color: #fff;
  font-size: 1.18rem;
  font-weight: 800;
}

.dm-field input[type="text"],
.dm-field input[type="tel"] {
  width: 100%;
  height: 52px;
  border-radius: 14px;
  border: 1px solid var(--dm-border);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.07),
    rgba(255, 255, 255, 0.03)
  );
  color: #fff;
  padding: 0 16px;
  outline: none;
  font-size: 1.05rem;
}

.dm-field input::placeholder {
  color: rgba(255, 255, 255, 0.52);
}

.dm-field input:focus {
  border-color: rgba(227, 6, 19, 0.92);
  box-shadow: 0 0 0 0.18rem rgba(227, 6, 19, 0.18);
}

.dm-consent-box {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid var(--dm-border);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.03)
  );
  cursor: pointer;
}

.dm-consent-box input {
  display: none;
}

.dm-consent-mark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.32);
  margin-top: 2px;
}

.dm-consent-box input:checked + .dm-consent-mark {
  background: var(--dm-red);
  border-color: var(--dm-red);
}

.dm-consent-content strong {
  display: block;
  margin-bottom: 6px;
  color: #fff;
  font-size: 1.15rem;
}

.dm-consent-content small {
  display: block;
  color: var(--dm-text-soft);
  font-size: 0.92rem;
  line-height: 1.55;
}

.dm-submit {
  height: 50px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(90deg, #e30613, #ff2b2b);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(227, 6, 19, 0.22);
}

/* =========================
   OVERLAY + MODALS
========================= */

.dm-overlay {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(
      circle at top right,
      rgba(227, 6, 19, 0.18),
      transparent 30%
    ),
    rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
  z-index: 9990;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease;
}

.dm-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.dm-modal {
  position: fixed;
  inset: 0;
  z-index: 9991;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: 0.3s ease;
}

.dm-modal.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.dm-modal-card {
  position: relative;
  width: 100%;
  color: #fff;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(
      circle at top right,
      rgba(255, 255, 255, 0.1),
      transparent 18%
    ),
    linear-gradient(145deg, rgba(179, 0, 22, 0.96), rgba(8, 8, 8, 0.98) 60%);
  box-shadow: var(--dm-shadow);
}

.dm-modal-card--small {
  max-width: 620px;
  padding: 38px 32px 30px;
}

.dm-modal-card--large {
  max-width: 980px;
  padding: 34px 30px 24px;
}

.dm-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

.dm-modal-chip {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #f3c64d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.dm-modal h2 {
  margin: 18px 0 14px;
  font-size: 3rem;
  line-height: 1.1;
}

.dm-modal p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.45rem;
  line-height: 1.7;
}

.dm-age-badge {
  width: 110px;
  height: 110px;
  margin: 24px auto 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    circle at 30% 30%,
    #ff4b4b,
    #e30613 45%,
    #7a0010 100%
  );
  font-size: 3rem;
  font-weight: 800;
}

.dm-modal-note {
  text-align: center;
}

.dm-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

.dm-modal-actions--end {
  justify-content: flex-end;
}

.dm-btn {
  min-width: 160px;
  height: 52px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  text-transform: uppercase;
}

.dm-btn--primary {
  color: #fff;
  background: linear-gradient(90deg, #e30613, #ff2b2b);
}

.dm-btn--ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.dm-rules-scroll {
  max-height: 60vh;
  overflow-y: auto;
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.dm-rule-block {
  padding: 16px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.16);
  margin-bottom: 14px;
}

.dm-rule-block h3 {
  margin: 0 0 10px;
  color: #f3c64d;
  font-size: 1.55rem;
}

.dm-rule-block ul {
  margin: 10px 0 0 18px;
  color: rgba(255, 255, 255, 0.82);
}

/* =========================
   TABLETTE
========================= */

@media (max-width: 1199px) {
  .dm-layout {
    grid-template-columns: 1fr;
    min-height: auto;
    height: auto;
  }

  .dm-visual-panel {
    padding: 14px 14px 0;
  }

  .dm-visual-wrap {
    height: auto;
    min-height: 0;
    padding: 0;
  }

  .dm-visual-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    transform: none;
  }

  .dm-form-panel {
    min-height: auto;
    height: auto;
    overflow: visible;
  }

  .dm-form-shell {
    max-width: 100%;
    padding: 30px 20px 34px;
  }

  .dm-form-header h1 {
    font-size: 3.8rem;
    max-width: 300px;
  }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 767px) {
  .dm-visual-panel {
    padding: 10px 10px 0;
  }

  .dm-form-shell {
    padding: 22px 15px 28px;
  }

  .dm-form-header h1 {
    font-size: 2.8rem;
    max-width: 220px;
  }

  .dm-field label {
    font-size: 1.02rem;
  }

  .dm-field input[type="text"],
  .dm-field input[type="tel"] {
    min-height: 50px;
    height: 50px;
    font-size: 1rem;
    border-radius: 13px;
  }

  .dm-submit {
    height: 48px;
    font-size: 1rem;
  }

  .dm-modal {
    padding: 12px;
  }

  .dm-modal-card--small,
  .dm-modal-card--large {
    padding: 28px 18px 18px;
  }

  .dm-modal h2 {
    font-size: 2.2rem;
  }

  .dm-rules-scroll {
    max-height: 50vh;
    padding: 12px;
  }

  .dm-btn {
    width: 100%;
    min-width: 100%;
  }
}

/* =========================
   MODALS - BRAND HEADER
========================= */

.dm-modal-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 18px;
  padding-right: 46px;
}

.dm-modal-brand-img {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
}

/* l'ancienne capsule texte n'est plus utile */
.dm-modal-chip {
  display: none !important;
}

/* =========================
   MODAL CARDS
========================= */

.dm-modal-card {
  position: relative;
  width: 100%;
  color: #fff;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  box-shadow: var(--dm-shadow);
}

.dm-modal-card--small {
  max-width: 580px;
  padding: 28px 26px 24px;
}

.dm-modal-card--large {
  max-width: 980px;
  padding: 30px 28px 22px;
}

/* popup âge : image de fond + overlay */
.dm-modal-card--age {
  background:
    linear-gradient(
      180deg,
      rgba(10, 10, 10, 0.35) 0%,
      rgba(10, 10, 10, 0.62) 38%,
      rgba(10, 10, 10, 0.82) 100%
    ),
    linear-gradient(135deg, rgba(179, 0, 22, 0.22), rgba(8, 8, 8, 0.5)),
    url("../images/dm-age-bg.png");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

/* popup règlement : fond premium plus sobre */
.dm-modal-card--rules {
  background:
    radial-gradient(
      circle at top right,
      rgba(255, 255, 255, 0.1),
      transparent 18%
    ),
    linear-gradient(145deg, rgba(179, 0, 22, 0.96), rgba(8, 8, 8, 0.98) 60%);
}

/* =========================
   MODAL TYPO
========================= */

.dm-modal h2 {
  margin: 10px 0 10px;
  font-size: 2.45rem;
  line-height: 1.08;
}

.dm-modal p {
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.08rem;
  line-height: 1.55;
}

.dm-age-badge {
  width: 88px;
  height: 88px;
  margin: 18px auto 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    circle at 30% 30%,
    #ff4b4b,
    #e30613 45%,
    #7a0010 100%
  );
  font-size: 2.35rem;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(227, 6, 19, 0.35);
}

.dm-modal-note {
  text-align: center;
  margin-top: 8px;
}

.dm-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  z-index: 2;
}

/* =========================
   RULES SCROLL
========================= */

.dm-rules-scroll {
  max-height: 60vh;
  overflow-y: auto;
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 767px) {
  .dm-modal-card--small,
  .dm-modal-card--large {
    padding: 24px 16px 18px;
  }

  .dm-modal-brand {
    margin-bottom: 14px;
    padding-right: 34px;
  }

  .dm-modal-brand-img {
    max-width: 290px;
  }

  .dm-modal h2 {
    font-size: 2rem;
    line-height: 1.08;
    margin: 8px 0 10px;
  }

  .dm-modal p {
    font-size: 0.98rem;
    line-height: 1.5;
  }

  .dm-age-badge {
    width: 76px;
    height: 76px;
    font-size: 2rem;
    margin: 16px auto 8px;
  }

  .dm-rules-scroll {
    max-height: 50vh;
    padding: 12px;
  }
}


/* =========================
   RULES MODAL - TYPO SIMPLIFIEE
========================= */

.dm-modal-card--rules h2 {
  margin: 10px 0 14px;
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 800;
  color: #ffffff;
}

.dm-rule-block {
  padding: 18px 18px 16px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.16);
  margin-bottom: 14px;
}

.dm-rule-block h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
  line-height: 1.5;
  font-weight: 800;
  color: #f3c64d;
  text-transform: none;
}

.dm-rule-block p,
.dm-rule-block li {
  font-size: 0.98rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.84);
}

.dm-rule-block p {
  margin: 0;
}

.dm-rule-block p + p {
  margin-top: 10px;
}

.dm-rule-block ul,
.dm-rule-block ol {
  margin: 10px 0 0 18px;
  padding-left: 18px;
}

.dm-rule-block ul li,
.dm-rule-block ol li {
  margin-bottom: 8px;
}

.dm-rule-block--hero {
  text-align: center;
}

.dm-rule-block--hero h3 {
  color: #ffffff;
}

.dm-rule-block--signature {
  text-align: center;
}

.dm-signature {
  margin-top: 16px;
}

.dm-signature-name {
  margin-top: 10px;
  color: #f3c64d;
  font-weight: 800;
}

@media (max-width: 767px) {
  .dm-modal-card--rules h2 {
    font-size: 1.6rem;
  }

  .dm-rule-block {
    padding: 14px 14px 12px;
  }

  .dm-rule-block h3 {
    font-size: 1rem;
  }

  .dm-rule-block p,
  .dm-rule-block li {
    font-size: 0.92rem;
    line-height: 1.65;
  }
}
