/* Coachix V2 — styles pages légales (RGPD, CGV, CGU, etc.) */

.legal-container {
  max-width: 860px;
  margin: 0 auto;
}

.legal-section h2 {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 56px 0 16px;
  color: var(--text);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-strong);
}

.legal-section h2:first-of-type {
  margin-top: 24px;
}

.legal-section h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--text);
}

.legal-section p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.legal-section p strong, .legal-section li strong {
  color: var(--text);
  font-weight: 700;
}

.legal-section a {
  color: var(--orange);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.legal-section a:hover {
  background: var(--orange);
  color: var(--bg);
  text-decoration: none;
  padding: 0 4px;
}

.legal-list {
  list-style: none;
  padding-left: 0;
  margin: 16px 0 24px;
}

.legal-list li {
  position: relative;
  padding-left: 26px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.legal-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 14px;
  height: 2px;
  background: var(--orange);
}

.legal-callout {
  background: var(--bg-2);
  border-left: 4px solid var(--orange);
  padding: 20px 24px;
  margin: 32px 0;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text);
}

.legal-callout strong {
  display: block;
  margin-bottom: 6px;
  color: var(--orange);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
}

.legal-table-wrapper {
  overflow-x: auto;
  margin: 24px 0 32px;
  border: 1px solid var(--border);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 600px;
}

.legal-table thead {
  background: var(--text);
  color: var(--bg);
}

.legal-table th {
  text-align: left;
  padding: 14px 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 12px;
}

.legal-table td {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.6;
  color: var(--text-dim);
}

.legal-table tr:nth-child(even) td {
  background: var(--bg-2);
}

.legal-link-btn {
  background: none;
  border: none;
  color: var(--orange);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.legal-link-btn:hover {
  background: var(--orange);
  color: var(--bg);
  text-decoration: none;
  padding: 0 4px;
}

.cookie-prefs-btn {
  cursor: pointer;
  background: none;
  border: 1px solid var(--border-strong);
  color: var(--text);
  font: inherit;
}

.cookie-prefs-btn:hover {
  background: var(--text);
  color: var(--bg);
}

/* ---------- Bandeau et modale de consentement cookies ---------- */
.cc-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 9998;
  background: var(--text);
  color: var(--bg);
  padding: 20px 24px;
  border: 2px solid var(--orange);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  font-size: 14.5px;
  line-height: 1.55;
}

@media (max-width: 768px) {
  .cc-banner {
    grid-template-columns: 1fr;
    bottom: 8px;
    left: 8px;
    right: 8px;
    padding: 18px 18px;
  }
}

.cc-banner strong {
  display: block;
  font-weight: 800;
  margin-bottom: 4px;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--orange);
}

.cc-banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cc-banner button {
  border: 0;
  padding: 12px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cc-btn-accept {
  background: var(--orange);
  color: var(--bg);
}

.cc-btn-accept:hover {
  background: #35B3E1;
}

.cc-btn-reject {
  background: transparent;
  color: var(--bg);
  border: 1px solid rgba(255, 251, 245, 0.4) !important;
}

.cc-btn-reject:hover {
  background: rgba(255, 251, 245, 0.1);
}

.cc-btn-prefs {
  background: transparent;
  color: var(--bg);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Modale */
.cc-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 51, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.cc-modal-inner {
  background: var(--bg);
  max-width: 640px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  border: 2px solid var(--text);
  padding: 32px;
}

.cc-modal h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.cc-modal p {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.cc-category {
  border: 1px solid var(--border);
  padding: 18px 20px;
  margin-bottom: 14px;
}

.cc-category-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  gap: 12px;
}

.cc-category-head h3 {
  font-size: 15px;
  font-weight: 800;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cc-category p {
  font-size: 13.5px;
  margin: 0;
  line-height: 1.6;
}

/* Toggle switch */
.cc-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

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

.cc-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #ccc;
  transition: 0.2s;
}

.cc-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  transition: 0.2s;
}

.cc-switch input:checked + .cc-slider {
  background: var(--orange);
}

.cc-switch input:checked + .cc-slider::before {
  transform: translateX(20px);
}

.cc-switch input:disabled + .cc-slider {
  background: #555;
  cursor: not-allowed;
}

.cc-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
  flex-wrap: wrap;
}

.cc-modal-actions button {
  border: 0;
  padding: 12px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cc-btn-save {
  background: var(--text);
  color: var(--bg);
}

.cc-btn-close {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong) !important;
}
