/* =============================================================
   SALOTT-IT — Cookie consent banner & modal (LOT 12.1)
   ============================================================= */

/* L'attribut HTML [hidden] doit gagner sur display:flex/fixed */
.consent-banner[hidden],
.consent-modal[hidden],
.consent-reopen[hidden] { display: none !important; }

/* Bannière bottom */
.consent-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1050;
  background: #fff;
  box-shadow: 0 -8px 32px rgba(11, 37, 89, 0.18);
  border-top: 3px solid var(--accent, #FF6B35);
  padding: 16px;
  font-family: var(--font, system-ui, sans-serif);
  animation: slideUpIn .4s cubic-bezier(.25,.46,.45,.94);
}
@keyframes slideUpIn { from { transform: translateY(100%); } to { transform: translateY(0); } }

.consent-banner__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.consent-banner__text { flex: 1 1 320px; min-width: 0; }
.consent-banner__text strong {
  display: block;
  font-size: 0.95rem;
  color: var(--primary, #0b2559);
  margin-bottom: 4px;
}
.consent-banner__text strong i { color: var(--accent, #FF6B35); margin-right: 6px; }
.consent-banner__text p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--gray-700, #475569);
  line-height: 1.45;
}
.consent-banner__text a { color: var(--accent, #FF6B35); text-decoration: underline; }

.consent-banner__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.consent-btn {
  border: 0; cursor: pointer;
  padding: 10px 18px;
  border-radius: 8px;
  font: 600 0.85rem var(--font, system-ui);
  transition: background .2s, transform .1s;
  min-height: 44px;
  white-space: nowrap;
}
.consent-btn--ghost {
  background: transparent;
  color: var(--gray-700, #475569);
  border: 1.5px solid var(--gray-200, #e5e7eb);
}
.consent-btn--ghost:hover { background: var(--gray-100, #f3f4f6); }
.consent-btn--primary {
  background: var(--accent, #FF6B35);
  color: #fff;
}
.consent-btn--primary:hover { background: var(--accent-dark, #e55a2b); }
.consent-btn:active { transform: scale(.97); }

/* Modal de personnalisation */
.consent-modal {
  position: fixed; inset: 0;
  z-index: 1060;
  background: rgba(11, 37, 89, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.consent-modal__dialog {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(11, 37, 89, 0.3);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow: auto;
  animation: dialogIn .3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes dialogIn { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.consent-modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200, #e5e7eb);
}
.consent-modal__head h2 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--primary, #0b2559);
  font-weight: 700;
}
.consent-modal__head h2 i { color: var(--accent, #FF6B35); margin-right: 8px; }
.consent-modal__close {
  background: transparent; border: 0;
  font-size: 1.6rem; line-height: 1;
  color: var(--gray-600, #64748b);
  cursor: pointer;
  width: 36px; height: 36px;
  border-radius: 50%;
  transition: background .2s;
}
.consent-modal__close:hover { background: var(--gray-100, #f3f4f6); color: #dc3545; }

.consent-modal__body { padding: 16px 24px; }
.consent-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100, #f3f4f6);
  cursor: pointer;
}
.consent-row:last-child { border-bottom: 0; }
.consent-row input[type="checkbox"] {
  width: 20px; height: 20px;
  margin-top: 2px;
  accent-color: var(--accent, #FF6B35);
  cursor: pointer;
  flex-shrink: 0;
}
.consent-row strong {
  display: block;
  color: var(--primary, #0b2559);
  font-size: 0.92rem;
  margin-bottom: 2px;
}
.consent-row span {
  display: block;
  color: var(--gray-600, #64748b);
  font-size: 0.8rem;
  line-height: 1.4;
}
.consent-row--locked { opacity: .7; cursor: not-allowed; }
.consent-row--locked input { cursor: not-allowed; }

.consent-modal__foot {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--gray-200, #e5e7eb);
  background: var(--gray-100, #f3f4f6);
  border-radius: 0 0 14px 14px;
  flex-wrap: wrap;
}

/* Bouton ré-ouverture (toujours accessible) */
.consent-reopen {
  position: fixed;
  bottom: 16px; left: 16px;
  z-index: 1030;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid var(--gray-200, #e5e7eb);
  color: var(--accent, #FF6B35);
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(11, 37, 89, 0.12);
  transition: transform .2s, box-shadow .2s;
}
.consent-reopen:hover { transform: scale(1.08); box-shadow: 0 6px 18px rgba(11, 37, 89, 0.2); }

/* Mobile portrait : bannière en colonne */
@media (max-width: 600px) {
  .consent-banner__inner { flex-direction: column; align-items: stretch; gap: 12px; }
  .consent-banner__actions { justify-content: stretch; }
  .consent-banner__actions .consent-btn { flex: 1; }
}

/* Print : on cache tout */
@media print {
  .consent-banner, .consent-modal, .consent-reopen { display: none !important; }
}
