/**
 * PAGE COOKIES - L'Échoppe Gauloise
 * Styles spécifiques pour la Politique des Cookies
 */

/* ═══════════════════════════════════════════════════════════════════════════
   HERO COOKIES
   ═══════════════════════════════════════════════════════════════════════════ */

.cookies-hero {
  padding: var(--space-20) 0 var(--space-12);
  margin-top: var(--header-height);
  background: linear-gradient(135deg, #654309 0%, #b27710 100%);
  color: white;
  text-align: center;
}

.cookies-hero-content {
  max-width: 800px;
  margin: 0 auto;
  animation: fadeIn 0.8s ease-out;
}

.cookies-hero-title {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  line-height: 1.1;
  margin: var(--space-6) 0 var(--space-4);
  font-weight: 700;
}

.cookies-hero-subtitle {
  font-size: var(--text-lg);
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto var(--space-4);
  color: rgba(255, 255, 255, 0.9);
}

.cookies-hero-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
  flex-wrap: wrap;
}

.cookies-hero-meta .separator {
  color: rgba(255, 255, 255, 0.5);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SOMMAIRE (TABLE DES MATIÈRES)
   ═══════════════════════════════════════════════════════════════════════════ */

.cookies-toc {
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
  padding: var(--space-4) 0;
  position: sticky;
  top: var(--header-height);
  z-index: 90;
  backdrop-filter: blur(8px);
  background-color: rgba(255, 255, 255, 0.95);
}

.toc-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.toc-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.toc-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-list li a {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.toc-list li a:hover {
  background: #b27710;
  color: white;
  border-color: #b27710;
}

.toc-list li a.active {
  background: #b27710;
  color: white;
  border-color: #b27710;
}

@media (max-width: 768px) {
  .toc-wrapper {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .toc-list {
    width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTENU PRINCIPAL
   ═══════════════════════════════════════════════════════════════════════════ */

.cookies-content {
  padding: var(--space-16) 0;
  background: white;
}

.cookies-content .container {
  max-width: 900px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NOTICE PÉDAGOGIQUE
   ═══════════════════════════════════════════════════════════════════════════ */

.cookies-notice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-6);
  background: linear-gradient(135deg, rgba(139, 69, 19, 0.08) 0%, rgba(178, 119, 16, 0.08) 100%);
  border-left: 6px solid #b27710;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-12);
}

.notice-icon {
  flex-shrink: 0;
  color: #b27710;
}

.notice-text h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

.notice-text p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 640px) {
  .cookies-notice {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════════════════════════════════════ */

.cookies-section {
  padding : 0;
  margin-bottom: var(--space-12);
  scroll-margin-top: calc(var(--header-height) + 60px);
}

.cookies-section .section-title {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-4);
  color: var(--text-primary);
  border-bottom: 2px solid var(--border);
  padding-bottom: var(--space-3);
}

.section-number {
  color: #b27710;
  font-weight: 700;
}

.section-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}

.section-card:hover {
  box-shadow: var(--shadow-md);
}

/* Introduction */
.intro-content {
  display: flex;
  align-items: flex-start;
  gap: var(--space-6);
}

.intro-icon {
  flex-shrink: 0;
  color: #b27710;
}

.intro-text p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-3);
}

@media (max-width: 640px) {
  .intro-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* Tableau des cookies */
.cookies-table {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: var(--space-4) 0;
}

.table-header {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-tertiary);
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}

.table-row {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
}

.table-row:last-child {
  border-bottom: none;
}

.table-row code {
  background: var(--bg-tertiary);
  padding: 0.125rem 0.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.85em;
}

@media (max-width: 768px) {
  .table-header,
  .table-row {
    grid-template-columns: 1fr;
    gap: var(--space-1);
  }
  
  .table-header {
    display: none;
  }
  
  .table-row span:first-child {
    font-weight: 600;
    color: var(--text-primary);
  }
}

/* Cookies analytiques */
.consent-required {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
}

.consent-required i {
  color: #f59e0b;
  flex-shrink: 0;
}

.cookies-note {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin-top: var(--space-3);
  font-style: italic;
}

/* Aucun cookie publicitaire */
.no-cookies-badge {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: #e6f7e6;
  border: 2px solid #2e7d32;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
}

.no-cookies-badge i {
  color: #2e7d32;
}

.no-cookies-badge p {
  margin: 0;
  font-weight: 600;
  color: #2e7d32;
}

.highlight-note {
  padding: var(--space-3);
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  font-style: italic;
}

/* Consentement */
.consent-list {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0;
}

.consent-list li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.consent-list li i {
  color: #b27710;
}

.consent-simulation {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-4);
  padding: var(--space-3);
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
}

.consent-simulation p {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
}

/* Gestion des cookies */
.browser-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.browser-links a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.browser-links a:hover {
  background: var(--primary);
  color: white;
}

.browser-links a i {
  color: inherit;
}

/* Contact */
.contact-details {
  margin-top: var(--space-3);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.contact-item i {
  color: #b27710;
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-item strong {
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.contact-item span,
.contact-item a {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.contact-item span {
  margin-left: var(--space-1);
  color: var(--text-tertiary);
}

/* Signature finale */
.cookies-signature {
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 2px solid var(--border);
  text-align: center;
}

.cookies-signature p {
  color: var(--text-secondary);
  font-style: italic;
}

.signature-credit {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin-top: var(--space-2);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .cookies-hero {
    padding: var(--space-12) 0 var(--space-8);
  }
  
  .cookies-content {
    padding: var(--space-12) 0;
  }
  
  .section-card {
    padding: var(--space-4);
  }
  
  .consent-simulation {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .cookies-hero-meta {
    flex-direction: column;
    gap: var(--space-1);
  }
  
  .cookies-hero-meta .separator {
    display: none;
  }
  
  .no-cookies-badge {
    flex-direction: column;
    text-align: center;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

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

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACCESSIBILITÉ
   ═══════════════════════════════════════════════════════════════════════════ */

:focus-visible {
  outline: 2px solid #b27710;
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}