html, body{ 
    scroll-behavior: smooth
}

body {
    margin: 0;
    font-family: sans-serif;
    background-color: #eee;
}

body.dark {
    background-color: #333;
    color: #eee;
}

.hidden {
    display: none !important;
}

.show-dark {
    display: none;
}
.dark .show-dark {
    display: inline;
}
.dark .hide-dark {
    display: none;
}

header {
    margin-bottom: 10px;
    padding: 8px 0 20px 0;
}

header nav {
    background-color: rgb(23, 85, 126);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.dark header, .dark header nav {
    background-color: #222222;
    box-shadow: none;
}

header nav ul {
    margin: 0 auto;
    width: 680px;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

header nav ul li {
    display: flex;
    align-items: center;
}

nav a {
    color: #fff;
    text-decoration: none;
    padding: 12px 16px;
}
nav a:hover {
    color: #fff;
    background-color: rgb(17, 64, 95);
}
nav a:focus {
    /* masquer focus */
    outline: none;
}
nav a.active {
    color: #fff;
    font-weight: bold;
    background-color: rgb(17, 64, 95);
}
.dark nav a.active {
    background-color: #333;
    border-radius: 8px;
}
nav .nav-item-right {
    margin-left: 60px;
}

.main-title {
    font-size: 32px;
    font-weight: bold;
    margin: 0 auto;
    max-width: 680px;
    padding: 8px 0 16px 8px;
}
.main-title img {
    position: relative;
    top: 4px;
}

/* Burger / backdrop : masqués sur desktop (pas d’impact) */
.nav-burger {
    display: none;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    width: 40px;
    height: 40px;
    margin: 0 8px 0 0;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    vertical-align: middle;
}
.nav-burger-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #222;
    border-radius: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.dark .nav-burger-bar {
    background: #eee;
}
.nav-backdrop {
    display: none;
}
/* Titre / croix du drawer : masqués sur desktop */
.nav-drawer-brand,
.nav-drawer-close {
    display: none;
}

h1 {
    margin-top: 0;
    font-size: 25px;
}
.dark h1 svg path {
    fill: #eee;
}
h2 {
    font-size: 20px;
}

.win-subtitle {
    font-size: 18px;
}
a {
    color: #2c3e50;
    text-decoration: none;
}
.dark a {
    color: #eee;
}
a.disabled {
    color: #666;
    cursor: not-allowed;
}

.news-container {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}
.news {
    display: inline-block;
    background-color:#c1d8fc; 
    padding: 8px 12px;
    border-radius: 4px;
}
.dark .news {
    background-color: #222222;
    color: #eee;
}

.game-toolbar {
    margin: 0 auto;
    margin-bottom: 4px;
    display: flex;
    max-width: 100%;
    min-width: 210px !important;
}
.game-toolbar button {
    border: none;
    background-color: transparent;
    cursor: pointer;
    padding: 8px;
    margin: 0;
}
.dark .game-toolbar button {
    background-color: transparent;
}
.game-toolbar .toolbar-left {
    flex-basis: 37.5%;
    text-align: left;
}
.game-toolbar .toolbar-zoom {
    flex-basis: 35%;
    text-align: center;
}
.game-toolbar .toolbar-settings {
    flex-basis: 37.5%;
    text-align: right;
}

article#game {
    margin: 0 auto;
    padding: 0 0 16px 0;
    text-align: center;
    user-select: none;
}
canvas {
    image-rendering: pixelated;
}

#canvas-container {
    position: relative;
    margin: 0 auto;
}
#canvas-container canvas {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 4px;
}
.game-img {
    border-radius: 4px;
    box-shadow: 3px 3px 6px 0 rgba(0,0,0,0.15);
}
.game-loading .game-img {
    box-shadow: none;
}

.best-score {
    color: #000;
    font-size: 14px;
    margin-top: 12px;
    min-height: 22px;
}
.best-score svg {
    font-size: 18px;
    position: relative;
    top: 4px;
}
.dark .best-score {
    color: #eee;
}
.new-best-score {
    color: #000;
    font-size: 14px;
    margin-bottom: 20px;
    background-color: #eee;
    display: inline-block;
    padding: 4px 18px 8px 14px;
    border-radius: 20px;
    font-weight: bold;
}
.new-best-score svg {
    font-size: 18px;
    position: relative;
    top: 4px;
    margin-right: 4px;
}
.dark .new-best-score a {
    color: #2c3e50;
}

.end-game {
    width: 100%;
    color: #fff;
}
.end-game#game-over {
    background-color: #615f5f;
}
.end-game#game-win {
    background-color: #f39c12;
}
.dark .end-game#game-over, .dark .end-game#game-win {
    background-color: transparent;
}
.end-game > div {
    margin: 0 auto;
    max-width: 600px;
    padding: 16px 16px 36px 50px;
}

.slide {
    transition: height 0.5s ease, margin 0.5s ease, padding 0.5s ease;
    overflow: hidden;
    display: none;
}

.slide.show {
    display: block;
}

.modal {
    width: 600px;
    min-height: 264px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    position: fixed;
    top: 40px;
    left: calc(50% - 300px);
}
.modal.modal-sm {
    width: 400px;
    min-height: 200px;
    left: calc(50% - 200px);
}

.modal .modal-title {
    font-size: 24px;
    padding: 16px;
}

.modal .modal-title .modal-close {
    float: right;
    font-size: 24px;
    cursor: pointer;
}

.modal .modal-body {
    font-size: 14px;
    color: #444;
    min-height: 100px;
    padding: 0 16px 16px 16px;
}

.modal .modal-footer {
    padding: 26px 16px;
    background-color: #eee;
    border-top: 1px solid #ccc;
}
.dark .modal {
    background-color: #333;
    color: #eee;
}
.dark .modal .modal-body {
    color: #eee;
}
.dark .modal .modal-footer {
    background-color: #333;
    border-top: 0;
}

#cookies-modal .modal-footer, #cookies-light-modal .modal-footer {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
}
#cookies-modal .modal-footer .btn, #cookies-light-modal .modal-footer .btn {
    flex: 1;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    white-space: normal;
    text-align: center;
}
#cookies-modal .modal-footer .more-options {
    flex: 0 0 100%;
    margin-top: 20px;
    font-size: 14px;
    color: rgb(17, 64, 95);
}

.btn {
    padding: 12px 16px;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    display: inline-block;
    margin: 3px;
}
.btn-primary {
    background-color: rgb(23, 85, 126);
    color: #fff;
    border: none;
    border-radius: 4px;
}
.btn-primary:hover {
    background-color: rgb(17, 64, 95);
}

.btn-secondary {
    background-color: #dfdfdf;
    color: #2c3e50;
    border: none;
    border-radius: 4px;
}
.btn-secondary:hover {
    background-color: #ccc;
}

.btn-success {
    background-color: #2ecc71;
    color: #fff;
    border: none;
    border-radius: 4px;
}

.btn.disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
}


.dark .btn-primary {
    background-color: #111;
    color: #eee;
}
.dark .btn-primary:hover {
    background-color: #000;
}
.dark .btn-secondary {
    background-color: #161616;
    color: #eee;
}
.dark .btn-secondary:hover {
    background-color: #111;
}

article.container {
    margin: 0 auto;
    max-width: 650px;
    padding: 0 16px 16px 16px;
    line-height: 1.3em;
}
.breadcrumb {
    font-size: 0.9em;
    margin: 0 0 16px 0;
    color: #666;
}
.breadcrumb ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}
.breadcrumb li:not(:first-child)::before {
    content: "›";
    margin: 0 8px;
    color: #999;
}
.breadcrumb a {
    color: rgb(23, 85, 126);
    text-decoration: none;
}
.breadcrumb a:hover {
    text-decoration: underline;
}
.breadcrumb li[aria-current="page"] {
    color: #333;
}
.page-back {
    margin: 24px 0 8px 0;
}
.dark .breadcrumb {
    color: #aaa;
}
.dark .breadcrumb li:not(:first-child)::before {
    color: #777;
}
.dark .breadcrumb a {
    color: #8ec8f0;
}
.dark .breadcrumb li[aria-current="page"] {
    color: #eee;
}
article.container h1 {
    line-height: 1.1em;
}
article.container.container-large {
    max-width: 1280px;
}
/* Page Plus (FR) : largeur utile + texte à droite des blocs */
article.container.container-plus {
    max-width: 1024px;
}
.plus-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 28px;
    margin-bottom: 16px;
}
/* Même largeur qu'avant (container 650px) : ne pas toucher au calage pixel des grilles */
.plus-row > .card,
.plus-row > .plus-row-main {
    flex: 0 0 650px;
    width: 650px;
    max-width: 650px;
    box-sizing: border-box;
}
.card.plus-section-card {
    padding: 24px 36px 16px 36px;
}
.card.plus-section-card-classic {
    background-color: #e6e6e6;
}
.plus-section-title {
    margin: 30px 0 12px 14px;
}
.plus-aside {
    flex: 1 1 auto;
    min-width: 0;
    padding-top: 8px;
    font-size: 0.95em;
    line-height: 1.45;
    color: #444;
}
.plus-aside-align {
    padding-top: 68px;
}
.plus-aside p {
    margin: 0 0 12px 0;
}
.plus-aside a {
    color: rgb(23, 85, 126);
}
.dark .plus-aside {
    color: #ccc;
}
.dark .plus-aside a {
    color: #8ec8f0;
}
/* Tablette : empile niveaux puis texte (texte toujours visible pour le SEO) */
@media (max-width: 980px) {
    .plus-row {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 20px;
    }
    .plus-row > .card,
    .plus-row > .plus-row-main {
        flex: 0 0 auto;
        width: 100%;
        max-width: 650px;
    }
    .card.plus-section-card {
        padding: 20px 20px 14px;
    }
    .plus-aside,
    .plus-aside-align {
        position: relative;
        order: 1;
        padding: 2px 4px 2px 12px;
        border-left: 3px solid rgba(23, 85, 126, 0.22);
        font-size: 0.9em;
        line-height: 1.4;
        color: #555;
    }
    /* Triangle vers le haut : rattache le texte au bloc de niveaux au-dessus */
    .plus-aside::before,
    .plus-aside-align::before {
        content: "";
        position: absolute;
        /* Pointe centrée sur la bordure gauche (3px) : left = 1.5px − demi-largeur */
        top: -8px;
        left: -8px;
        width: 0;
        height: 0;
        border-left: 7.5px solid transparent;
        border-right: 7.5px solid transparent;
        border-bottom: 8px solid rgba(23, 85, 126, 0.22);
        pointer-events: none;
    }
    .dark .plus-aside,
    .dark .plus-aside-align {
        border-left-color: rgba(142, 200, 240, 0.35);
        color: #bbb;
    }
    .dark .plus-aside::before,
    .dark .plus-aside-align::before {
        border-bottom-color: rgba(142, 200, 240, 0.35);
    }
    .plus-aside p {
        margin: 0 0 8px 0;
    }
    .plus-aside p:last-child {
        margin-bottom: 0;
    }
}

/* Rangées de niveaux (classiques / géants / no-guess) : bas aligné, labels + badge */
.plus-levels-row {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 28px;
    width: 100%;
    box-sizing: border-box;
}
.plus-levels-row .pl-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.plus-levels-row .pl-beginner {
    flex: 55 1 0;
}
.plus-levels-row .pl-intermediate {
    flex: 89 1 0;
}
.plus-levels-row .pl-expert {
    flex: 156 1 0;
}
/* Classiques / no-guess : images un peu réduites, titres calés comme avant */
.plus-levels-row:not(.pl-giant) .pl-img {
    width: 92%;
    margin: 0 auto;
}
/* Géants : plus grands, 2 lignes (Élite+Colossal puis Suprême) */
.plus-levels-row.pl-giant {
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-end;
    gap: 18px 36px;
}
.plus-levels-row.pl-giant .pl-elite,
.plus-levels-row.pl-giant .pl-colossal,
.plus-levels-row.pl-giant .pl-supreme {
    flex: 0 0 auto;
}
.plus-levels-row.pl-giant .pl-elite {
    width: 250px;
}
.plus-levels-row.pl-giant .pl-colossal {
    width: 280px;
}
.plus-levels-row.pl-giant .pl-supreme {
    width: 310px;
}
.plus-levels-row .image-level-1 {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    text-align: center;
}
.plus-levels-row .image-level-1 > a {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}
.plus-levels-row .pl-img {
    flex: 1 1 auto;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
}
.plus-levels-row .level-img-container {
    display: block;
}
.plus-levels-row img {
    width: 100%;
    height: auto;
    vertical-align: bottom;
}
.plus-levels-row .overlay {
    position: static;
    visibility: visible;
    margin-top: 8px;
    padding-bottom: 0;
}
.plus-levels-row .level-label-name {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 600;
    color: #222;
}
.mines-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px 2px 6px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    color: #333;
    background: rgba(255, 255, 255, 0.62);
    border-radius: 4px;
    box-shadow: none;
}
/* Classiques (et cartes grises type image-level-2) : badge un peu gris */
.card:not(.noguess-card):not(.giant-card) .mines-badge {
    color: #4a4a4a;
    background: rgba(160, 160, 160, 0.22);
    box-shadow: none;
}
.mines-badge::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    background: url(/img/mine2.svg) no-repeat center / contain;
    opacity: 0.55;
}
.image-level-2 .mines-badge {
    margin-top: 6px;
}

.float-left {
    float: left;
    margin-right: 8px;
}
.float-left-lg {
    float: left;
    margin-right: 8px;
}
.float-left.large {
    margin-right: 24px;
}
.float-right {
    float: right;
    margin-left: 8px;
}
.clear {
    clear: both;
}
.bg-light {
    background-color: #eee;
    padding: 16px;
    margin: 16px 0;
}
.text-center {
    text-align: center;
}

article#help, article#level-desc {
    margin: 0 auto;
    max-width: 800px;
    padding: 0 0 16px 0;
    color: #333;
}
.dark article#help {
    color: #ccc;
}
#game h2, #help h2 {
    text-align: center;
    margin: 8px 0 12px 0;
}
.help-center {
    text-align: center;
}

table {
    border-collapse: collapse;
    width: 100%;
}
th, td {
    padding: 2px 8px;
    border: 1px solid #ccc;
    text-align: left;
}

.bottom-spacer {
    clear: both;
    height: 80px;
}
footer {
    width: 100%;
    background-color: #ddd;
    text-align: center;
    font-size: 14px;
    color: #333;
}
footer .footer-container {
    padding: 16px;
}
footer a {
    color: #111;
    text-decoration: none;
    white-space: nowrap;
}
footer a:hover {
    text-decoration: underline;
}
.dark footer {
    background-color: #222;
    color: #eee;
}

.form-field {
    margin: 16px 0;
}
.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}
input, textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
input[type="radio"], input[type="checkbox"] {
    display: inline-block;
    width: auto;
    margin-right: 8px;
}
input[type="file"] {
    padding: 4px 0;
    border: none;
    border-radius: 0;
    background: transparent;
}
.form-field .info {
    font-size: 14px;
    color: #666;
}
.form-field.subject {
    display: none;
}

.alert {
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 4px;
}
.alert-success {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #a5d6a7;
}
.alert-danger {
    background: #fdecea;
    color: #8a1f11;
    border: 1px solid #f5c6cb;
}

fieldset {
    border: 1px solid #ccc;
    margin: 16px 0;
}
fieldset legend {
    font-weight: bold;
}

.strong {
    font-weight: bold;
}

/* Tooltip hidden by default */
.simpletooltip[aria-hidden="true"],
.minimalist-simpletooltip[aria-hidden="true"],
.minimalist-left-simpletooltip[aria-hidden="true"],
.minimalist-center-simpletooltip[aria-hidden="true"] {
  display: none;
}
/* position relative for containers */
.simpletooltip_container,
.minimalist-simpletooltip_container,
.minimalist-left-simpletooltip_container ,
.minimalist-center-simpletooltip_container {
  position: relative;
}

/* tooltip styles */
.simpletooltip, 
.minimalist-simpletooltip, 
.minimalist-left-simpletooltip, 
.minimalist-center-simpletooltip {
  position: absolute;
  z-index: 666;
  width: 200px;
  border-radius: 6px;
  background: #201f1f;
  color: #eee;
  padding: 6px;
  font-size: 12px !important;
  text-align: left;
  line-height: 1.3;
  font-weight: normal;
}
.simpletooltip, 
.minimalist-simpletooltip {
  right: auto;
  left: 100%;
  margin-left: 6px;
}
.minimalist-left-simpletooltip {
  right: 100%;
  left: auto;
  margin-right: 6px;
}
.minimalist-center-simpletooltip {
  right: auto;
  left: auto;
}

.error {
    background-color: #e74c3c;
    padding: 16px;
}

/* Liste des thèmes dans la modale : affichage sur 3 colonnes */
.skin-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
.skin-list .skin {
    width: 30%;
    margin: 0 1% 12px 1%;
    text-align: center;
    border-radius: 4px;
    padding: 8px 0;
    cursor: pointer;
}
.skin-list .skin img {
    max-width: 95%;
    height: auto;
}
.skin-list .skin.skin-active {
    background-color: #c1d8fc;
}
.dark .skin-list .skin.skin-active {
    border-color: #000;
    background-color: #222;
}
.skin-list .skin:hover {
    background-color: #c1d8fc;
}
.dark .skin-list .skin:hover {
    background-color: #222;
}
.skin-list .skin .skin-name {
    margin-top: 8px;
    font-size: 14px;
    color: #333;
}
.dark .skin-list .skin .skin-name {
    color: #ccc;
}
/* La modale des thèmes peut être haute : on la rend défilable */
#theme-modal .modal-body {
    max-height: 65vh;
    overflow-y: auto;
}

/* it can be easily adapted in media-queries for tablets/mobile */

/* for this example: mobile */
@media (max-width: 44.375em) {

    .simpletooltip, 
    .minimalist-simpletooltip,
    .minimalist-left-simpletooltip  {
      width: 120px;
      font-size: 12px;
      top: 100%;
      left: 50%;
      right: 0;
      margin: 0;
      margin-top: 8px;
      margin-left: -6px;
    }

  .minimalist-center-simpletooltip  {
    width: 100%;
    font-size: 12px;
    top: 100%;
    left: 10%;
    margin: 0;
	margin-top: 8px;
	margin-left: -6px;
  }
  
}

/* Ads */
#col-left, #col-right {
    width: 300px;
    height: 600px;
}
#col-top img {
    width: 100%;
    max-width: 970px;
}
#col-left img, #col-right img {
    width: 100%;
    max-width: 300px;
}
.ads-on-sides #col-top-container, .ads-on-sides #bottom-container {
    display: none;
}
.ads-on-top-bottom #col-left-container, .ads-on-top-bottom #col-right-container {
    display: none;
}
.ads-on-top-bottom #col-top-container {
    width: 100%;
    max-width: 970px;
    margin: 0 auto 20px auto;
} 
.ads-on-top-bottom #bottom-container {
    width: 100%;
    position: fixed;
    bottom: 0;
    background-color: #eee;
}
body.dark .ads-on-top-bottom #bottom-container {
    background-color: #333;
}
.ads-on-top-bottom #bottom-container #col-bottom {
    width: 970px;
    margin: 0 auto;
    text-align: center;
}
@media only screen and (max-device-width : 500px) {
    .ads-on-top-bottom #bottom-container #col-bottom {
        width: 320px;
    }
}
.ads-on-top-bottom {
    margin-bottom: 100px;
}

.ads-on-sides #columns {
    display: flex;
    gap: 16px;
    padding: 0 16px;
}
.ads-on-sides #column-center {
    flex-grow: 1;
}
.ads-on-sides #col-left {
    position: sticky;
    top: 16px;
}
.ads-on-sides #col-right {
    position: sticky;
    top: 16px;
}

/* No ads */
body.typexx-none #col-left-container, body.typexx-none #col-right-container,
    body.typexx-none #col-top-container, body.typexx-none #bottom-container {
    display: none;
}

/* Ads light */
body.typexx-fake-light #col-top-container, body.typexx-light #col-top-container {
    display: none;
}

@media only screen and (max-device-width : 768px) {
    body {
        overflow-x: hidden;
    }
    .game-container {
        max-width: 100%;
        overflow: auto;
    }
    header nav ul {
        margin: 0 auto;
        width: 100%;
    }
    nav .nav-item-right {
        margin-left: 0;
    }
    article#help,
    article#level-desc {
        padding-left: 16px;
        padding-right: 16px;
        box-sizing: border-box;
    }
    article#help .help-left, article#help .help-right {
        float: none;
        width: auto;
        padding: 0;
    }
    .float-left-lg {
        float: none;
    }

    .modal, .modal.modal-sm {
        position: fixed;
        top: 12%;
        left: 12%;
        transform: translate(-9%, -12%);
        min-width: 90%;
        max-width: 90%;
    }

    .skin-list .skin {
        width: 46%;
    }
}
@media only screen and (max-device-width : 350px) {
    .skin-list .skin {
        width: 90%;
    }
}

/* Pour amélioration du CLS */
#canvas-container {
    height: 494px;
    width: 780px;
}
@media only screen and (max-device-width : 768px) {
    #canvas-container {
        height: 470px;
        width: 420px;
    }
}

/* Page "Plus" */ 
.card {
    background-color: #f6f6f6;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    margin-bottom: 16px;
    padding: 16px;
}
.card > h2 {
    margin-top: 2px;
    margin-bottom: 20px;
}
/* Saisonniers — fond teinté selon le thème */
.card.halloween-card,
.card.christmas-card,
.card.newyear-card {
    border-radius: 10px;
}
.card.halloween-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background-color: #000;
    color: #eee;
}
.card.halloween-card::before {
    content: "";
    position: absolute;
    right: -30px;
    top: -50px;
    width: 320px;
    height: 320px;
    background: url(/img/spider-web.svg) no-repeat center / contain;
    opacity: 0.7;
    pointer-events: none;
    z-index: 0;
}
.card.halloween-card > * {
    position: relative;
    z-index: 1;
}
.card.halloween-card h2,
.card.halloween-card h2 a,
.card.halloween-card p {
    color: #eee;
}
#halloween-levels .image-level-2.card {
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.45);
}
#halloween-levels .image-level-2 .level-name {
    color: #eee;
}
#halloween-levels .image-level-2 .mines-badge {
    color: #1e1e1e;
    background: rgba(255, 255, 255, 0.72);
}
.card.christmas-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background-color: #d6292c; /* rouge des boules christmas-unknown */
    color: #fff;
}
.card.christmas-card h2,
.card.christmas-card h2 a,
.card.christmas-card p {
    color: #fff;
    text-shadow:
        0 1px 2px rgba(80, 0, 0, 0.85),
        0 0 10px rgba(80, 0, 0, 0.45);
}
.card.christmas-card > .christmas-snow-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}
.card.christmas-card > *:not(.christmas-snow-canvas) {
    position: relative;
    z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
    .card.christmas-card > .christmas-snow-canvas {
        display: none;
    }
}
.card.newyear-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background-color: #0b1020;
    background-image: linear-gradient(180deg, #0a0e1c 0%, #12183a 55%, #1a1040 100%);
    color: #eee;
}
.card.newyear-card h2,
.card.newyear-card h2 a,
.card.newyear-card p {
    color: #eee;
    text-shadow:
        0 1px 2px rgba(0, 0, 20, 0.9),
        0 0 12px rgba(80, 60, 160, 0.45);
}
.card.newyear-card > .newyear-fireworks-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}
.card.newyear-card > *:not(.newyear-fireworks-canvas) {
    position: relative;
    z-index: 1;
}
#newyear-levels .image-level-2.card {
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
}
#newyear-levels .image-level-2 .level-name {
    color: #e8ecff;
}
#newyear-levels .image-level-2 .mines-badge {
    color: #333750;
    background: rgba(255, 255, 255, 0.72);
}
@media (prefers-reduced-motion: reduce) {
    .card.newyear-card > .newyear-fireworks-canvas {
        display: none;
    }
}
/* Géants — rouge pâle gris (#d6c1c1) + bandes danger discrètes + grosse mine */
.card.giant-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-radius: 2px;
    background-color: #d6c1c1;
    background-image:
        repeating-linear-gradient(
            -45deg,
            rgba(122, 58, 58, 0.04) 0,
            rgba(122, 58, 58, 0.04) 9px,
            transparent 9px,
            transparent 25px
        ),
        linear-gradient(180deg, #decaca 0%, #d6c1c1 55%, #cbb0b0 100%);
    background-repeat: repeat, no-repeat;
    background-size: auto, 100% 100%;
}
.card.giant-card .giant-mine {
    position: absolute;
    background: url(/img/mine2.svg) no-repeat center / contain;
    pointer-events: none;
    z-index: 0;
}
/* Grande mine (bas droite) + moyenne centrée dedans, plus sombre */
.card.giant-card .giant-mine-1 {
    right: -62px;
    bottom: -60px;
    width: 350px;
    height: 350px;
    opacity: 0.12;
}
.card.giant-card .giant-mine-2 {
    /* centre = (-62+175, -60+175) = (113, 115) → right/bottom = centre − taille/2 */
    right: 28px;
    bottom: 30px;
    width: 170px;
    height: 170px;
    opacity: 0.22;
}
.card.giant-card > *:not(.giant-mine) {
    position: relative;
    z-index: 1;
}
/* Mode sans hasard — bleu sombre (proche marque), graphe clair.
 * Canvas animé en overlay ; SVG uniquement en reduced-motion (pas de fallback au chargement). */
.card.noguess-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-radius: 2px;
    background-color: #4a6578;
    background-image: linear-gradient(180deg, #5a768c 0%, #3d5566 100%);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: 0 0;
    color: #fff;
}
.card.noguess-card h2,
.card.noguess-card .level-label-name {
    color: #fff;
    text-shadow:
        0 1px 2px rgba(20, 35, 48, 0.85),
        0 0 10px rgba(20, 35, 48, 0.55),
        0 0 18px rgba(20, 35, 48, 0.35);
}
.card.noguess-card .mines-badge {
    color: #1a2430;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: none;
}
.card.noguess-card > .noguess-graph-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}
.card.noguess-card > *:not(.noguess-graph-canvas) {
    position: relative;
    z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
    .card.noguess-card {
        background-image:
            url(/img/noguess-graph.svg),
            linear-gradient(180deg, #5a768c 0%, #3d5566 100%);
        background-repeat: repeat, no-repeat;
        background-size: 180px 140px, 100% 100%;
        background-position: 12px 8px, 0 0;
    }
    .card.noguess-card > .noguess-graph-canvas {
        display: none;
    }
}
/* Extrêmes, spéciaux & saisonniers : 3 colonnes sur toute la largeur (650px) */
#extreme-levels .level-grid,
#special-levels .level-grid,
#halloween-levels .level-grid,
#christmas-levels .level-grid,
#newyear-levels .level-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 14px;
    width: 100%;
    box-sizing: border-box;
}
#special-levels .level-grid,
#halloween-levels .level-grid,
#christmas-levels .level-grid,
#newyear-levels .level-grid {
    gap: 12px 22px;
}
#extreme-levels .image-level-2.card,
#special-levels .image-level-2.card,
#halloween-levels .image-level-2.card,
#christmas-levels .image-level-2.card,
#newyear-levels .image-level-2.card {
    border-radius: 2px;
    flex: none;
    width: 100%;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
}
/* Spéciaux & saisonniers : badge mines calé en bas (noms sur 1 ou 2 lignes) */
#special-levels .image-level-2.card,
#halloween-levels .image-level-2.card,
#christmas-levels .image-level-2.card,
#newyear-levels .image-level-2.card {
    display: flex;
    flex-direction: column;
    align-items: center;
}
#special-levels .image-level-2.card .level-name,
#halloween-levels .image-level-2.card .level-name,
#christmas-levels .image-level-2.card .level-name,
#newyear-levels .image-level-2.card .level-name {
    margin-bottom: 8px;
}
#special-levels .image-level-2.card .mines-badge,
#halloween-levels .image-level-2.card .mines-badge,
#christmas-levels .image-level-2.card .mines-badge,
#newyear-levels .image-level-2.card .mines-badge {
    margin-top: auto;
}
/* Spéciaux & saisonniers : bordure fine claire + même ombre que les encarts */
#special-levels .image-level-2.card,
#christmas-levels .image-level-2.card {
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.14);
}
#special-levels .image-level-2.card:nth-child(1) {
    border-color: #dadada;
}
#special-levels .image-level-2.card:nth-child(2) {
    border-color: #ddcbcb;
}
#special-levels .image-level-2.card:nth-child(3) {
    border-color: #ddd4db;
}
/* Extrêmes — damier + dégradé danger (corail → rouge, progression douce) */
#extreme-levels .extreme-card {
    --ex-a: #d47868;
    --ex-b: #a8483c;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff8f5;
    background-color: var(--ex-b);
    background-image:
        repeating-conic-gradient(
            from 90deg at 50% 50%,
            rgba(0, 0, 0, 0.11) 0deg 90deg,
            rgba(255, 255, 255, 0.07) 90deg 180deg
        ),
        linear-gradient(165deg, var(--ex-a) 0%, var(--ex-b) 100%);
    background-size: 12px 12px, 100% 100%;
    box-shadow: 0 1px 6px rgba(80, 25, 20, 0.28);
}
#extreme-levels .extreme-card strong {
    display: block;
    color: inherit;
    text-shadow: 0 1px 2px rgba(40, 10, 10, 0.45);
}
#extreme-levels .extreme-card .mines-badge {
    color: #2a1614;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: none;
}
#extreme-levels .extreme-card .mines-badge::before {
    width: 17px;
    height: 17px;
    margin: -3px -1px -3px 0;
    flex-shrink: 0;
    background: url(/img/warning-triangle.svg) no-repeat center / contain;
    opacity: 1;
}
#extreme-levels .extreme-card:nth-child(1) { --ex-a: #e08a5c; --ex-b: #c45a3a; }
#extreme-levels .extreme-card:nth-child(2) { --ex-a: #dc7e58; --ex-b: #be5440; }
#extreme-levels .extreme-card:nth-child(3) { --ex-a: #d87254; --ex-b: #b84e42; }
#extreme-levels .extreme-card:nth-child(4) { --ex-a: #d06852; --ex-b: #b24844; }
#extreme-levels .extreme-card:nth-child(5) { --ex-a: #c86054; --ex-b: #a84448; }
#extreme-levels .extreme-card:nth-child(6) { --ex-a: #c05856; --ex-b: #a0404a; }
#extreme-levels .extreme-card:nth-child(7) { --ex-a: #b85258; --ex-b: #983c4c; }
#extreme-levels .extreme-card:nth-child(8) { --ex-a: #b04c5a; --ex-b: #903850; }
#extreme-levels .extreme-card:nth-child(9) { --ex-a: #a8485c; --ex-b: #883454; }
.image-level-1 {
    display: inline-block;
    position: relative;
}
.image-level-1 a img {
    border-radius: 3px;
    box-shadow: 2px 2px 4px 0 rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}
.image-level-1 a .level-img-container {
    transition: all 0.3s ease;
    transform: scale(0.95);
}
.image-level-1:hover a .level-img-container {
    transition: all 0.3s ease;
    transform: scale(1.05);
    filter: brightness(95%);
}
.overlay {
    visibility: hidden;
    margin-top: -10px;
    font-size: 14px;
    text-align: center;
    color: #222;
}
.image-level-1:hover .overlay {
    visibility: visible;
}
.image-level-1 .level-locked {
    position: relative;
    display: inline-block;
    cursor: not-allowed;
}

.image-level-1 .level-locked img.level-preview {
    filter: brightness(70%);
}

.image-level-1:hover a.level-locked img.level-preview {
    filter: brightness(70%);
}

.image-level-1 .lock-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    /* Décalé vers le haut (comme l’ancien état au survol) */
    transform: translate(-50%, -100%);
    z-index: 1;
    box-shadow: none !important;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.image-level-1:hover .lock-icon {
    opacity: 1;
}
.lock-right .image-level-1 .lock-icon, .lock-right .image-level-2 .lock-icon,
.lock-right .image-level-1:hover .lock-icon, .lock-right .image-level-2:hover .lock-icon {
    left: auto;
    right: 20px;
    transform: translate(50%, -50%);
}

.image-level-1 .locked-overlay {
    position: absolute;
    bottom: 8px;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: #eeeeee;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 2;
    font-size: 14px;
    box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.5);
}

.image-level-1:hover .level-locked .locked-overlay {
    opacity: 1;
}

.image-level-2.level-new {
    position: relative;
}
.image-level-1 .level-new .level-img-container::after {
    content: "";
    position: absolute;
    top: -6px;
    right: -1px;
    width: 20px;
    height: 20px;
    background: url(/img/new.svg) no-repeat;
    background-size: contain;
}
.image-level-2.level-new .level-name::after {
    content: "";
    position: absolute;
    top: 7px;
    right: 7px;
    width: 20px;
    height: 20px;
    background: url(/img/new.svg) no-repeat;
    background-size: contain;
}

/* affiché si ne supporte pas le hover */
@media (hover: none) {
    .image-level-1 .overlay {
        visibility: visible;
        margin-top: -18px;
        padding-bottom: 4px;
    }
    /* Classiques / no-guess / géants : overlay toujours visible, pas de chevauchement */
    .plus-levels-row .image-level-1 .overlay {
        margin-top: 8px;
        padding-bottom: 0;
    }
    .image-level-1 .lock-icon,
    .image-level-2 .lock-icon {
        opacity: 1;
    }
}

.level-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.image-level-2 {
    flex: 0 1 calc(33.333% - 60px);
    margin: 10px 15px;
    box-sizing: border-box;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    padding-bottom: 10px !important;
}
.image-level-2:hover {
    transform: scale(1.07);
    filter: brightness(95%);
}
.image-level-2.level-locked {
    filter: brightness(70%);
    cursor: not-allowed;
}

.image-level-2 .lock-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    transform: translate(-50%, -50%);
    z-index: 1;
    box-shadow: none !important;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.image-level-2:hover .lock-icon {
    opacity: 1;
}

.image-level-2 .locked-overlay {
    position: absolute;
    bottom: 6px;
    left: 0;
    background-color: rgba(0, 0, 0, 0.8);
    color: white !important;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 2;
    font-size: 14px;
    box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.5);
    margin: 0 6px;
    padding: 2px 8px;
    filter: brightness(142%) !important;
}

.image-level-2.level-locked:hover .locked-overlay {
    opacity: 1;
}

.level-name {
    font-size: 14px;
    line-height: 1.15;
    color: #222;
    font-weight: bold;
    margin-top: 4px;
}

@media (max-width: 768px) {
    .image-level-2 img.level-preview {
        width: auto;
        max-width: 100%;
        height: auto !important;
    }
}

.mine-yes,
.mine-no {
    display: inline-block;
    width: 18px;
    height: 18px;
    background: url(/img/mine2.svg) no-repeat;
    background-position: center;
    background-size: contain;
}
.mine-no {
    filter: opacity(0.3);
}

i.tooltip-icon::before {
    content: url(/img/tooltip.svg);
    display: inline-block;
    width: 16px;
    height: 16px;
}

ul.languages {
    list-style: none;
    padding: 8px 20px;
    margin: 0;
}
ul.languages li {
    margin: 8px 0;
}
.lang-detail {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}
#lang-container {
    position: absolute;
    top: 19px;
    right: 20px;
}
/* Langue dans le DOM de <nav> : ne pas hériter des styles des liens de menu (desktop) */
header nav #lang-container a {
    color: inherit;
    background: transparent;
    padding: 5px 10px;
    font-weight: normal;
}
header nav #lang-container a:hover,
header nav #lang-container a:focus {
    color: inherit;
    background: transparent;
}
/* Ne pas hériter du flex horizontal de header nav ul */
header nav #lang-container ul.languages {
    display: block;
    width: auto;
    margin: 0;
}
header nav #lang-container ul.languages li {
    display: block;
}
header nav #lang-container .languages a {
    display: block;
}
.current-lang {
    padding: 5px 10px;
    cursor: pointer;
}
.current-lang::after {
    content: "";
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #000;
    display: inline-block;
    margin-left: 6px;
    vertical-align: middle;
}
.dark .current-lang::after {
    border-top: 5px solid #eee;
}
.current-lang svg {
    margin-right: 4px;
    fill: #333;
}
.dark .current-lang svg {
    fill: #eee;
}
.languages {
    position: absolute;
    top: 100%;
    right: 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
    z-index: 1;
    background-color: #fff;
}
.dark .languages {
    border: 1px solid #333;
    background-color: #333;
}
.hidden {
    display: none;
}
@media (max-width: 670px) {
    .main-title {
        margin-right: 80px;
    }
    .current-lang .lang-label {
        display: none;
    }
}

/* ========== Menu burger mobile (drawer gauche) — desktop inchangé ========== */
@media (max-width: 768px) {
    body {
        padding-top: 64px;
    }
    body.nav-open {
        overflow: hidden;
    }

    header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        margin: 0;
        padding: 0;
        background-color: #eee;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    }
    .dark header {
        background-color: #333;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    }

    .main-title {
        display: flex;
        align-items: center;
        max-width: none;
        width: 100%;
        box-sizing: border-box;
        margin: 0;
        margin-right: 0;
        padding: 6px 12px;
        font-size: 18px;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .main-title-mine {
        display: none !important;
    }

    .nav-burger {
        display: inline-flex;
    }
    body.nav-open .nav-burger-bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    body.nav-open .nav-burger-bar:nth-child(2) {
        opacity: 0;
    }
    body.nav-open .nav-burger-bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1001;
        background: rgba(0, 0, 0, 0.45);
        border: none;
        padding: 0;
        cursor: pointer;
    }
    .nav-backdrop[hidden] {
        display: none;
    }

    header nav#site-nav {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(280px, 82vw);
        z-index: 1002;
        margin: 0;
        padding: 12px 0 24px;
        box-sizing: border-box;
        background-color: rgb(23, 85, 126);
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.25);
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .dark header nav#site-nav {
        background-color: #222222;
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.5);
    }
    body.nav-open header nav#site-nav {
        transform: translateX(0);
    }

    header nav#site-nav .nav-drawer-close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 8px;
        right: 8px;
        z-index: 1;
        width: 40px;
        height: 40px;
        margin: 0;
        padding: 0;
        border: none;
        border-radius: 6px;
        background: transparent;
        color: #fff;
        font-size: 28px;
        line-height: 1;
        cursor: pointer;
    }
    header nav#site-nav .nav-drawer-close:hover,
    header nav#site-nav .nav-drawer-close:focus {
        background: rgba(255, 255, 255, 0.12);
    }

    header nav#site-nav .nav-drawer-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0 16px 12px;
        padding: 8px 40px 16px 4px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.25);
        font-size: 17px;
        font-weight: 700;
        line-height: 1.2;
        color: #fff;
    }
    header nav#site-nav .nav-drawer-brand img {
        flex-shrink: 0;
        width: 28px;
        height: 28px;
    }

    header nav#site-nav ul {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    header nav#site-nav ul li {
        display: block;
        width: 100%;
    }
    header nav#site-nav .nav-item-right {
        margin-left: 0;
    }
    header nav#site-nav a {
        display: block;
        padding: 14px 20px;
        font-size: 16px;
    }

    /* Langue dans le drawer (plus en haut à droite) */
    header nav#site-nav #lang-container {
        position: static;
        margin: 12px 12px 0;
        padding-top: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.25);
    }
    header nav#site-nav .current-lang {
        color: #fff;
        padding: 10px 8px;
    }
    header nav#site-nav .current-lang .lang-label {
        display: inline !important;
    }
    header nav#site-nav .current-lang::after {
        border-top-color: #fff;
    }
    header nav#site-nav .current-lang svg {
        fill: #fff;
    }
    header nav#site-nav .languages {
        position: static;
        margin-top: 4px;
        right: auto;
        box-shadow: none;
        border-radius: 4px;
    }
    header nav#site-nav .languages li a {
        color: #222 !important;
        background: transparent;
        padding: 10px 14px;
    }
    header nav#site-nav .languages li a:hover {
        background: rgba(0, 0, 0, 0.06);
    }
    .dark header nav#site-nav .languages li a {
        color: #eee !important;
    }
    .dark header nav#site-nav .languages li a:hover {
        background: rgba(255, 255, 255, 0.08);
    }
}

.noguess-badge {
    display: inline-block;
    vertical-align: middle;
    margin-left: 8px;
    padding: 3px 10px 4px;
    border-radius: 4px;
    font-size: 0.55em;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.3;
    color: #fff;
    background: linear-gradient(180deg, #5a768c 0%, #3d5566 100%);
    box-shadow: 0 1px 2px rgba(20, 35, 48, 0.35);
    text-transform: lowercase;
}
.dark .noguess-badge {
    background: linear-gradient(180deg, #6a879c 0%, #4a6578 100%);
}

.result-title {
    font-size: 34px;
    margin-top: 16px;
}

/* ========== Page Plus — responsive (en fin de fichier pour gagner la cascade) ========== */
@media (max-width: 980px) {
    /* Géants : largeurs toujours croissantes (ratio previews 204 : 252 : 276) */
    .plus-levels-row.pl-giant {
        --pl-giant-gap-x: 16px;
        gap: 14px var(--pl-giant-gap-x);
    }
    .plus-levels-row.pl-giant .pl-elite {
        width: calc((100% - var(--pl-giant-gap-x)) * 204 / 456);
        max-width: none;
    }
    .plus-levels-row.pl-giant .pl-colossal {
        width: calc((100% - var(--pl-giant-gap-x)) * 252 / 456);
        max-width: none;
    }
    .plus-levels-row.pl-giant .pl-supreme {
        width: calc((100% - var(--pl-giant-gap-x)) * 276 / 456);
        max-width: none;
    }
    #extreme-levels .image-level-2.card img.level-preview,
    #special-levels .image-level-2.card img.level-preview,
    #halloween-levels .image-level-2.card img.level-preview,
    #christmas-levels .image-level-2.card img.level-preview,
    #newyear-levels .image-level-2.card img.level-preview {
        max-width: 100%;
        height: auto;
    }
}
@media (max-width: 680px) {
    article.container.container-plus {
        padding-left: 12px;
        padding-right: 12px;
    }
    article.container.container-plus > h1 {
        font-size: 1.35em;
        margin-bottom: 8px;
    }
    article.container.container-plus > p {
        font-size: 0.95em;
        line-height: 1.4;
        margin-bottom: 4px;
    }
    .plus-row > .card,
    .plus-row > .plus-row-main {
        max-width: 100%;
    }
    .card.plus-section-card {
        padding: 16px 12px 12px;
    }
    .card.plus-section-card > h2 {
        margin-top: 0;
        margin-bottom: 14px;
        font-size: 1.15em;
    }
    .plus-section-title {
        margin: 18px 0 10px 4px;
        font-size: 1.15em;
    }
    .plus-aside,
    .plus-aside-align {
        font-size: 0.84em;
        line-height: 1.38;
        color: #666;
        padding: 0 2px 0 10px;
        margin: 0 0 4px;
    }
    .dark .plus-aside,
    .dark .plus-aside-align {
        color: #aaa;
    }
    .plus-levels-row {
        gap: 10px;
    }
    .plus-levels-row .level-label-name {
        font-size: 12px;
        margin-bottom: 4px;
    }
    .plus-levels-row .mines-badge,
    .plus-levels-row .pl-col .mines-badge,
    .image-level-2 .mines-badge {
        font-size: 11px;
        padding: 2px 7px 2px 4px;
        gap: 3px;
        white-space: nowrap;
    }
    /* Icône mine suffit : on retire le mot « mines » pour rester sur une ligne */
    .mines-badge-unit {
        display: none;
    }
    .plus-levels-row.pl-giant {
        --pl-giant-gap-x: 14px;
        gap: 12px var(--pl-giant-gap-x);
    }
    #extreme-levels .level-grid,
    #special-levels .level-grid,
    #halloween-levels .level-grid,
    #christmas-levels .level-grid,
    #newyear-levels .level-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }
    #extreme-levels .image-level-2.card,
    #special-levels .image-level-2.card,
    #halloween-levels .image-level-2.card,
    #christmas-levels .image-level-2.card,
    #newyear-levels .image-level-2.card {
        min-width: 0;
        padding: 6px 4px 8px !important;
    }
    #extreme-levels .image-level-2.card img.level-preview,
    #special-levels .image-level-2.card img.level-preview,
    #halloween-levels .image-level-2.card img.level-preview,
    #christmas-levels .image-level-2.card img.level-preview,
    #newyear-levels .image-level-2.card img.level-preview {
        width: 100% !important;
        max-width: 100%;
        height: auto !important;
    }
    .level-name {
        font-size: 12px;
    }
    #extreme-levels .extreme-card strong {
        font-size: 12px;
    }
}
@media (max-width: 380px) {
    .plus-levels-row {
        gap: 6px;
    }
    .plus-levels-row .level-label-name {
        font-size: 11px;
    }
    .plus-levels-row.pl-giant {
        --pl-giant-gap-x: 10px;
    }
    #extreme-levels .level-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}