/* ============================================================
   Bannière de consentement cookies — Jérôme-Pneus
   S'appuie sur les variables de charte définies dans style.css
   ============================================================ */
.jp-cc, .jp-cc-modal { font-family: var(--font-body, system-ui, sans-serif); box-sizing: border-box; }
.jp-cc *, .jp-cc-modal * { box-sizing: border-box; }

/* --- Bannière (bas de page) --- */
.jp-cc {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9998;
  padding: 14px; display: flex; justify-content: center;
  animation: jp-cc-in .35s var(--ease, ease) both;
}
@keyframes jp-cc-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.jp-cc__card {
  width: 100%; max-width: 1080px;
  background: var(--navy-900, #0A1B33); color: #fff;
  border: 1px solid rgba(255,255,255,.12); border-radius: var(--r-lg, 18px);
  box-shadow: 0 18px 50px rgba(0,0,0,.42);
  padding: 18px 20px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
}
.jp-cc__body { flex: 1 1 320px; }
.jp-cc__title { font-family: var(--font-display, sans-serif); font-size: 1.05rem; font-weight: 700; margin: 0 0 5px; color: #fff; }
.jp-cc__text { font-size: .9rem; line-height: 1.5; margin: 0; color: rgba(255,255,255,.82); }
.jp-cc__text a { color: var(--gold, #F6A623); text-decoration: underline; }
.jp-cc__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.jp-cc__actions .btn { white-space: nowrap; cursor: pointer; }
/* Boutons "ghost" sur fond foncé : texte clair */
.jp-cc__actions .btn--ghost { color: #fff; border-color: rgba(255,255,255,.42); background: transparent; }
.jp-cc__actions .btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }

/* --- Modale préférences --- */
.jp-cc-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.jp-cc-modal__overlay { position: absolute; inset: 0; background: rgba(10,27,51,.55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.jp-cc-modal__box {
  position: relative; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  background: var(--surface, #fff); color: var(--ink, #0F172A);
  border-radius: var(--r-lg, 18px); box-shadow: var(--sh-lg, 0 18px 40px rgba(0,0,0,.2));
  padding: 26px 26px 22px; animation: jp-cc-in .3s var(--ease, ease) both;
}
.jp-cc-modal__x { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; border: 0; background: transparent; font-size: 1.7rem; line-height: 1; color: var(--muted, #5B6B7F); cursor: pointer; border-radius: 50%; }
.jp-cc-modal__x:hover { background: var(--steel-50, #F3F7FB); color: var(--ink, #0F172A); }
.jp-cc-modal__box h2 { font-family: var(--font-display, sans-serif); font-size: 1.25rem; margin: 0 0 8px; padding-right: 28px; }
.jp-cc-modal__intro { font-size: .9rem; color: var(--muted, #5B6B7F); margin: 0 0 18px; line-height: 1.5; }
.jp-cc-modal__intro a { color: var(--red-600, #C10F20); text-decoration: underline; }
.jp-cc-cat { border: 1px solid var(--border, #E2E8F0); border-radius: var(--r-md, 12px); padding: 14px 16px; margin-bottom: 12px; }
.jp-cc-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 5px; }
.jp-cc-cat__head strong { font-size: .98rem; }
.jp-cc-cat p { font-size: .84rem; color: var(--muted, #5B6B7F); margin: 0; line-height: 1.45; }
.jp-cc-badge { font-size: .72rem; font-weight: 600; color: var(--green-600, #15803D); background: var(--green-soft, #E7F6EC); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.jp-cc-modal__actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
.jp-cc-modal__actions .btn { cursor: pointer; }

/* --- Interrupteur (switch) --- */
.jp-cc-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.jp-cc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.jp-cc-switch span { position: absolute; inset: 0; background: var(--border-strong, #CBD5E1); border-radius: 999px; transition: .2s; pointer-events: none; }
.jp-cc-switch span::before { content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.jp-cc-switch input:checked + span { background: var(--green-500, #16A34A); }
.jp-cc-switch input:checked + span::before { transform: translateX(20px); }
.jp-cc-switch input:focus-visible + span { outline: 2px solid var(--navy-600, #1E3A5F); outline-offset: 2px; }

@media (max-width: 640px) {
  .jp-cc__card { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px; }
  .jp-cc__actions { justify-content: stretch; }
  .jp-cc__actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* --- Tableau des cookies (page Politique cookies) --- */
.jp-cookie-table { width: 100%; border-collapse: collapse; margin: 16px 0 8px; font-size: .88rem; }
.jp-cookie-table th, .jp-cookie-table td { text-align: left; padding: 10px 12px; border: 1px solid var(--border, #E2E8F0); vertical-align: top; }
.jp-cookie-table th { background: var(--steel-50, #F3F7FB); font-family: var(--font-display, sans-serif); font-size: .8rem; letter-spacing: .01em; }
@media (max-width: 560px) {
  .jp-cookie-table, .jp-cookie-table tbody, .jp-cookie-table tr, .jp-cookie-table td { display: block; width: 100%; }
  .jp-cookie-table thead { display: none; }
  .jp-cookie-table tr { border: 1px solid var(--border, #E2E8F0); border-radius: 10px; margin-bottom: 10px; padding: 4px 2px; }
  .jp-cookie-table td { border: 0; border-bottom: 1px solid var(--border, #E2E8F0); }
  .jp-cookie-table td:last-child { border-bottom: 0; }
  .jp-cookie-table td::before { content: attr(data-th) " : "; font-weight: 600; color: var(--ink-2, #334155); }
}
