@charset "UTF-8";

/* =========================================================
   COCOON PROTHESE DU GENOU
   CSS UNIFIÉE – PAGE MÈRE + PAGES FILLES
   ---------------------------------------------------------
   FICHIERS HTML PRINCIPAUX :
   - prothese-de-genou-essentiel.html (page mère)
   - prothese-genou-indications.html
   - prothese-genou-technique.html
   - prothese-genou-hospitalisation.html
   - prothese-genou-reeducation.html
   - prothese-genou-resultats.html
   - prothese-genou-sur-mesure.html
   ---------------------------------------------------------
   JS ASSOCIÉS :
   - /js/prothese-toc-index.js  → sommaire mobile de la page mère
   - /js/prothese-toc.js        → sommaire H2 automatique sur pages filles
   ========================================================= */


/* =========================================================
   1. VARIABLES GLOBALES / RESET
   ========================================================= */

:root {
  /* Palette “scientifique et sympa” */
  --blue-main: #0070BD;         /* H2, liens, boutons */
  --blue-dark: #003F7F;         /* H1, header, nav */
  --blue-soft: #E6F2FA;         /* fonds encadrés/sommaire */
  --text: #333333;              /* texte courant */
  --text-soft: #555555;         /* H4, légendes */
  --muted: #999999;             /* notes discrètes */
  --bg: #FFFFFF;                /* fond */
  --shadow: 0 6px 20px rgba(0,0,0,.06);
  --radius: 12px;
  --radius-lg: 16px;
  --container: 1200px;

  --font-title: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Reset simple */
*, *::before, *::after { box-sizing: border-box; }
img { display: block; max-width: 100%; height: auto; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
}

/* =========================================================
  POUR VALIDER LE CHARGEMENT DE CSS ET JS	
   ---------------------------------------------------------*/

 
	body::after{
  content:"CSS OK";
  position:fixed; right:8px; bottom:8px; padding:.25rem .5rem;
  background:#000; color:#fff; font:12px/1.2 monospace; z-index:9999; opacity:.7;
}
body[data-js="ok"]::after{ content:"CSS+JS OK"; background:#0a0; }



/* =========================================================
   2. HEADER SIMPLE (toutes les pages du cocon)
   ---------------------------------------------------------
   HTML attendu (extrait) :
   <header class="site-header simple-header">
     <div class="header-inner">
       <a href="/index.htm" class="brand-link">
         <span class="brand-title">Dr&nbsp;Jean-Etienne&nbsp;Perraudin</span>
         <span class="brand-subtitle">Chirurgien orthopédiste – Spécialisé dans le genou</span>
       </a>
       <a class="btn-rdv" href="/contact.html">RDV</a>
     </div>
   </header>
   ========================================================= */

.simple-header {
  background: linear-gradient(90deg, var(--blue-dark), var(--blue-main));
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  margin-bottom: 1rem;
}

.simple-header .header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.brand-link {
  color: #fff;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.3;
}

.brand-subtitle {
  font-size: 0.95rem;
  opacity: 0.9;
  line-height: 1.2;
}

/* Bouton RDV */
.btn-rdv {
  background: #fff;
  color: var(--blue-dark);
  text-decoration: none;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
  font-family: var(--font-title);
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-rdv:hover {
  background: var(--blue-soft);
  color: var(--blue-dark);
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

/* Responsive header */
@media (max-width: 551px) {
  .simple-header .header-inner {
    flex-direction: column;
    text-align: center;
  }
  .btn-rdv {
    margin-top: 0.4rem;
  }
}

/* =========================================================
   3. TYPOGRAPHIE / PARAGRAPHES
   ========================================================= */

h1, h2, h3, h4 {
  line-height: 1.25;
  margin: .2em 0 .5em ;
}

h1 {
  font-family: var(--font-title);
  color: var(--blue-dark);
  font-size: 2.2rem;
  margin-top: .2rem;
}

h2 {
  font-family: var(--font-title);
  color: var(--blue-main);
  font-size: 1.6rem;
  margin-top: 1.6rem;
}

h3 {
  color: var(--text);
  font-size: 1.3rem;
  font-weight: 700;
}

h4 {
  color: var(--text-soft);
  font-size: 1.1rem;
  font-style: italic;
}

p {
  text-indent: 35px;
}

/* tailles texte adaptatives */
@media (max-width: 551px) {
  body {
    font-size: 16px;
    line-height: 1.6;
    padding: 0 8px;
  }
  main {
    padding: 16px;
  }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.15rem; }
}
/* ================================
   H1 : centrage premium + largeur réduite
   ================================ */
.page-with-toc h1 {
  text-align: center;
  max-width: 900px;
  margin: 1.2rem auto 1.8rem auto;
  line-height: 1.25;
  font-size: 2rem;
  font-weight: 700;
  color: #003F7F; /* ton bleu foncé scientifique */
}

@media (min-width: 768px) {
  .page-with-toc h1 {
    font-size: 2.4rem;
  }
}
/* =========================================================
   4. LAYOUT GÉNÉRAL
   ========================================================= */

/* ======================================
   TITRE PLEINE LARGEUR AU-DESSUS DU SOMMAIRE
   ====================================== */
.page-title-block {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.page-title-block h1 {
  font-size: 2rem;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.page-title-block p {
  margin: 0;
  color: var(--muted, #555);
  font-size: 0.95rem;
	text-align: left
}

/* Mobile optimisation */
@media (max-width: 767px){
  .page-title-block {
    padding: 2rem 1rem 1rem;
  }
  .page-title-block h1 {
    font-size: 1.6rem;
  }
}


/* 4.1 Page MÈRE – grille 2 colonnes (sommaire desktop + contenu)
   --------------------------------------------------------------
   HTML attendu (page mère prothese-de-genou-essentiel.html) :

   <div class="wrap">
     <aside class="toc">... sommaire desktop ...</aside>
     <div class="col-main">
       <button class="toc-toggle" ...>☰ Afficher le sommaire...</button>
       <nav id="toc-mobile" class="toc toc--mobile toc--anim" hidden> ... </nav>
       <main id="contenu"> ... contenu ... </main>
     </div>
   </div>
*/

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
}

/* Colonne droite (sommaire mobile + contenu) */
.col-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Zone de contenu principale */
main {
  background: #fff;
  border: 1px solid #EEF1F5;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
}

/* 4.2 Pages FILLES – main.page-with-toc
   -------------------------------------
   HTML attendu (exemple hospitalisation) :

   <main class="page-with-toc">
     <h1>...</h1>
     <p>...</p>
     <nav id="toc" aria-label="Sommaire">
       <button class="toc-toggle" ...>Sommaire</button>
       <div class="toc-heading none-si-inf-768" role="heading" aria-level="2">Sommaire</div>
       <ol id="toc-list" class="toc-list"></ol>
     </nav>
     <div class="page-body">
       ... contenu avec h2, h3, etc. ...
     </div>
   </main>
*/

.page-with-toc {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px;
}

@media (min-width: 768px) {
  .page-with-toc {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    align-items: start;
  }
}
/* ============================================
   Centrer le contenu principal en desktop
   ============================================ */
@media (min-width: 768px) {
  .page-body {
    max-width: 900px;       /* largeur premium, centrée */
    margin: 0 auto;         /* centrage horizontal */
    padding-top: 0.5rem;    /* optionnel, équilibre visuel */
  }
}
/* =========================================================
   5. SOMMAIRES (TOC)
   ========================================================= */

/* =============== rajout 17 37  =============== */
/* Sommaire – base */
#toc {
  margin: 1.5rem 0;
}

#toc-list {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

/* Mobile : bouton + sommaire rétractable */
@media (max-width: 767px) {
  .page-with-toc {
    display: block;
  }

  #toc .toc-heading.none-si-inf-768 {
    display: none;
  }

  #toc-list {
    display: none;
  }

  #toc[data-open="true"] #toc-list {
    display: block;
    margin-top: 0.5rem;
  }
}

/* Desktop : sommaire fixe à gauche */
@media (min-width: 768px) {
  .page-with-toc {
    display: grid;
    grid-template-columns: minmax(230px, 280px) 1fr;
    gap: 2rem;
    align-items: flex-start;
  }

  #toc {
    position: sticky;
    top: 96px; /* à ajuster selon la hauteur de ton header */
  }

  .toc-toggle {
    display: none;
  }

  #toc .toc-heading.none-si-inf-768 {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
  }

  #toc-list {
    display: block;
  }
}
/* =============== 5.1 Base commune =============== */

#toc {
  z-index: 3;
}

#toc .toc-list {
  margin: .75rem 0 0 1.25rem;
  padding: 0;
}

#toc .toc-list > li {
  margin: .35rem 0;
}

#toc a {
  text-decoration: none;
  color: var(--blue-main);
}

#toc a:hover {
  text-decoration: underline;
}

/* Surbrillance de la section active (pages filles avec JS IntersectionObserver) */
#toc a.active {
  font-weight: 700;
}

/* “Sommaire” (texte de titre) visible uniquement en desktop */
.none-si-inf-768 { display: none; }
@media (min-width: 768px) {
  .none-si-inf-768 { display: block; }
}

/* On s’assure que le TOC reste cliquable, même avec des z-index ailleurs */
#toc, #toc * {
  pointer-events: auto;
}

/* =============== 5.2 Page FILLES – nav#toc dans .page-with-toc =============== */

/* Desktop : nav#toc devient sticky à gauche et toujours ouvert */
@media (min-width: 768px) {
  .page-with-toc #toc {
    position: sticky;
    top: 88px;
    height: fit-content;
  }
  .page-with-toc #toc .toc-toggle { display: none; }
  .page-with-toc #toc .toc-list   { display: block !important; }
}

/* Mobile : accordéon, bouton visible */
@media (max-width: 767px) {
  .page-with-toc {
    display: block;
    max-width: var(--container);
    margin: 0 auto;
    padding: 16px;
  }
  .page-with-toc #toc {
    position: relative;
    top: auto;
    z-index: 9999; /* pour passer devant si besoin */
  }
  .page-with-toc #toc .toc-toggle {
    display: inline-flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
  }
  .page-with-toc #toc[data-open="false"] .toc-list {
    display: none !important;
  }
}

/* =============== 5.3 Page MÈRE – aside.toc + sommaire mobile =============== */

/* Sommaire desktop dans la colonne de gauche */
aside.toc {
  position: sticky;
  top: 16px;
  align-self: start;
  background: #F7FAFC;
  border: 1px solid #E6EAF0;
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  height: max-content;
}

.toc small {
  color: var(--muted);
  display: block;
  margin-bottom: 10px;
}

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc li {
  margin: 8px 0;
}

/* Bouton toggle pour mobile (page mère) */
.toc-toggle {
  display: none; /* visible uniquement en mobile sur la page mère */
  width: 100%;
  background: #F7FAFC;
  border: 1px solid #E6EAF0;
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 12px 0 0;
  font-weight: 600;
  text-align: left;
}

/* Nav mobile cloné (id="toc-mobile") */
#toc-mobile {
  /* même aspect général que le TOC */
}

.toc--mobile {
  position: static;
  margin-top: 8px;
}

/* Animation d’ouverture/fermeture du sommaire mobile */
[hidden] {
  display: none !important;
}

.toc--anim {
  overflow: hidden;
  max-height: 0;
  transition: max-height .28s ease;
}

.toc--anim.is-open {
  max-height: 1000px;
}

/* Réduction des animations si préférence utilisateur */
@media (prefers-reduced-motion: reduce) {
  .toc--anim { transition: none; }
}

/* Mobile : le sommaire desktop disparaît, le bouton apparaît */
@media (max-width: 768px) {
  .wrap {
    grid-template-columns: 1fr;
  }
  aside.toc {
    display: none;
  }
  .toc-toggle {
    display: block;
  }
}

/* Desktop : on cache le TOC mobile */
@media (min-width: 768px) {
  #toc-mobile {
    display: none !important;
  }
}

/* Corrections de scroll sur mobile pour les ancres (pages filles) */
@media (max-width: 767px) {
  main h2[id] {
    scroll-margin-top: 20px;
  }
}

/* =========================================================
   6. BREADCRUMB
   ---------------------------------------------------------
   HTML type :

   <nav class="breadcrumb" aria-label="Fil d’Ariane">
     <ol>
       <li><a href="/index.htm">Accueil</a></li>
       <li>...</li>
     </ol>
   </nav>
   ========================================================= */

.breadcrumb {
  font-size: 0.9rem;
  margin: 0 0 1rem 0;
}
.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.breadcrumb li::after {
  content: "›";
  margin-left: 0.35rem;
}
.breadcrumb li:last-child::after {
  content: "";
}
.breadcrumb a {
  text-decoration: none;
  color: var(--blue-dark);
}
.breadcrumb a:hover {
  text-decoration: underline;
}

/* =========================================================
   7. ENCADRÉS, GRILLES, CARTES
   ========================================================= */

/* Encadré type “note” */
.note {
  background: var(--blue-soft);
  border-left: 4px solid var(--blue-main);
  padding: 12px 14px;
  border-radius: 8px;
  margin: 16px 0;
}

/* Grille de points clés (2 colonnes) */
.keypoints {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0,1fr));
}
.keypoints .card {
  background: #fff;
  border: 1px solid #EAEFF5;
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

/* Grille de cartes vers pages filles (sommaire visuel page mère) */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  margin: 14px 0 50px;
  justify-content: center;
  row-gap: 50px;
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid #E6EAF0;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  transition: transform .06s ease, box-shadow .2s ease;
  min-height: 100%;
}
.card-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0,0,0,.08);
}
.card-link h3 {
  margin-top: 0;
}
.card-link p {
  margin: .4rem 0 0;
  color: #444;
}

/* Cartes avec images */
.card-link .card-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background-color: #E6F2FA;
  margin-bottom: 16px;
}
.card-link .card-img img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
  transition: transform .3s ease;
}
.card-link:hover .card-img img {
  transform: scale(1.05);
}

/* Helpers de cadrage image */
.img-top          { object-position: center top; }
.img-bottom       { object-position: center bottom; }
.img-left         { object-position: left center; }
.img-right        { object-position: right center; }
.img-top-left     { object-position: left top; }
.img-top-right    { object-position: right top; }
.img-bottom-left  { object-position: left bottom; }
.img-bottom-right { object-position: right bottom; }

/* Grille 1fr/1fr pour images + texte (intro page mère, radios PTG, etc.) */
.grid-1fr-1fr {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: center;
  justify-content: center;
  gap: 10px;
}
.grid-1fr{
	 display: grid;
  grid-template-columns: 1fr ;
  align-content: center;
  justify-content: center;
  
}
.flex-col-texte,
.flex-col-image {
  display: flex;
  flex-flow: column wrap;
  justify-content: center;
  align-items: flex-start;
  text-align:left
}

/* Responsive grilles */
@media (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
  .keypoints {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .keypoints {
    grid-template-columns: 1fr;
  }
	/*modifié le 14 11*/
  .grid-1fr-1fr {
    grid-template-columns: 1fr 1fr;
  }
}

/* =========================================================
   8. BOUTONS / CTA
   ========================================================= */

.cta {
  display: inline-block;
  background: var(--blue-main);
  color: #fff;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  transition: transform .06s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,.05);
}
.cta:hover {
  background: #005A9E;
  transform: translateY(-1px);
}

/* Boutons côte à côte */
.button-in-line {
  display: flex;
  flex-flow: row wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

/* Bouton retour type “← Retour à l’essentiel” */
.cta-back {
  display: inline-block;
  margin: 10px 0 20px;
  padding: 8px 14px;
  background: var(--blue-soft);
  border-radius: 8px;
  text-decoration: none;
  color: var(--blue-dark);
  font-weight: 500;
}
.cta-back:hover {
  text-decoration: underline;
}
/* =========================================================
   9. FAQ (details/summary)
   ---------------------------------------------------------
   HTML type (extrait page mère) :

   <section class="faq-section">
     <h2 id="faq-prothese-courte">Questions fréquentes</h2>
     <details class="faq-item">
       <summary>…</summary>
       <div class="faq-answer">…</div>
     </details>
   </section>
   ========================================================= */

.faq-section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.faq-intro {
  margin-top: 0;
}

details {
  border: 1px solid #E6EAF0;
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 10px 0;
  background: #fff;
}

summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--blue-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-answer p {
  text-indent: 0; /* pas de retrait dans les réponses */
}

/* =========================================================
   10. FOOTER
   ========================================================= */

.site-footer {
  background: var(--blue-dark);
  color: #fff;
  font-size: 0.95rem;
  margin-top: 2rem;
  line-height: 1.5;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.footer-col h3,
.footer-col h4 {
  font-family: var(--font-title);
  color: #fff;
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.footer-col p {
  margin: 0.4rem 0;
  color: #f2f2f2;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin: 0.25rem 0;
}

.footer-col a {
  color: #ffffff;
  opacity: 0.9;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.footer-col a:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer-bottom {
  background: var(--blue-main);
  color: #fff;
  font-size: 0.9rem;
}

.footer-bottom-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
}

.footer-bottom a {
  color: #fff;
  opacity: 0.9;
  text-decoration: none;
}
.footer-bottom a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ============================================================
   SOMMAIRE FAQ (toc-faq)
   Style A — Numéros cerclés premium, cohérent avec le cocon
   ============================================================ */

.toc-faq ol.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc-counter;
}

.toc-faq ol.toc-list li {
  counter-increment: toc-counter;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0;
}

.toc-faq ol.toc-list li::before {
  content: counter(toc-counter);
  display: flex;
  align-items: center;
  justify-content: center;

  width: 28px;
  height: 28px;

  font-size: 0.95rem;
  font-weight: 600;
  color: var(--blue-dark);

  background: var(--blue-soft);
  border: 2px solid var(--blue-main);
  border-radius: 50%;

  flex-shrink: 0;
}

.toc-faq ol.toc-list a {
  text-decoration: none;
  color: var(--blue-main);
  font-size: 1rem;
  line-height: 1.4;
}

.toc-faq ol.toc-list a:hover {
  text-decoration: underline;
}

/* Icône médicale dans le titre du sommaire FAQ */
.toc-faq .toc-heading {
  font-weight: 700;
  color: var(--blue-dark);
  font-family: Poppins, sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.toc-faq .toc-heading::before {
  content: "⚕️"; /* Icône médicale */
  font-size: 1.2rem;
  color: var(--blue-main);
}

/* Micro animation premium sur les pastilles */
.toc-faq ol.toc-list li::before {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.toc-faq ol.toc-list li:hover::before {
  transform: scale(1.08);
  box-shadow: 0 0 6px rgba(0,112,189,0.25);
}

    /* Bloc références homogène avec les autres pages (si pas déjà dans le CSS global) */
    #references{
      background-color:#E6F2FA;
      padding:2rem;
      margin-top:2rem;
      border-radius:12px;
    }
    #references h3{
      color:#0070BD;
      margin-top:0;
    }
    #references ol{
      padding-left:1.5rem;
      line-height:1.6;
    }
    #references a{
      color:#003F7F;
      text-decoration:none;
    }
    #references a:hover{
      text-decoration:underline;
    }
    .back-to-text{
      margin-left:0.5rem;
      font-size:0.9em;
    }
