/* Charte des fiches de cours, reprise des fiches PDF JAT1 et générée par outils/migrer_fiches.py.
   Les adaptations à l'écran (grilles sur une colonne, corrections dépliables) sont dans style.css. */
.fiche .cover {background: linear-gradient(120deg, var(--navy) 0%, #174a87 70%, var(--orange) 140%); color: #fff; border-radius: 10px; padding: 16px 20px 14px; position: relative; overflow: hidden;}
.fiche .cover h1 {margin: 0; font-size: 2.292rem; letter-spacing: .3px;}
.fiche .cover .sub {font-size: 1.146rem; opacity: .92; margin-top: 2px;}
.fiche .cover .ball {position:absolute; right:-28px; top:-28px; width:130px; height:130px; border-radius:50%; background:#d8f14a; opacity:.9; box-shadow: inset -12px -12px 0 rgba(0,0,0,.08);}
.fiche .cover .ball:before, .fiche .cover .ball:after {content:''; position:absolute; border:3px solid #fff; border-radius:50%; width:130px; height:130px;}
.fiche .cover .ball:before {left:-70px;}
.fiche .cover .ball:after {left:70px;}
.fiche .chips {margin-top: 10px; display:flex; flex-wrap:wrap; gap:6px;}
.fiche .chip {background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); padding: 2px 9px; border-radius: 20px; font-size: 0.92rem;}
.fiche h2 {font-size: 1.354rem; color: var(--navy); margin: 16px 0 7px; display:flex; align-items:center; gap:9px; page-break-after: avoid;}
.fiche h2 .n {background: var(--orange); color:#fff; width: 26px; height: 26px; border-radius: 50%; display:inline-flex; align-items:center; justify-content:center; font-size: 1.146rem; flex: none;}
.fiche h2:after {content:''; flex:1; height:2px; background: linear-gradient(90deg, var(--orange), transparent);}
.fiche h3 {font-size: 1.083rem; color: var(--blue); margin: 9px 0 4px; page-break-after: avoid;}
.fiche p {margin: 3px 0 6px;}
.fiche ul {margin: 3px 0 6px; padding-left: 17px;}
.fiche li {margin: 1.5px 0;}
.fiche .grid2 > div, .fiche .grid3 > div {break-inside: avoid;}
.fiche .grid2 {display:grid; grid-template-columns: 1fr 1fr; gap: 10px;}
.fiche .grid3 {display:grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px;}
.fiche .card {border: 1px solid #d6dee8; border-radius: 8px; padding: 7px 10px; background: #f7f9fc; page-break-inside: avoid;}
.fiche .card h4 {margin: 0 0 3px; font-size: 1.021rem; color: var(--navy);}
.fiche .box {border-radius: 7px; padding: 6px 10px 6px 34px; margin: 7px 0; position: relative; page-break-inside: avoid;}
.fiche .box:before {position:absolute; left:9px; top:5px; font-size: 1.25rem;}
.fiche .key {background:#e7f1ff; border-left: 4px solid var(--blue);}
.fiche .key:before {content:'★'; color: var(--blue);}
.fiche .trap {background:#fff0f0; border-left: 4px solid var(--red);}
.fiche .trap:before {content:'⚑'; color: var(--red);}
.fiche .y27 {background:#fff4e6; border-left: 4px solid var(--orange);}
.fiche .y27:before {content:'⚠'; color: var(--orange);}
.fiche .tip {background:#f3f0ff; border-left: 4px solid var(--lilac);}
.fiche .tip:before {content:'∑'; color: var(--lilac); font-weight:bold;}
.fiche .lbl {font-weight: bold; font-size: 0.92rem; text-transform: uppercase; letter-spacing: .5px; margin-right: 4px;}
.fiche .key .lbl {color: var(--blue);}
.fiche .trap .lbl {color: var(--red);}
.fiche .y27 .lbl {color: var(--orange);}
.fiche .tip .lbl {color: var(--lilac);}
.fiche table {border-collapse: collapse; width: 100%; font-size: 0.938rem; page-break-inside: avoid; margin: 4px 0 6px;}
.fiche th {background: var(--navy); color:#fff; text-align:left; font-weight: 600;}
.fiche th, .fiche td {padding: 4px 7px; border: 1px solid #d6dee8; vertical-align: top;}
.fiche tr:nth-child(even) td {background:#f7f9fc;}
.fiche .abbr {display:inline-block; min-width: 30px; text-align:center; background: var(--orange); color:#fff; border-radius: 12px; padding: 0 7px; font-weight: bold; font-family: 'DejaVu Sans Mono', monospace;}
.fiche .abbr.b {background: var(--blue); border-radius: 4px;}
.fiche .timeline {display:grid; grid-template-columns: 1fr 1fr 1fr; gap: 0; margin: 6px 0; page-break-inside: avoid;}
.fiche .step {padding: 8px 10px 8px 12px; color:#fff; position: relative; min-height: 120px;}
.fiche .step h4 {margin:0 0 4px; font-size: 1.094rem;}
.fiche .step ul {padding-left: 14px; margin: 0;}
.fiche .step li {font-size: 0.92rem;}
.fiche .s1 {background:#174a87; border-radius: 8px 0 0 8px;}
.fiche .s2 {background: var(--blue);}
.fiche .s3 {background: var(--orange); border-radius: 0 8px 8px 0;}
.fiche .step .tag {display:inline-block; background:#fff; color: var(--red); font-weight:bold; border-radius: 4px; padding: 0 5px; font-size: 0.92rem; margin-top: 4px;}
.fiche svg.br {width: 100%; max-height: 220px; display:block;}
.fiche svg .ln {stroke: #33415c; stroke-width: 1.4; fill:none;}
.fiche svg .lb {font-size: 10px; fill: #1b1f24; font-weight: 600;}
.fiche svg .ex {font-size: 10px; fill: var(--blue); font-weight: 700;}
.fiche svg .qe {font-size: 10px; fill: var(--lilac); font-weight: 700; font-style: italic;}
.fiche svg .q {font-size: 10.5px; fill: var(--red); font-weight: 800;}
.fiche svg .rd {font-size: 8.5px; fill: #6c7a91; text-transform: uppercase;}
.fiche .diag {border: 1px solid #d6dee8; border-radius: 8px; padding: 6px 8px; background:#fff; page-break-inside: avoid;}
.fiche .diag .cap {font-size: 0.92rem; color:#495467; margin-top: 3px;}
.fiche .diag .ttl {font-weight:bold; color: var(--navy); font-size: 0.979rem; margin-bottom: 2px;}
.fiche svg.pyr {width: 100%; max-height: 300px; display:block; margin: 0 auto;}
.fiche svg .pyl {font-size: 11.5px; font-weight: 800; fill: #fff;}
.fiche svg .pyd {font-size: 10px; fill: var(--navy); font-weight: 600;}
.fiche svg .pyd2 {font-size: 9px; fill: #eef4ff;}
.fiche .nbrow {display:flex; flex-wrap: nowrap; gap: 2px; margin: 3px 0;}
.fiche .nb {width: 18px; height: 18px; border-radius: 50%; background:#e3e8ef; color:#8a96a8; font-size: 0.92rem; display:inline-flex; align-items:center; justify-content:center; font-weight: bold;}
.fiche .nb.on {background: var(--red); color:#fff;}
.fiche .flow {display:flex; align-items:center; gap: 7px; justify-content:flex-start; margin: 5px 0; flex-wrap: nowrap;}
.fiche .flow span:last-child {font-size: 0.938rem;}
.fiche .pill {white-space:nowrap; border-radius: 18px; padding: 3px 10px; font-weight: bold; font-size: 0.938rem;}
.fiche .p-blue {background: var(--blue); color:#fff;}
.fiche .p-white {background:#fff; border: 2px solid var(--navy); color: var(--navy);}
.fiche .p-lilac {background:#ece6ff; color: var(--lilac); border:2px solid var(--lilac);}
.fiche .arrow {color: var(--orange); font-weight: bold; font-size: 1.354rem;}
.fiche .formula {font-family: 'DejaVu Sans Mono', monospace; background: var(--navy); color: #fff; padding: 2px 8px; border-radius: 5px; white-space: nowrap;}
.fiche .quiz td:first-child {width: 26px; text-align:center; font-weight:bold; color: var(--orange);}
.fiche .ans {color: #0b7a3e; font-weight: bold;}
.fiche .pb {page-break-before: always;}
.fiche .keep {break-inside: avoid; page-break-inside: avoid;}
.fiche .glance {border: 2px solid var(--navy); border-radius: 10px; margin: 10px 0 12px; overflow: hidden;}
.fiche .glance .gh {background: var(--navy); color: #fff; padding: 5px 12px; font-weight: 800; font-size: 1.146rem; letter-spacing: .3px;}
.fiche .glance .gh span {float: right; font-weight: 400; font-size: 0.92rem; opacity: .85; padding-top: 2px;}
.fiche .glance .gp {padding: 8px 13px 6px; font-size: 1.01rem; color: #1b1f24; background: #eef3fa; border-bottom: 1px solid #d6dee8; line-height: 1.45;}
.fiche .glance .gp p {margin: 0 0 5px;}
.fiche .glance .gg {display: block;}
.fiche .glance .gt {padding: 8px 13px 9px; border-bottom: 2px solid #fff;}
.fiche .glance .gt h5, .fiche .glance .gt li {break-inside: avoid; page-break-inside: avoid;}
.fiche .glance .gt h5 {break-after: avoid; page-break-after: avoid;}
.fiche .glance .gt h5 {margin: 0 0 5px; font-size: 1.021rem; text-transform: uppercase; letter-spacing: .5px;}
.fiche .glance .gt ul {margin: 0; padding-left: 16px;}
.fiche .glance .gt li {font-size: 0.969rem; margin: 4px 0; line-height: 1.45;}
.fiche .glance .g-ess {background: #e7f1ff;}
.fiche .glance .g-ess h5 {color: var(--blue);}
.fiche .glance .g-for {background: #f3f0ff;}
.fiche .glance .g-for h5 {color: var(--lilac);}
.fiche .glance .g-dan {background: #fff0f0;}
.fiche .glance .g-dan h5 {color: var(--red);}
.fiche .glance .g-tip {background: #ebfbee;}
.fiche .glance .g-tip h5 {color: #2b8a3e;}
.fiche .glance .gt .formula {font-size: 0.92rem; padding: 1px 6px;}
.fiche .glance .gc {background: #fff8f0; border-top: 3px solid var(--orange); padding: 7px 11px 9px;}
.fiche .glance .gc h5 {margin: 0 0 6px; color: var(--orange); font-size: 1.021rem; text-transform: uppercase; letter-spacing: .4px; break-after: avoid; page-break-after: avoid;}
.fiche .glance .gc table {width: 100%; border-collapse: collapse; margin: 0; font-size: 0.92rem; page-break-inside: auto; break-inside: auto;}
.fiche .glance .gc th {background: var(--orange); color: #fff; text-align: left; padding: 3px 6px; font-size: 0.92rem;}
.fiche .glance .gc td {border-bottom: 1px solid #f1d8bb; padding: 4px 6px; vertical-align: top; line-height: 1.38; background: transparent;}
.fiche .glance .gc tr {break-inside: avoid; page-break-inside: avoid;}
.fiche .glance .gc td.th {width: 15%; font-weight: 700; color: var(--navy);}
.fiche .glance .gc td.old {width: 26%; color: #6b7280;}
.fiche .glance .gc td.new {width: 33%; background: #fff;}
.fiche .glance .gc td.ex {width: 26%; color: #2b8a3e; font-weight: 600;}
.fiche .glance .gc .same {margin-top: 7px; padding: 5px 9px; background: #ebfbee; border-left: 4px solid #2b8a3e; border-radius: 4px; font-size: 0.92rem; line-height: 1.4; break-inside: avoid;}
.fiche .glance .gc .note {margin-top: 6px; padding: 5px 9px; background: #fff0f0; border-left: 4px solid var(--red); border-radius: 4px; font-size: 0.92rem; line-height: 1.4; break-inside: avoid;}
.fiche .foot {margin-top: 10px; font-size: 0.92rem; color:#6c7a91; border-top: 1px solid #d6dee8; padding-top: 4px;}
.fiche .small {font-size: 0.92rem; color:#495467;}
.fiche .selftest ol {padding-left: 18px;}
.fiche .selftest li {margin: 3px 0;}
.fiche .corr {transform: rotate(180deg); font-size: 0.92rem; color:#495467; border: 1px dashed #b8c2d1; border-radius: 6px; padding: 6px 9px; margin-top: 6px;}
.fiche .diag.bad {border: 2px solid #c92a2a; background: #fff8f8; position: relative;}
.fiche .diag.ok {border: 2px solid #2b8a3e; background: #f6fff8; position: relative;}
.fiche .badge {position:absolute; top:-9px; right:8px; font-size: 0.92rem; font-weight: bold; color:#fff; border-radius: 10px; padding: 1px 8px;}
.fiche .bad .badge {background:#c92a2a;}
.fiche .ok .badge {background:#2b8a3e;}
.fiche svg .hl {fill: none; stroke: #c92a2a; stroke-width: 1.6;}
.fiche svg .ts {font-size: 8px; fill: #e8590c; font-weight: 800;}
.fiche .rule {border: 1px solid #d6dee8; border-radius: 9px; padding: 8px 10px 6px; margin: 9px 0; background: #fbfcfe;}
.fiche .rule .head {display:flex; align-items:center; gap: 9px; margin-bottom: 4px;}
.fiche .rule .letter {background: var(--navy); color:#fff; font-weight: 800; font-size: 1.458rem; width: 30px; height: 30px; border-radius: 7px; display:inline-flex; align-items:center; justify-content:center; flex:none;}
.fiche .rule .txt {font-weight: 600; color: var(--navy);}
.fiche .rule .clair {font-size: 0.938rem; color:#333; margin: 2px 0 5px;}
.fiche .pair {display:grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px;}
.fiche .rule svg.br {max-height: 150px;}
.fiche .pair, .fiche .rule .head, .fiche .rule .clair {break-inside: avoid; page-break-inside: avoid;}
.fiche .rule .clair {page-break-after: avoid;}
.fiche .pair .cap {font-size: 0.92rem; margin-top: 1px;}
.fiche .pair .diag {padding: 4px 7px;}
.fiche .pair .ttl {font-size: 0.92rem;}
.fiche .reco .diag + .diag {margin-top: 10px;}
.fiche .reco {display:grid; grid-template-columns: 34px 1fr 210px; gap: 9px; align-items:center; border-bottom: 1px dashed #d6dee8; padding: 6px 0; break-inside: avoid;}
.fiche .reco .num {background: var(--orange); color:#fff; border-radius: 50%; width: 28px; height: 28px; display:inline-flex; align-items:center; justify-content:center; font-weight:800;}
.fiche .reco .t {font-weight: 600; color: var(--navy);}
.fiche .reco .w {font-size: 0.92rem; color:#495467; margin-top: 2px;}
.fiche .vs {display:grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: 9px; overflow:hidden; break-inside: avoid; margin: 6px 0;}
.fiche .vs > div {padding: 8px 12px;}
.fiche .vs .l {background: var(--navy); color:#fff;}
.fiche .vs .r {background: #ffe8d6; color: #5c2b00;}
.fiche .vs h4 {margin: 0 0 3px; font-size: 1.094rem;}
.fiche .check td:first-child {width: 30px; text-align:center; font-weight: 800; color:#fff; background: var(--navy);}
.fiche .calc {width: auto; min-width: 230px; font-size: 0.92rem; margin: 0 0 6px;}
.fiche .calc td {padding: 2px 7px;}
.fiche .calc td:first-child {font-weight: 800; color: var(--navy); width: 52px;}
.fiche .calc td:last-child {font-weight: 800; color: var(--red); text-align:right;}
.fiche .calc caption {caption-side: top; text-align:left; font-weight: bold; color:#fff; background: var(--blue); padding: 2px 7px; border-radius: 5px 5px 0 0;}
.fiche .case {display:grid; grid-template-columns: 260px 1fr; gap: 12px; align-items:start; break-inside: avoid; margin: 6px 0 10px;}
.fiche .case.wide {grid-template-columns: 300px 1fr;}
.fiche .steps {counter-reset: st; list-style: none; padding-left: 0; margin: 4px 0;}
.fiche .steps li {counter-increment: st; position: relative; padding: 3px 0 3px 30px; border-bottom: 1px dashed #d6dee8; font-size: 0.938rem;}
.fiche .steps li:before {content: counter(st); position:absolute; left:0; top:3px; width:21px; height:21px; border-radius:50%; background: var(--orange); color:#fff; font-weight:800; display:inline-flex; align-items:center; justify-content:center; font-size: 0.92rem;}
.fiche .eff {display:inline-block; background: var(--orange); color:#fff; border-radius: 6px; padding: 3px 10px; font-weight: bold; margin-bottom: 5px;}
.fiche .ref td {font-family: 'DejaVu Sans Mono', monospace; font-size: 0.92rem;}
.fiche .ref td:first-child {font-family: inherit; font-weight: 800; white-space: nowrap;}
.fiche .method {display:grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin: 6px 0; break-inside: avoid;}
.fiche .method div {background: #b5541c; color:#fff; border-radius: 6px; padding: 5px 6px; font-size: 0.92rem; text-align:center; font-weight: 600;}
.fiche .method div b {display:block; font-size: 1.25rem;}
.fiche .method div:first-child {background: var(--blue);}
.fiche svg .bh {fill: #efe4f8;}
.fiche svg .bb {fill: #e1f0e1;}
.fiche svg .sl {font-size: 6.5px; fill: #b5541c; font-weight: 700; letter-spacing: .3px;}
.fiche .case {display:grid; grid-template-columns: 250px 1fr; gap: 12px; align-items:start; break-inside: avoid; margin: 6px 0 10px;}
.fiche .case.wide {grid-template-columns: 280px 1fr;}
.fiche .legend {display:flex; gap: 14px; font-size: 0.92rem; margin: 2px 0 6px;}
.fiche .legend span:before {content:''; display:inline-block; width: 12px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px;}
.fiche .legend .h:before {background:#efe4f8; border:1px solid #c9b3e0;}
.fiche .legend .b:before {background:#e1f0e1; border:1px solid #a9cfa9;}
.fiche .old .badge {background:#868e96;}
.fiche .diag {margin: 8px 0 10px; position: relative;}
.fiche svg.fg {width: 100%; display: block; margin: 2px auto 0;}
.fiche svg text {font-family: 'DejaVu Sans', Arial, sans-serif;}
.fiche .fig2 {display:grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 10px; break-inside: avoid;}
.fiche .fig2 .diag {margin: 0;}
.fiche td, .fiche th {line-height: 1.35;}
.fiche blockquote {margin: 0;}
.fiche h2 .n.e {background: var(--navy); font-size: 1.042rem;}
.fiche .glance .gp ol, .fiche .glance .gp ul {margin: 3px 0 5px;}
