@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=EB+Garamond:ital,wght@0,400;0,500;1,400&family=Cinzel:wght@400;500;600&display=swap');

:root{
  --wall: #1f2b24;
  --wall-dark: #172018;
  --wood: #3a2c1e;
  --wood-dark: #241a11;
  --brass: #c9a876;
  --brass-bright: #e4c98f;
  --mat: #f4ecd8;
  --mat-shadow: #ddd0ab;
  --ink: #2a2118;
  --ink-soft: #5a4d3c;
  --burgundy: #7f2d34;
}

/* ---------- Fond de salle ---------- */
.page-musee {
    background:
      radial-gradient(ellipse at 50% -10%, rgba(255,240,210,0.07), transparent 60%),
      linear-gradient(180deg, var(--wall), var(--wall-dark)) !important;
    color: var(--mat);
    font-family: 'EB Garamond', Georgia, serif;
    margin: 0;
    padding: 0;
}

.museum-header h1 {
    text-align: center;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 26px;
    letter-spacing: 0.22em;
    color: var(--mat);
    margin: 44px 0 8px;
    text-shadow: 0 2px 18px rgba(0,0,0,0.45);
}

.museum-header h1::after{
    content: "";
    display: block;
    width: 110px;
    height: 1px;
    margin: 20px auto 0;
    background: linear-gradient(90deg, transparent, var(--brass), transparent);
}

.museum-header p{
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    color: var(--brass-bright);
    opacity: .85;
    margin: 0 0 10px;
}

/* =====================================================================
   NAVIGATION — Continent puis Pays
   ===================================================================== */
#searchInput {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 15px;
    background: var(--mat);
    border: 1px solid var(--brass);
    color: var(--ink);
    border-radius: 2px;
    padding: 10px 14px;
    width: 250px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
#searchInput::placeholder { color: var(--ink-soft); opacity: .7; }

.layout-recherche {
    display: flex;
    gap: 28px;
    max-width: 1300px;
    margin: 0 auto 60px;
    padding: 0 24px;
    align-items: flex-start;
}

#nav-continents {
    flex: 0 0 250px;
    background: linear-gradient(160deg, var(--wood) 0%, var(--wood-dark) 100%);
    border: 1px solid rgba(201,168,118,0.35);
    border-radius: 4px;
    padding: 18px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.06);
    position: sticky;
    top: 20px;
}

.message-selection {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    color: var(--brass-bright);
    text-align: center;
    font-size: 14px;
    margin-bottom: 16px;
    opacity: .85;
}

.nav-item {
    font-family: 'Cinzel', serif;
    font-size: 12.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
    color: var(--wood-dark);
    background: linear-gradient(180deg, var(--brass-bright) 0%, var(--brass) 100%);
    border: 1px solid #7c6743;
    border-radius: 2px;
    padding: 12px 10px;
    margin-bottom: 8px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.35), inset 0 1px 1px rgba(255,255,255,0.5);
    transition: transform .15s ease;
}
.nav-item:hover { transform: translateY(-2px); }
.nav-item.actif {
    background: linear-gradient(180deg, #191309 0%, #100c07 100%);
    color: var(--brass-bright);
}

.nav-sous-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0 0 14px;
}

.nav-pays {
    font-family: 'EB Garamond', serif;
    font-size: 13px;
    color: var(--brass-bright);
    background: linear-gradient(180deg, #2a2016 0%, #1a130c 100%);
    border: 1px solid rgba(201,168,118,0.4);
    border-radius: 2px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all .15s ease;
}
.nav-pays:hover, .nav-pays.actif {
    border-color: var(--brass-bright);
    box-shadow: 0 0 12px rgba(201,168,118,0.35);
    color: var(--mat);
}

/* ---------- Colonne contenu ---------- */
.contenu-droite { flex: 1; min-width: 0; }

.fil-ariane {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    color: var(--brass-bright);
    opacity: .85;
    font-size: 14.5px;
    margin-bottom: 20px;
}
.fil-ariane span[data-nav] {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: rgba(228,201,143,0.4);
}
.fil-ariane span[data-nav]:hover { color: var(--mat); }
.fil-ariane strong { color: var(--mat); font-style: normal; }

#zone-message {
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 16px;
    color: var(--brass-bright);
    opacity: .85;
    padding: 50px 20px;
}

/* =====================================================================
   TIROIRS ALPHABÉTIQUES (A à Z, à l'intérieur d'un pays)
   ===================================================================== */
.sous-titre-zone {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    color: var(--brass-bright);
    opacity: .8;
    font-size: 14px;
    margin: 0 0 12px;
}

.alphabet-drawers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
    gap: 10px;
    margin-bottom: 30px;
}

.drawer-handle {
    background: linear-gradient(180deg, #2a2016 0%, #1a130c 100%);
    border: 1px solid rgba(201,168,118,0.4);
    border-radius: 3px;
    height: 46px;
    cursor: pointer;
    box-shadow: 0 4px 0 rgba(0,0,0,0.5), 0 8px 14px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--brass-bright);
    transition: all 0.18s ease;
    position: relative;
}
.drawer-handle:hover:not(.vide) {
    border-color: var(--brass-bright);
    box-shadow: 0 4px 0 rgba(0,0,0,0.5), 0 0 16px rgba(201,168,118,0.35);
}
.drawer-handle.actif {
    transform: translateY(3px);
    background: linear-gradient(180deg, #191309 0%, #100c07 100%);
    border-color: var(--brass-bright);
    box-shadow: 0 1px 0 rgba(0,0,0,0.5), 0 2px 6px rgba(0,0,0,0.5);
    color: var(--mat);
}
.drawer-handle.vide {
    opacity: .28;
    cursor: default;
    box-shadow: none;
}

/* =====================================================================
   ÉTAGÈRE DES SÉRIES (Napoléon, Marianne, Cérès...)
   ===================================================================== */
.series-shelf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 22px;
}

.serie-card {
    background: linear-gradient(160deg, var(--wood) 0%, var(--wood-dark) 100%);
    border-radius: 3px;
    padding: 14px;
    box-shadow: 0 14px 30px rgba(0,0,0,0.4);
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease;
    border: 1px solid rgba(201,168,118,0.3);
}
.serie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
.serie-card .serie-vignette {
    background: #0d0d0d;
    border: 1px solid var(--brass);
    border-radius: 2px;
    height: 128px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 10px;
}
.serie-card .serie-vignette img {
    max-width: 88%;
    max-height: 88%;
    object-fit: contain;
}
.serie-card .serie-nom {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 600;
    font-size: 15px;
    text-align: center;
    color: var(--brass-bright);
    margin: 0 0 4px;
    line-height: 1.25;
}
.serie-card .serie-count {
    font-family: 'Cinzel', serif;
    font-size: 9.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    color: var(--mat);
    opacity: .65;
}

/* =====================================================================
   GALERIE DE FICHES — image en haut, description en dessous
   ===================================================================== */
.stamp-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 30px;
}

.stamp-card {
    display: block;
    text-decoration: none;
    background: linear-gradient(160deg, var(--wood) 0%, var(--wood-dark) 100%);
    padding: 14px 14px 0;
    border-radius: 2px;
    box-shadow: 0 16px 34px rgba(0,0,0,0.4);
    transition: transform .3s ease, box-shadow .3s ease;
}
.stamp-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 44px rgba(0,0,0,0.5);
}
.stamp-card .card-inner-border {
    border: 1px solid var(--brass);
    border-radius: 2px;
    background: var(--mat);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.10);
    padding-bottom: 16px;
}
.stamp-card.timbre-neuf .card-inner-border { box-shadow: inset 0 0 0 2px rgba(103,150,103,0.4), inset 0 0 20px rgba(0,0,0,0.10); }
.stamp-card.timbre-charniere .card-inner-border { box-shadow: inset 0 0 0 2px rgba(196,163,74,0.4), inset 0 0 20px rgba(0,0,0,0.10); }
.stamp-card.timbre-oblitere .card-inner-border { box-shadow: inset 0 0 0 2px rgba(140,140,140,0.35), inset 0 0 20px rgba(0,0,0,0.10); }
.stamp-card.timbre-possede .card-inner-border { box-shadow: inset 0 0 0 2px rgba(90,160,100,0.55), inset 0 0 20px rgba(0,0,0,0.10); }
.stamp-card.timbre-possede .possession-chip { background: linear-gradient(180deg, #a9d9b3 0%, #7fbf8f 100%); }
.stamp-card.timbre-impossible { opacity: .55; }

.stamp-card .card-main-header {
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.3;
    color: var(--brass-bright);
    background: linear-gradient(160deg, var(--wood) 0%, var(--wood-dark) 100%);
    padding: 12px 12px;
    margin: 0 0 14px;
    border-bottom: 1px solid var(--brass);
}

/* --- VITRINE NOIRE + LOUPE --- */
.stamp-card .stamp-display-case {
    background: #0d0d0d;
    border: 1px solid var(--brass);
    border-radius: 2px;
    width: calc(100% - 32px);
    margin: 0 16px 12px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.stamp-card .stamp-display-case img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
}
.stamp-loupe-element {
    position: absolute;
    width: 90px;
    height: 90px;
    border: 2px solid var(--brass-bright);
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(0,0,0,0.6), inset 0 0 8px rgba(0,0,0,0.4);
    display: none;
    pointer-events: none;
    background-repeat: no-repeat;
    z-index: 10;
}
.stamp-card .possession-chip {
    position: absolute;
    top: 6px;
    right: 6px;
    font-family: 'Cinzel', serif;
    font-size: 9px;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 3px 7px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--brass-bright) 0%, var(--brass) 100%);
    color: var(--wood-dark);
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.stamp-card .double-chip {
    position: absolute;
    top: 6px;
    left: 6px;
    font-family: 'Cinzel', serif;
    font-size: 9px;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 3px 7px;
    border-radius: 2px;
    background: linear-gradient(180deg, #c9a8e0 0%, #9a75c9 100%);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.stamp-card .specs-table {
    width: calc(100% - 32px);
    margin: 0 16px;
    border-collapse: collapse;
}
.stamp-card .specs-table td {
    padding: 5px 0;
    font-size: 12.5px;
    font-family: 'EB Garamond', serif;
    color: var(--ink);
    border-bottom: 1px solid rgba(148,122,76,0.2);
    vertical-align: top;
}
.stamp-card .specs-table td:first-child {
    font-family: 'Cinzel', serif;
    font-size: 9.5px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-soft);
    width: 90px;
    white-space: nowrap;
    font-weight: 500;
}
.stamp-card .primary-text {
    font-family: 'Cinzel', serif;
    font-weight: 500;
    letter-spacing: .05em;
    color: var(--burgundy) !important;
}

/* description SOUS l'image et les spécifications */
.stamp-card .parchment-desc-block {
    margin: 12px 16px 0;
    padding-top: 10px;
    border-top: 1px dashed rgba(148,122,76,0.4);
}
.stamp-card .parchment-desc-text {
    margin: 0;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 13px;
    line-height: 1.55;
    color: var(--ink-soft);
    text-align: justify;
}

/* =====================================================================
   PAGINATION
   ===================================================================== */
.museum-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 44px 0 10px;
    flex-wrap: wrap;
}
.museum-pagination button {
    font-family: 'Cinzel', serif;
    font-size: 12px;
    letter-spacing: .05em;
    background: linear-gradient(180deg, var(--brass-bright) 0%, var(--brass) 100%);
    color: var(--wood-dark);
    border: 1px solid #7c6743;
    border-radius: 2px;
    padding: 8px 13px;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
    transition: transform .12s ease;
}
.museum-pagination button:hover:not(:disabled) { transform: translateY(-1px); }
.museum-pagination button.actif {
    background: linear-gradient(180deg, #191309 0%, #100c07 100%);
    color: var(--brass-bright);
}
.museum-pagination button:disabled {
    opacity: .35;
    cursor: default;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .layout-recherche { flex-direction: column; }
    #nav-continents { position: static; flex: none; width: 100%; }
}