/* ════════════════════════════════════════════════════════
   Photoésie — Patrick ROUSSEL
   ════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;1,8..60,300&display=swap');

/* ── Variables ──────────────────────────────────────────── */
:root {
    --ink:       #1a1714;
    --parchment: #f5f0e8;
    --warm:      #e8ddc8;
    --amber:     #b07d3a;
    --moss:      #4a5e3a;
    --mist:      #8a8070;
    --paper:     #faf7f2;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body:    'Source Serif 4', Georgia, serif;
    --max-w: 1100px;
    --max-w-article: 780px;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.75;
}

/* ── Conteneur ──────────────────────────────────────────── */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ── En-tête ────────────────────────────────────────────── */
.site-header {
    background: var(--ink);
    color: var(--parchment);
    padding: 1.5rem 1.25rem;
    border-bottom: 3px solid var(--amber);
}
.site-header__inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.site-logo { text-decoration: none; display: flex; flex-direction: column; line-height: 1.2; }
.site-logo__main { font-family: var(--font-display); font-size: 1.8rem; font-style: italic; color: var(--parchment); }
.site-logo__sub  { font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--amber); }
.site-nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.site-nav a { color: var(--warm); text-decoration: none; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; transition: color .2s; }
.site-nav a:hover { color: var(--amber); }

/* ── Contenu principal ──────────────────────────────────── */
.site-main { padding: 2.5rem 0 4rem; min-height: 60vh; }

/* ══════════════════════════════════════════════════════════
   GRILLE INDEX — responsive 1 / 2 / 3 colonnes
   ══════════════════════════════════════════════════════════ */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
@media (max-width: 900px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .post-grid { grid-template-columns: 1fr; } }

.post-card {
    background: #fff;
    border: 1px solid var(--warm);
    border-radius: 3px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s;
}
.post-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.08); }

/* Grille de vignettes dans la carte */
.post-card__thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    background: var(--warm);
}
.post-card__thumbs a { display: block; aspect-ratio: 1; overflow: hidden; }
.post-card__thumbs img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.post-card__thumbs a:hover img { transform: scale(1.05); }

/* Badge +N photos */
.thumbs-more {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ink);
    color: var(--parchment);
    font-size: 0.85rem;
    font-family: var(--font-display);
    aspect-ratio: 1;
    text-decoration: none;
    transition: background .2s;
}
.thumbs-more:hover { background: var(--amber); }

.post-card__body {
    padding: 1rem 1.1rem 1.2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.post-date {
    display: block;
    font-size: 0.9rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--mist);
    margin-bottom: .3rem;
	font-weight: bolder;
}
}
.post-card h2 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; line-height: 1.25; margin-bottom: .5rem; }
.post-card h2 a { color: var(--ink); text-decoration: none; transition: color .2s; }
.post-card h2 a:hover { color: var(--amber); }
.post-excerpt { font-size: 0.85rem; color: var(--mist); margin-bottom: .75rem; flex: 1; }
.read-more {
    align-self: flex-start;
    font-size: 0.75rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--moss);
    text-decoration: none;
    border-bottom: 1px solid var(--moss);
    padding-bottom: 1px;
    transition: color .2s, border-color .2s;
    margin-top: auto;
}
.read-more:hover { color: var(--amber); border-color: var(--amber); }

/* ══════════════════════════════════════════════════════════
   ARTICLE INDIVIDUEL
   ══════════════════════════════════════════════════════════ */
.post-single { max-width: var(--max-w-article); margin: 0 auto; }
.post-single__header { margin-bottom: 2rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--warm); }
.post-single h1 { font-family: var(--font-display); font-size: 2rem; font-weight: 600; line-height: 1.2; }

/* Contenu riche */
.post-content h2 { font-family: var(--font-display); font-size: 1.45rem; margin: 2rem 0 .75rem; }
.post-content h3 { font-family: var(--font-display); font-size: 1.15rem; margin: 1.5rem 0 .5rem; }
.post-content p  { margin-bottom: 1.2rem; font-size: 1.4rem;   color: black; font-weight: bolder; }
.post-content a  { color: var(--moss); }
.post-content a:hover { color: var(--amber); }
.post-content blockquote { border-left: 3px solid var(--amber); margin: 1.5rem 0; padding: .5rem 1.25rem; color: var(--mist); font-style: italic; white-space: pre-line; text-align: center; }
.post-content ul, .post-content ol { margin: 0 0 1.2rem 1.5rem; }
.post-content li { margin-bottom: .3rem; }
.post-content strong { font-weight: 600; }
.post-content em     { font-style: italic; }

/* ══════════════════════════════════════════════════════════
   GALERIE DANS L'ARTICLE
   ══════════════════════════════════════════════════════════ */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 6px;
    margin: 1.5rem 0;
}
.gallery--single { grid-template-columns: 1fr; max-width: 680px; }

.gallery__item {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* supprimer l'aspect-ratio qui bloquait la figcaption */
}
.gallery__item a {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
}
.gallery--single .gallery__item a { aspect-ratio: unset; }

.gallery__item img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s, opacity .2s;
}
.gallery--single .gallery__item img { height: auto; object-fit: unset; }
.gallery__item:hover img { transform: scale(1.04); opacity: .92; }

/* ── Retour ─────────────────────────────────────────────── */
.back-link {
    display: inline-block;
    margin-top: 2.5rem;
    font-size: 0.78rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--mist);
    text-decoration: none;
}
.back-link:hover { color: var(--amber); }

/* ══════════════════════════════════════════════════════════
   MOT DE PASSE
   ══════════════════════════════════════════════════════════ */
.pw-form {
    max-width: 400px;
    margin: 4rem auto;
    text-align: center;
}
.pw-form h2 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 1rem; }
.pw-form p  { color: var(--mist); margin-bottom: 1.5rem; }
.pw-form input[type=password] {
    width: 100%;
    padding: .6rem 1rem;
    border: 1px solid var(--warm);
    background: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    margin-bottom: .75rem;
    border-radius: 2px;
}
.pw-form input:focus { outline: 2px solid var(--amber); border-color: var(--amber); }
.pw-form button {
    background: var(--ink);
    color: var(--parchment);
    border: none;
    padding: .6rem 2rem;
    font-family: var(--font-body);
    font-size: .85rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 2px;
    transition: background .2s;
}
.pw-form button:hover { background: var(--amber); }
.pw-error { color: #8b3a3a; font-size: .85rem; margin-bottom: 1rem; }

/* ── Pied de page ───────────────────────────────────────── */
.site-footer {
    background: var(--ink);
    color: var(--mist);
    padding: 2.5rem 1.25rem;
    text-align: center;
    font-size: .82rem;
    border-top: 3px solid var(--amber);
}
.site-footer .container > * + * { margin-top: .5rem; }
.site-footer a { color: var(--warm); }
.site-footer a:hover { color: var(--amber); }
.footer-tagline { font-style: italic; color: var(--warm); }

/* ── Erreur / vide ──────────────────────────────────────── */
.error { color: #8b3a3a; padding: 2rem 0; }
.empty { color: var(--mist); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
    html { font-size: 15px; }
    .site-logo__main { font-size: 1.5rem; }
    .post-single h1  { font-size: 1.6rem; }
    .site-header__inner { flex-direction: column; }
    .gallery { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
.gallery__caption {
    font-size: 0.75rem;
    color: var(--mist);
    font-style: italic;
    text-align: center;
    padding: 0.3rem 0.4rem;
    background: #fff;
}
/* ── Lightbox — flèches fixes aux bords de l'écran ─────── */
.lb-nav {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}

.lb-prev,
.lb-next {
    pointer-events: all;
    position: static !important;
    width: 60px !important;
    height: 60px !important;
    background-color: rgba(0,0,0,0.5) !important;
    background-size: 20px !important;
    background-position: center !important;
    border-radius: 50%;
    opacity: 0.8 !important;
    flex-shrink: 0;
}

.lb-prev:hover,
.lb-next:hover {
    opacity: 1 !important;
    background-color: rgba(180,120,40,0.8) !important;
}

.video-wrap {
    position: relative;
    padding-bottom: 56.25%; /* ratio 16:9 */
    height: 0;
    overflow: hidden;
    margin: 1.5rem 0;
}
.video-wrap iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}