/* CheckMatePub — calcaire, mer, tomette, soleil */
:root {
  --cav: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='50 -820 900 900'%3E%3Cpath transform='scale%281,-1%29' fill='black' d='M336 0Q336 49 348.0 90.0Q360 131 375 152Q383 163 399.5 181.5Q416 200 443 227Q475 259 488.5 279.5Q502 300 502 321Q502 331 500 339H496Q495 331 481.5 316.0Q468 301 448 295Q438 292 421.5 289.5Q405 287 382 285Q370 277 356.5 263.0Q343 249 328 229Q298 190 274 190Q248 190 231.5 196.0Q215 202 205 218L160 289Q167 302 174.5 322.0Q182 342 191 367Q200 393 209.5 411.5Q219 430 227 440Q244 462 256 505Q264 534 271.5 552.5Q279 571 293.0 585.0Q307 599 335 614Q344 643 344 675Q344 691 342.0 706.5Q340 722 336 738H360Q413 718 424 668H430Q434 677 436.0 698.0Q438 719 438 733Q438 742 437.5 751.0Q437 760 436 767H471Q501 751 519.0 718.0Q537 685 537 647Q599 630 654.5 584.0Q710 538 751.5 467.0Q793 396 812 304Q826 235 833.0 161.5Q840 88 840 9V0ZM706 67H772Q772 145 763.5 219.0Q755 293 737.0 355.0Q719 417 689 459Q667 491 644.0 515.0Q621 539 597 554L588 548Q630 513 657.5 470.5Q685 428 699.0 364.0Q713 300 713 198Q713 161 711.5 128.0Q710 95 706 67ZM358 494Q371 494 383 504Q395 514 408 514L416 513V522L388 530Q382 532 375.5 533.0Q369 534 363 534Q347 534 336.5 528.0Q326 522 326 511V504L327 500Q335 494 358 494ZM258 279Q261 293 272.0 311.5Q283 330 303 344L299 349Q271 348 253.5 334.5Q236 321 231 301Q235 293 243.5 286.5Q252 280 258 279Z'/%3E%3C/svg%3E");
  --fond: #F4EEE3;
  --fond-2: #ECE4D5;
  --carte: #FFFCF6;
  --encre: #15222C;
  --encre-2: #4E5B63;
  --encre-3: #8A9196;
  --ligne: #E2D8C6;
  --mer: #0F3B57;
  --mer-2: #22597A;
  --mer-pale: #DCE7EC;
  --tomette: #B8472A;
  --tomette-2: #D0623F;
  --tomette-pale: #F5DED3;
  --soleil: #E3A33A;
  --soleil-pale: #FBEBCB;
  --pin: #3D6A4B;
  --pin-pale: #DCEAD9;
  --rouge: #B3261E;
  --ombre: 0 1px 2px rgba(21, 34, 44, .06), 0 6px 22px -8px rgba(21, 34, 44, .16);
  --ombre-haute: 0 24px 60px -18px rgba(11, 23, 32, .45);
  --rayon: 18px;
  --rayon-s: 12px;
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Instrument Sans', -apple-system, 'Segoe UI', system-ui, sans-serif;
  --pieces: 'Noto Sans Symbols 2', 'Segoe UI Symbol', 'Apple Symbols', sans-serif;
  --rail: 92px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond: #0B1720; --fond-2: #0F1F2A; --carte: #13252F; --encre: #F1E9DA; --encre-2: #B9B3A6; --encre-3: #7F8A8F;
    --ligne: #23394A; --mer: #6FA9C9; --mer-2: #8CBFDA; --mer-pale: #17323F; --tomette: #E07452; --tomette-2: #EA8A69;
    --tomette-pale: #3A2219; --soleil: #F0B652; --soleil-pale: #3A2E17; --pin: #7FB28D; --pin-pale: #1B3124; --rouge: #F2867D;
    --ombre: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fond: #0B1720; --fond-2: #0F1F2A; --carte: #13252F; --encre: #F1E9DA; --encre-2: #B9B3A6; --encre-3: #7F8A8F;
  --ligne: #23394A; --mer: #6FA9C9; --mer-2: #8CBFDA; --mer-pale: #17323F; --tomette: #E07452; --tomette-2: #EA8A69;
  --tomette-pale: #3A2219; --soleil: #F0B652; --soleil-pale: #3A2E17; --pin: #7FB28D; --pin-pale: #1B3124; --rouge: #F2867D;
  --ombre: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -10px rgba(0,0,0,.6); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fond); color: var(--encre); font: 16px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--mer-2); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; margin: 0; line-height: 1.1; }
h1 { font-size: clamp(30px, 4.4vw, 48px); font-variation-settings: 'opsz' 144; }
h2 { font-size: 24px; font-variation-settings: 'opsz' 72; }
h3 { font-size: 18px; }
.p { display: inline-block; width: 1em; height: 1em; line-height: 1; vertical-align: -.12em; background: currentColor; -webkit-mask: var(--piece) center / contain no-repeat; mask: var(--piece) center / contain no-repeat; }
[data-piece="R"] { --piece: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='50 -820 900 900'%3E%3Cpath transform='scale%281,-1%29' fill='black' d='M500 -34Q454 -34 417.0 -29.5Q380 -25 353 -18Q299 -3 299 24L313 227Q203 343 203 436Q203 499 235.5 536.0Q268 573 325 573Q391 573 439 525L435 591Q432 628 483 636V692H442V716H483V753H517V716H558V692H517V636Q568 628 565 591L561 525Q609 573 675 573Q732 573 764.5 536.0Q797 499 797 436Q797 343 687 227L701 24Q701 -3 647 -18Q620 -25 583.5 -29.5Q547 -34 500 -34ZM500 422Q515 462 528 483V578Q528 611 500 611Q472 611 472 578V483Q485 462 500 422ZM500 448Q498 457 494.5 469.0Q491 481 487 491V562Q487 570 489.0 577.5Q491 585 500 585Q509 585 511.0 577.5Q513 570 513 562V491Q509 481 505.5 469.0Q502 457 500 448ZM347 247Q422 262 479 262V294Q479 338 467.5 380.0Q456 422 435.0 456.0Q414 490 386.5 510.5Q359 531 327 531Q290 531 269.0 504.5Q248 478 248 431Q248 393 276.0 342.0Q304 291 347 247ZM653 247Q696 291 724.0 342.0Q752 393 752 431Q752 478 731.5 504.5Q711 531 673 531Q641 531 613.5 510.5Q586 490 565.0 456.0Q544 422 532.5 380.0Q521 338 521 294V262Q578 262 653 247ZM351 279Q279 363 279 422Q279 457 293.5 478.0Q308 499 337 499Q370 499 396.5 468.5Q423 438 438.5 391.5Q454 345 454 295V290Q436 290 410.5 287.0Q385 284 351 279ZM649 279Q615 284 589.5 287.0Q564 290 546 290V295Q546 345 561.5 391.5Q577 438 604.0 468.5Q631 499 663 499Q692 499 706.5 478.0Q721 457 721 422Q721 363 649 279ZM353 149Q363 153 386.5 157.0Q410 161 440.5 163.5Q471 166 500 166Q530 166 560.0 163.5Q590 161 613.5 157.0Q637 153 647 149L645 177Q613 185 577.0 189.5Q541 194 500 194Q460 194 423.5 189.5Q387 185 355 177ZM346 72Q399 90 500 90Q602 90 654 72L652 98Q624 106 582.0 112.0Q540 118 500 118Q460 118 418.0 112.0Q376 106 348 98Z'/%3E%3C/svg%3E"); }
[data-piece="D"] { --piece: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='50 -820 900 900'%3E%3Cpath transform='scale%281,-1%29' fill='black' d='M500 -34Q454 -34 417.0 -29.5Q380 -25 353 -18Q299 -3 299 24L302 239L210 518Q207 517 202.5 516.5Q198 516 192 516Q164 516 144.5 535.5Q125 555 125 586Q125 614 145.0 633.0Q165 652 193 652Q222 652 241.5 632.5Q261 613 261 584Q261 568 253.0 551.5Q245 535 231 527L362 306L333 598H331Q305 598 284.5 618.0Q264 638 264 666Q264 694 283.5 714.5Q303 735 331 735Q359 735 379.5 715.5Q400 696 400 667Q400 645 388.5 628.0Q377 611 356 603L450 318L488 632Q465 636 448.5 654.5Q432 673 432 699Q432 728 452.0 747.5Q472 767 500 767Q528 767 548.0 747.5Q568 728 568 699Q568 673 551.5 654.5Q535 636 512 632L550 318L644 603Q623 611 611.5 628.0Q600 645 600 667Q600 696 620.5 715.5Q641 735 669 735Q698 735 717.0 714.5Q736 694 736 666Q736 638 715.5 618.0Q695 598 669 598H667L638 306L769 527Q756 535 747.5 551.5Q739 568 739 584Q739 613 758.5 632.5Q778 652 807 652Q836 652 855.5 633.0Q875 614 875 586Q875 555 855.5 535.5Q836 516 808 516Q802 516 797.5 516.5Q793 517 790 518L698 239L701 24Q701 -4 647 -19Q593 -34 500 -34ZM482 681Q493 681 500.0 688.5Q507 696 507 706Q507 717 500.0 724.0Q493 731 482 731Q472 731 464.5 724.0Q457 717 457 706Q457 696 464.5 688.5Q472 681 482 681ZM650 649Q661 649 668.0 656.5Q675 664 675 674Q675 685 668.0 692.0Q661 699 650 699Q640 699 632.5 692.0Q625 685 625 674Q625 664 632.5 656.5Q640 649 650 649ZM315 649Q326 649 333.0 656.5Q340 664 340 674Q340 685 333.0 692.0Q326 699 315 699Q305 699 297.5 692.0Q290 685 290 674Q290 664 297.5 656.5Q305 649 315 649ZM789 568Q800 568 807.0 575.5Q814 583 814 593Q814 604 807.0 611.0Q800 618 789 618Q779 618 771.5 611.0Q764 604 764 593Q764 583 771.5 575.5Q779 568 789 568ZM175 568Q186 568 193.0 575.5Q200 583 200 593Q200 604 193.0 611.0Q186 618 175 618Q165 618 157.5 611.0Q150 604 150 593Q150 583 157.5 575.5Q165 568 175 568ZM334 174Q397 194 500 194Q544 194 590.0 189.5Q636 185 667 174V192Q655 197 625.5 201.5Q596 206 561.5 209.0Q527 212 500 212Q472 212 437.5 209.0Q403 206 374.5 201.5Q346 197 334 192ZM333 114Q396 134 500 134Q542 134 589.0 129.0Q636 124 668 114V132Q657 137 627.5 141.5Q598 146 563.0 149.0Q528 152 500 152Q473 152 438.5 149.0Q404 146 374.5 141.5Q345 137 333 132ZM332 56Q359 65 405.0 69.5Q451 74 500 74Q548 74 595.5 69.5Q643 65 669 56V72Q657 77 628.0 81.5Q599 86 564.0 89.0Q529 92 500 92Q472 92 437.5 89.0Q403 86 373.5 81.5Q344 77 332 72Z'/%3E%3C/svg%3E"); }
[data-piece="T"] { --piece: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='50 -820 900 900'%3E%3Cpath transform='scale%281,-1%29' fill='black' d='M176 0V91H236V159H278L316 227V531L278 599H236V719H360V690H420V715H581V690H641V719H765V599H722L685 531V227L722 159H765V91H825V0ZM266 622H735V643H266ZM326 564H675L687 585H314ZM311 169H690L678 190H323ZM266 101H735V122H266ZM206 33H795V54H206Z'/%3E%3C/svg%3E"); }
[data-piece="F"] { --piece: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='50 -820 900 900'%3E%3Cpath transform='scale%281,-1%29' fill='black' d='M153 -49V48Q169 62 198.0 71.5Q227 81 262 81H406Q429 81 441.0 84.5Q453 88 453 104Q338 111 338 153Q338 159 341 165L376 255Q341 277 320.5 318.5Q300 360 300 407Q300 472 346.0 531.5Q392 591 472 636Q444 652 444 685Q444 708 460.5 724.5Q477 741 500 741Q523 741 539.5 724.5Q556 708 556 685Q556 652 528 636Q608 591 654.0 531.5Q700 472 700 407Q700 360 679.5 318.5Q659 277 624 255L659 165Q662 159 662 153Q662 111 547 104Q547 88 559.0 84.5Q571 81 594 81H738Q773 81 802.0 71.5Q831 62 847 48V-49H822Q815 -6 746 -6H559Q515 -6 500 21Q485 -6 441 -6H254Q185 -6 178 -49ZM483 292H517V470H597V502H517V582H483V502H403V470H483ZM403 193Q432 203 500 203Q568 203 597 193L582 230Q560 226 540.5 224.0Q521 222 500 222Q479 222 459.5 224.0Q440 226 418 230ZM500 136Q528 136 547.5 137.5Q567 139 580 141Q606 146 606 153Q606 160 578 166Q564 169 544.5 170.0Q525 171 500 171Q475 171 455.5 170.0Q436 169 422 166Q394 160 394 153Q394 146 420 141Q433 139 452.5 137.5Q472 136 500 136Z'/%3E%3C/svg%3E"); }
[data-piece="C"] { --piece: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='50 -820 900 900'%3E%3Cpath transform='scale%281,-1%29' fill='black' d='M336 0Q336 49 348.0 90.0Q360 131 375 152Q383 163 399.5 181.5Q416 200 443 227Q475 259 488.5 279.5Q502 300 502 321Q502 331 500 339H496Q495 331 481.5 316.0Q468 301 448 295Q438 292 421.5 289.5Q405 287 382 285Q370 277 356.5 263.0Q343 249 328 229Q298 190 274 190Q248 190 231.5 196.0Q215 202 205 218L160 289Q167 302 174.5 322.0Q182 342 191 367Q200 393 209.5 411.5Q219 430 227 440Q244 462 256 505Q264 534 271.5 552.5Q279 571 293.0 585.0Q307 599 335 614Q344 643 344 675Q344 691 342.0 706.5Q340 722 336 738H360Q413 718 424 668H430Q434 677 436.0 698.0Q438 719 438 733Q438 742 437.5 751.0Q437 760 436 767H471Q501 751 519.0 718.0Q537 685 537 647Q599 630 654.5 584.0Q710 538 751.5 467.0Q793 396 812 304Q826 235 833.0 161.5Q840 88 840 9V0ZM706 67H772Q772 145 763.5 219.0Q755 293 737.0 355.0Q719 417 689 459Q667 491 644.0 515.0Q621 539 597 554L588 548Q630 513 657.5 470.5Q685 428 699.0 364.0Q713 300 713 198Q713 161 711.5 128.0Q710 95 706 67ZM358 494Q371 494 383 504Q395 514 408 514L416 513V522L388 530Q382 532 375.5 533.0Q369 534 363 534Q347 534 336.5 528.0Q326 522 326 511V504L327 500Q335 494 358 494ZM258 279Q261 293 272.0 311.5Q283 330 303 344L299 349Q271 348 253.5 334.5Q236 321 231 301Q235 293 243.5 286.5Q252 280 258 279Z'/%3E%3C/svg%3E"); }
[data-piece="P"] { --piece: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='50 -820 900 900'%3E%3Cpath transform='scale%281,-1%29' fill='black' d='M186 0V37Q186 115 210.5 180.5Q235 246 280.0 293.0Q325 340 386 360Q318 404 318 473Q318 526 351.0 565.0Q384 604 445 623Q424 631 411.5 648.0Q399 665 399 688Q399 719 426.5 737.0Q454 755 500 755Q546 755 573.5 737.0Q601 719 601 688Q601 665 588.0 647.5Q575 630 555 623Q615 604 648.5 565.0Q682 526 682 473Q682 404 614 360Q676 340 721.0 293.0Q766 246 790.0 180.5Q814 115 814 37V0ZM445 644Q432 654 432 684Q432 715 461 733Q450 733 435.0 718.5Q420 704 420 683Q420 669 428.0 657.5Q436 646 445 644ZM406 396Q393 415 386.5 433.0Q380 451 380 479Q380 548 439 585Q422 584 402.0 569.5Q382 555 368.5 531.0Q355 507 355 478Q355 450 371.0 426.5Q387 403 406 396ZM238 62H272V76Q275 161 300.5 213.5Q326 266 370 298Q309 278 273.5 220.0Q238 162 238 86Z'/%3E%3C/svg%3E"); }
.muet { color: var(--encre-3); }
.petit { font-size: 13px; }
.chiffre { font-family: var(--serif); font-variant-numeric: tabular-nums lining-nums; font-weight: 600; }
.cache { display: none !important; }
:focus-visible { outline: 3px solid var(--soleil); outline-offset: 2px; border-radius: 8px; }

/* ---------- Structure ---------- */
#app { min-height: 100dvh; }
#rail {
  position: fixed; inset: 0 auto 0 0; width: var(--rail); background: var(--mer); color: #F4EEE3;
  display: flex; flex-direction: column; align-items: center; padding: calc(18px + env(safe-area-inset-top)) 0 18px; gap: 6px; z-index: 20;
}
:root[data-theme="dark"] #rail { background: #081219; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #rail { background: #081219; } }
.marque { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--tomette); color: #FFF7EC; margin-bottom: 14px; text-decoration: none; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }
.marque .p { font-size: 32px; transform: translateY(-1px); }
.onglet {
  display: flex; flex-direction: column; align-items: center; gap: 4px; width: 76px; padding: 10px 4px; border-radius: 14px;
  color: rgba(244, 238, 227, .66); text-decoration: none; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; transition: background .2s, color .2s;
}
.onglet svg { width: 24px; height: 24px; }
.onglet:hover { color: #F4EEE3; background: rgba(255,255,255,.06); }
.onglet[aria-current="page"] { color: #fff; background: rgba(255,255,255,.12); }
.onglet[aria-current="page"] svg { color: var(--soleil); }
.rail-bas { margin-top: auto; }
#vue { margin-left: var(--rail); padding: calc(28px + env(safe-area-inset-top)) clamp(16px, 3.4vw, 44px) 60px; outline: none; max-width: 1480px; }

@media (max-width: 760px) {
  :root { --rail: 0px; }
  #rail {
    inset: auto 0 0 0; width: auto; height: calc(66px + env(safe-area-inset-bottom)); flex-direction: row; justify-content: space-around;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); gap: 0;
  }
  .marque, .rail-bas, .rail-ordi { display: none; }
  .onglet { width: auto; flex: 1; padding: 6px 2px; font-size: 10.5px; }
  #vue { padding: calc(18px + env(safe-area-inset-top)) 16px calc(96px + env(safe-area-inset-bottom)); }
}

/* ---------- Éléments ---------- */
.carte { background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 20px; border: 1px solid color-mix(in srgb, var(--ligne) 60%, transparent); }
.carte > h2, .carte > .entete-carte { margin-bottom: 14px; }
.entete-carte { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.entete-carte h2 { margin: 0; }
.surtitre { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--tomette); }
.grille { display: grid; gap: 20px; }
.deux-col { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); gap: 22px; align-items: start; }
@media (max-width: 1100px) { .deux-col { grid-template-columns: 1fr; } }
.pile { display: grid; gap: 22px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 20px; border-radius: 14px;
  border: 0; background: var(--fond-2); color: var(--encre); font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: transform .12s, background .2s, box-shadow .2s;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn.primaire { background: var(--tomette); color: #FFF8EF; box-shadow: inset 0 -3px 0 rgba(0,0,0,.16); }
.btn.primaire:hover { background: var(--tomette-2); }
.btn.mer { background: var(--mer); color: #F4EEE3; box-shadow: inset 0 -3px 0 rgba(0,0,0,.2); }
:root[data-theme="dark"] .btn.mer { color: #0B1720; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.mer { color: #0B1720; } }
.btn.contour { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ligne); }
.btn.contour:hover { box-shadow: inset 0 0 0 1.5px var(--encre-3); }
.btn.fantome { background: transparent; padding: 0 12px; }
.btn.fantome:hover { background: var(--fond-2); }
.btn.grand { min-height: 64px; font-size: 18px; border-radius: 18px; padding: 0 26px; }
.btn.bloc { width: 100%; }
.btn.petit-btn { min-height: 38px; font-size: 14px; padding: 0 14px; border-radius: 11px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.rangee { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.espace { flex: 1; }

.puce { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 99px; background: var(--fond-2); font-size: 13px; font-weight: 600; color: var(--encre-2); white-space: nowrap; }
.puce.mer { background: var(--mer-pale); color: var(--mer); }
.puce.tomette { background: var(--tomette-pale); color: var(--tomette); }
.puce.soleil { background: var(--soleil-pale); color: color-mix(in srgb, var(--soleil) 60%, var(--encre)); }
.puce.pin { background: var(--pin-pale); color: var(--pin); }
.puce .point { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.puce .point.vivant { animation: pouls 1.6s infinite; }
@keyframes pouls { 50% { opacity: .25; } }

.champ { display: grid; gap: 6px; }
.champ > span { font-size: 13px; font-weight: 600; color: var(--encre-2); }
.saisie {
  width: 100%; min-height: 52px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--ligne); background: var(--carte);
  font-size: 17px; outline: none; transition: border-color .2s, box-shadow .2s;
}
textarea.saisie { padding: 12px 16px; min-height: 90px; resize: vertical; }
.saisie:focus { border-color: var(--mer-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mer-2) 18%, transparent); }
.choix { display: flex; flex-wrap: wrap; gap: 8px; }
.choix button {
  min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--ligne); background: var(--carte); font-weight: 600;
}
.choix button[aria-pressed="true"] { border-color: var(--mer); background: var(--mer); color: #F4EEE3; }
:root[data-theme="dark"] .choix button[aria-pressed="true"] { color: #0B1720; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .choix button[aria-pressed="true"] { color: #0B1720; } }

/* ---------- Avatars (pièces) ---------- */
.av {
  --c: var(--tomette); position: relative; display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--c); color: #FFF8EE; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18), 0 0 0 2px var(--carte);
}
.av .p { font-size: .62em; font-size: calc(var(--t, 44px) * .56); transform: translateY(-.04em); }
.av.terre { --c: #B8472A; } .av.mer { --c: #1E5677; } .av.soleil { --c: #D3922A; } .av.pin { --c: #3D6A4B; } .av.nuit { --c: #26313B; } .av.rose { --c: #C25B78; }
.joueur { display: flex; align-items: center; gap: 12px; min-width: 0; }
.joueur .nom { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.joueur .sous { font-size: 13px; color: var(--encre-3); }
.joueur > div { min-width: 0; }

/* ---------- Héros du lieu ---------- */
.heros {
  position: relative; overflow: hidden; border-radius: 26px; padding: clamp(22px, 3.2vw, 38px); color: #F6EFE2;
  background:
    radial-gradient(circle at calc(100% - 104px) calc(100% - 78px), #E3A33A 0 60px, rgba(227, 163, 58, 0) 61px),
    linear-gradient(160deg, #134766 0%, #0F3B57 45%, #0B2B40 100%);
  box-shadow: var(--ombre-haute);
}
.heros::before {
  content: ''; position: absolute; inset: auto 0 0 0; height: 46%; opacity: .5;
  background:
    repeating-linear-gradient(0deg, transparent 0 17px, rgba(244, 238, 227, .07) 17px 18px);
  -webkit-mask: linear-gradient(transparent, #000); mask: linear-gradient(transparent, #000);
}
.heros::after { content: ''; position: absolute; right: 38px; bottom: -6px; width: 158px; height: 158px; background: #F6EFE2; -webkit-mask: var(--cav) center / contain no-repeat; mask: var(--cav) center / contain no-repeat; filter: drop-shadow(0 6px 0 rgba(0,0,0,.18)); z-index: 0; line-height: 1; pointer-events: none; }
.heros > * { position: relative; z-index: 1; }
.heros::before { z-index: 1; }
@media (max-width: 760px) {
  .heros { background: linear-gradient(160deg, #134766 0%, #0F3B57 45%, #0B2B40 100%); }
  .heros::after { background: rgba(246, 239, 226, .08); filter: none; right: -20px; }
}
.heros .surtitre { color: var(--soleil); }
.heros h1 { margin: 8px 0 6px; color: #FFF8EC; }
.heros .lieu-sous { color: rgba(246, 239, 226, .72); font-size: 17px; }
.heros .chiffres { display: flex; gap: clamp(18px, 4vw, 44px); margin: 26px 0 26px; flex-wrap: wrap; }
.heros .chiffres div { display: grid; }
.heros .chiffres b { font-family: var(--serif); font-size: 40px; line-height: 1; font-weight: 600; }
.heros .chiffres span { font-size: 13px; color: rgba(246, 239, 226, .66); margin-top: 4px; }
.heros .btn.contour { color: #F6EFE2; box-shadow: inset 0 0 0 1.5px rgba(246, 239, 226, .35); }
.heros .btn.contour:hover { background: rgba(255,255,255,.08); }
.heros .btn.clair { background: #F6EFE2; color: #0F3B57; }
.heros > .rangee { padding-right: 140px; }
@media (max-width: 760px) { .heros > .rangee { padding-right: 0; } }

/* ---------- Présents ---------- */
.presents { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 14px 8px; }
.present { color: inherit; text-decoration: none; display: grid; justify-items: center; gap: 6px; text-align: center; background: none; border: 0; padding: 4px; border-radius: 14px; }
.present:hover { background: var(--fond-2); }
.present .av { --t: 58px; width: 58px; height: 58px; }
.present .nom { font-size: 13.5px; font-weight: 600; max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.present .elo { font-size: 12px; color: var(--encre-3); margin-top: -4px; }
.vide { padding: 26px 16px; text-align: center; color: var(--encre-3); border: 1.5px dashed var(--ligne); border-radius: var(--rayon-s); }
.vide .p { display: block; margin: 0 auto 8px; font-size: 36px; color: var(--encre-3); opacity: .6; }

/* ---------- Parties ---------- */
.tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.table {
  position: relative; display: grid; gap: 12px; padding: 16px 16px 14px; border-radius: 16px; background: var(--fond); border: 1px solid var(--ligne);
}
.table .no { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--encre-3); }
.table .no b { color: var(--tomette); }
.face { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.face .cote { display: grid; justify-items: center; gap: 4px; text-align: center; min-width: 0; }
.face .cote .av { --t: 48px; width: 48px; height: 48px; }
.face .cote .nom { font-weight: 650; font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.face .vs { font-family: var(--serif); font-style: italic; color: var(--encre-3); font-size: 18px; }
.couleur { display: inline-block; width: 11px; height: 11px; border-radius: 3px; border: 1.5px solid var(--encre-3); vertical-align: -1px; margin-right: 4px; }
.couleur.b { background: #FFF; } .couleur.n { background: #1C252C; border-color: #1C252C; }
:root[data-theme="dark"] .couleur.n { border-color: #8A9196; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .couleur.n { border-color: #8A9196; } }
.table .actions { display: flex; gap: 8px; }
.table .actions .btn { flex: 1; }
.liste-parties { display: grid; }
.ligne-partie { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 11px 4px; border-bottom: 1px solid var(--ligne); font-size: 15px; }
.ligne-partie:last-child { border-bottom: 0; }
.ligne-partie .g { font-weight: 700; }
.ligne-partie .d { text-align: right; }
.score { font-family: var(--serif); font-weight: 600; font-size: 16px; padding: 3px 10px; border-radius: 8px; background: var(--fond-2); white-space: nowrap; }
.delta { font-size: 12px; font-weight: 700; }
.delta.plus { color: var(--pin); } .delta.moins { color: var(--rouge); }

/* ---------- QR ---------- */
.qr-carte { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.qr { width: 132px; height: 132px; padding: 9px; border-radius: 14px; background: #fff; flex: none; }
.qr svg { display: block; width: 100%; height: 100%; }

/* ---------- Calques (fenêtres) ---------- */
.calque { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(9, 18, 25, .52); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: apparait .18s ease-out; }
.fenetre {
  width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow: auto; background: var(--carte); border-radius: 26px; box-shadow: var(--ombre-haute);
  padding: 26px; animation: monte .26s cubic-bezier(.2, .9, .3, 1.2);
}
.fenetre.large { width: min(860px, 100%); }
.fenetre .entete-f { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.fermer { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--fond-2); display: grid; place-items: center; flex: none; }
.fermer svg { width: 20px; height: 20px; }
@keyframes apparait { from { opacity: 0; } }
@keyframes monte { from { transform: translateY(24px) scale(.98); opacity: 0; } }
@media (max-width: 600px) {
  .calque { place-items: end center; padding: 0; }
  .fenetre { border-radius: 26px 26px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); max-height: 94dvh; }
}

/* ---------- Pavé du code ---------- */
.pave-tete { display: grid; justify-items: center; gap: 10px; text-align: center; margin-bottom: 8px; }
.pave-tete .av { --t: 72px; width: 72px; height: 72px; }
.points-code { display: flex; justify-content: center; gap: 16px; margin: 18px 0 22px; }
.points-code i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--encre-3); transition: background .15s, border-color .15s, transform .15s; }
.points-code i.plein { background: var(--mer); border-color: var(--mer); transform: scale(1.08); }
.points-code.faux { animation: secoue .42s; }
.points-code.faux i { border-color: var(--rouge); }
@keyframes secoue { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
.pave { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 330px; margin: 0 auto; }
.pave button { height: 66px; border-radius: 20px; border: 0; background: var(--fond-2); font: 600 26px var(--serif); transition: background .15s, transform .1s; }
.pave button:active { transform: scale(.94); background: var(--ligne); }
.pave button.vid { background: transparent; }
.pave button svg { width: 26px; height: 26px; }
.message-erreur { min-height: 22px; text-align: center; color: var(--rouge); font-weight: 600; font-size: 14px; margin-top: 12px; }

/* ---------- Sélecteur de joueur ---------- */
.recherche { position: relative; margin-bottom: 16px; }
.recherche svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--encre-3); }
.recherche .saisie { padding-left: 46px; }
.grille-joueurs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tuile-joueur { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--ligne); background: var(--carte); text-align: left; min-width: 0; }
.tuile-joueur:hover { border-color: var(--mer-2); }
.tuile-joueur .av { --t: 40px; width: 40px; height: 40px; }
.tuile-joueur b { display: block; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tuile-joueur small { color: var(--encre-3); }
.tuile-joueur[disabled] { opacity: .4; }
.titre-groupe { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--encre-3); margin: 18px 0 10px; }

/* ---------- Nouvelle partie ---------- */
.duel { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin-bottom: 20px; }
.siege {
  display: grid; justify-items: center; gap: 8px; padding: 18px 10px; border-radius: 18px; border: 2px dashed var(--ligne); background: var(--fond); min-height: 150px; align-content: center;
}
.siege.rempli { border-style: solid; border-color: var(--ligne); }
.siege .av { --t: 64px; width: 64px; height: 64px; }
.siege .vide-siege { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--fond-2); color: var(--encre-3); font-size: 30px; }
.siege b { font-size: 16px; }
.siege small { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--encre-3); }
.echange { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--fond-2); display: grid; place-items: center; }
.echange svg { width: 22px; height: 22px; }

/* ---------- Résultat ---------- */
.trois { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; }
.choix-res { display: grid; justify-items: center; gap: 8px; padding: 18px 10px; border-radius: 18px; border: 2px solid var(--ligne); background: var(--carte); text-align: center; font-weight: 600; }
.choix-res:hover { border-color: var(--mer-2); }
.choix-res .av { --t: 54px; width: 54px; height: 54px; }
.choix-res.nul { align-content: center; padding: 18px 20px; font-family: var(--serif); font-size: 22px; }
.celebration { text-align: center; display: grid; gap: 18px; justify-items: center; }
.celebration .trophee { font-size: 64px; color: var(--soleil); }
.duo-delta { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; }
.duo-delta > div { display: grid; justify-items: center; gap: 6px; }
.duo-delta .av { --t: 56px; width: 56px; height: 56px; }
.duo-delta .chiffre { font-size: 28px; }

/* ---------- Pendule ---------- */
.pendule { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-rows: 1fr auto 1fr; background: #081219; user-select: none; -webkit-user-select: none; }
.pendule .moitie {
  display: grid; place-items: center; border: 0; background: #1A2A35; color: #E9E1D2; font-family: var(--serif); font-variant-numeric: tabular-nums; margin: 10px; border-radius: 28px; transition: background .2s;
  position: relative;
}
.pendule .moitie.haut { transform: rotate(180deg); }
.pendule .moitie.actif { background: #F4EEE3; color: #0F3B57; }
.pendule .moitie.perdu { background: #B3261E; color: #fff; }
.pendule .temps { font-size: clamp(64px, 17vw, 170px); font-weight: 600; letter-spacing: -.02em; }
.pendule .qui { position: absolute; top: 22px; left: 0; right: 0; text-align: center; font: 600 16px var(--sans); opacity: .7; }
.pendule .coups { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; font: 500 14px var(--sans); opacity: .55; }
.pendule .milieu { display: flex; justify-content: center; gap: 12px; padding: 4px; }
.pendule .milieu button { width: 58px; height: 58px; border-radius: 50%; border: 0; background: #22343F; color: #E9E1D2; display: grid; place-items: center; }
.pendule .milieu svg { width: 24px; height: 24px; }

/* ---------- Classements ---------- */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 12px; align-items: end; margin-bottom: 22px; }
.marche { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 18px 10px 0; background: none; border: 0; }
.marche .av { --t: 64px; width: 64px; height: 64px; }
.marche.or .av { --t: 82px; width: 82px; height: 82px; box-shadow: 0 0 0 4px var(--soleil), 0 0 0 7px var(--carte); }
.marche .nom { font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.marche .socle { width: 100%; border-radius: 14px 14px 0 0; display: grid; place-items: center; font-family: var(--serif); font-size: 30px; font-weight: 700; color: #FFF8EE; padding: 10px 0; }
.marche.or .socle { height: 96px; background: linear-gradient(var(--soleil), color-mix(in srgb, var(--soleil) 70%, #000)); }
.marche.argent .socle { height: 70px; background: linear-gradient(#9AA6AD, #6E7B83); }
.marche.bronze .socle { height: 54px; background: linear-gradient(var(--tomette-2), var(--tomette)); }
.tableau { width: 100%; border-collapse: collapse; font-size: 15px; }
.tableau th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--encre-3); padding: 0 8px 10px; }
.tableau td { padding: 10px 8px; border-top: 1px solid var(--ligne); vertical-align: middle; }
.tableau tr.cliquable { cursor: pointer; }
.tableau tr.cliquable:hover td { background: var(--fond); }
.tableau .num { text-align: right; font-variant-numeric: tabular-nums; }
.rang { font-family: var(--serif); font-weight: 700; color: var(--encre-3); width: 36px; }
.segments { display: inline-flex; background: var(--fond-2); padding: 4px; border-radius: 14px; gap: 2px; flex-wrap: wrap; }
.segments button { border: 0; background: none; min-height: 40px; padding: 0 16px; border-radius: 11px; font-weight: 600; color: var(--encre-2); }
.segments button[aria-pressed="true"] { background: var(--carte); color: var(--encre); box-shadow: var(--ombre); }

/* ---------- Profil ---------- */
.profil-tete { display: flex; gap: clamp(16px, 3vw, 30px); align-items: center; flex-wrap: wrap; }
.profil-tete .av { --t: 110px; width: 110px; height: 110px; box-shadow: inset 0 -5px 0 rgba(0,0,0,.18), 0 0 0 5px var(--carte), var(--ombre); }
.elo-geant { font-family: var(--serif); font-size: clamp(54px, 8vw, 84px); line-height: .9; font-weight: 600; letter-spacing: -.03em; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.kpi { padding: 16px; border-radius: 16px; background: var(--fond); border: 1px solid var(--ligne); }
.kpi b { display: block; font-family: var(--serif); font-size: 32px; line-height: 1.05; font-weight: 600; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 13px; color: var(--encre-3); font-weight: 600; }
.barre-vnd { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--fond-2); gap: 2px; }
.barre-vnd i { display: block; height: 100%; }
.legende { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--encre-2); margin-top: 10px; }
.legende span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); margin-right: 6px; }
.courbe { width: 100%; height: 200px; display: block; overflow: visible; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badge { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; padding: 12px; border-radius: 14px; background: var(--fond); border: 1px solid var(--ligne); }
.badge .medaille { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--soleil); color: #fff; font-size: 20px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }
.badge.non { opacity: .5; } .badge.non .medaille { background: var(--ligne); color: var(--encre-3); box-shadow: none; }
.badge b { font-size: 14px; display: block; line-height: 1.2; }
.badge small { font-size: 12px; color: var(--encre-3); line-height: 1.25; display: block; }

/* ---------- Tournois ---------- */
.cartes-tournois { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.carte-tournoi { display: grid; gap: 12px; padding: 20px; border-radius: var(--rayon); background: var(--carte); box-shadow: var(--ombre); text-decoration: none; color: inherit; border: 1px solid color-mix(in srgb, var(--ligne) 60%, transparent); position: relative; overflow: hidden; transition: transform .15s; }
.carte-tournoi:hover { transform: translateY(-2px); }
.carte-tournoi .p.fond { position: absolute; right: -6px; bottom: -22px; font-size: 110px; opacity: .06; }
.carte-tournoi h3 { font-size: 21px; }
.formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.format { display: grid; gap: 4px; text-align: left; padding: 14px; border-radius: 16px; border: 2px solid var(--ligne); background: var(--carte); }
.format b { font-family: var(--serif); font-size: 18px; }
.format small { color: var(--encre-3); font-size: 13px; line-height: 1.3; }
.format[aria-pressed="true"] { border-color: var(--mer); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mer) 18%, transparent); }
.ronde-titre { display: flex; align-items: center; gap: 10px; margin: 18px 0 8px; }
.ronde-titre h3 { font-size: 17px; }
.appariement { display: grid; grid-template-columns: 40px 1fr auto 1fr; gap: 10px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--ligne); }
.appariement .t { font-family: var(--serif); color: var(--encre-3); font-weight: 600; }
.appariement .droite { justify-content: flex-end; text-align: right; }
.appariement .droite .joueur { flex-direction: row-reverse; }
.feu { color: var(--tomette); }
.grand-libre { display: grid; justify-items: center; gap: 12px; padding: 22px; border-radius: 22px; background: linear-gradient(135deg, var(--tomette), #8E3219); color: #FFF7EC; text-align: center; }
.grand-libre .btn { background: #FFF7EC; color: #8E3219; }

/* ---------- Lieux ---------- */
.cartes-lieux { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.carte-lieu { display: grid; gap: 10px; }
.carte-lieu h3 { font-size: 22px; }
.agenda { display: grid; gap: 10px; }
.date-soiree { display: grid; grid-template-columns: 62px 1fr; gap: 14px; align-items: center; padding: 10px; border-radius: 16px; background: var(--fond); border: 1px solid var(--ligne); }
.calendrier { display: grid; justify-items: center; border-radius: 12px; overflow: hidden; background: var(--carte); box-shadow: var(--ombre); }
.calendrier small { display: block; width: 100%; text-align: center; background: var(--tomette); color: #FFF7EC; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 2px 0; }
.calendrier b { font-family: var(--serif); font-size: 26px; padding: 2px 0 4px; }

/* ---------- Graphiques simples ---------- */
.histo { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: end; gap: 6px; height: 150px; padding-top: 10px; }
.histo .col { display: grid; justify-items: center; gap: 6px; height: 100%; align-content: end; }
.histo .col i { width: 100%; max-width: 38px; border-radius: 8px 8px 3px 3px; background: var(--mer-2); min-height: 3px; transition: height .5s; }
.histo .col.fort i { background: var(--tomette); }
.histo .col small { font-size: 11.5px; color: var(--encre-3); font-weight: 600; }
.histo .col em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--encre-2); }

/* ---------- Toasts ---------- */
#toasts { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; width: min(460px, calc(100% - 32px)); pointer-events: none; }
@media (max-width: 760px) { #toasts { bottom: calc(84px + env(safe-area-inset-bottom)); } }
.toast { display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-radius: 16px; background: #15222C; color: #F4EEE3; box-shadow: var(--ombre-haute); font-weight: 600; animation: monte .3s cubic-bezier(.2, .9, .3, 1.2); }
.toast.erreur { background: var(--rouge); color: #fff; }
.toast .av { --t: 36px; width: 36px; height: 36px; box-shadow: none; }

/* ---------- Divers ---------- */
.chargement { display: grid; place-items: center; min-height: 60vh; }
.piece-anim { font-size: 56px; color: var(--tomette); animation: saute 1s infinite ease-in-out; }
@keyframes saute { 50% { transform: translateY(-12px) rotate(-8deg); } }
.entete-page { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.entete-page p { margin: 8px 0 0; color: var(--encre-2); max-width: 60ch; }
.accueil-public { display: grid; gap: 22px; }
.etapes { display: grid; gap: 14px; counter-reset: e; padding: 0; margin: 0; list-style: none; }
.etapes li { counter-increment: e; display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: start; }
.etapes li::before { content: counter(e); width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--mer); color: #F4EEE3; font-family: var(--serif); font-weight: 700; }
:root[data-theme="dark"] .etapes li::before { color: #0B1720; }
.choix-avatar { display: grid; gap: 12px; }
.choix-avatar .ligne-av { display: flex; gap: 10px; flex-wrap: wrap; }
.choix-avatar button { border: 0; background: none; padding: 3px; border-radius: 50%; }
.choix-avatar button .av { --t: 50px; width: 50px; height: 50px; }
.choix-avatar button[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--soleil); }
.pastille-c { width: 36px; height: 36px; border-radius: 50%; border: 0; }
.pastille-c[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--carte), 0 0 0 6px var(--encre-2); }
.lien-copie { display: flex; gap: 8px; align-items: center; }
.lien-copie code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 10px 12px; border-radius: 10px; background: var(--fond-2); font-size: 13px; }
.montant { font-family: var(--serif); font-size: 46px; font-weight: 600; line-height: 1; color: var(--tomette); }
.separateur { height: 1px; background: var(--ligne); margin: 18px 0; border: 0; }
@media print {
  #rail, #toasts, .pas-imprime { display: none !important; }
  #vue { margin: 0; padding: 0; }
  body { background: #fff; }
}
.affiche { width: 100%; max-width: 680px; margin: 0 auto; aspect-ratio: 1 / 1.414; border-radius: 22px; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; color: #F4EEE3; background: linear-gradient(170deg, #134766, #0B2B40); padding: 8%; position: relative; }
.affiche h1 { font-size: clamp(36px, 7vw, 68px); color: #FFF8EC; }
.affiche .qr { width: 52%; height: auto; aspect-ratio: 1; padding: 4%; margin: 0 auto; border-radius: 20px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.choix-avatar button.pastille-c { background: var(--c); box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }
.choix-avatar button.pastille-c[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--carte), 0 0 0 6px var(--soleil); }
.qr-carte > * { min-width: 0; }
.lien-copie .btn { flex: none; }
/* boutons : pas de style système (iPhone/iPad), pastilles de couleur écrites en dur */
button { -webkit-appearance: none; appearance: none; }
.pastille-c.terre { background-color: #B8472A !important; } .pastille-c.mer { background-color: #1E5677 !important; } .pastille-c.soleil { background-color: #D3922A !important; }
.pastille-c.pin { background-color: #3D6A4B !important; } .pastille-c.nuit { background-color: #26313B !important; } .pastille-c.rose { background-color: #C25B78 !important; }

/* Notifications (onglet Moi) */
.coche { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; cursor: pointer; }
.coche input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--mer); }
.coche b { display: block; }
.liste-lieux { display: grid; gap: 8px; max-height: 260px; overflow: auto; padding: 4px 2px; }

/* Espace du gérant : la soirée en cours */
.ce-soir .kpis { margin: 4px 0 16px; }
.presents-gerant { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.present-g { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--fond); border: 1px solid var(--ligne); }

/* Pages légales, aide, factures */
.texte-legal { max-width: 860px; line-height: 1.6; }
.texte-legal h2 { font-size: 21px; margin: 26px 0 8px; }
.texte-legal h2:first-child { margin-top: 0; }
.texte-legal ul { padding-left: 20px; margin: 0 0 10px; }
.texte-legal li { margin: 4px 0; }
.texte-legal .tableau td { vertical-align: top; font-size: 14px; }
mark { background: var(--soleil-pale); color: var(--tomette); padding: 0 4px; border-radius: 4px; }
.faq details { border-bottom: 1px solid var(--ligne); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 8px 0 0; }
textarea.saisie { min-height: 120px; padding-top: 12px; resize: vertical; font: inherit; }
.liens-legaux { flex-wrap: wrap; gap: 4px; }
.facture { background: #fff; color: #1a1a1a; max-width: 800px; margin: 0 auto; padding: 48px 52px; border-radius: 6px; box-shadow: var(--ombre); font-size: 14px; line-height: 1.5; }
.facture h1 { font-size: 30px; margin: 0; color: #1a1a1a; }
.facture .entete-fac { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.facture .parties-fac { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 30px; }
.facture .bloc-fac { padding: 14px 16px; border: 1px solid #ddd; border-radius: 6px; }
.facture .bloc-fac b.titre { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #777; margin-bottom: 6px; }
.facture table { width: 100%; border-collapse: collapse; margin-bottom: 18px; }
.facture th, .facture td { padding: 10px 8px; border-bottom: 1px solid #ddd; text-align: left; }
.facture th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #777; }
.facture .num { text-align: right; font-variant-numeric: tabular-nums; }
.facture .total td { font-weight: 700; font-size: 16px; border-bottom: 2px solid #1a1a1a; }
.facture .mentions-fac { font-size: 12px; color: #555; margin-top: 26px; }
@media print { .facture { box-shadow: none; padding: 0; max-width: none; } }

/* Menu du haut : Comment ça marche · Pour les établissements · Aide */
#haut { margin-left: var(--rail); max-width: 1480px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(16px + env(safe-area-inset-top)) clamp(16px, 3.4vw, 44px) 0; }
#haut[hidden] { display: none; }
#haut:not([hidden]) + #vue { padding-top: 18px; }
.haut-marque { font-family: var(--serif); font-weight: 700; font-size: 21px; color: var(--encre); text-decoration: none; letter-spacing: -.01em; }
.haut-liens { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.haut-liens a { padding: 9px 14px; border-radius: 99px; color: var(--encre-2); text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap; }
.haut-liens a:hover { background: var(--fond-2); color: var(--encre); }
.haut-liens a[aria-current="page"] { background: var(--carte); color: var(--encre); box-shadow: var(--ombre); }
@media (max-width: 760px) {
  #haut { padding: calc(10px + env(safe-area-inset-top)) 12px 0; }
  .haut-marque { display: none; }
  .haut-liens { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; width: 100%; scrollbar-width: none; }
  .haut-liens a { padding: 8px 12px; font-size: 14px; background: var(--fond-2); }
  #haut:not([hidden]) + #vue { padding-top: 14px; }
}
@media print { #haut { display: none !important; } }
.cartes-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.carte-info .p { font-size: 34px; color: var(--tomette); }
.carte-info h3 { margin: 10px 0 6px; }
.carte-info p { margin: 0; }
.liste-regles { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.tarif .montant { font-size: 64px; }
.haut-liens .mb { display: none; }
@media (max-width: 760px) { .haut-liens .lg { display: none; } .haut-liens .mb { display: inline; } }

/* Rencontres, annonces, carte */
.lien-venus { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; color: var(--mer); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.annonce-lieu { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 14px; background: var(--soleil-pale); color: var(--encre); margin: 10px 0 4px; }
.heros .annonce-lieu { background: rgba(255,255,255,.12); color: #FFF8EC; max-width: 60ch; }
.annonce-lieu svg { width: 20px; height: 20px; flex: none; color: var(--tomette); margin-top: 1px; }
.carte-lieux { margin: 0 0 22px; }
.carte-fond { height: min(460px, 60vh); border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); z-index: 0; }
.repere-lieu > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); background: var(--tomette); color: #FFF8EC; box-shadow: 0 3px 8px rgba(0,0,0,.3); }
.repere-lieu > span.vivant { background: var(--pin); }
.repere-lieu .p { transform: rotate(45deg); font-size: 20px; }
