/* ===================================================================
   Bandeau de consentement aux cookies
   Scopé sous #consentement : n'affecte aucune autre partie du site.
   =================================================================== */

#consentement,
#consentement *,
#consentement *::before,
#consentement *::after { box-sizing: border-box; }

#consentement {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 10000;
  display: none;
  padding: 18px 20px calc(18px + env(safe-area-inset-bottom, 0px));
  background: #06304d;
  color: #fff;
  border-top: 3px solid #ff7427;
  box-shadow: 0 -10px 34px rgba(0, 0, 0, .28);
  font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
}

#consentement.est-visible { display: block; }

#consentement .consentement-inner {
  width: min(1160px, 100%);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
}

#consentement p {
  margin: 0;
  flex: 1 1 380px;
  hyphens: none;
  overflow-wrap: normal;
  text-wrap: pretty;
  font-size: .95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, .92);
  text-align: left;
}

#consentement a {
  white-space: nowrap;
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#consentement a:hover,
#consentement a:focus-visible { color: #ff7427; }

#consentement .consentement-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 0 0 auto;
}

#consentement button {
  appearance: none;
  cursor: pointer;
  padding: 12px 24px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: .98rem;
  font-weight: 700;
  line-height: 1;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}

#consentement .consentement-accepter {
  background: #ff7427;
  color: #fff;
}

#consentement .consentement-accepter:hover,
#consentement .consentement-accepter:focus-visible {
  background: #ec6417;
  transform: translateY(-1px);
}

#consentement .consentement-refuser {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, .5);
}

#consentement .consentement-refuser:hover,
#consentement .consentement-refuser:focus-visible {
  background: rgba(255, 255, 255, .12);
  border-color: #fff;
  transform: translateY(-1px);
}

#consentement button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* lien permanent pour revenir sur son choix */
.consentement-rouvrir {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 720px) {
  #consentement .consentement-inner {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  /* en colonne, flex-basis s applique a la hauteur : on le neutralise */
  #consentement p { flex: 0 0 auto; }
  #consentement .consentement-actions { flex-direction: column; }
  #consentement button { width: 100%; }
}
