/* Habillage du bandeau Silktide aux couleurs du site DCA. */
#stcm-wrapper {
  --fontFamily: Arial, Helvetica, sans-serif;
  --primaryColor: var(--blue);
  --backgroundColor: #fff;
  --textColor: var(--ink);
  --boxShadow: 0 -6px 24px rgba(16, 41, 67, .16);
}

#stcm-icon,
#stcm-wrapper .stcm-logo,
#stcm-wrapper .stcm-credit-link,
#stcm-modal .stcm-toggle-off,
#stcm-modal .stcm-toggle-on { display: none !important; }

/* Bandeau pleine largeur en bas */
#stcm-wrapper #stcm-banner,
#stcm-wrapper #stcm-banner:focus {
  top: auto;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  width: 100%;
  max-width: 100%;
  padding: 18px max(20px, calc((100vw - 980px) / 2));
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: 0 -6px 24px rgba(16, 41, 67, .16);
}

#stcm-wrapper #stcm-banner p {
  flex: 1 1 auto;
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

#stcm-wrapper #stcm-banner p a {
  color: var(--blue);
  font-size: inherit;
}

#stcm-wrapper #stcm-banner .stcm-actions {
  display: flex;
  flex: 0 0 auto;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin: 0;
}

#stcm-wrapper #stcm-banner .stcm-actions-row { display: contents; }

/* Boutons : même taille pour les deux, angles droits comme le reste du site */
#stcm-wrapper #stcm-banner .stcm-button,
#stcm-wrapper #stcm-banner .stcm-preferences-button,
#stcm-wrapper #stcm-modal .stcm-button {
  min-height: 44px;
  padding: 9px 20px;
  border: 2px solid var(--blue);
  border-radius: 0;
  font-family: var(--fontFamily);
  font-size: 15px;
  font-weight: bold;
  line-height: 1.2;
  cursor: pointer;
}

#stcm-wrapper #stcm-banner .stcm-accept-all { order: 1; color: #fff; background: var(--blue); }
#stcm-wrapper #stcm-banner .stcm-accept-all:hover { border-color: var(--navy-dark); background: var(--navy-dark); color: #fff; }

#stcm-wrapper #stcm-banner .stcm-preferences-button {
  order: 2;
  display: inline-block;
  color: var(--blue);
  background: #fff;
}
#stcm-wrapper #stcm-banner .stcm-preferences-button span { color: inherit; }
#stcm-wrapper #stcm-banner .stcm-preferences-button:hover { color: #fff; background: var(--blue); }

/* Refus : lien lisible, disponible dès le bandeau (exigence CNIL) */
#stcm-wrapper #stcm-banner .stcm-reject-all {
  order: 3;
  min-height: 44px;
  padding: 0 0 0 8px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
  font-weight: normal;
  text-decoration: underline;
  white-space: nowrap;
}
#stcm-wrapper #stcm-banner .stcm-reject-all:hover { color: var(--blue); background: transparent; }

/* Fenêtre « Je choisis » */
#stcm-wrapper #stcm-modal {
  width: 620px;
  max-width: calc(100% - 32px);
  max-height: calc(100% - 32px);
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: 0 10px 40px rgba(16, 41, 67, .28);
}
#stcm-wrapper #stcm-modal header h2 { margin: 0; color: var(--navy-dark); font-family: Georgia, "Times New Roman", serif; font-size: 22px; line-height: 1.25; }
#stcm-wrapper #stcm-modal p,
#stcm-wrapper #stcm-modal .stcm-consent-description { color: var(--ink); font-size: 14px; line-height: 1.5; }
#stcm-wrapper #stcm-modal legend { color: var(--navy-dark); font-size: 15px; font-weight: bold; }
#stcm-wrapper #stcm-modal .stcm-modal-close { color: var(--navy-dark); fill: var(--navy-dark); }
#stcm-wrapper #stcm-modal .stcm-modal-save { color: #fff; background: var(--blue); }
#stcm-wrapper #stcm-modal .stcm-modal-save:hover { border-color: var(--navy-dark); background: var(--navy-dark); color: #fff; }
#stcm-wrapper #stcm-modal .stcm-modal-reject-all { color: var(--blue); background: #fff; }
#stcm-wrapper #stcm-modal .stcm-modal-reject-all:hover { color: #fff; background: var(--blue); }

/* Le style header / section / footer du site ne doit pas s'appliquer à la fenêtre */
#stcm-wrapper #stcm-modal header,
#stcm-wrapper #stcm-modal section,
#stcm-wrapper #stcm-modal footer {
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
}
#stcm-wrapper #stcm-modal section { margin-top: 18px; }
#stcm-wrapper #stcm-modal footer { margin-top: 18px; gap: 10px; }
#stcm-wrapper #stcm-modal p { opacity: 1; }
#stcm-wrapper #stcm-modal .stcm-toggle-track { background: #8b9299; }
#stcm-wrapper #stcm-modal .stcm-toggle input:checked + .stcm-toggle-track { background: var(--blue); }

/* Contour clavier sobre, en angles droits */
#stcm-wrapper a:focus,
#stcm-wrapper #stcm-banner button:focus,
#stcm-wrapper #stcm-modal button:focus { outline: none; box-shadow: none; }
#stcm-wrapper a:focus-visible,
#stcm-wrapper #stcm-banner button:focus-visible,
#stcm-wrapper #stcm-modal button:focus-visible { outline: 2px solid var(--navy-dark); outline-offset: 2px; border-radius: 0; }

/* Mobile : le bandeau recouvre la barre d'appel, qui réapparaît une fois le choix fait */
@media (max-width: 760px) {
  #stcm-wrapper #stcm-banner,
  #stcm-wrapper #stcm-banner:focus {
    bottom: 0;
    display: block;
    padding: 14px 16px calc(8px + env(safe-area-inset-bottom));
  }

  #stcm-wrapper #stcm-banner p { margin-bottom: 12px; }

  #stcm-wrapper #stcm-banner .stcm-actions { flex-wrap: wrap; gap: 8px; }

  #stcm-wrapper #stcm-banner .stcm-accept-all,
  #stcm-wrapper #stcm-banner .stcm-preferences-button { flex: 1 1 calc(50% - 4px); padding-right: 8px; padding-left: 8px; }

  #stcm-wrapper #stcm-banner .stcm-reject-all { flex: 1 1 100%; padding: 0; text-align: center; }

  #stcm-wrapper #stcm-modal { padding: 20px; }
  #stcm-wrapper #stcm-modal .stcm-button { width: 100%; }
}
