body {
    background: #e8e3d8;
    font-family: "Georgia", serif;
}

/* PAGE */
.page {
    max-width: 900px;
    margin: 40px auto;
    background: #fff;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* HEADER */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

h1 {
    text-align: center;
    flex: 1;
}

/* TOP */
.top {
    display: grid;
    grid-template-columns: 220px 1fr 180px;
    gap: 20px;
}

/* IMAGE */
.image {
    text-align: center;
}

.image img {
    width: 180px;
    border: 4px solid black;
}

.image p {
    margin-top: 10px;
}

/* INFOS */
.infos table {
    width: 100%;
    border-collapse: collapse;
}

.infos td {
    padding: 5px;
    border-bottom: 1px solid #ddd;
}

/* COTES */
.cotes {
    background: #f7f3ea;
    padding: 10px;
    border-left: 3px solid #a67c52;
}

/* MIDDLE */
.middle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 25px;
    gap: 20px;
}

.middle div {
    background: #f7f3ea;
    padding: 10px;
}

/* DESC */
.desc {
    margin-top: 25px;
}

/* ACTIONS */
.actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

button {
    padding: 10px 15px;
    border: none;
    cursor: pointer;
}

.save { background: purple; color: white; }
.edit { background: green; color: white; }
.delete { background: red; color: white; }

/* CADRE MUSÉE */
.cadre-timbre {
    background: linear-gradient(145deg, #e8dcc5, #f5eee2);
    padding: 15px;
    border: 2px solid #b89b6b;
    border-radius: 10px;
    box-shadow: 
        inset 0 0 10px rgba(0,0,0,0.15),
        0 8px 20px rgba(0,0,0,0.25);
    display: inline-block;
}

.cadre-timbre img {
    width: 180px;
    border: 6px solid #111;
    display: block;
}

/* NOM */
.nom-timbre {
    text-align: center;
    margin-top: 10px;
    font-weight: bold;
}

/* LOUPE */
#loupe {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 3px solid #333;
    background-repeat: no-repeat;
    display: none;
    pointer-events: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

.image-wrapper {
    position: relative;
    text-align: center;
}
.btn-retour {
    display: inline-block;
    padding: 8px 14px;
    background: #a67c52;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    transition: 0.2s;
    position: absolute;
    right: 0;
    top: 0;
}

.btn-retour:hover {
    background: #8c653f;
}
.desc-input {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    padding: 10px;
    font-family: Georgia;
    border: 1px solid #ccc;
}
.mode-lecture {
    background: transparent;
    border: none;
}

.mode-edition {
    background: #fff8dc;
    border: 1px solid #a67c52;
}
.titre-input {
    width: 100%;
    font-size: 26px;
    font-weight: bold;
    text-align: center;
    color: #222;
    background: transparent;
    border: none;
}

/* champs classiques */
input[disabled]:not(.titre-input) {
    background: transparent;
    border: none;
    color: #333;
}

/* Champ quantité (gestion des doubles) : on masque les flèches natives */
input[name="quantite"]::-webkit-inner-spin-button,
input[name="quantite"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[name="quantite"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Lien vers l'article de blog associé au timbre */
.lien-article-blog {
    display: inline-block;
    padding: 8px 16px;
    background: #7d2c2c;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    transition: 0.2s;
}

.lien-article-blog:hover {
    background: #611f1f;
}

.lien-article-blog-creer {
    background: #5f8d4e;
}

.lien-article-blog-creer:hover {
    background: #4c7440;
}

/* Badge quantité en lecture seule (visiteurs) */
.badge-etat-fiche {
    font-family: 'EB Garamond', serif;
    font-size: 12px;
    font-weight: bold;
    color: #2e6a32;
    background-color: #eef7ee;
    border: 1px solid #c8e6c9;
    padding: 4px 10px;
    border-radius: 4px;
}

/* LIEN VERS LA DISPOLISTE (doubles) */
.lien-double-dispoliste {
    display: inline-block;
    padding: 8px 14px;
    background: #a67c52;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    transition: 0.2s;
}

.lien-double-dispoliste:hover {
    background: #8c653f;
}

.lien-proposer-double {
    background: #5f8d4e;
}

.lien-proposer-double:hover {
    background: #4c7440;
}

.aucun-double-fiche {
    font-size: 13px;
    color: #999;
    font-style: italic;
}