/* Fiches patient /actes/ : pages ouvertes depuis le QR code du PDF, surtout sur téléphone.
   Pas de JavaScript, pas de traceur. Générées par tools/build-actes.js. */

body.actes {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
}

.actes a { color: var(--color-primary); }
.actes a:hover { color: var(--color-primary-dark); }

.actes-header {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
}

.actes-header-inner {
    max-width: 760px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.actes-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--color-text);
}

.actes-brand img { width: 34px; height: 34px; }
.actes-brand b { font-family: var(--font-display); font-weight: 400; font-size: 20px; color: var(--color-primary); }
.actes-brand span { font-size: 14px; color: var(--color-text-secondary); }

.actes-main {
    max-width: 760px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

.actes-crumb {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin: 0 0 10px;
}

.actes-crumb a { text-decoration: none; }

.actes h1 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(28px, 6vw, 38px);
    line-height: 1.2;
    margin: 0 0 12px;
    color: var(--color-text);
    text-wrap: balance;
}

.actes-lead {
    font-size: 18px;
    color: var(--color-text);
    margin: 0 0 20px;
}

.actes-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    padding: 18px 18px 6px;
    margin: 0 0 16px;
}

.actes-card h2 {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 19px;
    line-height: 1.3;
    margin: 0 0 10px;
    color: var(--color-primary-dark);
}

.actes-card p { margin: 0 0 14px; }

.actes-steps {
    list-style: none;
    counter-reset: step;
    margin: 0 0 14px;
    padding: 0;
}

.actes-steps li {
    counter-increment: step;
    position: relative;
    padding: 0 0 12px 40px;
    min-height: 28px;
}

.actes-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-primary-pastel);
    color: var(--color-primary-dark);
    font-weight: 800;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.actes-card--wait {
    background: #FDF6EC;
    border-color: #EBD9B8;
}

.actes-card--wait h2 { color: #8A5E17; }

.actes-alts {
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

.actes-alts li {
    padding: 10px 0;
    border-top: 1px solid var(--color-border);
}

.actes-alts li:first-child { border-top: 0; padding-top: 0; }
.actes-alts b { display: block; }

.actes-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 15px;
    color: var(--color-text-secondary);
    background: var(--color-surface);
    border-radius: 14px;
    padding: 14px 16px;
    margin: 4px 0 20px;
}

.actes-note svg { flex-shrink: 0; width: 20px; height: 20px; color: var(--color-primary); margin-top: 2px; }

.actes-related h2 {
    font-size: 17px;
    font-weight: 800;
    margin: 0 0 10px;
}

.actes-related ul,
.actes-index-list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: grid;
    gap: 8px;
}

.actes-related a,
.actes-index-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 12px 14px;
    text-decoration: none;
    color: var(--color-text);
    font-weight: 700;
}

.actes-related a:hover,
.actes-index-list a:hover { border-color: var(--color-primary); color: var(--color-primary-dark); }

.actes-related a svg,
.actes-index-list a svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--color-text-muted); }

.actes-index-list small {
    display: block;
    font-weight: 400;
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-top: 2px;
}

.actes-index-group {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    margin: 24px 0 10px;
}

.actes-footer {
    border-top: 1px solid var(--color-border);
    background: var(--color-white);
    font-size: 14px;
    color: var(--color-text-secondary);
}

.actes-footer-inner {
    max-width: 760px;
    margin: 0 auto;
    padding: 18px 16px 26px;
}

.actes-footer p { margin: 0 0 8px; }

/* ---------- Schéma animé ---------- */

.schema {
    margin: 0 0 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    padding: 12px 12px 8px;
    text-align: center;
}

.schema svg {
    width: 100%;
    max-width: 320px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.schema figcaption {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 4px;
}

.schema .lbl { font-family: var(--font-body); font-weight: 800; font-size: 13.5px; fill: var(--color-text); text-anchor: middle; }

.schema .gum { fill: #F2C4C0; }
.schema .gum-heal { fill: #EBB1AC; }
.schema .gum-line { fill: none; stroke: #D99A96; stroke-width: 3; stroke-linecap: round; }
.schema .gum-red { fill: none; stroke: #D9534F; stroke-width: 4; stroke-linecap: round; }
.schema .gum-swollen { fill: none; stroke: #D9534F; stroke-width: 6; stroke-linecap: round; }
.schema .pocket { fill: #E58F8A; opacity: .85; }
.schema .bone { fill: #EFE3C8; }
.schema .socket { fill: #C9787A; }
.schema .stitch { stroke: #172830; stroke-width: 2; stroke-linecap: round; }
.schema .root { fill: #F7F3E8; stroke: #6F7E83; stroke-width: 2; stroke-linejoin: round; }
.schema .enamel { fill: #FBFBF8; stroke: #3B4A50; stroke-width: 2.5; stroke-linejoin: round; }
.schema .enamel-dark { fill: #EADDB4; stroke: #3B4A50; stroke-width: 2.5; }
.schema .dentin { fill: #F1E6C8; stroke: #3B4A50; stroke-width: 2.5; stroke-linejoin: round; }
.schema .prosthesis { fill: #E7F4F6; stroke: #1A7886; stroke-width: 3; stroke-linejoin: round; }
.schema .prosthesis-ghost { fill-opacity: .75; stroke-dasharray: 7 5; }
.schema .ceramic { fill: #E7F4F6; stroke: #1A7886; stroke-width: 3; stroke-linejoin: round; }
.schema .veneer { fill: #FFFFFF; stroke: #1A7886; stroke-width: 3; }
.schema .shine { fill: none; stroke: #FFFFFF; stroke-width: 4; stroke-linecap: round; opacity: .9; }
.schema .crack { fill: none; stroke: #AD4D38; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.schema .decay { fill: #8A6A4A; opacity: .6; }
.schema .chip { fill: #F3F7F7; }
.schema .stain { fill: #B08A4A; opacity: .5; }
.schema .cavity { fill: #FFFFFF; stroke: #A8B2B4; stroke-width: 1.5; stroke-dasharray: 4 3; }
.schema .resin { fill: #F4EBCB; stroke: #3B4A50; stroke-width: 2; }
.schema .metal { fill: #C3CCD0; stroke: #5D6B70; stroke-width: 2; stroke-linejoin: round; }
.schema .thread { stroke: #5D6B70; stroke-width: 2; }
.schema .implant-ghost { fill: none; stroke: #1A7886; stroke-width: 2.5; stroke-dasharray: 6 5; }
.schema .pulp-sick { fill: #D9534F; opacity: .85; }
.schema .pulp-sick-line { stroke: #D9534F; stroke-width: 7; stroke-linecap: round; opacity: .85; }
.schema .abscess { fill: #E8A13A; opacity: .75; }
.schema .pulp-empty { fill: #FFFFFF; stroke: #A8B2B4; stroke-width: 1.5; }
.schema .pulp-empty-line { stroke: #FFFFFF; stroke-width: 7; stroke-linecap: round; }
.schema .filling { fill: #E08A5C; }
.schema .canal-filled { fill: none; stroke: #E08A5C; stroke-width: 7; stroke-linecap: round; }
.schema .file { fill: #8C9AA0; }
.schema .file-handle { fill: #1A7886; }
.schema .drill { stroke: #8C9AA0; stroke-width: 8; stroke-linecap: round; }
.schema .drill-tip { fill: #5D6B70; }
.schema .scaler { fill: none; stroke: #8C9AA0; stroke-width: 6; stroke-linecap: round; }
.schema .scaler-tip { fill: none; stroke: #5D6B70; stroke-width: 4; stroke-linecap: round; }
.schema .waves { fill: none; stroke: #4FCAD8; stroke-width: 2; stroke-linecap: round; }
.schema .tartar { fill: #D6B45A; stroke: #A88A32; stroke-width: 1.5; }
.schema .spark { fill: #4FCAD8; }
.schema .joint { stroke: #1A7886; stroke-width: 4; stroke-linecap: round; }
.schema .denture-base { fill: #E68C99; stroke: #B5566A; stroke-width: 2; }
.schema .denture-tooth { fill: #FFFFFF; stroke: #1A7886; stroke-width: 2.5; }
.schema .clasp { fill: none; stroke: #8C9AA0; stroke-width: 3; stroke-linecap: round; }
.schema .groove { fill: none; stroke: #6B4F35; stroke-width: 4; stroke-linecap: round; }
.schema .sealant { fill: none; stroke: #8FD3DE; stroke-width: 8; stroke-linecap: round; }
.schema .brush { stroke: #1A7886; stroke-width: 6; stroke-linecap: round; }
.schema .brush-tip { fill: #4FCAD8; }
.schema .lamp { fill: #1A7886; }
.schema .light { fill: #4FCAD8; opacity: .35; }
.schema .varnish { fill: #4FCAD8; opacity: .22; }
.schema .tray { fill: #CDEAEF; fill-opacity: .55; stroke: #5DB5C5; stroke-width: 2.5; }
.schema .graft { fill: #F5E8C8; stroke: #C9A96A; stroke-width: 2; stroke-dasharray: 5 4; }
.schema .granule { fill: #C9A96A; }
.schema .wear { stroke: #AD4D38; stroke-width: 3; stroke-linecap: round; }

/* Trois temps sur 9 s */
.schema .ph1, .schema .l1 { animation: acte-ph1 9s infinite; }
.schema .ph2, .schema .l2 { animation: acte-ph2 9s infinite; }
.schema .ph3, .schema .l3 { animation: acte-ph3 9s infinite; }
.schema .ph12 { animation: acte-ph12 9s infinite; }
.schema .ph23 { animation: acte-ph23 9s infinite; }
.schema .drop2 { animation: acte-drop2 9s infinite; }
.schema .drop3 { animation: acte-drop3 9s infinite; }
.schema .seat3 { animation: acte-seat3 9s infinite; }
.schema .lift2 { animation: acte-lift2 9s infinite; }
.schema .fade2 { animation: acte-fade2 9s infinite; }
.schema .tool2 { animation: acte-tool2 9s infinite; }
.schema .tool2v { animation: acte-tool2v 9s infinite; }
.schema .grind1 { animation: acte-grind1 9s infinite; }

@keyframes acte-ph1 { 0%, 28% { opacity: 1; } 33%, 100% { opacity: 0; } }
@keyframes acte-ph2 { 0%, 28% { opacity: 0; } 33%, 61% { opacity: 1; } 66%, 100% { opacity: 0; } }
@keyframes acte-ph3 { 0%, 61% { opacity: 0; } 66%, 100% { opacity: 1; } }
@keyframes acte-ph12 { 0%, 61% { opacity: 1; } 66%, 100% { opacity: 0; } }
@keyframes acte-ph23 { 0%, 28% { opacity: 0; } 33%, 100% { opacity: 1; } }
@keyframes acte-drop2 {
    0%, 29% { opacity: 0; transform: translateY(-44px); }
    33% { opacity: 1; transform: translateY(-44px); }
    45%, 100% { opacity: 1; transform: translateY(0); }
}
@keyframes acte-drop3 {
    0%, 62% { opacity: 0; transform: translateY(-44px); }
    66% { opacity: 1; transform: translateY(-44px); }
    78%, 100% { opacity: 1; transform: translateY(0); }
}
@keyframes acte-seat3 {
    0%, 29% { opacity: 0; transform: translateY(-28px); }
    33%, 62% { opacity: 1; transform: translateY(-28px); }
    74%, 100% { opacity: 1; transform: translateY(0); }
}
@keyframes acte-lift2 {
    0%, 33% { opacity: 1; transform: translateY(0); }
    46% { opacity: .5; transform: translateY(-22px); }
    52%, 100% { opacity: 0; transform: translateY(-26px); }
}
@keyframes acte-fade2 { 0%, 40% { opacity: 1; } 58%, 100% { opacity: 0; } }
@keyframes acte-tool2 {
    0%, 30% { opacity: 0; transform: translate(18px, -18px); }
    34% { opacity: 1; transform: translate(18px, -18px); }
    42% { transform: translate(0, 0); }
    49% { transform: translate(10px, -6px); }
    56% { opacity: 1; transform: translate(0, 0); }
    61%, 100% { opacity: 0; transform: translate(0, 0); }
}
@keyframes acte-tool2v {
    0%, 30% { opacity: 0; transform: translateY(-30px); }
    34% { opacity: 1; transform: translateY(-30px); }
    44% { transform: translateY(0); }
    51% { transform: translateY(-14px); }
    57% { opacity: 1; transform: translateY(0); }
    61%, 100% { opacity: 0; transform: translateY(0); }
}
@keyframes acte-grind1 {
    0%, 15%, 30%, 100% { transform: translateX(0); }
    3%, 9%, 18%, 24% { transform: translateX(-5px); }
    6%, 12%, 21%, 27% { transform: translateX(5px); }
}

/* Animations réduites : l'image finale seule */
@media (prefers-reduced-motion: reduce) {
    .schema * { animation: none !important; }
    .schema .ph1, .schema .ph2, .schema .ph12, .schema .lift2, .schema .fade2,
    .schema .tool2, .schema .tool2v, .schema .l1, .schema .l2 { opacity: 0; }
    .schema .ph3, .schema .ph23, .schema .drop2, .schema .drop3, .schema .seat3, .schema .l3 { opacity: 1; transform: none; }
}

@media (min-width: 720px) {
    .actes-top {
        display: grid;
        grid-template-columns: 1.15fr .85fr;
        gap: 24px;
        align-items: start;
    }
    .actes-main { padding-top: 28px; }
}
