:root{--tg-ink:#1f2440;--tg-ink-2:#303653;--tg-muted:#70758d;--tg-purple:#6f57ef;--tg-purple-dark:#5140ca;--tg-pink:#ff5c9f;--tg-yellow:#ffd65c;--tg-orange:#ff9a58;--tg-mint:#81e4c5;--tg-blue:#72c7ff;--tg-bg:#fffaf6;--tg-card:#fff;--tg-line:#e9e7f2;--tg-soft:#f7f5ff;--tg-shadow:0 18px 50px rgba(54,48,102,.13)}
.tg-page{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--tg-ink);background:linear-gradient(#fff 0,#fffaf6 20%,#fff 100%);line-height:1.55;overflow:hidden}.tg-page *{box-sizing:border-box}.tg-page a{color:inherit}
.tg-hero{position:relative;max-width:1280px;min-height:575px;margin:24px auto 0;padding:58px clamp(28px,5vw,72px);display:grid;grid-template-columns:minmax(0,1.04fr) minmax(370px,.96fr);gap:48px;align-items:center;border-radius:42px;overflow:hidden;background:radial-gradient(circle at 12% 8%,rgba(255,214,92,.52) 0 9%,transparent 9.5%),radial-gradient(circle at 92% 88%,rgba(129,228,197,.42) 0 15%,transparent 15.5%),radial-gradient(circle at 76% 6%,rgba(255,92,159,.13) 0 17%,transparent 17.5%),linear-gradient(135deg,#fff7d9 0%,#fff8fa 43%,#f1efff 100%);border:1px solid #f0e9df}.tg-hero:before,.tg-hero:after{content:"";position:absolute;border-radius:50%;pointer-events:none}.tg-hero:before{width:15px;height:15px;background:var(--tg-purple);left:45%;top:45px;box-shadow:40px 26px 0 var(--tg-pink),-28px 56px 0 var(--tg-mint)}.tg-hero:after{width:13px;height:13px;border:4px solid var(--tg-orange);right:48%;bottom:58px;transform:rotate(18deg)}
.tg-free-badge{display:inline-flex;align-items:center;width:max-content;max-width:100%;padding:8px 13px;border-radius:999px;background:#fff;color:var(--tg-purple-dark);font-size:12px;font-weight:900;letter-spacing:.02em;box-shadow:0 7px 20px rgba(70,56,142,.09);border:1px solid rgba(111,87,239,.12)}
.tg-eyebrow,.tg-kicker{font-size:12px;font-weight:950;letter-spacing:.13em;color:var(--tg-purple);text-transform:uppercase}.tg-hero h1,.tg-library-hero h1,.tg-model-head h1{font-size:clamp(43px,5.5vw,70px);line-height:.98;letter-spacing:-.055em;margin:16px 0 22px;font-weight:950}.tg-hero h1 em{font-style:normal;color:var(--tg-purple)}.tg-hero p{font-size:19px;max-width:680px;color:#60667f}.tg-hero-actions{display:flex;flex-wrap:wrap;gap:12px;margin:27px 0 18px}
.tg-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;text-decoration:none;border:0;border-radius:15px;padding:14px 20px;font-weight:900;cursor:pointer;font:inherit;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}.tg-btn:hover{transform:translateY(-2px)}.tg-btn-primary{background:linear-gradient(135deg,var(--tg-purple),#8069f5);color:#fff;box-shadow:0 8px 0 #4f40b8,0 14px 25px rgba(111,87,239,.22)}.tg-btn-primary:active{transform:translateY(4px);box-shadow:0 4px 0 #4f40b8}.tg-btn-soft{background:#fff;color:var(--tg-ink);border:2px solid #ece8f4;box-shadow:0 8px 20px rgba(42,37,80,.06)}.tg-proof{display:flex;flex-wrap:wrap;gap:9px 18px;color:#5f657a;font-size:14px;font-weight:800}
.tg-hero-art{height:430px;position:relative;border-radius:38px;background:radial-gradient(circle at 24% 18%,rgba(255,255,255,.11),transparent 23%),linear-gradient(145deg,#252846,#1c2039);box-shadow:0 28px 65px rgba(57,49,112,.28);transform:rotate(1.2deg);overflow:visible;border:7px solid rgba(255,255,255,.72)}.tg-hero-art:before{content:"";position:absolute;inset:20px;border-radius:26px;border:1px dashed rgba(255,255,255,.16)}.tg-shape{position:absolute;filter:drop-shadow(0 10px 9px rgba(0,0,0,.18))}.tg-s1{left:16%;top:17%;width:0;height:0;border-left:82px solid transparent;border-right:82px solid transparent;border-bottom:116px solid #ff667f;transform:rotate(45deg)}.tg-s2{right:8%;top:10%;width:0;height:0;border-left:92px solid transparent;border-right:92px solid transparent;border-bottom:130px solid #ffd45b;transform:rotate(-35deg)}.tg-s3{left:35%;bottom:18%;width:108px;height:108px;background:#72c7ff;transform:rotate(45deg);border-radius:4px}.tg-s4{left:2%;bottom:5%;width:0;height:0;border-left:75px solid transparent;border-right:75px solid transparent;border-bottom:106px solid #81e4c5;transform:rotate(12deg)}.tg-s5{right:10%;bottom:9%;width:154px;height:68px;background:#a98df4;transform:skewX(-35deg) rotate(15deg);border-radius:4px}.tg-s6{left:51%;top:33%;width:0;height:0;border-left:55px solid transparent;border-right:55px solid transparent;border-bottom:79px solid #ff9a58;transform:rotate(150deg)}.tg-s7{right:36%;top:8%;width:0;height:0;border-left:43px solid transparent;border-right:43px solid transparent;border-bottom:61px solid #f062b7;transform:rotate(-80deg)}
.tg-badge{position:absolute;right:24px;bottom:25px;background:#fff;border-radius:24px;min-width:145px;padding:14px 18px;display:grid;gap:1px;text-align:left;font-size:29px;font-weight:950;line-height:1;color:var(--tg-ink);transform:rotate(-4deg);box-shadow:0 14px 34px rgba(0,0,0,.25)}.tg-badge strong{font-size:17px;letter-spacing:.04em}.tg-badge small{font-size:9px;letter-spacing:.14em;color:var(--tg-muted)}.tg-float-note{position:absolute;z-index:4;background:#fff;border-radius:999px;padding:9px 13px;font-size:12px;font-weight:950;color:var(--tg-ink);box-shadow:0 10px 24px rgba(0,0,0,.18)}.tg-note-top{top:-18px;left:35px;transform:rotate(-6deg)}.tg-note-side{right:-24px;top:72px;transform:rotate(7deg);background:#fff1ac}
.tg-quick-grid{max-width:1180px;margin:-16px auto 12px;padding:0 20px;position:relative;z-index:3;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}.tg-quick-card{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;text-decoration:none;border-radius:20px;padding:17px 18px;border:1px solid rgba(60,55,90,.07);box-shadow:0 10px 26px rgba(49,45,86,.08);transition:transform .16s ease,box-shadow .16s ease}.tg-quick-card:hover{transform:translateY(-4px);box-shadow:0 16px 30px rgba(49,45,86,.13)}.tg-quick-card>span{width:45px;height:45px;border-radius:14px;background:#fff;display:grid;place-items:center;font-size:23px;box-shadow:0 6px 16px rgba(40,35,80,.08)}.tg-quick-card strong{display:block;font-size:15px;line-height:1.1}.tg-quick-card small{display:block;margin-top:4px;color:#62677b;font-size:11px}.tg-quick-card>b{font-size:25px}.tg-quick-purple{background:#eeeaff}.tg-quick-yellow{background:#fff2b9}.tg-quick-mint{background:#dcf8ee}.tg-quick-pink{background:#ffe3ef}
.tg-section{max-width:1240px;margin:0 auto;padding:72px 24px}.tg-section-head{max-width:790px;margin:0 auto 34px;text-align:center}.tg-section-head-left{max-width:1040px;display:flex;align-items:flex-start;gap:16px;text-align:left}.tg-section-emoji{display:block;font-size:30px;line-height:1;margin-bottom:8px}.tg-section-head-left .tg-section-emoji{width:58px;height:58px;flex:0 0 58px;border-radius:18px;background:#eeeaff;display:grid;place-items:center;margin-top:3px}.tg-section-head h2,.tg-seo-copy h2{font-size:clamp(31px,4vw,50px);line-height:1.05;letter-spacing:-.04em;margin:7px 0 12px}.tg-section-head p,.tg-seo-copy p{color:var(--tg-muted)}.tg-section-head p strong{color:var(--tg-ink)}
.tg-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.tg-card{display:block;text-decoration:none;color:inherit;background:#fff;border:1px solid #ebe9f2;border-radius:22px;overflow:hidden;box-shadow:0 7px 22px rgba(37,32,79,.06);transition:.18s transform,.18s box-shadow}.tg-card:hover{transform:translateY(-5px) rotate(-.25deg);box-shadow:0 17px 34px rgba(37,32,79,.13)}.tg-card-preview{aspect-ratio:1.16;background:radial-gradient(circle at 85% 15%,rgba(255,214,92,.36),transparent 25%),linear-gradient(135deg,#f4f1ff,#fff7fb);display:grid;place-items:center;padding:18px}.tg-card-preview img{width:100%;height:100%;object-fit:contain}.tg-card-body{padding:15px;display:grid;gap:5px}.tg-card-body strong{font-size:17px}.tg-card-body>span:last-child{font-size:13px;color:var(--tg-muted)}.tg-pill{justify-self:start;font-size:10px;text-transform:uppercase;letter-spacing:.07em;font-weight:950;padding:5px 9px;border-radius:999px;background:#efeff7}.tg-pill-facile{background:#dcf8ed;color:#087c5a}.tg-pill-intermediaire{background:#e5f3ff;color:#12649c}.tg-pill-difficile{background:#fff1cd;color:#9a5b00}.tg-pill-expert{background:#ffe4ee;color:#a51e52}.tg-center{text-align:center;margin-top:30px}
.tg-feature-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.tg-feature-grid-four{grid-template-columns:repeat(4,1fr)}.tg-feature-grid article{position:relative;background:#fff;border:1px solid var(--tg-line);border-radius:24px;padding:26px;box-shadow:0 8px 22px rgba(47,43,80,.05)}.tg-feature-grid article>span{width:54px;height:54px;display:grid;place-items:center;border-radius:17px;background:#f3f0ff;font-size:29px}.tg-feature-grid article:nth-child(2)>span{background:#fff1ba}.tg-feature-grid article:nth-child(3)>span{background:#dcf8ee}.tg-feature-grid article:nth-child(4)>span{background:#ffe3ef}.tg-feature-grid h3{font-size:20px;margin:14px 0 6px}.tg-feature-grid p{color:var(--tg-muted);margin:0}.tg-feature-grid h3 a{text-decoration:none}.tg-feature-grid h3 a:hover{text-decoration:underline}.tg-seo-copy{max-width:900px;background:#fff;border:1px solid #eeeaf2;border-radius:28px;margin-bottom:60px;padding:42px}.tg-seo-copy h3{font-size:25px;margin-top:34px}
.tg-first-play{padding-top:82px}.tg-game-shell{max-width:1040px;margin:0 auto;background:#fff;border:1px solid #ebe8f3;border-radius:30px;padding:19px;box-shadow:0 24px 65px rgba(46,40,92,.12)}.tg-game-topbar{display:flex;justify-content:space-between;gap:22px;align-items:center;padding:4px 4px 16px}.tg-game-title{display:flex;align-items:center;gap:12px}.tg-game-icon{width:52px;height:52px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(135deg,#eeeaff,#fff1c8);font-size:27px}.tg-game-topbar h2{font-size:27px;line-height:1.05;margin:3px 0}.tg-game-topbar p{margin:4px 0 0;color:var(--tg-muted);font-size:13px}.tg-game-stats{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.tg-stat{min-width:82px;background:#f7f5fb;border:1px solid #eeebf4;border-radius:14px;padding:8px 11px;text-align:center}.tg-stat span{display:block;font-size:9px;letter-spacing:.06em;text-transform:uppercase;color:var(--tg-muted);font-weight:850}.tg-stat strong{display:block;font-size:15px;margin-top:2px;color:var(--tg-ink)}
.tg-mode-row{display:flex;gap:8px;margin-bottom:12px;padding:6px;background:#f5f3fa;border-radius:16px;width:max-content;max-width:100%;overflow:auto}.tg-mode-row button,.tg-controls button{border:0;color:var(--tg-ink);font-weight:850;cursor:pointer;font-family:inherit}.tg-mode-row button{background:transparent;border-radius:11px;padding:9px 13px;white-space:nowrap}.tg-mode-row button.is-active{background:#fff;color:var(--tg-purple-dark);box-shadow:0 5px 13px rgba(55,48,101,.11)}
.tg-board-wrap{position:relative;background:radial-gradient(circle at 1px 1px,rgba(111,87,239,.10) 1.2px,transparent 1.3px),linear-gradient(145deg,#f8f6ff,#fffaf0);background-size:18px 18px,auto;border-radius:24px;overflow:hidden;border:1px solid #e9e6f1;min-height:500px}.tg-board-label{position:absolute;left:15px;top:14px;z-index:2;background:rgba(255,255,255,.93);border:1px solid rgba(229,226,239,.95);border-radius:14px;padding:8px 11px;box-shadow:0 6px 16px rgba(43,38,77,.07);pointer-events:none}.tg-board-label span{display:block;color:var(--tg-purple);font-size:9px;letter-spacing:.1em;text-transform:uppercase;font-weight:950}.tg-board-label strong{display:block;font-size:11px;margin-top:1px}.tg-board{display:block;width:100%;height:auto;min-height:520px;touch-action:none;user-select:none;-webkit-user-select:none}.tg-target-sil{fill:#252940;opacity:.96}.tg-guide{stroke:#fff;stroke-width:.45;opacity:.34}.tg-piece{stroke:#fff;stroke-width:.7;cursor:pointer;filter:drop-shadow(0 3px 3px rgba(0,0,0,.22));transition:filter .12s ease,opacity .12s ease}.tg-piece:hover{filter:drop-shadow(0 6px 5px rgba(28,30,55,.25))}.tg-piece.is-selected{stroke:#20243a;stroke-width:1.25;filter:drop-shadow(0 7px 6px rgba(28,30,55,.30))}.tg-piece.is-pressed{opacity:.92}.tg-piece.is-dragging{cursor:grabbing;filter:drop-shadow(0 10px 8px rgba(28,30,55,.34))}.tg-piece.is-solved{cursor:default;filter:none}.tg-hint-pulse{animation:tgPulse 650ms ease-in-out infinite alternate}@keyframes tgPulse{from{opacity:.45}to{opacity:1}}
.tg-controls{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.tg-controls button{background:#f4f2f8;border-radius:12px;padding:10px 13px;transition:background .15s ease,transform .15s ease}.tg-controls button:hover{background:#eae6f4;transform:translateY(-1px)}.tg-controls .tg-control-main{background:#eeeaff;color:var(--tg-purple-dark)}.tg-gesture-help{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.tg-gesture-help span{background:#fff9dc;border:1px solid #f4e9ad;color:#5d5a50;border-radius:999px;padding:7px 10px;font-size:12px}.tg-gesture-help b{color:var(--tg-ink)}
.tg-win{position:absolute;inset:16% 21%;background:#fff;border-radius:28px;box-shadow:0 24px 70px rgba(28,32,57,.28);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;z-index:8;padding:28px;border:2px solid #f2eff9}.tg-win[hidden]{display:none}.tg-win-icon{font-size:50px}.tg-win strong{font-size:36px;line-height:1.1;margin:6px 0}.tg-win>span:not(.tg-win-icon){color:var(--tg-muted);margin-bottom:14px}.tg-win button{border:0;background:linear-gradient(135deg,var(--tg-purple),#8069f5);color:#fff;border-radius:13px;padding:12px 16px;font-weight:900;cursor:pointer}
.tg-library-hero{padding:70px 24px 38px;max-width:1100px;margin:auto;text-align:center}.tg-library-hero:before{content:"🌈";display:block;font-size:34px}.tg-library-hero h1{font-size:clamp(42px,6vw,68px)}.tg-library-hero p{color:var(--tg-muted);font-size:18px}.tg-filterbar{max-width:900px;margin:0 auto 28px;display:grid;grid-template-columns:1fr 240px;gap:10px;padding:0 24px}.tg-filterbar input,.tg-filterbar select{border:1px solid var(--tg-line);border-radius:15px;padding:14px 16px;background:white;font:inherit;box-shadow:0 5px 14px rgba(37,32,79,.04)}.tg-library>.tg-grid{max-width:1240px;margin:auto;padding:0 24px 74px}.tg-empty{text-align:center;color:var(--tg-muted)}
.tg-breadcrumb{max-width:1240px;margin:auto;padding:24px;display:flex;flex-wrap:wrap;gap:7px;color:var(--tg-muted);font-size:13px}.tg-breadcrumb a{color:var(--tg-purple);text-decoration:none}.tg-model-head{max-width:1180px;margin:10px auto 42px;padding:36px;display:grid;grid-template-columns:1fr 290px;gap:45px;align-items:center;background:linear-gradient(135deg,#fff4c9,#f3efff 70%,#ffe9f2);border:1px solid #eee7dc;border-radius:32px}.tg-model-head h1{font-size:clamp(38px,5vw,60px)}.tg-model-head>img{width:100%;border-radius:26px;background:#fff;border:1px solid var(--tg-line);box-shadow:0 12px 28px rgba(50,44,89,.10);padding:10px}.tg-model-page>.tg-game-shell{margin-bottom:20px}.tg-model-actions{max-width:1040px;margin:0 auto;display:flex;gap:10px;padding:0 0 30px}.tg-solution{max-width:800px;margin:0 auto 20px;padding:24px;background:#fff;border:1px solid var(--tg-line);border-radius:24px;display:none}.tg-solution.is-open{display:block}.tg-solution svg{width:100%;max-height:420px}.tg-solution polygon:nth-of-type(1){fill:#6F57EF}.tg-solution polygon:nth-of-type(2){fill:#22B8A7}.tg-solution polygon:nth-of-type(3){fill:#42A5F5}.tg-solution polygon:nth-of-type(4){fill:#FF8A65}.tg-solution polygon:nth-of-type(5){fill:#FF5C7C}.tg-solution polygon:nth-of-type(6){fill:#FFD45B}.tg-solution polygon:nth-of-type(7){fill:#F062B7}.tg-solution polygon{stroke:#fff;stroke-width:.55}
@media(max-width:1050px){.tg-hero{margin-left:16px;margin-right:16px}.tg-quick-grid{grid-template-columns:repeat(2,1fr);max-width:900px}.tg-feature-grid-four{grid-template-columns:repeat(2,1fr)}}
@media(max-width:900px){.tg-hero{grid-template-columns:1fr;padding-top:46px}.tg-hero-art{height:340px;max-width:600px;width:100%;margin:auto}.tg-grid{grid-template-columns:repeat(2,1fr)}.tg-feature-grid{grid-template-columns:1fr}.tg-feature-grid-four{grid-template-columns:repeat(2,1fr)}.tg-model-head{grid-template-columns:1fr;margin-left:16px;margin-right:16px}.tg-model-head>img{max-width:300px;margin:auto}.tg-game-topbar{align-items:flex-start;flex-direction:column}.tg-game-stats{justify-content:flex-start}.tg-filterbar{grid-template-columns:1fr}.tg-board{min-height:470px}.tg-section-head-left{display:block;text-align:center}.tg-section-head-left .tg-section-emoji{margin:0 auto 12px}}
@media(max-width:620px){.tg-page{overflow:visible}.tg-hero{margin:10px 10px 0;padding:34px 18px 40px;border-radius:28px}.tg-hero h1{font-size:42px}.tg-hero p{font-size:16px}.tg-hero-art{height:285px;border-width:5px;border-radius:28px}.tg-note-side{right:-5px}.tg-note-top{left:18px}.tg-badge{right:13px;bottom:14px;min-width:128px}.tg-quick-grid{grid-template-columns:1fr;padding:0 12px;margin:12px auto 0}.tg-quick-card{padding:13px 14px}.tg-section{padding:54px 14px}.tg-grid{grid-template-columns:1fr 1fr;gap:10px}.tg-card-body{padding:11px}.tg-card-body strong{font-size:14px}.tg-card-body>span:last-child{font-size:11px}.tg-game-shell{border-radius:22px;padding:10px}.tg-game-topbar h2{font-size:22px}.tg-game-title{align-items:flex-start}.tg-game-icon{width:44px;height:44px;flex:0 0 44px}.tg-game-stats{display:grid;grid-template-columns:repeat(3,1fr);width:100%}.tg-stat{min-width:0;padding:7px 5px}.tg-mode-row{width:100%}.tg-mode-row button{flex:1 0 auto}.tg-board-wrap{min-height:430px}.tg-board{min-height:430px}.tg-board-label strong{display:none}.tg-controls button{flex:1 1 44%;font-size:12px}.tg-gesture-help{display:grid}.tg-gesture-help span{border-radius:12px}.tg-win{inset:17% 7%;padding:20px}.tg-win strong{font-size:30px}.tg-model-actions{padding:0 14px 24px;flex-direction:column}.tg-feature-grid-four{grid-template-columns:1fr}.tg-seo-copy{padding:25px 20px;border-radius:22px}.tg-model-head{padding:24px 18px}.tg-model-head h1{font-size:38px}}

/* ============================================================
   V3 — PLATEAU DESKTOP COMPACT / ERGONOMIQUE
   Ne modifie pas tablette/mobile (<= 900px).
   ============================================================ */
@media(min-width:901px){
  .tg-first-play{padding-top:62px}
  .tg-game-shell{max-width:860px;padding:15px;border-radius:26px;box-shadow:0 18px 48px rgba(46,40,92,.11)}
  .tg-game-topbar{gap:14px;padding:2px 2px 12px}
  .tg-game-title{gap:10px;min-width:0}
  .tg-game-icon{width:46px;height:46px;flex:0 0 46px;border-radius:14px;font-size:24px}
  .tg-game-topbar h2{font-size:23px}
  .tg-game-topbar p{font-size:12px}
  .tg-game-stats{gap:6px}
  .tg-stat{min-width:72px;padding:6px 8px;border-radius:12px}
  .tg-stat span{font-size:8px}
  .tg-stat strong{font-size:14px}
  .tg-mode-row{margin-bottom:9px;padding:5px}
  .tg-mode-row button{padding:8px 11px}
  .tg-board-wrap{min-height:405px;border-radius:20px}
  .tg-board{min-height:405px}
  .tg-board-label{left:12px;top:11px;padding:7px 9px;border-radius:12px}
  .tg-controls{gap:6px;margin-top:9px}
  .tg-controls button{padding:9px 11px;font-size:13px}
  .tg-gesture-help{gap:6px;margin-top:9px}
  .tg-gesture-help span{padding:6px 9px;font-size:11px}
  .tg-model-actions{max-width:860px}
}
