/* ==============================
   Legal Page - Modern Design
   ============================== */

/* Container principal avec navigation latérale */
.legal-container {
  display: flex;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  padding-left: clamp(180px, 20vw, 280px); /* Shrinks with viewport — matches nav width */
  min-height: calc(100vh - 80px);
}

/* Navigation latérale FIXE (flottante) */
.legal-nav {
  position: fixed;
  left: max(24px, calc((100vw - 1200px) / 2 + 24px));
  top: 100px;
  width: clamp(140px, 16vw, 220px); /* Shrinks with viewport */
  height: fit-content;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: clamp(12px, 1.5vw, 20px);
  z-index: 50;
  box-shadow: none;
}

.legal-nav-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.legal-nav-title {
  display: block;
  font-size: clamp(1rem, 1.1vw, 1.25rem);
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 4px;
}

.legal-nav-updated {
  font-size: clamp(0.65rem, 0.7vw, 0.75rem);
  color: #94a3b8;
}

.legal-nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.legal-nav-links li {
  margin-bottom: 4px;
}

.legal-nav-link {
  display: block;
  padding: clamp(7px, 0.8vw, 10px) clamp(8px, 1vw, 12px);
  color: #94a3b8;
  text-decoration: none !important;
  font-size: clamp(0.75rem, 0.85vw, 0.875rem);
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.legal-nav-link:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none !important;
}

 .legal-nav-link:focus,
 .legal-nav-link:focus-visible {
  text-decoration: none !important;
 }

.legal-nav-link.active {
  color: #00d6b4;
  background: rgba(0, 214, 180, 0.1);
  text-decoration: none !important;
}

/* Contenu principal */
.legal-content {
  flex: 1;
  min-width: 0;
}

/* Sections */
.legal-section {
  margin-bottom: 60px;
  scroll-margin-top: 24px;
}

.section-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 32px;
}

.section-icon {
  font-size: 2rem;
  line-height: 1;
}

.section-title-group h1 {
  font-size: 1.75rem;
  font-weight: 600;
  color: #e2e8f0;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}

.effective-date {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 400;
}

/* Cartes légales */
.legal-card {
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 16px;
}

.legal-card h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #e2e8f0;
  margin: 0 0 16px;
}

.legal-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #cbd5e1;
  margin: 20px 0 12px;
}

.legal-card h3:first-child {
  margin-top: 0;
}

.legal-card p {
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0 0 12px;
}

.legal-card p:last-child {
  margin-bottom: 0;
}

/* Listes */
.legal-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}

.legal-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.6;
}

.legal-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  background: #00d6b4;
  border-radius: 50%;
}

.legal-list li strong {
  color: #e2e8f0;
  font-weight: 500;
}

/* Liens */
.legal-card a {
  color: #00d6b4;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.legal-card a:hover {
  color: #14e6c7;
  text-decoration: underline;
}

/* Highlight boxes */
.legal-highlight {
  background: rgba(0, 214, 180, 0.08);
  border: 1px solid rgba(0, 214, 180, 0.2);
  border-radius: 8px;
  padding: 16px;
  margin: 0 0 16px;
}

.legal-highlight p {
  margin: 0;
  color: #e2e8f0;
  font-weight: 500;
}

.legal-highlight.important {
  background: rgba(0, 214, 180, 0.12);
  border-color: rgba(0, 214, 180, 0.3);
}

.legal-highlight.warning {
  background: rgba(255, 165, 0, 0.08);
  border-color: rgba(255, 165, 0, 0.25);
  padding: 12px 14px;
}

.legal-highlight.warning h2 {
  color: #ff9500;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.legal-highlight.warning p {
  font-size: 0.85rem !important;
  line-height: 1.5 !important;
  color: #ffb347 !important;
}

.legal-highlight.warning p strong {
  color: #ff9500;
}

/* Service list */
.service-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.service-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(10, 10, 10, 0.4);
  border-radius: 8px;
}

.service-item strong {
  color: #e2e8f0;
  font-weight: 500;
}

.service-item span {
  color: #94a3b8;
  font-size: 0.85rem;
}

/* Cookie types */
.cookie-type {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.cookie-type:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.cookie-note {
  font-size: 0.8rem !important;
  color: #94a3b8 !important;
  font-style: italic;
  margin-top: 12px !important;
}

/* Algorithm items - compact */
.algo-item {
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(10, 10, 10, 0.3);
  border-radius: 6px;
  border-left: 2px solid #00d6b4;
}

.algo-item h3 {
  margin: 0 0 4px !important;
  color: #00d6b4 !important;
  font-size: 0.85rem !important;
}

.algo-item p {
  margin: 0 !important;
  font-size: 0.8rem !important;
  line-height: 1.4 !important;
}

/* Cookie preferences box */
.cookie-prefs-box {
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cookie-status {
  font-size: 13px;
  color: #94a3b8;
}

.status-accepted {
  color: #00d6b4;
  font-weight: 500;
}

.status-declined {
  color: #f87171;
  font-weight: 500;
}

.status-none {
  color: #cbd5e1;
  font-weight: 500;
}

.cookie-actions {
  display: flex;
  gap: 8px;
}

.cookie-btn-small {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #cbd5e1;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cookie-btn-accept:hover {
  border-color: #00d6b4;
  color: #00d6b4;
}

.cookie-btn-decline:hover {
  border-color: #f87171;
  color: #f87171;
}

.legal-root .cookie-btn-main {
  background: #00d6b4;
  color: #0a0a0a;
  border: none;
  border-radius: 12px;
  padding: 12px 32px;
  font-size: 15px;
  font-weight: 600;
  margin-right: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 214, 180, 0.25);
}

.legal-root .cookie-btn-main:hover {
  background: #14e6c7;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 214, 180, 0.35);
}

.legal-root .cookie-btn-outlined {
  background: transparent;
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 12px 32px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.legal-root .cookie-btn-outlined:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}
/* Contact section - compact, same style as other cards */
.legal-section-contact {
  margin-bottom: 40px;
}

.contact-card {
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.contact-card h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #e2e8f0;
  margin: 0;
}

.contact-card p {
  color: #94a3b8;
  margin: 0;
  font-size: 0.85rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-link {
  display: inline-block;
  padding: 8px 20px;
  background: #00d6b4;
  color: #0a0a0a;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.contact-link:hover {
  background: #14e6c7;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 214, 180, 0.3);
}

/* ==============================
   Responsive Design
   ============================== */

/* Mobile */
@media (max-width: 1024px) {
  .legal-container {
    flex-direction: column;
    padding: 16px;
    padding-left: 16px; /* Reset padding for mobile */
    gap: 20px;
  }
  
  .legal-nav {
    position: relative;
    left: 0;
    top: 0;
    width: 100%;
    max-height: none;
    background: rgba(255, 255, 255, 0.025);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: none;
  }
  
  .legal-nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .legal-nav-links li {
    margin-bottom: 0;
  }
  
  .legal-nav-link {
    padding: 8px 12px;
    font-size: 0.75rem;
    white-space: nowrap;
  }
  
  .section-header {
    gap: 12px;
  }
  
  .section-icon {
    font-size: 1.5rem;
  }
  
  .section-title-group h1 {
    font-size: 1.4rem;
  }
  
  .legal-card {
    padding: 20px;
  }
  
  .legal-card h2 {
    font-size: 1rem;
  }
  
  .service-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .cookie-prefs-box {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .cookie-actions {
    justify-content: stretch;
  }
  
  .cookie-btn-small {
    flex: 1;
    text-align: center;
  }
  
  .contact-card {
    padding: 24px;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .legal-container {
    padding: 12px;
  }
  
  .legal-nav-links {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  
  .legal-nav-links::-webkit-scrollbar {
    display: none;
  }
  
  .section-title-group h1 {
    font-size: 1.2rem;
  }
  
  .legal-card {
    padding: 16px;
  }
  
  .algo-item {
    padding: 12px;
  }
}

/* Cookie notification message */
.cookie-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(19, 19, 19, 0.95);
  color: #cbd5e1;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 13px;
  border: 1px solid rgba(0, 214, 180, 0.3);
  z-index: 10000;
  display: none;
  max-width: 300px;
  animation: slideIn 0.3s ease-out;
}

.cookie-notification.success {
  border-color: rgba(0, 214, 180, 0.4);
  background: rgba(0, 214, 180, 0.1);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@media (max-width: 480px) {
  .cookie-notification {
    top: auto;
    bottom: 20px;
    right: 12px;
    left: 12px;
    max-width: none;
    text-align: center;
  }
}
