body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
}


body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle, transparent 60%, rgba(0, 0, 0, 0.45));
    z-index: -1; 
}

.hero {
    background: #5a3e2b;
    color: white;
    padding: 20px;
    text-align: center;
    margin-bottom: 0;
}

h2{
    text-align: center;
    margin-top: 20px;
    margin: bottom 20px;
}

/* dispoliste */
#dispoliste {
    list-style: none;
    display: flex;
    gap: 20px;
    
}

#dispoliste li {
    border: 2px solid #5c3a21;
    padding: 15px;
    width: 160px;
    background: #f8f4e8;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
    border-radius: 8px;

    display: flex;
    flex-direction: column;
    align-items: center;
}

#dispoliste img {
    display: block;
    width: 120px;
    height: auto;
    margin: 0 auto;
}

/*carte timbre */
.top {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 8px;
}

.annee {
    font-size: 14px;
}

.numero {
    font-weight: bold;
}

.nom {
    text-align: center;
    margin-top: 10px;
    font-style: italic;
}

/* ===== MANCOLISTE ===== */

#mancoliste {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    /* 6 timbres par ligne */
    gap: 20px;
    padding: 20px;
}

/* carte timbre */
#mancoliste li {
    border: 2px solid #5c3a21;
    padding: 15px;
    width: 160px;
    background: #f8f4e8;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;

    transition: all 0.3s ease;
}

/* image */
#mancoliste li img {
    display: block;
    width: 120px;
    height: auto;
    margin: 0 auto;

    /* tous les timbres = atténués */
    opacity: 0.25;
    filter: grayscale(60%);
    transition: all 0.3s ease;
}

/* timbres intéressants (<= 100€) */
#mancoliste li.manco-facile img {
    opacity: 1;
    filter: none;
    transform: scale(1.08);
}

/* carte mise en valeur */
#mancoliste li.manco-facile {
    box-shadow: 0 0 15px rgba(107, 76, 59, 0.6);
    border: 2px solid #6b4c3b;
}

/* effet au survol */
#mancoliste li:hover img {
    transform: scale(1.1);
}

/* grille timbres */
#dispoliste,
#mancoliste,
#liste {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    padding: 50px;
    list-style: none;
}
#liste li {
    border: 2px solid #5c3a21;
    padding: 15px;
    width: 160px;
    background: #f8f4e8;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
#liste img {
    display: block;
    width: 120px;
    height: auto;
    margin: 0 auto;
}

/* titre de la période */
#titre-periode {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 10px;
}

/* messages */
.success-message {
    color: green;
    text-align: center;
    font-weight: bold;
}

.error-message {
    color: red;
    text-align: center;
    font-weight: bold;
}

@media (max-width: 1000px) {
    #dispoliste,
    #mancoliste,
    #liste {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    #dispoliste,
    #mancoliste,
    #liste {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* flèche qui remonte*/
#btnTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 10px 15px;
    font-size: 20px;
    background-color: #6b4c3b;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

#btnTop:hover {
    background-color: #8a624d;
}

/* bouton de pagination */
#pagination {
    text-align: center;
    margin: 30px 0;
}

#pagination button {
    margin: 5px;
    padding: 8px 14px;
    background-color: #f5efe6;
    border: 2px solid #6b4c3b;
    color: #6b4c3b;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
}

/* hover de la pagination */
#pagination button:hover {
    background-color: #6b4c3b;
    color: white;
    transform: scale(1.1);
}

/* bouton actif */
#pagination button.active {
    background-color: #6b4c3b;
    color: white;

}

/* commentaire */
.commentaire {
    font-size: 11px;
    color: white;
    background: #8a624d;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 5px;
}

.etat {
    font-weight: bold;
    color: #2c3e50;
    line-height: 1.4;
}

.recherche {
    margin-top: 5px;
    font-size: 12px;
    color: #c0392b;
    font-weight: bold;
}

.cote {
    font-size: 0.9em;
    color: #555;
}

/* Page de chargement */
body {
    margin: 0;
    padding: 0;
}

/*Effet vignettage*/
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle, transparent 60%, rgba(0, 0, 0, 0.45));
    z-index: 10;
}

/*Conteneur principal */
.loading-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}

/* Carte centrale */
.loading-box {
    background: rgba(247, 241, 227, 0.95);
    padding: 40px 60px;
    border: 3px solid #b89b6d;
    border-radius: 8px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35);
    animation: fadeIn 0.6s ease;
}

/* Timbre + tampon */
.timbre-container {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.timbre {
    width: 140px;
    height: auto;
    filter: sepia(0.4) contrast(1.1);
    border: 4px solid #b89b6d;
    padding: 6px;
    background: #f7f1e3;
}

.tampon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(3);
    opacity: 0;
    color: rgba(150, 0, 0, 0.7);
    font-size: 32px;
    font-weight: bold;
    border: 3px solid rgba(150, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 6px;
    rotate: -15deg;
    animation: tamponner 1.2s ease-out forwards;
}

@keyframes tamponner {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(3);
    }

    60% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Texte */
.loading-text {
    font-size: 22px;
    color: #5a4632;
    margin-bottom: 20px;
}

/* Filigrane Cérès */
.filigrane {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 120px;
    opacity: 0.15;
    filter: sepia(1) contrast(1.2);
    pointer-events: none;
}

/* Animation fade-in */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn_entrer {
    margin-top: 15px;
    padding: 10px 20px;
    background: #a67c52;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn_entrer:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* caché au départ */
.cache {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

/* visible après animation */
.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* ===== TIROIR HORIZONTAL ===== */

.tiroir_horizontal {
    position: sticky; 
    top: 0;
    left: 0;
    width: 100%;
    background: #3e2f1c;
    z-index: 1000;
}

/* bouton menu */
.tiroir_header_horizontal {
    width: 100%;
    padding: 15px;
    text-align: center;
    background: #5a4328;
    color: white;
    cursor: pointer;
    font-size: 18px;
    user-select: none;
}

/* contenu */
.tiroir_content_horizontal {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;

    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

/* liens */
.tiroir_content_horizontal a {
    display: inline-block;
    padding: 15px;
    color: #f5e9d4;
    text-decoration: none;
}

/* hover */
.tiroir_content_horizontal a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ouvert */
.tiroir_horizontal.open .tiroir_content_horizontal {
    max-height: 120px;
}

/* =========================
   ACCUEIL STYLE MUSÉE PREMIUM
========================= */

.accueil-musee {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: radial-gradient(
        circle at center,
        rgba(255,255,255,0.4) 0%,
        rgba(255,255,255,0.1) 40%,
        transparent 70%
    );
}

/* carte centrale */
.accueil-box {
    max-width: 800px;
    padding: 50px 60px;
    background: #f8f1e4;
    border: 6px solid #b89b6d;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
    text-align: center;
    position: relative;   
    z-index: 2;
    overflow: visible;
    transform: perspective(1200px) rotateX(1deg);
}

/* titre */
.titre-musee {
    font-size: 42px;
    margin-bottom: 15px;
    letter-spacing: 2px;
    color: #3e2f1c;
}

/* intro */
.intro-musee {
    font-size: 18px;
    margin-bottom: 15px;
    color: #6b5844;
}

/* citation */
.citation-musee {
    font-size: 18px;
    font-style: italic;
    margin: 20px auto;
    max-width: 550px;
    color: #5a3e2b;
}

/* bouton */
.bouton-entrer {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 28px;
    background: linear-gradient(#c2a375, #a67c52);
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 6px;
    box-shadow: 
        0 4px 10px rgba(0,0,0,0.3),
        inset 0 1px 2px rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}

.bouton-entrer:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.4);
}

/* détails */
.details-musee {
    margin-top: 60px;
    display: flex;
    justify-content: center;
    padding-bottom: 10px;
    gap: 25px;
    bottom: auto;
    font-size: 13px;
    color: #6b5844;
}

/* =========================
   TIMBRES
========================= */

/* timbre principal */
.timbre.main {
    position: relative;
    width: 160px;
    margin: 0 auto 20px auto;
    border: 4px solid #111;
    box-shadow: 
        0 12px 25px rgba(0,0,0,0.4),
        0 2px 6px rgba(0,0,0,0.2);
    z-index: 2;
}

/* timbres décoratifs */
.timbre.deco {
    position: absolute;
    width: 60px;
    opacity: 0.65;

    border: 3px solid #f3e8d2;
    background: #fffdf8;
    box-shadow: 
        0 10px 18px rgba(0,0,0,0.35),
        0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
    z-index: 1;
}

/* effet hover */
.timbre.deco:hover {
   transform: scale(1.08) rotate(0deg);
}

/* positions propres */
.t1 {
    top: 40px;
    left: 80px;
    transform: rotate(-6deg);
}

.t2 {
    top: 50px;
    right: 80px;
    transform: rotate(6deg);
}

.t3 {
    bottom: 110px;
    right: 90px;
    transform: rotate(-4deg);
}
.t4 {
    bottom:110px;
    left: 90px;
    transform: rotate(4deg);
}

/* A propos */
/* ambiance globale */
.expo-container {
    position: relative;
    min-height: 100vh;
    background: radial-gradient(circle at center, #f5f1e6 0%, #d6cbb7 100%);
    overflow: hidden;
}

/* lumière douce */
.overlay-lumiere {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center,
        rgba(255,255,255,0.4) 0%,
        rgba(0,0,0,0.25) 100%);
    pointer-events: none;
}

/* carte */
.page-apropos-musee {
    max-width: 850px;
    margin: 100px auto;
    padding: 60px;
    background: #f8f1e4;
    border: 6px solid #b89b6d;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    text-align: justify;
    position: relative;
    z-index: 2;
}

/* timbre */
.timbre-apropos {
    display: block;
    width: 180px;
    margin: 0 auto 20px auto;
    border: 4px solid #111;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

/* texte */
.titre-apropos {
    text-align: center;
    font-size: 42px;
    color: #3e2f1c;
}

.citation-apropos {
    text-align: center;
    font-style: italic;
    font-size: 22px;
    margin: 30px 0;
}
.signature {
    text-align: center;
    margin-top: 20px;
    font-style: italic;
}

/* fade-in */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: apparition 1.5s ease forwards;
}

@keyframes apparition {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* bouton son */
#btnAudio {
    display: block;
    margin: 30px auto 0 auto;
    margin-top: 30px;
    padding: 10px 20px;
    background: #a67c52;
    color: white;
    border: none;
    cursor: pointer;
}

.timbre-non-possede {
    opacity: 0.4;
    filter: grayscale(100%);
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

textarea {
    border: 1px solid #ccc;
    padding: 10px;
    font-family: Georgia;
}

/* formulaire ajout timbre */

form {
    background-color: #f5efe6;
    padding: 25px;
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    margin: 30px auto;
    border: 3px solid #6b4c3b;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2);
}

/* INPUTS */
form input,
form select,
form textarea {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border-radius: 5px;
    border: 1px solid #aaa;
}

/* grille formulaire */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px 25px;
    margin-bottom: 20px;
}

.form-grid > div {
    display: flex;
    flex-direction: column;
}

/* CHECKBOX */
.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* TITRES */
h3 {
    margin-top: 20px;
    text-align: center;
}

/* BOUTON */
button {
    margin-top: 20px;
    padding: 10px 20px;
    background: #7b5a45;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 6px;
}

button:hover {
    background: #5e4333;
}

.footer-musee {
    background: #2f241d;
    color: #e8dcc3;
    text-align: center;
    padding: 50px 20px;
    font-family: "Georgia", serif;
    position: relative;
    border-top: 6px double #b89b6b;
}

/* Effet plaque / encadrement */
.footer-musee::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(200, 170, 120, 0.3);
    pointer-events: none;
}

.footer-musee-content {
    max-width: 800px;
    margin: auto;
}

.footer-ligne {
    width: 60px;
    height: 2px;
    background: #b89b6b;
    margin: 0 auto 20px;
}

.footer-titre {
    font-size: 20px;
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.footer-texte {
    font-size: 14px;
    opacity: 0.85;
    margin-bottom: 25px;
    font-style: italic;
}

.footer-nav {
    margin-bottom: 25px;
}

.footer-nav a {
    color: #d6c29a;
    margin: 0 12px;
    text-decoration: none;
    font-size: 13px;
    letter-spacing: 1px;
    position: relative;
}

.footer-nav a::after {
    content: "";
    display: block;
    height: 1px;
    width: 0;
    background: #d6c29a;
    transition: width 0.3s;
    margin: 4px auto 0;
}

.footer-nav a:hover::after {
    width: 100%;
}

.footer-signature {
    font-size: 12px;
    opacity: 0.6;
    margin-top: 10px;
}
.footer-social {
    margin-top: 15px;
    font-size: 13px;
    font-style: italic;
}

.footer-social a {
    color: #cbb892;
    text-decoration: none;
    letter-spacing: 1px;
    transition: opacity 0.3s;
}

.footer-social a:hover {
    opacity: 0.7;
}