:root {
    --pierre: #EDE6DA;
    --pierre-claire: #F7F3EB;
    --encre: #292420;
    --cypres: #2F3D32;
    --cypres-clair: #4A5C4D;
    --brique: #9C5B45;
    --ligne: #D9D0BF;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--pierre);
    color: var(--encre);
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 400;
    line-height: 1.65;
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 62vh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background-size: cover;
    background-position: center 25%;
    overflow: hidden;
}
.hero--motif {
    background: var(--cypres);
}
.hero-motif {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 260px;
    height: auto;
    transform: translate(-50%, -55%);
    color: rgba(247, 243, 235, 0.16);
}
.hero-voile {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(41,36,32,0.05) 0%, rgba(41,36,32,0.15) 45%, rgba(41,36,32,0.82) 100%);
}
.hero--motif .hero-voile {
    background: linear-gradient(to bottom, rgba(41,36,32,0.05) 0%, rgba(41,36,32,0.35) 100%);
}
.hero-contenu {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--pierre-claire);
    padding: 0 24px 56px;
    max-width: 640px;
    animation: apparition 1.1s ease-out both;
}
@keyframes apparition {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
.titre-haut {
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-style: italic;
    font-weight: 300;
    color: rgba(247, 243, 235, 0.85);
}
.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(2.2rem, 5.2vw, 3.4rem);
    font-weight: 500;
    letter-spacing: 0.01em;
}
.ligne-de-vie {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 1rem;
    font-style: italic;
    color: rgba(247, 243, 235, 0.9);
}
.ligne-de-vie .trait {
    width: 64px;
    height: 1px;
    background: rgba(247, 243, 235, 0.55);
}
.dates-simple {
    font-style: italic;
    color: rgba(247, 243, 235, 0.9);
}

/* ---------- Contenu ---------- */
main {
    max-width: 640px;
    margin: 0 auto;
    padding: 64px 24px 16px;
}

.biographie p { margin: 0 0 20px; }

.separateur {
    height: 1px;
    background: var(--ligne);
    margin: 32px 0;
}

.faits {
    color: var(--cypres);
    font-size: 0.98rem;
}
.faits p { margin: 0 0 8px; }

.citation {
    position: relative;
    margin: 44px 0 8px;
    padding: 0 8px 0 40px;
    font-style: italic;
    font-size: 1.15rem;
    color: var(--brique);
}
.citation .guillemet {
    position: absolute;
    left: -8px;
    top: -22px;
    font-size: 3.4rem;
    font-style: normal;
    color: var(--brique);
    opacity: 0.35;
    font-family: Georgia, serif;
}

.galerie { margin-top: 56px; }
.galerie h2 {
    font-weight: 400;
    font-style: italic;
    font-size: 1.4rem;
    color: var(--cypres);
    text-align: center;
    margin-bottom: 22px;
}
.galerie-vide {
    text-align: center;
    color: var(--cypres-clair);
}

.mosaique {
    columns: 2;
    column-gap: 10px;
}
@media (min-width: 640px) { .mosaique { columns: 3; } }
@media (min-width: 900px) { .mosaique { columns: 4; } }

.vignette {
    display: block;
    margin-bottom: 10px;
    break-inside: avoid;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(41,36,32,0.12);
}
.vignette img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.vignette:hover img { transform: scale(1.04); }

footer {
    text-align: center;
    padding: 48px 20px 40px;
    color: var(--cypres-clair);
    font-size: 0.9rem;
    font-style: italic;
}

/* ---------- Lightbox ---------- */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(20,18,16,0.94);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.lightbox.ouverte { display: flex; }
.lightbox img {
    max-width: 90%;
    max-height: 85%;
    border-radius: 3px;
}
.lightbox-fermer, .lightbox-prec, .lightbox-suiv {
    position: absolute;
    color: var(--pierre-claire);
    font-size: 2.1rem;
    cursor: pointer;
    user-select: none;
    padding: 12px;
    opacity: 0.85;
}
.lightbox-fermer:hover, .lightbox-prec:hover, .lightbox-suiv:hover { opacity: 1; }
.lightbox-fermer { top: 6px; right: 18px; }
.lightbox-prec { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-suiv { right: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-fermer:focus-visible,
.lightbox-prec:focus-visible,
.lightbox-suiv:focus-visible,
.vignette:focus-visible {
    outline: 2px solid var(--pierre-claire);
    outline-offset: 2px;
}

/* ============================================================
   ADMINISTRATION (utilitaire — même palette, mise en page simple)
   ============================================================ */
.admin-body {
    font-family: -apple-system, 'Segoe UI', Arial, sans-serif;
    background: #f0ede6;
}
.admin-login {
    max-width: 320px;
    margin: 100px auto;
    background: #fff;
    padding: 30px;
    border-radius: 6px;
    text-align: center;
}
.admin-login input { width: 100%; padding: 10px; margin-bottom: 12px; }
.admin-login button, .admin-panel button {
    background: var(--cypres);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
}
.admin-panel { max-width: 800px; margin: 30px auto; padding: 0 20px 60px; }
.admin-top { display: flex; justify-content: space-between; align-items: center; }
.btn-deco { color: var(--brique); }
.admin-section {
    background: #fff;
    padding: 24px;
    border-radius: 6px;
    margin-top: 24px;
}
.admin-section label {
    display: block;
    margin-bottom: 14px;
    font-size: 0.9rem;
    color: #444;
}
.admin-section input[type=text], .admin-section textarea {
    width: 100%;
    padding: 8px;
    margin-top: 4px;
    font-family: inherit;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.astuce { font-size: 0.85rem; color: #777; }
.erreur { color: #b00020; }
.succes { color: #0a7a2f; font-weight: bold; }
.admin-grille-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}
.admin-photo img { width: 100%; height: 100px; object-fit: cover; border-radius: 4px; }
.btn-supprimer {
    background: var(--brique);
    width: 100%;
    margin-top: 4px;
    font-size: 0.8rem;
    padding: 6px;
}
.admin-portrait-actuel img {
    max-width: 220px;
    border-radius: 4px;
    display: block;
    margin-bottom: 12px;
}
