/* Styles généraux optimisés pour la vitesse */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Optimisation des images pour la vitesse */
img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #fffef7, #fff8dc);
  min-height: 100vh;
}

/* Navigation */
nav {
  background: #fff;
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

nav a {
  margin: 0 15px;
  color: #8b4513;
  text-decoration: none;
  font-weight: bold;
}

nav a:hover {
  text-decoration: underline;
}

.logo-section {
  display: flex;
  align-items: center;
}

.logo {
  margin-right: 10px;
}

.logo:hover {
  text-decoration: none;
}

.logo-text {
  font-weight: bold;
  font-size: 1.2rem;
  color: #8b4513;
}

.menu-links a {
  margin: 0 15px;
}

/* En-tête */
header {
  background: #fff8dc;
  text-align: center;
  padding: 2rem 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

header h1 {
  color: #8b4513;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

header p {
  color: #636e72;
  font-size: 1.1rem;
}

/* Contenu principal */
main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Cartes et sections */
.intro-card {
  background: #fff;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 4px 15px rgba(253, 203, 110, 0.3);
  border-left: 4px solid #fdcb6e;
  margin-bottom: 2rem;
  font-size: 1.1rem;
  line-height: 1.8;
}

.intro-card h2 {
  color: #8b4513;
  font-size: 1.4rem;
  margin: 0 0 1rem 0;
}

.intro-card p {
  margin-bottom: 1rem;
}

.highlight {
  background: #ffeaa7;
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 1.5rem;
  font-weight: bold;
  color: #2d3436;
  border-left: 4px solid #e17055;
}

.important-note {
  background-color: #f8f1e5;
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #8b4513;
  font-weight: 500;
  color: #5d4037;
  margin: 1.5rem 0;
  font-size: 1.2rem;
  line-height: 1.9;
}

.medical-warning {
  color: #c0392b;
  font-weight: bold;
}

/* Table des matières */
.table-of-contents {
  background: #fff;
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(253, 203, 110, 0.3);
  border-left: 4px solid #8b4513;
  position: static;
}

.table-of-contents h2 {
  color: #8b4513;
  font-size: 1.4rem;
  margin-top: 0;
  margin-bottom: 1rem;
  text-align: center;
}

.table-of-contents ul {
  display: block;
  list-style: none;
  padding: 0;
}

.table-of-contents li {
  margin-bottom: 0.5rem;
  background: #fff8dc;
  padding: 0.8rem;
  border-radius: 5px;
  transition: transform 0.2s ease;
}

.table-of-contents li:hover {
  transform: translateX(5px);
  background: #ffeaa7;
}

.table-of-contents a {
  display: block;
  color: #8b4513;
  text-decoration: none;
  font-weight: bold;
}

/* FAQ Arthrose */
.faq-arthrose {
  margin-top: 2rem;
  background: #f8f1e5;
  border-radius: 10px;
  padding: 1.5rem;
  border-left: 4px solid #8b4513;
}

.faq-arthrose h4 {
  color: #8b4513;
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: 1.3rem;
}

.faq-arthrose h5 {
  color: #8b4513;
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
  background: #fff;
  padding: 0.8rem 1rem;
  border-radius: 5px;
  border-left: 4px solid #fdcb6e;
}

.faq-arthrose p {
  padding: 0.5rem 1rem 1rem;
  border-left: 4px solid #f1f1f1;
  margin-left: 1rem;
  line-height: 1.7;
}

/* Titres de section */
h2 {
  color: #8b4513;
  font-size: 1.8rem;
  margin: 2rem 0 1rem 0;
  text-align: center;
  scroll-margin-top: 100px;
}

/* Listes */
ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

li {
  background: #fff;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(253, 203, 110, 0.3);
  border-left: 4px solid #fdcb6e;
  transition: transform 0.3s ease;
}

li:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(253, 203, 110, 0.4);
}

li a {
  color: #8b4513;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
}

li a:hover {
  text-decoration: underline;
}

/* Détails de contenu */
.content-detail {
  display: none;
  background: #fff;
  border-radius: 10px;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: 0 4px 15px rgba(253, 203, 110, 0.3);
  border-left: 4px solid #e17055;
  scroll-margin-top: 100px;
}

.content-detail:target {
  display: block !important;
  animation: slideIn 0.5s ease;
  z-index: 10;
  position: relative;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.content-detail h3 {
  color: #8b4513;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.content-detail h4 {
  color: #8b4513;
  margin: 1.5rem 0 0.5rem 0;
}

.content-detail ul {
  display: block;
  padding-left: 20px;
  margin-bottom: 1rem;
}

.content-detail li {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  margin-bottom: 0.5rem;
  transform: none;
  list-style: disc;
}

.content-detail ol {
  padding-left: 20px;
  margin-bottom: 1rem;
}

.content-detail ol li {
  list-style: decimal;
}

.close-btn {
  float: right;
  color: #8b4513;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: bold;
}

/* Infobulle */
.tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted #8b4513;
  cursor: help;
  outline: none;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 200px;
  background-color: #8b4513;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 8px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  font-size: 0.85rem;
  font-weight: normal;
}

.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #8b4513 transparent transparent transparent;
}

.tooltip:hover .tooltiptext,
.tooltip:focus .tooltiptext,
.tooltip:active .tooltiptext {
  visibility: visible;
}

/* Pied de page */
footer {
  background: #fff;
  text-align: center;
  padding: 1.5rem;
  margin-top: 3rem;
  color: #2d3436;
}

.medical-disclaimer {
  background-color: #fff8f8;
  border: 1px solid #ffcdd2;
  border-left: 4px solid #f44336;
  padding: 1rem;
  margin: 1rem auto;
  max-width: 1000px;
  border-radius: 4px;
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.5;
}

.medical-disclaimer strong {
  color: #d32f2f;
}

/* Responsive Design Optimisé */
@media (max-width: 992px) {
  main {
    padding: 0 2rem;
  }
  
  .content-detail {
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  nav {
    flex-direction: column;
    padding: 10px;
  }
  
  .logo-section {
    margin-bottom: 10px;
  }
  
  .menu-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: 100%;
  }
  
  .menu-links a {
    margin: 5px;
    padding: 10px 14px;
    background: #fff8dc;
    border-radius: 20px;
    font-size: 0.9rem;
    text-align: center;
    flex: 1 0 auto;
    min-width: 80px;
  }
  
  .logo-text {
    font-size: 1rem;
  }
  
  ul {
    grid-template-columns: 1fr;
  }
  
  header h1 {
    font-size: 1.8rem;
  }
  

  
  .intro-card {
    padding: 1.5rem;
  }
  
  .tooltip .tooltiptext {
    width: 160px;
    margin-left: -80px;
  }
}

@media (max-width: 480px) {
  main {
    padding: 0 1rem;
  }
  
  header h1 {
    font-size: 1.5rem;
  }
  
  .intro-card h2 {
    font-size: 1.2rem;
  }
  
  .content-detail h3 {
    font-size: 1.5rem;
  }
  
  .medical-disclaimer {
    font-size: 0.85rem;
    padding: 0.75rem;
  }
  
  .menu-links a {
    padding: 8px 10px;
    font-size: 0.85rem;
  }
}

/* Optimisations pour l'impression */
@media print {
  nav, footer, .close-btn {
    display: none;
  }
  
  body {
    background: white;
    color: black;
    font-size: 12pt;
  }
  
  .content-detail {
    display: block !important;
    break-inside: avoid;
  }
  
  a {
    color: black;
    text-decoration: none;
  }
  
  .medical-disclaimer {
    border: 1px solid #000;
    padding: 0.5rem;
    margin: 1rem 0;
  }
}