/* Outils (outils/index.php, outils/ligne-de-vue.php). Interface : couleurs par les variables (le mode sombre suit).
   Plateau de la ligne de vue : couleurs en dur posées sur l'illustration de la map, identiques dans les deux thèmes
   (rien à ajouter dans theme-sombre.css). */
.outils-page {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0.75rem 0 2.5rem;
    color: var(--encre);
}

.outils-entete {
    max-width: 720px;
    margin: 0 auto 1.75rem;
    text-align: center;
}

.outils-entete--compact {
    margin-bottom: 1rem;
}

.outils-entete h1 {
    margin: 0.2rem 0 0.5rem;
    font-size: clamp(1.5rem, 4vw, 2.1rem);
    color: var(--brun-nuit);
}

.outils-entete p {
    margin: 0;
    line-height: 1.55;
    color: var(--brun-cuir);
}

.outils-kicker {
    margin: 0;
    font-family: 'Grandstander', cursive;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Liste des outils */
.outils-liste {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.outils-carte > a,
.outils-carte > div {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: 100%;
    padding: 1.25rem;
    color: var(--encre);
    text-decoration: none;
    background: var(--beige-clair);
    border: 1px solid var(--beige-fonce);
    border-radius: var(--radius-card);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.outils-carte > a:hover,
.outils-carte > a:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.outils-carte.is-bientot > div {
    opacity: 0.65;
}

.outils-carte-icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.2rem;
    height: 3.2rem;
    color: var(--or-clair);
    background: var(--brun-cuir);
    border-radius: 0.8rem;
}

.outils-carte-texte {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1;
}

.outils-carte-titre {
    font-family: 'Grandstander', cursive;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--brun-nuit);
}

.outils-carte-description {
    line-height: 1.5;
    color: var(--brun-cuir);
}

.outils-carte-action {
    font-weight: 700;
    color: var(--rouille);
}

.outils-carte-bientot {
    align-self: flex-start;
    padding: 0.15rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--brun-cuir);
    border: 1px solid var(--beige-fonce);
    border-radius: var(--radius-small);
}

/* ── Calculateur de ligne de vue ─────────────────────────────── */
.ldv-app {
    display: grid;
    gap: 1rem;
    align-items: start;
}

@media (min-width: 992px) {
    .ldv-app {
        grid-template-columns: minmax(0, 1fr) 300px;
    }

    .ldv-panneau {
        position: sticky;
        top: 1rem;
    }
}

.ldv-colonne {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-width: 0;
}

.ldv-choix {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
}

.ldv-champ {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin: 0;
    min-width: 0;
}

.ldv-champ > span,
.ldv-champ > legend {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--brun-cuir);
}

/* Choix de la map : bande basse de vignettes (illustration à gauche, nom à droite) qui défile, aimantée, flèches
   par-dessus les bords */
.ldv-champ--map {
    padding: 0;
    border: 0;
}

.ldv-champ--map > legend {
    float: none;
    width: auto;
    margin: 0 0 0.2rem;
    padding: 0;
    line-height: inherit;
}

.ldv-maps {
    position: relative;
}

.ldv-maps-bande {
    display: flex;
    gap: 0.4rem;
    padding: 0.15rem 0.1rem 0.3rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
}

/* Barre de défilement du thème (components.css), plus fine sous la bande ; pas de scrollbar-width ici : il
   désactiverait ce rendu dans Chrome */
@supports selector(::-webkit-scrollbar) {
    .ldv-maps-bande::-webkit-scrollbar {
        height: 7px;
    }
}

.ldv-map-choix {
    position: relative;
    display: flex;
    flex: 0 0 8.5rem;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.4rem 0.2rem 0.2rem;
    cursor: pointer;
    background: var(--beige-clair);
    border: 2px solid transparent;
    border-radius: 0.6rem;
    scroll-snap-align: start;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.ldv-map-choix:hover {
    border-color: var(--beige-fonce);
}

.ldv-map-choix input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ldv-map-choix:has(input:checked) {
    background: var(--or-clair);
    border-color: var(--or);
}

.ldv-map-choix:has(input:focus-visible) {
    outline: 2px solid var(--brun-cuir);
    outline-offset: 1px;
}

.ldv-map-vignette {
    display: block;
    flex: 0 0 2.5rem;
    width: 2.5rem;
    height: 2.5rem;
    overflow: hidden;
    background: var(--brun-cuir);
    border-radius: 0.4rem;
}

.ldv-map-vignette img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Map vierge : damier dessiné */
.ldv-map-vignette--vierge {
    background:
        repeating-conic-gradient(#c9b98f 0 25%, #e3d6b0 0 50%) 0 0 / 25% 25%;
}

.ldv-map-nom {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--encre);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ldv-maps-fleche {
    position: absolute;
    top: 50%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    padding: 0 0 0.15rem;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--white);
    background: var(--brun-cuir);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    transform: translateY(-60%);
}

.ldv-maps-fleche[hidden] {
    display: none;
}

.ldv-maps-fleche--avant {
    left: -0.4rem;
}

.ldv-maps-fleche--apres {
    right: -0.4rem;
}

/* Au doigt, la bande se fait glisser : pas de flèches */
@media (hover: none) {
    .ldv-maps-fleche {
        display: none;
    }
}

/* Barre d'outils : six boutons, icône au-dessus du libellé, toujours sur une ligne */
.ldv-outils {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.3rem;
    padding: 0.3rem;
    background: var(--brun-cuir);
    border-radius: 0.8rem;
}

.ldv-outil {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    min-width: 0;
    padding: 0.4rem 0.2rem;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--beige);
    background: transparent;
    border: 0;
    border-radius: 0.6rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.ldv-outil:hover {
    background: rgba(255, 255, 255, 0.1);
}

.ldv-outil:focus-visible {
    outline: 2px solid var(--or-clair);
    outline-offset: 1px;
}

.ldv-outil.is-actif {
    color: var(--brun-nuit);
    background: var(--or);
}

/* Icône de chaque outil dans une pastille aux couleurs des jetons du plateau */
.ldv-outil-icone {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    color: #ffffff;
    background: var(--ldv-outil-couleur, rgba(255, 255, 255, 0.15));
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.ldv-outil-icone svg {
    display: block;
    width: 62%;
    height: 62%;
}

.ldv-outil[data-outil='moi'] {
    --ldv-outil-couleur: #f2c14e;
}

.ldv-outil[data-outil='moi'] .ldv-outil-icone {
    color: #2a1c12;
}

.ldv-outil[data-outil='allie'] {
    --ldv-outil-couleur: #2f6fd6;
}

.ldv-outil[data-outil='ennemi'] {
    --ldv-outil-couleur: #c63a2f;
}

.ldv-outil[data-outil='decor'] {
    --ldv-outil-couleur: #2f8f4e;
}

.ldv-outil[data-outil='viser'] {
    --ldv-outil-couleur: #5a6b7d;
}

.ldv-outil[data-outil='gomme'] {
    --ldv-outil-couleur: #8a7560;
}

.ldv-outil-texte {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Palette des décors (outil Décor) */
.ldv-palette {
    display: flex;
    gap: 0.4rem;
    padding-bottom: 0.2rem;
    overflow-x: auto;
    scrollbar-width: thin;
}

.ldv-palette[hidden] {
    display: none;
}

.ldv-palette-choix {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 0.4rem;
    padding: 0.25rem 0.7rem 0.25rem 0.3rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--encre);
    background: var(--beige-clair);
    border: 2px solid var(--beige-fonce);
    border-radius: var(--radius-small);
}

.ldv-palette-choix.is-actif {
    border-color: var(--rouille);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--rouille) 30%, transparent);
}

.ldv-palette-visuel {
    display: block;
    width: 2rem;
    height: 2rem;
}

.ldv-palette-visuel img,
.ldv-palette-visuel svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Plateau : carré (ou rectangle) aux proportions de la grille, tenu dans la hauteur de l'écran */
.ldv-plateau-cadre {
    width: 100%;
    max-width: max(280px, calc((100svh - 9.5rem) * var(--ldv-colonnes) / var(--ldv-lignes)));
    margin: 0 auto;
}

.ldv-plateau {
    position: relative;
    aspect-ratio: var(--ldv-colonnes) / var(--ldv-lignes);
    overflow: hidden;
    background: #5c7a3a;
    border-radius: 0.6rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

/* Sans illustration (map vierge) : damier d'herbe, une case par carreau */
.ldv-plateau.is-sans-image {
    background: repeating-conic-gradient(#6f8f4a 0 25%, #66853f 0 50%) 0 0 / calc(200% / var(--ldv-colonnes)) calc(200% / var(--ldv-lignes));
}

.ldv-plateau.is-glisse {
    cursor: grabbing;
}

.ldv-plateau[data-outil='viser'] {
    cursor: crosshair;
}

.ldv-scene {
    position: absolute;
    inset: 0;
    transform-origin: 0 0;
}

.ldv-plateau.is-zoome {
    cursor: grab;
}

/* Zoom : boutons dans le coin du plateau */
.ldv-zoom {
    position: absolute;
    right: 0.5rem;
    bottom: 0.5rem;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.ldv-zoom button {
    width: 2.4rem;
    height: 2.4rem;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    color: #ffffff;
    background: rgba(28, 17, 10, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.ldv-zoom button[hidden] {
    display: none;
}

.ldv-zoom button:disabled {
    opacity: 0.4;
}

.ldv-fond {
    position: absolute;
    max-width: none;
    pointer-events: none;
}

.ldv-calque,
.ldv-pieces {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.ldv-case {
    transition: fill 0.15s ease;
}

.ldv-case--cible {
    fill: rgba(52, 211, 83, 0.45);
}

.ldv-case--vue {
    fill: rgba(255, 220, 110, 0.22);
}

.ldv-case--cache {
    fill: rgba(14, 9, 4, 0.58);
}

/* Hachures : motif à la couleur du type (style posé par le JS) */
.ldv-case--speciale {
    fill: url(#ldv-hachures-rouge);
}

/* Case spéciale ciblable : hachures atténuées par-dessus sa couleur (ciblable, hors de vue…) */
.ldv-case--speciale-ciblable {
    opacity: 0.4;
}

.ldv-hachure {
    opacity: 0.5;
}

.ldv-case--moi {
    fill: rgba(242, 217, 138, 0.45);
}

/* Cases en contour (interrupteur sous la légende) : ciblable et visible hors de portée encadrées, l'illustration et
   les hachures restent lisibles ; hors de vue seulement assombri */
.ldv-app.is-contours .ldv-case--cible,
.ldv-app.is-contours .ldv-case--vue {
    fill: none;
    stroke-width: 2.5px;
    vector-effect: non-scaling-stroke;
    transform-box: fill-box;
    transform-origin: center;
    /* Au bord de la case : juste le retrait de la moitié du trait */
    transform: scale(0.965);
}

.ldv-app.is-contours .ldv-case--cible {
    stroke: #4fe06b;
}

.ldv-app.is-contours .ldv-case--vue {
    stroke: #ffd65c;
    stroke-dasharray: 4 3;
}

.ldv-app.is-contours .ldv-case--cache {
    fill: rgba(14, 9, 4, 0.45);
}

.ldv-quadrillage {
    fill: none;
    stroke: rgba(255, 255, 255, 0.35);
    stroke-width: 1;
}

.ldv-bord {
    fill: none;
    stroke: rgba(0, 0, 0, 0.45);
    stroke-width: 2;
}

.ldv-ligne {
    stroke-width: 3;
    stroke-linecap: round;
}

.ldv-ligne--libre {
    stroke: #ffffff;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.8));
}

.ldv-ligne--bloquee {
    stroke: #ff5a4f;
    stroke-dasharray: 6 5;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.8));
}

.ldv-bloqueur {
    fill: rgba(255, 70, 60, 0.35);
    stroke: #ff5a4f;
    stroke-width: 2.5;
}

.ldv-visee {
    fill: none;
    stroke: #ffffff;
    stroke-width: 2.5;
}

.ldv-visee--cache,
.ldv-visee--speciale,
.ldv-visee--occupee {
    stroke: #ff5a4f;
}

/* Pièces : décors (image de l'article ou dessin) et personnages (jetons) */
.ldv-piece {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: left 0.12s ease, top 0.12s ease, transform 0.12s ease;
}

.ldv-piece--decor img,
.ldv-piece--decor svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.45));
    transform: translateY(-6%) scale(1.08);
}

.ldv-piece--porteur {
    z-index: 0;
}

.ldv-piece--perso {
    z-index: 2;
}

.ldv-jeton {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72%;
    aspect-ratio: 1;
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);
}

.ldv-jeton svg {
    width: 62%;
    height: 62%;
}

.ldv-piece--moi .ldv-jeton {
    color: #2a1c12;
    background: #f2c14e;
    border-color: #fff6d8;
    box-shadow: 0 0 0 3px rgba(242, 193, 78, 0.45), 0 3px 6px rgba(0, 0, 0, 0.5);
}

.ldv-piece--allie .ldv-jeton {
    background: #2f6fd6;
}

.ldv-piece--ennemi .ldv-jeton {
    background: #c63a2f;
}

.ldv-piece.is-glisse {
    z-index: 3;
    transform: scale(1.18);
    transition: none;
}

/* Bulle du résultat : en transparence en haut du plateau (en bas quand la case visée est en haut) */
.ldv-bulle {
    position: absolute;
    top: 0.5rem;
    left: 50%;
    z-index: 4;
    max-width: calc(100% - 1rem);
    padding: 0.35rem 0.85rem;
    overflow: hidden;
    font-size: clamp(0.85rem, 2.4vw, 1rem);
    font-weight: 800;
    line-height: 1.25;
    color: #ffffff;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: rgba(20, 12, 6, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
    transform: translateX(-50%);
    backdrop-filter: blur(3px);
    pointer-events: none;
    transition: background-color 0.15s ease;
}

.ldv-bulle:empty {
    display: none;
}

.ldv-bulle.is-bas {
    top: auto;
    bottom: 0.5rem;
    max-width: calc(100% - 7rem);
}

.ldv-bulle[data-statut='cible'] {
    background: rgba(28, 125, 52, 0.82);
}

.ldv-bulle[data-statut='cache'],
.ldv-bulle[data-statut='occupee'],
.ldv-bulle[data-statut='speciale'],
.ldv-bulle[data-statut='refus'] {
    background: rgba(160, 35, 28, 0.85);
}

.ldv-bulle[data-statut='vue'] {
    background: rgba(150, 105, 10, 0.85);
}

.ldv-chargement {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 700;
    color: #ffffff;
    background: rgba(14, 9, 4, 0.55);
}

.ldv-chargement[hidden] {
    display: none;
}

/* Résultat sous le plateau */
.ldv-resume {
    min-height: 2.8em;
    margin: 0;
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    color: var(--brun-nuit);
    background: var(--beige-clair);
    border-left: 4px solid var(--beige-fonce);
    border-radius: 0.5rem;
}

.ldv-resume[data-statut='cible'] {
    border-left-color: #2fa84f;
}

.ldv-resume[data-statut='cache'],
.ldv-resume[data-statut='occupee'] {
    border-left-color: #d0443a;
}

.ldv-resume[data-statut='refus'],
.ldv-resume[data-statut='speciale'] {
    border-left-color: #d0443a;
}

.ldv-resume[data-statut='refus'] {
    color: #8f2a20;
}

.ldv-resume[data-statut='vue'] {
    border-left-color: #d9a520;
}

/* Réglages */
.ldv-panneau {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ldv-bloc {
    padding: 0.9rem 1rem;
    background: var(--beige-clair);
    border: 1px solid var(--beige-fonce);
    border-radius: var(--radius-card);
}

.ldv-bloc h2 {
    margin: 0 0 0.6rem;
    font-size: 1rem;
    color: var(--brun-nuit);
}

.ldv-portee {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

/* Carré de portée des cartes : icône du type, PO minimale et maximale en bas */
.ldv-portee-carre {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #000;
    border-radius: 0.4rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.ldv-portee-carre img {
    display: block;
    width: 100%;
    height: 100%;
}

.ldv-portee-po {
    position: absolute;
    right: 0;
    bottom: 0.1rem;
    left: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 0.4rem;
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1;
    color: #ffffff;
    text-shadow: 0 0 3px #000, 0 0 3px #000;
}

.ldv-steppers {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.ldv-stepper.is-inactif {
    opacity: 0.45;
}

.ldv-stepper-libelle {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.15rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--brun-cuir);
}

.ldv-stepper-commandes {
    display: grid;
    grid-template-columns: 2.4rem minmax(0, 1fr) 2.4rem;
    gap: 0.25rem;
}

.ldv-stepper-commandes button {
    height: 2.4rem;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1;
    color: var(--brun-nuit);
    background: var(--beige);
    border: 1px solid var(--beige-fonce);
    border-radius: 0.5rem;
}

.ldv-stepper-commandes button:not(:disabled):active {
    background: var(--or-clair);
}

.ldv-stepper-valeur {
    min-width: 0;
    height: 2.4rem;
    padding: 0;
    font-size: 1.2rem;
    font-weight: 800;
    text-align: center;
    text-align-last: center;
    color: var(--brun-nuit);
    background: var(--white);
    border: 1px solid var(--beige-fonce);
    border-radius: 0.5rem;
    appearance: none;
    cursor: pointer;
}

/* Types de portée : icônes des cartes */
.ldv-portee-types {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.3rem;
}

.ldv-portee-type {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    min-width: 0;
    padding: 0.35rem 0.15rem;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--brun-cuir);
    background: transparent;
    border: 2px solid var(--beige-fonce);
    border-radius: 0.5rem;
}

.ldv-portee-type img {
    width: 2.1rem;
    height: 2.1rem;
    object-fit: contain;
}

.ldv-portee-type.is-actif {
    color: var(--brun-nuit);
    background: color-mix(in srgb, var(--or) 25%, transparent);
    border-color: var(--rouille);
}

.ldv-interrupteur {
    margin: 0.3rem 0 0;
}

.ldv-speciale-defaut {
    font-size: 0.78rem;
    color: var(--brun-cuir);
}

.ldv-speciale-defaut.is-modifie {
    font-weight: 700;
    color: var(--rouille);
}

.ldv-note {
    margin: 0.5rem 0 0;
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--brun-cuir);
}

.ldv-legende {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0 0 0.4rem;
    padding: 0;
    list-style: none;
    font-size: 0.9rem;
}

.ldv-legende li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ldv-pastille {
    flex: 0 0 auto;
    width: 1.1rem;
    height: 1.1rem;
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 0.25rem;
}

.ldv-pastille--cible {
    background: #4fc768;
}

.ldv-app.is-contours .ldv-pastille--cible {
    background: transparent;
    border: 2px solid #3bbf57;
}

.ldv-app.is-contours .ldv-pastille--vue {
    background: transparent;
    border: 2px dashed #d9a520;
}

.ldv-pastille--vue {
    background: #e9d389;
}

.ldv-pastille--cache {
    background: #4a3e33;
}

/* Icône PO dans les textes (bulle, légende, aide) */
.ldv-icone-po {
    display: inline-block;
    width: 1.15em;
    height: 1.15em;
    vertical-align: -0.22em;
}

.ldv-pastille--speciale {
    /* Fond sombre sous les rayures : les hachures blanches restent visibles */
    background: repeating-linear-gradient(45deg, var(--hachure, #ff5a28) 0 3px, transparent 3px 6px) #5b4a3a;
}

.ldv-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ldv-bouton {
    padding: 0.45rem 0.8rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--brun-cuir);
    background: transparent;
    border: 1px solid var(--beige-fonce);
    border-radius: var(--radius-small);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.ldv-bouton:hover {
    background: color-mix(in srgb, var(--beige-fonce) 45%, transparent);
}

.ldv-bouton--principal {
    color: var(--brun-nuit);
    background: var(--or);
    border-color: var(--or-terne);
}

.ldv-bouton--principal:hover {
    background: var(--or-clair);
}

/* Explications (rendues par le serveur) */
.ldv-aide {
    margin-top: 2rem;
}

.ldv-aide h2 {
    margin: 0 0 1rem;
    font-size: 1.35rem;
    text-align: center;
    color: var(--brun-nuit);
}

.ldv-aide-grille {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.ldv-aide h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    color: var(--brun-nuit);
}

.ldv-aide p {
    margin: 0;
    line-height: 1.55;
    color: var(--brun-cuir);
}

/* Téléphone et tablette : barre d'outils collée en haut de l'écran pendant qu'on parcourt le plateau */
@media (max-width: 991.98px) {
    .ldv-barre {
        position: sticky;
        top: 0;
        z-index: 10;
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
        padding: 0.35rem 0;
        background: var(--fond-page);
    }
}

@media (min-width: 992px) {
    .ldv-barre {
        display: flex;
        flex-direction: column;
        gap: 0.6rem;
    }
}

/* Téléphone : plateau bord à bord, sous les marges de la page */
@media (max-width: 575.98px) {
    .ldv-colonne {
        margin-inline: -0.9rem;
    }

    .ldv-choix,
    .ldv-barre {
        padding-inline: 0.5rem;
    }

    .ldv-resume {
        margin-inline: 0.5rem;
    }

    .ldv-plateau {
        border-radius: 0;
    }

    .ldv-outil {
        font-size: 0.7rem;
    }
}
