﻿body {
    font-family: Arial, sans-serif;
    padding: 0 20px 20px 20px;
    background: #f4f4f4;
    justify-content: center;
    align-items: center;
    display: flex;
    margin: 0;
;
    flex-direction: column;;
}
h1 {
    text-align: center;
}
.grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 10px;
    max-width: 1480px;
}
.duck {
    display: flex;
    padding: 6px;
    border-radius: 8px;
    text-align: center;
    min-height: 123px;
    flex-direction: column;
    min-width: 100px;
}
.duck-image {
    width: 50px;
    height: auto;
    display: block;
    margin: 0 auto 8px auto;
}
.duck-image-container {
    position: relative;
    display: inline-block;
}
.check-overlay {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    pointer-events: none; /* pour que le clic passe sous l’image */
}

/* Style grisé pour la carte entière quand trouvé */
.duck.found {
    filter: grayscale(70%);
    opacity: 0.8;
    transition: filter 0.3s, opacity 0.3s;
}
/* couleurs différentes par place */
.AGATHA { background: #ffe6e6; }
.MATTHIEU { background: #e6ffe6; }
.ELIAS { background: #e6f0ff; }

.tooltip-zone {
    position: relative;
    display: inline-block;
}

.tooltip-content {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s ease-in-out;
    position: absolute;
    z-index: 200;
    left: 50%;
    bottom: 120%;
    margin-left: -115px;
    width: 230px;
    background-color: #222;
    color: #fff;
    border-radius: 6px;
    padding: 12px;
    text-align: left;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
    pointer-events: auto;
}

.duck.found .tooltip-content {
    filter: none !important;
    opacity: 1 !important;
    background-color: #222; /* pour être sûr que la couleur reste lisible */
}

/* La bulle reste visible si on survole la zone déclencheur ou la bulle */
.tooltip-zone:hover .tooltip-content,
.tooltip-zone:focus-within .tooltip-content {
    visibility: visible;
    opacity: 1;
}

/* Style switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-right: 8px;
    vertical-align: middle;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 12px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4caf50;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100%;
    background: #fff;
    border-left: 2px solid #ccc;
    padding: 20px;
    box-shadow: -3px 0 8px rgba(0,0,0,0.1);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 500;
}

/* Sidebar visible */
.sidebar.open {
    transform: translateX(0);
}

/* Bouton toggle */
.sidebar-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4caf50;
    border: none;
    color: white;
    font-size: 22px;
    padding: 8px 14px;
    cursor: pointer;
    border-radius: 6px;
    z-index: 600;
}

/* Couleurs légende */
.legend-color {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    vertical-align: middle;
    border-radius: 4px;
}

.sidebar h2 {
    margin-top: 0;
    margin-bottom: 12px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.sidebar ul li {
    margin-bottom: 8px;
    font-size: 14px;
}


