html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #1a1a2e;
  color: #e0e0e0;
}

a {
  color: #5dade2;
}
a:visited {
  color: #a78bda;
}
a:hover {
  color: #85c7f2;
}

header {
  background: #0f3460;
  color: #e0e0e0;
  text-align: center;
  padding: 24px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: #5dade2;
  color: #0f3460;
  padding: 8px 16px;
  z-index: 100;
  font-weight: bold;
}
.skip-link:focus {
  top: 0;
}

.container {
  max-width: 1200px;
  margin: 30px auto;
  background: #16213e;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.intro {
  padding: 24px 24px 0 24px;
  margin: 0;
  line-height: 1.7;
}

.tabs {
  display: flex;
  flex-wrap: nowrap;
  background: #0f3460;
  border-bottom: 1px solid #1a3a6a;
}

.tab-button {
  flex: 1 1 0;
  padding: 14px 6px;
  border: none;
  background: transparent;
  color: #c8d8e8;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  transition: background 0.2s;
  text-align: center;
  line-height: 1.3;
}

.tab-button:hover {
  background: #1a3a6a;
}

.tab-button:focus-visible {
  outline: 2px solid #5dade2;
  outline-offset: -2px;
}

.tab-button[aria-selected="true"] {
  background: #16213e;
  color: #5dade2;
  border-bottom: 3px solid #5dade2;
}

.tab-content {
  display: none;
  padding: 24px;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.25s ease-in;
}

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

h2 {
  color: #5dade2;
  margin-top: 0;
}

h3 {
  color: #85c7f2;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

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

.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-top: 16px;
}

.table-responsive table {
  margin-top: 0;
}
.table-responsive-wide table {
  min-width: 720px;
}

th, td {
  border: 1px solid #1a3a6a;
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #0f3460;
  color: #e0e0e0;
}

tr:nth-child(even) {
  background: #1a2744;
}

ul {
  line-height: 1.7;
}

.note {
  margin-top: 18px;
  padding: 12px;
  background: #1a2744;
  border-left: 5px solid #5dade2;
  border-radius: 6px;
}

.timeline {
  position: relative;
  padding-left: 32px;
  margin-top: 20px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #5dade2;
  border-radius: 2px;
}
.timeline-item {
  position: relative;
  margin-bottom: 24px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 6px;
  width: 12px;
  height: 12px;
  background: #5dade2;
  border-radius: 50%;
  border: 2px solid #16213e;
  box-shadow: 0 0 0 2px #5dade2;
}
.timeline-year {
  font-weight: bold;
  color: #5dade2;
  font-size: 15px;
}
.timeline-text {
  line-height: 1.7;
  margin-top: 2px;
}
.profile-card {
  border: 1px solid #1a3a6a;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  background: #1a2744;
}
.profile-name {
  font-weight: bold;
  color: #5dade2;
  font-size: 16px;
  margin-bottom: 6px;
}
.profile-tag {
  display: inline-block;
  background: #0f3460;
  color: #c8d8e8;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

/* Glossaire */
.glossaire-wrapper {
  max-width: 720px;
  margin: 0 auto;
}
.glossaire-list {
  margin: 0 0 24px 0;
  padding: 0;
}
.glossaire-entry {
  display: flex;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #1a3a6a;
  line-height: 1.6;
}
.glossaire-entry dt {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: bold;
  color: #5dade2;
  white-space: nowrap;
  flex-shrink: 0;
}
.glossaire-entry dd {
  margin: 0;
  color: #e0e0e0;
}
.glossaire-entry code {
  background: #0f3460;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 13px;
  color: #85c7f2;
}

@media (max-width: 600px) {
  .glossaire-entry {
    flex-direction: column;
    gap: 2px;
  }
}

footer {
  text-align: center;
  padding: 20px;
  color: #8ea4c4;
  font-size: 13px;
}

/* Burger — masqué par défaut sur desktop */
.burger {
  display: none;
  background: #0f3460;
  border: none;
  cursor: pointer;
  padding: 14px 18px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 100%;
  border-bottom: 1px solid #1a3a6a;
}
.burger-line {
  display: block;
  width: 24px;
  height: 3px;
  background: #c8d8e8;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.burger[aria-expanded="true"] .burger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.burger[aria-expanded="true"] .burger-line:nth-child(2) {
  opacity: 0;
}
.burger[aria-expanded="true"] .burger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 900px) {
  .burger {
    display: flex;
  }

  .tabs {
    flex-direction: column;
    display: none;
  }
  .tabs.open {
    display: flex;
  }

  .tab-button {
    font-size: 14px;
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid #1a3a6a;
  }

  .tab-button[aria-selected="true"] {
    border-bottom: 1px solid #1a3a6a;
    border-left: 3px solid #5dade2;
  }

  table, thead, tbody, th, td, tr {
    font-size: 14px;
  }
}

/* Bandeau cookies */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0f3460;
  color: #e0e0e0;
  padding: 18px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  z-index: 1000;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.5);
  border-top: 2px solid #5dade2;
}
.cookie-banner p {
  flex: 1 1 300px;
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}
.cookie-banner .cookie-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.cookie-banner button {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}
.cookie-btn-accept {
  background: #5dade2;
  color: #0f3460;
}
.cookie-btn-accept:hover {
  background: #85c7f2;
}
.cookie-banner .cookie-btn-refuse {
  background: transparent;
  color: #c8d8e8;
  border: 1px solid #c8d8e8;
}
.cookie-banner .cookie-btn-refuse:hover {
  background: #1a3a6a;
}
.cookie-banner[hidden] {
  display: none;
}

/* Sections légales (footer) */
.legal-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px;
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  font-size: 12px;
  color: #8ea4c4;
}
.legal-section.active {
  display: block;
}
.legal-section h2 {
  color: rgba(255, 255, 255, 0.4);
  margin-top: 0;
  font-size: 14px;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.legal-section h3 {
  color: rgba(255, 255, 255, 0.35);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.legal-section p,
.legal-section li {
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.3);
}
.legal-section a {
  color: rgba(93, 173, 226, 0.5);
}
.legal-section a:hover {
  color: rgba(93, 173, 226, 0.7);
}
.legal-section address {
  font-style: normal;
  line-height: 1.6;
  margin-bottom: 12px;
}
.legal-section strong {
  color: rgba(255, 255, 255, 0.4);
  font-weight: normal;
}
.legal-back {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  text-decoration: none;
  font-size: 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.legal-back:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
}

/* Sous-onglets Visuels */
.sub-tabs {
  display: flex;
  gap: 0;
  background: #0f3460;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  margin-bottom: 0;
}
.sub-tab-button {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: #c8d8e8;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  transition: background 0.2s;
  text-align: center;
}
.sub-tab-button:hover {
  background: #1a3a6a;
}
.sub-tab-button.sub-tab-active {
  background: #16213e;
  color: #5dade2;
  border-bottom: 3px solid #5dade2;
}
.sub-tab-content {
  display: none;
}
.sub-tab-content.sub-tab-visible {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .tab-content.active {
    animation: none;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
  }
  header {
    background: none;
    color: #000;
    border-bottom: 2px solid #000;
  }
  .tabs {
    display: none;
  }
  .tab-content {
    display: block !important;
    padding: 16px 0;
    border-bottom: 1px solid #ccc;
  }
  .container {
    box-shadow: none;
    background: #fff;
  }
  h2 { color: #000; }
  h3 { color: #333; }
  a { color: #000; text-decoration: underline; }
  th { background: #eee; color: #000; }
  th, td { border-color: #999; }
  tr:nth-child(even) { background: #f5f5f5; }
  .note { background: #f0f0f0; border-left-color: #333; }
  .skip-link { display: none; }
  .cookie-banner { display: none !important; }
  .profile-card { background: #f5f5f5; border-color: #999; }
  .profile-name { color: #000; }
  .profile-tag { background: #eee; color: #333; }
  .timeline::before { background: #333; }
  .timeline-item::before { background: #333; border-color: #fff; box-shadow: 0 0 0 2px #333; }
  .timeline-year { color: #000; }
  footer { color: #666; }
}
