/* Flocons — casse-tête du Massieu Ski Club (page autonome, indépendante des mises à jour du site) */
*{box-sizing:border-box}
html,body{margin:0}
html{-webkit-text-size-adjust:100%}
body{-webkit-touch-callout:none;touch-action:manipulation;min-height:100vh;font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;background:#EAF2F8;color:#0B1117;min-height:100dvh;display:flex;flex-direction:column}
.fl-tete{background:#0277B0;color:#fff;padding:8px 14px;display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.fl-tete h1{font-size:20px;margin:0}
.fl-tete h1 span{font-weight:400;font-size:15px}
.fl-retour{color:#fff;text-decoration:none;font-size:15px;border:1px solid rgba(255,255,255,.6);border-radius:8px;padding:4px 10px}
.fl-retour:focus-visible,button:focus-visible{outline:3px solid #FFD21F;outline-offset:2px}
main{flex:1;display:flex;flex-direction:column;align-items:center;padding:8px 8px 16px;width:100%;max-width:1100px;margin:0 auto}
.fl-barre{display:flex;flex-wrap:wrap;gap:6px;align-items:center;justify-content:center}
.fl-info{background:#fff;border:1px solid #D6E4EE;border-radius:999px;padding:6px 12px;font-size:15px}
.fl-barre button,#fl-rejouer{font:inherit;font-size:15px;border:0;border-radius:10px;background:#0277B0;color:#fff;padding:8px 12px;min-height:40px;cursor:pointer}
.fl-barre button:hover{background:#005F8E}
.fl-barre button:disabled{background:#9DB3C2;cursor:not-allowed}
#fl-recommencer{background:#4A5866}
.fl-aide{margin:6px 0;font-size:14.5px;line-height:1.35;color:#334;text-align:center;height:2.7em;overflow:hidden;display:flex;align-items:center;justify-content:center} /* hauteur fixe : le plateau ne bouge pas quand le message change */
.fl-zone{width:100%;display:flex;justify-content:center}
#fl-jeu{display:block;touch-action:none;user-select:none;-webkit-user-select:none;overflow:visible}
.fl-regles{max-width:640px;margin-top:10px;background:#fff;border:1px solid #D6E4EE;border-radius:12px;padding:8px 14px;font-size:15px}
.fl-regles summary{cursor:pointer;font-weight:700}
.fl-regles li{margin:4px 0}
/* SVG */
.fl-piece{cursor:grab}
.fl-piece.fl-glisse{cursor:grabbing}
.fl-piece:focus{outline:none}
.fl-piece:focus-visible .fl-cadre,.fl-piece.fl-choisie .fl-cadre{stroke:#FFD21F;stroke-width:4;stroke-dasharray:8 5}
.fl-cadre{fill:none;stroke:none;pointer-events:none}
.fl-piece path,.fl-piece polygon:not(.fl-hit){pointer-events:none}
.fl-hit{fill:#000;fill-opacity:0;pointer-events:all}
.fl-trou{cursor:pointer}
.fl-trou:focus{outline:none}
.fl-trou:focus-visible .fl-trou-hex{stroke:#FFD21F;stroke-width:3}
.fl-trou-hex{fill:#000;fill-opacity:0;pointer-events:all}
.fl-ombre{pointer-events:none}
.fl-ombre.ok path{stroke:#7CFFB2}
.fl-ombre.ko path{stroke:#FF6B6B}
/* Victoire */
.fl-bravo{position:fixed;inset:0;background:rgba(11,17,23,.55);display:flex;align-items:center;justify-content:center;padding:16px;z-index:10}
.fl-bravo[hidden]{display:none}
.fl-bravo-carte{background:#fff;border-radius:18px;padding:22px 26px;max-width:380px;text-align:center;box-shadow:0 12px 40px rgba(0,0,0,.3)}
.fl-bravo-carte h2{margin:4px 0 8px}
.fl-bravo-flocon{font-size:54px;margin:0;color:#2F86E0;animation:fl-tourne 3s linear infinite}
@keyframes fl-tourne{to{transform:rotate(360deg)}}
.fl-neige{position:fixed;top:-40px;pointer-events:none;z-index:11;font-size:26px;animation:fl-tombe linear forwards}
@keyframes fl-tombe{to{transform:translateY(110vh) rotate(540deg)}}
@media (prefers-reduced-motion:reduce){.fl-bravo-flocon,.fl-neige{animation:none}.fl-neige{display:none}}
@media (max-width:560px){.fl-tete{padding:6px 10px}.fl-tete h1{font-size:18px}.fl-tete h1 span{display:none}.fl-barre{gap:4px}.fl-barre button{padding:6px 9px;font-size:18px;min-width:44px}.fl-barre .fl-txt{display:none}.fl-info{padding:5px 9px}.fl-aide{font-size:13px;margin:4px 0;height:4.05em}}
/* Classement */
.fl-cl-carte{max-width:520px;width:100%;max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow:auto;text-align:left}
.fl-cl-carte h2{text-align:center}
.fl-cl-info{font-size:14.5px;color:#4A5866;text-align:center}
.fl-cl-moi{font-weight:700;text-align:center;margin:12px 0}
.fl-podium{display:flex;align-items:flex-end;justify-content:center;gap:8px;margin:10px 0 14px}
.fl-marche{flex:1;max-width:140px;display:flex;flex-direction:column;align-items:center;text-align:center;gap:2px;font-size:14px}
.fl-marche strong{font-size:14.5px;overflow-wrap:anywhere}
.fl-med{font-size:28px}
.fl-pos{color:#4A5866;font-size:13px;min-height:1.2em}
.fl-socle{display:flex;align-items:center;justify-content:center;width:100%;color:#fff;font-weight:800;font-size:22px;border-radius:10px 10px 0 0;margin-top:4px}
.fl-m1 .fl-socle{height:84px;background:#D4A017}.fl-m2 .fl-socle{height:62px;background:#8C9AA8}.fl-m3 .fl-socle{height:46px;background:#B0703A}
.fl-marche.fl-moi strong{color:#0277B0}
.fl-tableau{width:100%;border-collapse:collapse;font-size:14.5px}
.fl-tableau th,.fl-tableau td{padding:6px 8px;border-bottom:1px solid #D6E4EE;text-align:left}
.fl-tableau td:nth-child(n+3),.fl-tableau th:nth-child(n+3){text-align:right}
.fl-tableau tr.fl-moi td{background:#E6F3FB;font-weight:700}
#fl-cl-fermer{font:inherit;font-size:15px;border:0;border-radius:10px;background:#4A5866;color:#fff;padding:8px 14px;min-height:40px;cursor:pointer;display:block;margin:12px auto 0}
.fl-enligne{font-size:14.5px;color:#0B5A33;font-weight:600}
.fl-bravo-boutons button{margin:4px}
.fl-sec{font:inherit;font-size:15px;border:0;border-radius:10px;background:#4A5866;color:#fff;padding:8px 12px;min-height:40px;cursor:pointer}
/* Téléphone à l'horizontale : boutons en colonne à gauche, plateau et réserve à droite, sans défilement */
@media (max-height:520px) and (orientation:landscape){
  .fl-tete{padding:3px 10px;gap:10px}.fl-tete h1{font-size:15px}.fl-tete h1 span{display:none}.fl-retour{padding:2px 8px;font-size:14px}
  main{flex-direction:row;align-items:flex-start;gap:10px;padding:6px 8px;max-width:none}
  .fl-barre{flex-direction:column;flex-wrap:nowrap;align-items:stretch;gap:5px;flex:none}
  .fl-barre .fl-txt{display:none}.fl-barre button{min-width:48px;font-size:18px;padding:5px 8px}.fl-info{padding:4px 8px;font-size:14px;text-align:center}
  .fl-aide,.fl-regles{display:none}
  .fl-zone{flex:1;min-width:0}
}
.fl-pseudo{margin:10px 0;text-align:left}
.fl-pseudo-form{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:6px 0}
.fl-pseudo-form label{font-weight:600;font-size:14.5px}
.fl-pseudo-form input{font:inherit;font-size:16px;padding:8px 10px;border:1px solid #9DB3C2;border-radius:8px;min-height:40px;flex:1 1 140px;min-width:0}
.fl-pseudo-form button{font:inherit;font-size:15px;border:0;border-radius:10px;background:#0277B0;color:#fff;padding:8px 12px;min-height:40px;cursor:pointer}
.fl-erreur{color:#B3261E;font-size:14px;margin:4px 0;min-height:1em}
.fl-pseudo-ok{font-size:15px;color:#0B5A33}
.fl-code{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:17px;letter-spacing:1px;background:#FFF8E6;padding:1px 6px;border-radius:6px;color:#0B1117}
.fl-retrouver{font-size:14.5px;margin:6px 0}
.fl-retrouver summary{cursor:pointer;color:#0277B0}
.fl-tableau caption{font-weight:700;text-align:left;padding:4px 0}
.fl-bravo-carte{max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow:auto}
@media (max-width:560px){.fl-tableau th,.fl-tableau td{padding:5px 4px;font-size:13.5px}.fl-tableau td:nth-child(2){overflow-wrap:anywhere}.fl-socle{font-size:18px}}
.fl-fixe{cursor:not-allowed;filter:saturate(.8) brightness(.95)}.fl-fixe path:first-of-type{stroke-dasharray:none}
.fl-fixe text{pointer-events:none}
.fl-onglets{display:flex;gap:4px;justify-content:center;flex-wrap:wrap;margin:0 0 8px}
.fl-onglets button{font:inherit;font-size:14px;border:1px solid #9DB3C2;background:#fff;color:#0B1117;border-radius:999px;padding:6px 12px;min-height:36px;cursor:pointer}
.fl-onglets button[aria-selected="true"]{background:#0277B0;border-color:#0277B0;color:#fff}
#fl-defi[aria-pressed="true"]{background:#A447C8}
