/* ==========================================================
   MediScribe : feuille de style des pages publiques
   Chargee uniquement sur /public/. Ne modifie pas style.css.
   Palette alignee sur hta-imprimable.html et tarifs.php.
   ========================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --vert:        #0A5659;
  --vert-fonce:  #074044;
  --teal:        #E0F2F2;
  --teal-clair:  #DFF0EF;
  --bordeaux:    #891022;
  --texte:       #1a1a1a;
  --texte-doux:  #555552;
  --anthracite:  #3A3A38;
  --bord:        #c6dedd;
  --blanc:       #ffffff;
  --font-titre:  'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-corps:  'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --rayon:       8px;
  --largeur:     760px;
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-corps);
  color: var(--texte);
  background: var(--blanc);
  line-height: 1.65;
  font-size: 1rem;
}

/* ---------- Barre superieure ---------- */
.topbar {
  background: var(--vert);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.topbar-logo {
  font-family: var(--font-titre);
  font-size: 1.25rem;
  color: var(--blanc);
  text-decoration: none;
}
.topbar-nav a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  text-decoration: none;
  margin-left: 18px;
}
.topbar-nav a:hover,
.topbar-nav a:focus { color: var(--blanc); text-decoration: underline; }

/* ---------- Structure ---------- */
.contenu-principal {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 32px 20px 64px;
}

/* ---------- Fil d'Ariane ---------- */
.fil-ariane {
  font-size: 0.82rem;
  color: var(--texte-doux);
  margin-bottom: 20px;
}
.fil-ariane ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.fil-ariane li::after { content: '›'; margin-left: 6px; color: var(--bord); }
.fil-ariane li:last-child::after { content: ''; }
.fil-ariane a { color: var(--vert); text-decoration: none; }
.fil-ariane a:hover { text-decoration: underline; }

/* ---------- Titres ---------- */
h1, h2, h3 {
  font-family: var(--font-titre);
  color: var(--vert);
  font-weight: 400;
  line-height: 1.25;
}
h1 { font-size: 2rem; margin-bottom: 20px; }
h2 { font-size: 1.45rem; margin: 40px 0 12px; }
h3 { font-size: 1.12rem; margin: 24px 0 8px; }

p { margin-bottom: 16px; }
p:last-child { margin-bottom: 0; }

a { color: var(--vert); }
a:hover { color: var(--vert-fonce); }

strong { font-weight: 700; }

ul, ol { margin: 0 0 16px 22px; }
li { margin-bottom: 7px; }

/* ---------- Bloc En bref (AEO et speakable) ---------- */
.en-bref {
  background: var(--teal);
  border-left: 4px solid var(--vert);
  padding: 20px 24px;
  border-radius: var(--rayon);
  margin: 0 0 32px;
}
.en-bref h2 {
  font-size: 1.05rem;
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: var(--font-corps);
  font-weight: 700;
}
.en-bref ul { margin: 0 0 0 20px; }
.en-bref li { margin-bottom: 8px; }
.en-bref li:last-child { margin-bottom: 0; }

/* ---------- Tableaux ---------- */
.tableau-wrap { overflow-x: auto; margin: 0 0 24px; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 380px;
}
th, td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--bord);
}
th {
  background: var(--teal-clair);
  color: var(--vert);
  font-weight: 700;
  font-size: 0.84rem;
}
td.nombre, th.nombre { text-align: right; }
tbody tr:last-child td { border-bottom: none; }

/* ---------- FAQ ---------- */
.faq { margin-top: 44px; }
.faq-item {
  border-bottom: 1px solid var(--bord);
  padding: 16px 0;
}
.faq-item:last-child { border-bottom: none; }
.faq-item h3 { margin: 0 0 8px; font-size: 1.05rem; }
.faq-item p { margin: 0; color: var(--anthracite); }

/* ---------- Appels a l'action ---------- */
.cta {
  margin: 44px 0 0;
  padding: 26px;
  background: var(--teal-clair);
  border-radius: var(--rayon);
  border: 1px solid var(--bord);
}
.cta p { margin-bottom: 16px; }
.cta a {
  display: inline-block;
  background: var(--vert);
  color: var(--blanc);
  padding: 11px 22px;
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  margin: 0 10px 8px 0;
}
.cta a:hover { background: var(--vert-fonce); color: var(--blanc); }
.cta a.secondaire { background: var(--bordeaux); }
.cta a.secondaire:hover { background: #6d0d1b; }

/* ---------- Mention tarifaire ---------- */
.mention-tarif {
  font-size: 0.85rem;
  color: var(--texte-doux);
  background: var(--teal);
  border-radius: var(--rayon);
  padding: 14px 18px;
  margin: 24px 0;
}
.mention-tva { font-size: 0.78rem; color: var(--texte-doux); }

/* ---------- Signature auteur ---------- */
.signature {
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--bord);
  font-size: 0.84rem;
  color: var(--texte-doux);
}

/* ---------- Pied de page ---------- */
.pied-public {
  background: var(--vert);
  color: rgba(255, 255, 255, 0.82);
  padding: 36px 20px 28px;
  font-size: 0.85rem;
}
.pied-inner { max-width: var(--largeur); margin: 0 auto; }
.pied-public h2 {
  color: var(--blanc);
  font-family: var(--font-corps);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 10px;
}
.pied-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 26px;
}
.pied-public ul { list-style: none; margin: 0; }
.pied-public li { margin-bottom: 7px; }
.pied-public a { color: rgba(255, 255, 255, 0.82); text-decoration: none; }
.pied-public a:hover,
.pied-public a:focus { color: var(--blanc); text-decoration: underline; }
.pied-bas {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.78rem;
}

/* ---------- Accessibilite ---------- */
.lien-evitement {
  position: absolute;
  left: -9999px;
  background: var(--vert);
  color: var(--blanc);
  padding: 10px 16px;
  z-index: 100;
}
.lien-evitement:focus { left: 8px; top: 8px; }

:focus-visible { outline: 3px solid var(--bordeaux); outline-offset: 2px; }

/* ---------- Meta lecture ---------- */
.meta-lecture {
  font-size: 0.82rem;
  color: var(--texte-doux);
  margin: -12px 0 26px;
}

/* ---------- Figures et graphiques ---------- */
.figure-courbe {
  margin: 28px 0 26px;
  padding: 0;
}
.figure-courbe img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  background: var(--blanc);
}
.figure-courbe figcaption {
  font-size: 0.8rem;
  color: var(--texte-doux);
  line-height: 1.55;
  margin-top: 10px;
}

/* ---------- Legende de tableau ---------- */
table caption.visuel-caption {
  caption-side: top;
  text-align: left;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--vert);
  padding: 0 0 8px;
}

/* ---------- Note de methode ---------- */
.note-methode {
  font-size: 0.85rem;
  color: var(--anthracite);
  background: #f5f8f8;
  border-left: 3px solid var(--bord);
  padding: 12px 16px;
  border-radius: 0 var(--rayon) var(--rayon) 0;
  margin: 24px 0;
}

/* ---------- Sources ---------- */
.sources { margin-top: 40px; }
.sources h2 { font-size: 1.15rem; margin-bottom: 10px; }
.sources ul { margin-left: 20px; }
.sources li { font-size: 0.85rem; color: var(--texte-doux); line-height: 1.6; }

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.25rem; margin-top: 32px; }
  .contenu-principal { padding: 24px 16px 48px; }
  .en-bref { padding: 16px 18px; }
  .cta { padding: 20px; }
  .meta-lecture { margin: -8px 0 20px; }
  .figure-courbe { margin: 22px -16px; }
  .figure-courbe img { border-left: none; border-right: none; border-radius: 0; }
  .figure-courbe figcaption { padding: 0 16px; }
  table { font-size: 0.82rem; min-width: 320px; }
  th, td { padding: 8px 10px; }
}

/* ---------- Impression ---------- */
@media print {
  .topbar, .pied-public, .cta, .fil-ariane { display: none; }
  .figure-courbe { break-inside: avoid; page-break-inside: avoid; }
  body { font-size: 11pt; }
  a { text-decoration: none; color: var(--texte); }
}

/* ---------------------------------------------------------------
   Bloc de demonstration video, page gestion des programmes ETP
   --------------------------------------------------------------- */
.bloc-demo-video {
  margin: 2.6rem 0;
}
.demo-video-cadre {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #04302f;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(10, 86, 89, .18);
}
.demo-video-cadre iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.demo-video-legende {
  margin-top: .8rem;
  font-size: .88rem;
  color: #5a6e70;
}
@media print {
  .bloc-demo-video { display: none; }
}
