/* ==========================================================================
   Smart Health — vitrine.css (site public)
   Mêmes couleurs que l'application ; le motif signature est la bande des
   quatre couleurs du triage des urgences.
   ========================================================================== */

:root {
  --encre: #0b3b38;          /* vert profond du menu de l'application */
  --encre-douce: #33524f;
  --vert: #0f766e;           /* actions */
  --vert-fonce: #115e59;
  --vert-clair: #ccfbf1;
  --papier: #f5f8f7;         /* blanc clinique légèrement vert */
  --blanc: #ffffff;
  --trait: #d8e3e1;
  --gris: #5b6f6c;

  --rouge: #dc2626;
  --orange: #ea580c;
  --jaune: #facc15;
  --vert-triage: #16a34a;

  --titre: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --texte: "Inter", "Segoe UI", system-ui, sans-serif;
  --largeur: 1180px;
  --rayon: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: var(--texte);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--vert); }
a:hover { color: var(--vert-fonce); }
:focus-visible { outline: 3px solid var(--vert); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--titre); font-weight: 700; line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4.1rem); font-weight: 750; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
p { margin: 0; }

.conteneur { width: 100%; max-width: var(--largeur); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.intro { max-width: 640px; }
.intro p { margin-top: 1rem; color: var(--gris); font-size: 1.12rem; }

/* ---------- Boutons ---------- */
.bouton {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.3rem;
  border-radius: 10px; border: 1.5px solid var(--vert);
  background: var(--vert); color: #fff;
  font: 600 1rem/1.2 var(--texte); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s ease, border-color .15s ease;
}
.bouton:hover { background: var(--vert-fonce); border-color: var(--vert-fonce); color: #fff; }
.bouton-clair { background: transparent; color: var(--encre); border-color: var(--trait); }
.bouton-clair:hover { background: var(--blanc); color: var(--encre); border-color: var(--encre-douce); }
.bouton-petit { min-height: 40px; padding: .5rem 1rem; font-size: .95rem; }

/* ---------- En-tête ---------- */
.entete {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 248, 247, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--trait);
}
.entete .conteneur { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.marque { white-space: nowrap; display: inline-flex; align-items: center; gap: .6rem; color: var(--encre); text-decoration: none; font-family: var(--titre); font-weight: 750; font-size: 1.25rem; letter-spacing: -0.02em; }
.marque .logo { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--encre); color: #5eead4; font-size: 1.1rem; }
.menu { display: flex; gap: 1.4rem; margin-left: .5rem; }
.menu a { color: var(--encre-douce); text-decoration: none; font-size: .95rem; font-weight: 500; white-space: nowrap; }
.menu a:hover { color: var(--vert); }
.entete-actions { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.bouton-menu { display: none; background: none; border: 0; color: var(--encre); font-size: 1.6rem; padding: .3rem; cursor: pointer; }

/* « Accéder à mon hôpital » */
.acces { position: relative; }
.acces > summary { list-style: none; cursor: pointer; }
.acces > summary::-webkit-details-marker { display: none; }
.texte-court { display: none; }
.acces-panneau {
  position: absolute; right: 0; top: calc(100% + .6rem); width: min(360px, 90vw);
  padding: 1.1rem; border-radius: var(--rayon);
  background: var(--blanc); border: 1px solid var(--trait); box-shadow: 0 18px 40px rgba(11, 59, 56, .16);
}
.acces-panneau p { font-size: .9rem; color: var(--gris); margin-bottom: .75rem; }
.adresse { display: flex; align-items: stretch; border: 1.5px solid var(--trait); border-radius: 10px; overflow: hidden; background: var(--blanc); }
.adresse:focus-within { border-color: var(--vert); }
.adresse input { flex: 1; min-width: 0; border: 0; padding: .65rem .75rem; font: inherit; font-size: .95rem; outline: none; }
.adresse span { display: flex; align-items: center; padding: 0 .7rem; background: var(--papier); color: var(--gris); font-size: .85rem; white-space: nowrap; }
.acces-panneau .bouton { width: 100%; justify-content: center; margin-top: .75rem; }

/* ---------- Ouverture ---------- */
.ouverture { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3.5rem, 7vw, 5rem); }
.ouverture .conteneur { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.ouverture h1 { max-width: 15ch; }
.ouverture .chapeau { margin-top: 1.4rem; max-width: 56ch; font-size: 1.18rem; color: var(--encre-douce); }
.ouverture .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.atouts { list-style: none; margin: 2.2rem 0 0; padding: 0; display: grid; gap: .55rem; color: var(--encre-douce); font-size: .97rem; }
.atouts li { display: flex; align-items: center; gap: .6rem; }
.atouts i { color: var(--vert); font-size: 1.1rem; }

/* L'écran des urgences, tel qu'il apparaît dans le logiciel */
.ecran {
  background: var(--blanc); border-radius: 18px; border: 1px solid var(--trait);
  box-shadow: 0 30px 60px -20px rgba(11, 59, 56, .28), 0 2px 6px rgba(11, 59, 56, .06);
  overflow: hidden;
}
.ecran-barre { display: flex; align-items: center; gap: .6rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--trait); font-weight: 600; font-size: .95rem; }
.ecran-barre i { color: var(--rouge); }
.ecran-barre small { margin-left: auto; color: var(--gris); font-weight: 500; }
.compteurs { display: grid; grid-template-columns: repeat(4, 1fr); }
.compteur { padding: .7rem .9rem; border-bottom: 1px solid var(--trait); }
.compteur + .compteur { border-left: 1px solid var(--trait); }
.compteur strong { display: block; font-family: var(--titre); font-size: 1.55rem; line-height: 1.1; }
.compteur span { font-size: .78rem; color: var(--gris); }
.compteur.rouge { box-shadow: inset 0 4px 0 var(--rouge); }
.compteur.orange { box-shadow: inset 0 4px 0 var(--orange); }
.compteur.jaune { box-shadow: inset 0 4px 0 var(--jaune); }
.compteur.vert { box-shadow: inset 0 4px 0 var(--vert-triage); }
.file { list-style: none; margin: 0; padding: .4rem 0; }
.file li { display: grid; grid-template-columns: 6px 1fr auto; gap: .9rem; align-items: center; padding: .65rem 1.1rem .65rem 0; }
.file li + li { border-top: 1px solid #edf2f1; }
.file .bande { align-self: stretch; border-radius: 0 4px 4px 0; }
.file .motif { font-weight: 600; font-size: .95rem; line-height: 1.3; }
.file .motif small { display: block; font-weight: 400; color: var(--gris); font-size: .82rem; }
.file .attente { text-align: right; font-size: .82rem; color: var(--gris); white-space: nowrap; }
.file .attente.depasse { color: var(--rouge); font-weight: 600; }
.bande.rouge { background: var(--rouge); } .bande.orange { background: var(--orange); }
.bande.jaune { background: var(--jaune); } .bande.vert { background: var(--vert-triage); }

/* Bande de triage : la signature du site */
.triage { display: grid; grid-template-columns: repeat(4, 1fr); height: 8px; }
.triage span:nth-child(1) { background: var(--rouge); }
.triage span:nth-child(2) { background: var(--orange); }
.triage span:nth-child(3) { background: var(--jaune); }
.triage span:nth-child(4) { background: var(--vert-triage); }

@media (prefers-reduced-motion: no-preference) {
  .ecran { animation: arrivee .7s cubic-bezier(.2, .7, .2, 1) both .1s; }
  .file li { animation: arrivee .45s ease both; }
  .file li:nth-child(1) { animation-delay: .45s; } .file li:nth-child(2) { animation-delay: .55s; }
  .file li:nth-child(3) { animation-delay: .65s; } .file li:nth-child(4) { animation-delay: .75s; }
  .file li:nth-child(5) { animation-delay: .85s; }
  @keyframes arrivee { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* ---------- Parcours du patient (vraie séquence) ---------- */
.parcours { background: var(--blanc); }
.etapes { list-style: none; margin: 3rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); counter-reset: etape; }
.etapes li { position: relative; padding: 0 1rem 0 0; counter-increment: etape; }
.etapes li::before {
  content: counter(etape);
  display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 1rem;
  border-radius: 50%; background: var(--papier); border: 1.5px solid var(--trait);
  font-family: var(--titre); font-weight: 700; color: var(--vert);
  position: relative; z-index: 1;
}
.etapes li::after { content: ""; position: absolute; top: 20px; left: 40px; right: 0; height: 1.5px; background: var(--trait); }
.etapes li:last-child::after { display: none; }
.etapes h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.etapes p { font-size: .92rem; color: var(--gris); line-height: 1.5; }

/* ---------- Modules ---------- */
.modules .conteneur { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.modules .intro { position: sticky; top: 100px; }
.groupes { display: grid; gap: 2.5rem; }
.groupe h3 { padding-bottom: .7rem; border-bottom: 2px solid var(--encre); margin-bottom: .3rem; }
.groupe ul { list-style: none; margin: 0; padding: 0; }
.groupe li { display: grid; grid-template-columns: 32px 1fr; gap: .4rem .9rem; padding: .95rem 0; border-bottom: 1px solid var(--trait); }
.groupe li i { grid-row: span 2; font-size: 1.25rem; color: var(--vert); padding-top: .1rem; }
.groupe li strong { font-weight: 650; }
.groupe li span { color: var(--gris); font-size: .96rem; }

/* ---------- Épidémiologie (section sombre) ---------- */
.epidemies { background: var(--encre); color: #d7ebe8; }
.epidemies h2 { color: #fff; }
.epidemies .intro p { color: #a9cbc6; }
.epidemies .conteneur { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.regles { list-style: none; margin: 2rem 0 0; padding: 0; }
.regles li { display: grid; grid-template-columns: 28px 1fr; gap: .8rem; padding: .85rem 0; border-top: 1px solid rgba(255, 255, 255, .12); }
.regles li i { color: #5eead4; font-size: 1.1rem; padding-top: .15rem; }
.regles strong { color: #fff; font-weight: 600; }
.alerte-exemple { background: #0f4a46; border: 1px solid rgba(255, 255, 255, .12); border-radius: 18px; overflow: hidden; }
.alerte-bandeau { display: flex; gap: .6rem; align-items: center; padding: .8rem 1.1rem; background: var(--rouge); color: #fff; font-weight: 650; font-size: .95rem; }
.alerte-corps { padding: 1.2rem 1.2rem 1.4rem; }
.alerte-corps h3 { color: #fff; font-size: 1.25rem; margin-bottom: .6rem; }
.alerte-corps dl { display: grid; grid-template-columns: 130px 1fr; gap: .45rem 1rem; margin: 1rem 0 0; font-size: .93rem; }
.alerte-corps dt { color: #8fb9b3; }
.alerte-corps dd { margin: 0; color: #fff; }
.maladies { margin-top: 1.8rem; }
.maladies p { font-size: .92rem; color: #a9cbc6; margin-bottom: .7rem; }
.maladies ul { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; margin: 0; padding: 0; }
.maladies li { padding: .3rem .7rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18); font-size: .85rem; color: #e6f4f2; }

/* ---------- Données ---------- */
.garanties { list-style: none; margin: 3rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--trait); }
.garanties li { padding: 1.6rem 1.6rem 1.6rem 0; border-bottom: 1px solid var(--trait); }
.garanties li:not(:nth-child(3n + 1)) { padding-left: 1.6rem; border-left: 1px solid var(--trait); }
.garanties i { font-size: 1.5rem; color: var(--vert); }
.garanties h3 { margin: .7rem 0 .45rem; font-size: 1.1rem; }
.garanties p { color: var(--gris); font-size: .95rem; }

/* ---------- Tarifs : tableau comparatif ---------- */
.tarifs { background: var(--blanc); }
.tableau-tarifs { margin-top: 3rem; overflow-x: auto; border: 1px solid var(--trait); border-radius: var(--rayon); }
.tableau-tarifs table { width: 100%; min-width: 640px; border-collapse: collapse; }
.tableau-tarifs th, .tableau-tarifs td { padding: .85rem 1.1rem; text-align: center; border-bottom: 1px solid var(--trait); }
.tableau-tarifs tbody th { text-align: left; font-weight: 500; color: var(--encre-douce); }
.tableau-tarifs thead th { vertical-align: top; padding: 1.6rem 1.1rem 1.3rem; background: var(--papier); }
.tableau-tarifs thead th:first-child { background: var(--blanc); }
.tableau-tarifs .nom-formule { display: block; font-family: var(--titre); font-size: 1.35rem; font-weight: 700; color: var(--encre); }
.tableau-tarifs .prix { display: block; margin-top: .5rem; font-family: var(--titre); font-size: 1.9rem; font-weight: 700; color: var(--encre); letter-spacing: -0.02em; }
.tableau-tarifs .prix small { font-family: var(--texte); font-size: .85rem; font-weight: 500; color: var(--gris); letter-spacing: 0; }
.tableau-tarifs .pour { display: block; margin-top: .35rem; font-size: .87rem; font-weight: 400; color: var(--gris); }
.tableau-tarifs .oui { color: var(--vert); font-size: 1.15rem; font-weight: 700; }
.tableau-tarifs .non { color: #b7c6c3; }
.tableau-tarifs tbody tr:last-child th, .tableau-tarifs tbody tr:last-child td { border-bottom: 0; }
.tableau-tarifs tfoot td { padding: 1.2rem 1.1rem; background: var(--papier); }
.note-tarifs { margin-top: 1.2rem; color: var(--gris); font-size: .95rem; max-width: 70ch; }

/* ---------- Questions ---------- */
.questions .conteneur { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.faq details { border-bottom: 1px solid var(--trait); }
.faq details:first-child { border-top: 1px solid var(--trait); }
.faq summary { display: flex; justify-content: space-between; gap: 1rem; padding: 1.15rem 0; cursor: pointer; list-style: none; font-weight: 600; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--titre); font-size: 1.5rem; line-height: 1; color: var(--vert); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 1.25rem; color: var(--encre-douce); max-width: 66ch; }

/* ---------- Demande de démonstration ---------- */
.demande { background: var(--blanc); border-top: 1px solid var(--trait); }
.demande .conteneur { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.suite { list-style: none; margin: 2rem 0 0; padding: 0; counter-reset: suite; }
.suite li { position: relative; padding: 0 0 1.4rem 3rem; counter-increment: suite; }
.suite li::before { content: counter(suite); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--vert-clair); color: var(--vert-fonce); font-weight: 700; font-size: .9rem; }
.suite li::after { content: ""; position: absolute; left: 15.5px; top: 36px; bottom: 4px; width: 1.5px; background: var(--trait); }
.suite li:last-child::after { display: none; }
.suite strong { display: block; }
.suite span { color: var(--gris); font-size: .95rem; }

.formulaire { padding: clamp(1.4rem, 3vw, 2.2rem); border-radius: 18px; background: var(--papier); border: 1px solid var(--trait); }
.champs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.1rem; }
.champ { display: flex; flex-direction: column; gap: .35rem; }
.champ.large { grid-column: 1 / -1; }
.champ label { font-weight: 600; font-size: .92rem; }
.champ label .requis { color: var(--rouge); }
.champ input, .champ select, .champ textarea {
  width: 100%; min-height: 46px; padding: .6rem .8rem;
  border: 1.5px solid var(--trait); border-radius: 10px; background: var(--blanc);
  font: inherit; font-size: 1rem; color: var(--encre);
}
.champ textarea { min-height: 96px; resize: vertical; }
.champ input:focus, .champ select:focus, .champ textarea:focus { outline: none; border-color: var(--vert); box-shadow: 0 0 0 3px rgba(15, 118, 110, .15); }
.champ .erreur, .formulaire .errorlist { margin: 0; padding: 0; list-style: none; color: var(--rouge); font-size: .87rem; }
.champ.a-erreur input, .champ.a-erreur select { border-color: var(--rouge); }
.piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.formulaire .bouton { margin-top: 1.4rem; }
.formulaire .mention { margin-top: .9rem; font-size: .85rem; color: var(--gris); }
.message { display: flex; gap: .8rem; padding: 1rem 1.1rem; border-radius: 12px; font-size: .97rem; }
.message i { font-size: 1.3rem; }
.message-succes { background: var(--vert-clair); color: var(--vert-fonce); }
.message-erreur { background: #fee2e2; color: #991b1b; margin-bottom: 1rem; }

/* ---------- Pied de page ---------- */
.pied { background: var(--encre); color: #a9cbc6; padding: 3rem 0 2.2rem; font-size: .93rem; }
.pied .conteneur { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: flex-start; justify-content: space-between; }
.pied .marque { color: #fff; }
.pied nav { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; }
.pied a { color: #d7ebe8; text-decoration: none; }
.pied a:hover { color: #fff; }
.pied .copyright { width: 100%; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .85rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .menu { display: none; }
  .bouton-menu { display: inline-flex; }
  .entete.menu-ouvert .menu {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; left: 0; right: 0; top: 100%;
    padding: .5rem 1.5rem 1rem; background: var(--papier); border-bottom: 1px solid var(--trait);
  }
  .entete.menu-ouvert .menu a { padding: .75rem 0; border-bottom: 1px solid var(--trait); font-size: 1rem; }
}
@media (max-width: 1080px) {
  .etapes { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 2.2rem; }
  .etapes li:nth-child(3)::after { display: none; }
}
@media (max-width: 900px) {
  .ouverture .conteneur, .modules .conteneur, .epidemies .conteneur, .questions .conteneur, .demande .conteneur { grid-template-columns: 1fr; }
  .modules .intro { position: static; }
  .garanties { grid-template-columns: 1fr 1fr; }
  .garanties li, .garanties li:not(:nth-child(3n + 1)) { padding: 1.4rem 1.2rem 1.4rem 0; border-left: 0; }
  .garanties li:nth-child(2n) { padding-left: 1.2rem; border-left: 1px solid var(--trait); }
}
@media (max-width: 640px) {
  .conteneur { padding: 0 1rem; }
  .entete-actions .bouton-demo { display: none; }
  .entete .conteneur { gap: .75rem; }
  .texte-long { display: none; }
  .texte-court { display: inline; }
  .etapes { grid-template-columns: 1fr; row-gap: 0; }
  .etapes li { display: grid; grid-template-columns: 40px 1fr; column-gap: 1rem; padding: 0 0 1.5rem; }
  .etapes li::before { grid-row: span 2; margin: 0; }
  .etapes li::after { top: 44px; left: 19.5px; right: auto; bottom: 4px; width: 1.5px; height: auto; display: block; }
  .etapes li:last-child::after { display: none; }
  .garanties { grid-template-columns: 1fr; }
  .garanties li:nth-child(2n) { padding-left: 0; border-left: 0; }
  .champs { grid-template-columns: 1fr; }
  .compteur { padding: .55rem .6rem; }
  .compteur strong { font-size: 1.25rem; }
  .alerte-corps dl { grid-template-columns: 1fr; gap: .1rem; }
  .alerte-corps dd { margin-bottom: .5rem; }
  .acces-panneau { position: fixed; left: 1rem; right: 1rem; top: 76px; width: auto; }
}

.sr-seul { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Signature de l'éditeur (Nami Industries) */
.signature { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--gris); white-space: nowrap; }
.signature strong { color: var(--encre); font-weight: 650; }
.signature-logo { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: #fff; }
.signature-logo img { width: 21px; height: 21px; object-fit: contain; }
.signature-claire { color: #a9cbc6; }
.signature-claire strong { color: #fff; }
