/* Choix des cookies (consent.js) */
.dtm-consent {
  position: fixed;
  z-index: 90;
  left: 1rem;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  display: flex;
  justify-content: flex-start;
  pointer-events: none;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.dtm-consent[hidden] { display: none; }
.dtm-consent__panel {
  pointer-events: auto;
  width: 100%;
  max-width: 26rem;
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1.15rem 1.15rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1.1rem;
  background: #111415;
  color: #fff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  animation: dtm-consent-in 0.28s ease-out;
}
@keyframes dtm-consent-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .dtm-consent__panel { animation: none; } }
.dtm-consent__title { margin: 0 0 0.35rem; font-size: 1rem; font-weight: 800; }
.dtm-consent__text { margin: 0; color: rgba(255, 255, 255, 0.72); font-size: 0.88rem; line-height: 1.5; }
.dtm-consent__text a { color: #00d2ff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.dtm-consent__prefs { display: grid; gap: 0.5rem; margin-top: 0.9rem; }
.dtm-consent__prefs[hidden] { display: none; }
.dtm-consent__opt {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.7rem 0.8rem; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 0.8rem; cursor: pointer;
}
.dtm-consent__opt span { display: flex; flex-direction: column; gap: 0.1rem; }
.dtm-consent__opt strong { font-size: 0.9rem; }
.dtm-consent__opt small { color: rgba(255, 255, 255, 0.6); font-size: 0.78rem; line-height: 1.35; }
.dtm-consent__opt input {
  flex: none; appearance: none; -webkit-appearance: none; position: relative;
  width: 2.75rem; height: 1.6rem; margin: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.18); cursor: pointer; transition: background-color 0.2s;
}
.dtm-consent__opt input::after {
  content: ''; position: absolute; top: 0.2rem; left: 0.2rem; width: 1.2rem; height: 1.2rem;
  border-radius: 999px; background: #fff; transition: transform 0.2s;
}
.dtm-consent__opt input:checked { background: #00d2ff; }
.dtm-consent__opt input:checked::after { transform: translateX(1.15rem); }
.dtm-consent__opt input:focus-visible { outline: 2px solid #00d2ff; outline-offset: 2px; }
.dtm-consent__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-top: 1rem; }
/* « Tout refuser » et « Tout accepter » ont exactement la même apparence (exigence de la CNIL). */
.dtm-consent__btn {
  min-height: 2.9rem; padding: 0.55rem 0.8rem; border: 1.5px solid #00d2ff; border-radius: 999px;
  background: rgba(0, 210, 255, 0.12); color: #fff; font: inherit; font-size: 0.92rem; font-weight: 800; cursor: pointer;
  transition: background-color 0.2s;
}
.dtm-consent__btn:hover { background: rgba(0, 210, 255, 0.24); }
.dtm-consent__btn:focus-visible, .dtm-consent__more:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.dtm-consent__save { width: 100%; margin-top: 0.6rem; }
.dtm-consent__save[hidden] { display: none; }
.dtm-consent__more {
  display: block; width: 100%; min-height: 2.5rem; margin-top: 0.35rem; border: 0; background: none;
  color: rgba(255, 255, 255, 0.7); font: inherit; font-size: 0.85rem; font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.dtm-consent__more:hover { color: #fff; }
@media (max-width: 520px) {
  .dtm-consent { left: 0.6rem; right: 0.6rem; bottom: calc(0.6rem + env(safe-area-inset-bottom)); }
  .dtm-consent__panel { max-width: none; }
}
/* Page d'inscription : au-dessus des boutons Retour / Continuer */
@media (max-width: 767px), (max-height: 500px) {
  body.insc .dtm-consent { bottom: calc(5.4rem + env(safe-area-inset-bottom)); }
}
button.site-footer__legal[data-consent-open] { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }

/* Anciens navigateurs sans <dialog> : une fenêtre fermée reste cachée. */
dialog:not([open]) { display: none; }

/* Inscription sur ordinateur : de la place sous les boutons Retour / Continuer tant que la fenêtre est ouverte. */
@media (min-width: 768px) and (min-height: 501px) {
  html.has-consent-banner body.insc .insc-main { padding-bottom: 17rem; }
}
