/*
  Banniere de consentement aux cookies (07/10/2026) - voir jr-consent.js.

  Carte discrete en bas a gauche (le badge Trusted Shops occupe le bas a
  droite) : pas de voile, la page reste entierement utilisable.
  Les deux boutons "Tout refuser" / "Tout accepter" partagent strictement le
  meme style : c'est une exigence CNIL, ne pas en mettre un en avant.

  Cache 30 jours : incrementer ?v= dans includes/consent_head.php.
*/
.jrc {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 10050;
  box-sizing: border-box;
  width: 400px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 16px 18px 12px;
  background: #fff;
  color: #2a2f3a;
  border: 1px solid #d9dde5;
  border-top: 4px solid #16213e;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(15, 23, 41, 0.18);
  font: 13px/1.45 'Segoe UI', Arial, sans-serif;
  text-align: left;
}
.jrc * { box-sizing: border-box; }

.jrc-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: #16213e;
}
.jrc-text { margin: 0 0 12px; }

.jrc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.jrc-btn {
  flex: 1 1 140px;
  min-height: 36px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #16213e;
  border-radius: 6px;
  background: #16213e;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.jrc-btn:hover { background: #24345f; border-color: #24345f; }
.jrc-btn:focus-visible,
.jrc-link:focus-visible,
.jrc-switch input:focus-visible + .jrc-slider {
  outline: 2px solid #F4607A;
  outline-offset: 2px;
}
.jrc-btn[hidden] { display: none; }
.jrc-btn-save { flex-basis: 100%; }

.jrc-links {
  margin: 10px 0 0;
  font-size: 12px;
  color: #6b7280;
}
.jrc-link {
  display: inline-block;
  min-height: 24px;
  padding: 3px 0;
  margin: 0;
  border: 0;
  background: none;
  color: #16213e;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.jrc-link:hover { color: #d4114a; }

/* --- Reglages detailles ------------------------------------------------- */
.jrc-details { margin: 0 0 12px; border-top: 1px solid #e5e7eb; }
.jrc-details[hidden] { display: none; }
.jrc-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
}
.jrc-row-text { flex: 1; }
.jrc-row-title {
  display: block;
  font-weight: 600;
  color: #16213e;
  cursor: pointer;
}
.jrc-row-title em { font-weight: 400; font-style: normal; color: #6b7280; }
.jrc-row-desc { display: block; font-size: 12px; color: #4b5563; }

/* Interrupteur : une vraie case a cocher, simplement habillee. */
.jrc-switch {
  position: relative;
  flex: none;
  width: 40px;
  height: 22px;
  margin-top: 2px;
}
.jrc-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.jrc-switch input:disabled { cursor: not-allowed; }
.jrc-slider {
  position: absolute;
  inset: 0;
  border-radius: 11px;
  background: #c4c9d4;
  transition: background .15s;
}
.jrc-slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s;
}
.jrc-switch input:checked + .jrc-slider { background: #16213e; }
.jrc-switch input:checked + .jrc-slider::before { transform: translateX(18px); }
.jrc-switch input:disabled + .jrc-slider { opacity: .55; }

/* Telephones : carte pleine largeur, en bas. */
@media (max-width: 600px) {
  .jrc {
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    max-width: none;
    max-height: calc(100vh - 16px);
  }
}

@media print { .jrc { display: none; } }
