/* Adaptation tactile iPad — Lycée Bon Secours, 2026 (CC BY-NC-SA, comme l'original) */
html { -webkit-text-size-adjust: 100%; }
body {
    height: auto; min-height: 100vh;
    font-family: Georgia, 'Times New Roman', serif;
    -webkit-user-select: none; -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) 20px env(safe-area-inset-left);
}
input, label, button { font-family: inherit; }
h1 { width: auto; max-width: 1000px; font-size: clamp(22px, 3.6vw, 36px); padding: 12px 10px; }
.retour {
    position: absolute; top: calc(8px + env(safe-area-inset-top)); left: 12px;
    color: #ddd; text-decoration: none; font-size: 17px; padding: 8px;
}
.zone-canvas { width: 100%; max-width: 1200px; margin: auto; padding: 0 8px; box-sizing: border-box; }
#canvas { display: block; width: 100%; height: auto; touch-action: none; }
.zone-bas {
    max-width: 1200px; margin: 10px auto 0; padding: 0 8px; box-sizing: border-box;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 30px;
}
.zone-bas > table { border-collapse: separate; border-spacing: 2px; }
th {
    width: clamp(30px, 4.6vw, 44px); height: clamp(30px, 4.6vw, 44px);
    font-size: clamp(12px, 1.7vw, 17px); border-radius: 4px; padding: 0;
    touch-action: manipulation;
}
th:active { filter: brightness(0.75); }
.panneau { width: 300px; font-size: 20px; color: #eee; }
.panneau .aide { text-align: center; font-size: 15px; color: #ccc; font-style: italic; margin-bottom: 6px; }
.panneau > div { margin: 4px 0; }
#btnZoom { font-size: 18px; padding: 10px 18px; border-radius: 8px; border: 1px solid #999; background: #ddd; touch-action: manipulation; }
#rangeIntensite { width: 100%; height: 36px; }
.panneau label { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.panneau input[type=checkbox] { width: 24px; height: 24px; }
footer { padding: 0 10px; color: #ccc; }
footer .source { width: auto; max-width: 750px; }
footer a { color: #9cf; }
.adapt { font-size: 85%; margin-top: 6px; }
@media (max-width: 1050px) { .panneau { width: 100%; max-width: 560px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; } .panneau .aide, .panneau > div:nth-child(-n+5) { grid-column: 1 / -1; } }
h1 { padding-top: 40px; }
@media (min-width: 1051px) {
    h1 { padding-top: 12px; }
    th { width: 3.3vw; height: 3.3vw; max-width: 44px; max-height: 44px; font-size: 1.35vw; }
    .panneau { width: 250px; font-size: 18px; }
}
/* Mode du doigt (écrans tactiles seulement) */
.tactile { display: none; }
@media (hover: none) and (pointer: coarse) {
    .tactile { display: block; }
    .souris { display: none; }
}
.panneau .mode-doigt.tactile { text-align: center; }
@media (hover: none) and (pointer: coarse) { .panneau .mode-doigt.tactile { display: flex; } }
.mode-doigt { justify-content: center; align-items: center; gap: 6px 14px; flex-wrap: wrap; font-size: 18px; }
.mode-doigt label { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 1px solid #888; border-radius: 22px; background: #555; }
.mode-doigt label:has(input:checked) { background: #2b6cb0; border-color: #9cf; }
.mode-doigt input[type=radio] { width: 22px; height: 22px; margin: 0; }
@media (max-width: 1050px) { .panneau > div:nth-child(-n+7) { grid-column: 1 / -1; } }
.mode-doigt .titre-mode { flex-basis: 100%; text-align: center; }
.mode-doigt label { font-size: 17px; padding: 0 10px; }
/* Police d'origine hébergée localement (Asul, SIL OFL 1.1 — voir police/OFL.txt) */
@font-face { font-family: 'Asul'; font-weight: 400; font-display: swap; src: url(police/asul-400.woff2) format('woff2'); }
@font-face { font-family: 'Asul'; font-weight: 700; font-display: swap; src: url(police/asul-700.woff2) format('woff2'); }
body, input, label, button { font-family: 'Asul', Georgia, serif; }
.boutons-zoom { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
#btnRetour, #btnZoom { font-size: 16px; padding: 10px 12px; border-radius: 8px; border: 1px solid #999; background: #ddd; touch-action: manipulation; }
#btnRetour:disabled { opacity: 0.45; }
/* Pied de page : crédits en cartes */
footer.credits {
    max-width: 1000px; margin: 28px auto 10px; padding: 0 12px;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px;
    text-align: left; color: #cfcfcf;
}
.carte-credit {
    position: relative; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
    border-left: 3px solid #c9a227; border-radius: 10px; padding: 14px 16px 14px;
}
.carte-credit h3 { margin: 0 0 6px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: #e8c766; }
.carte-credit p { margin: 0 0 4px; font-size: 15px; line-height: 1.45; }
.carte-credit p.discret { font-size: 13px; color: #a9a9a9; }
.carte-credit a { color: #9cc7ff; text-decoration: none; border-bottom: 1px dotted rgba(156,199,255,0.6); }
.licence {
    position: absolute; top: 12px; right: 12px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
    padding: 3px 8px; border-radius: 999px; border: 1px solid #888; color: #ddd;
}
.mention-police { grid-column: 1 / -1; text-align: center; margin: 2px 0 0; font-size: 12px; color: #8a8a8a; }
.mention-police a { color: #9a9a9a; }
footer.credits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 680px) { footer.credits { grid-template-columns: 1fr; } }
/* Fond sur toute la hauteur (iOS ignore background-attachment: fixed) */
html { background: #494949; min-height: 100%; }
body { background: linear-gradient(#333, #494949 600px, #494949); background-attachment: scroll; }
