/* ============================================
   GoHara - Bannière cookies RGPD/CNIL
   Design: noir/gold (#C4A265)
   Fonts: Cormorant Garamond + Outfit
   ============================================ */

/* Variables locales (utilisent les variables du site si disponibles) */
.gohara-cookie-banner,
.gohara-cookie-modal {
  --gc-black: #0a0a0a;
  --gc-dark: #151515;
  --gc-gold: #c4a265;
  --gc-gold-soft: rgba(196, 162, 101, 0.3);
  --gc-white: #f5f5f0;
  --gc-gray: #9a9590;
  --gc-gray-light: #d4d0c8;
  --gc-font-display: 'Cormorant Garamond', serif;
  --gc-font-body: 'Outfit', -apple-system, sans-serif;
  --gc-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================
   BANNIÈRE PRINCIPALE
   ============================================ */
.gohara-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  background: var(--gc-black);
  border-top: 1px solid var(--gc-gold-soft);
  padding: 24px 32px;
  transform: translateY(100%);
  transition: transform 0.5s var(--gc-ease);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
  font-family: var(--gc-font-body);
}

.gohara-cookie-banner.is-visible {
  transform: translateY(0);
}

.gohara-cookie-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 40px;
}

.gohara-cookie-banner-content {
  flex: 1;
  min-width: 0;
}

.gohara-cookie-banner-title {
  font-family: var(--gc-font-display);
  font-size: 20px;
  font-weight: 400;
  color: var(--gc-white);
  margin: 0 0 6px;
  letter-spacing: 0.02em;
}

.gohara-cookie-banner-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--gc-gray-light);
  margin: 0;
  font-weight: 300;
}

.gohara-cookie-banner-text a {
  color: var(--gc-gold);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: opacity 0.3s;
}

.gohara-cookie-banner-text a:hover {
  opacity: 0.7;
}

.gohara-cookie-banner-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

/* Boutons — 3 au même niveau (conforme CNIL) */
.gohara-cookie-btn {
  padding: 12px 24px;
  font-family: var(--gc-font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid var(--gc-gold-soft);
  background: transparent;
  color: var(--gc-gold);
  transition: all 0.3s var(--gc-ease);
  white-space: nowrap;
  border-radius: 0;
}

.gohara-cookie-btn:hover {
  border-color: var(--gc-gold);
  background: rgba(196, 162, 101, 0.08);
}

.gohara-cookie-btn-primary {
  background: var(--gc-gold);
  color: var(--gc-black);
  border-color: var(--gc-gold);
}

.gohara-cookie-btn-primary:hover {
  background: #d4b278;
  border-color: #d4b278;
  color: var(--gc-black);
}

/* ============================================
   MODALE DE PERSONNALISATION
   ============================================ */
.gohara-cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-family: var(--gc-font-body);
}

.gohara-cookie-modal.is-visible {
  display: flex;
  animation: gcFadeIn 0.3s var(--gc-ease);
}

@keyframes gcFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.gohara-cookie-modal-box {
  background: var(--gc-black);
  border: 1px solid var(--gc-gold-soft);
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
}

.gohara-cookie-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--gc-gray);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
  transition: color 0.3s;
}

.gohara-cookie-modal-close:hover {
  color: var(--gc-gold);
}

.gohara-cookie-modal-title {
  font-family: var(--gc-font-display);
  font-size: 26px;
  font-weight: 400;
  color: var(--gc-white);
  margin: 0 0 8px;
  letter-spacing: 0.03em;
}

.gohara-cookie-modal-intro {
  font-size: 13px;
  line-height: 1.7;
  color: var(--gc-gray-light);
  margin: 0 0 28px;
  font-weight: 300;
}

/* Catégorie de cookies */
.gohara-cookie-category {
  padding: 18px 0;
  border-bottom: 1px solid rgba(196, 162, 101, 0.12);
}

.gohara-cookie-category:last-of-type {
  border-bottom: none;
}

.gohara-cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 6px;
}

.gohara-cookie-category-name {
  font-family: var(--gc-font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--gc-white);
  letter-spacing: 0.02em;
  margin: 0;
}

.gohara-cookie-category-required {
  font-size: 10px;
  color: var(--gc-gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-left: 8px;
}

.gohara-cookie-category-desc {
  font-size: 12px;
  line-height: 1.65;
  color: var(--gc-gray);
  margin: 4px 0 0;
  padding-right: 60px;
  font-weight: 300;
}

/* Switch toggle (style iOS) */
.gohara-cookie-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

.gohara-cookie-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.gohara-cookie-switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #333;
  border-radius: 24px;
  transition: background 0.3s;
}

.gohara-cookie-switch-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: var(--gc-gray-light);
  border-radius: 50%;
  transition: all 0.3s var(--gc-ease);
}

.gohara-cookie-switch input:checked + .gohara-cookie-switch-slider {
  background: var(--gc-gold);
}

.gohara-cookie-switch input:checked + .gohara-cookie-switch-slider::before {
  transform: translateX(18px);
  background: var(--gc-black);
}

.gohara-cookie-switch input:disabled + .gohara-cookie-switch-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Boutons de la modale */
.gohara-cookie-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.gohara-cookie-modal-actions .gohara-cookie-btn {
  flex: 1;
  min-width: 140px;
}

/* ============================================
   RESPONSIVE MOBILE
   ============================================ */
@media (max-width: 768px) {
  .gohara-cookie-banner {
    padding: 20px;
  }

  .gohara-cookie-banner-inner {
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
  }

  .gohara-cookie-banner-title {
    font-size: 18px;
  }

  .gohara-cookie-banner-text {
    font-size: 12px;
  }

  .gohara-cookie-banner-actions {
    flex-direction: column;
    width: 100%;
  }

  .gohara-cookie-btn {
    width: 100%;
    padding: 14px 20px;
  }

  .gohara-cookie-modal-box {
    padding: 24px 20px;
    max-height: 90vh;
  }

  .gohara-cookie-modal-title {
    font-size: 22px;
  }

  .gohara-cookie-category-desc {
    padding-right: 0;
    margin-top: 8px;
  }

  .gohara-cookie-modal-actions {
    flex-direction: column;
  }

  .gohara-cookie-modal-actions .gohara-cookie-btn {
    width: 100%;
  }
}