/* =========================================================
   PYV — Modern theme (2025)  •  CSS unifié (Accueil + Œuvres)
   ========================================================= */
:root{
  --bg:#F7F5EF; --panel:#FFFFFF; --text:#1F2937; --muted:#6B7280; --accent:#0F3D5E;
  --line:rgba(0,0,0,.08);
  --shadow-xs:0 1px 2px rgba(0,0,0,.06);
  --shadow-sm:0 6px 18px rgba(0,0,0,.06);
  --shadow-md:0 12px 28px rgba(0,0,0,.08);
  --radius:18px; --maxw:1320px;
}

/* ===== BASE ===== */
html{box-sizing:border-box}
*,*::before,*::after{box-sizing:inherit}
html,body{
  height:100%;margin:0;padding:0;background:var(--bg);color:var(--text);
  font:16px/1.6 Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  max-width:100%;overflow-x:hidden;
}
img{max-width:100%;height:auto;display:block}
a{color:var(--accent);text-decoration:none}
a:hover{opacity:.92}
.nowrap{white-space:nowrap}
#page,.container{max-width:var(--maxw);margin:22px auto 6px;padding:0 16px;background:transparent}

/* ===== TITRES ===== */
h1,h2{font-family:"Playfair Display",Georgia,serif;color:var(--accent)}
h1{font-size:clamp(2.2rem,4.2vw,3.4rem);margin:6px 0 12px;text-align:center}
h2{font-size:1.18rem;margin:.25rem 0 .6rem}
p{margin:.25rem 0 1rem;font-size:1.06rem}
.update{color:var(--muted);font-size:.92rem;text-align:center;margin:2px 0 6px}

/* ===== TOPBAR ===== */
.topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:4px 0 0;margin-bottom:4px}
.topbar .brand{font-family:"Playfair Display",Georgia,serif;font-size:1.5rem;font-weight:700}
.topbar .brand a{color:var(--accent)}
.topbar nav{display:flex;gap:10px;flex-wrap:wrap}
.topbar nav a{padding:6px 8px;border-radius:8px;color:var(--accent);font-size:.98rem}
.topbar nav a[aria-current="page"]{background:rgba(15,61,94,.12);font-weight:600}
.topbar nav a:hover{background:rgba(15,61,94,.08)}
@media (max-width:600px){
  .topbar{flex-direction:column;align-items:center;gap:4px;text-align:center;padding:10px 0 6px}
  .topbar .brand a{font-size:20px;font-weight:600;white-space:nowrap;display:block}
  .topbar nav{flex-wrap:wrap;justify-content:center;gap:10px;margin-top:4px}
  .topbar nav a{font-size:14px;padding:.25rem .55rem;border-radius:8px}
}

/* ===== BOUTONS (génériques) ===== */
.btn{
  display:inline-flex;align-items:center;gap:.5rem;padding:1rem 1.2rem;line-height:1;border-radius:14px;
  border:1px solid rgba(0,0,0,.12);background:#fff;color:var(--accent);font-weight:600;
  transition:opacity .2s ease,transform .05s ease;white-space:nowrap
}
.btn:hover{opacity:.95;transform:translateY(-1px)}
.btn-primary{background:var(--accent);color:#fff;box-shadow:0 12px 26px rgba(15,61,94,.22)}
.btn-ghost{background:#fff;border-color:rgba(0,0,0,.12)}
.btn:focus-visible{outline:2px solid rgba(15,61,94,.5);outline-offset:2px}

/* =======================================================
   ACCUEIL (index.php)
   ======================================================= */

/* --- Section HÉRO (ancienne "intro-card") --- */
.intro-card{
  background:#fff;border:1px solid var(--line);border-radius:16px;
  box-shadow:var(--shadow-md);padding:18px;margin:10px 0 14px;
}
.intro-grid{
  display:grid;grid-template-columns:2fr 1fr;gap:20px;align-items:center;
}
.intro-media{
  position:relative;border-radius:16px;overflow:hidden;
}
.intro-media img{
  width:100%;height:auto;border-radius:16px;
  box-shadow:0 18px 40px rgba(0,0,0,.12);
}
/* petit cartouche si figcaption utilisé dans le HTML */
.intro-media figcaption{
  position:absolute;right:10px;top:10px;background:rgba(255,255,255,.88);
  border:1px solid var(--line);border-radius:10px;padding:4px 8px;font-size:.82rem;color:var(--muted);
}
.intro-text{max-width:560px}
.intro-text p{margin:0 0 .7rem}

@media (max-width:980px){
  .intro-grid{grid-template-columns:1fr;gap:14px}
  .intro-media img{max-height:48vh;object-fit:cover}
}
@media (max-width:600px){
  .intro-card{padding:14px}
  .intro-media{border-radius:14px}
  .intro-media img{border-radius:14px}
}

/* --- Variante légende sous l'image (si .media-caption utilisé) --- */
.media-caption{
  display:block;margin-top:6px;font-size:.92rem;color:var(--muted);
  background:transparent;border:0;padding:0;text-align:left;
}

/* --- Cartes “Repères” (si présentes) --- */
.highlights{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:10px 0 6px;align-items:stretch}
.card{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:14px 16px;box-shadow:var(--shadow-sm)}
@media (max-width:768px){.highlights{grid-template-columns:1fr}}

/* --- Vignettes de l’accueil (si utilisées) --- */
.grid{display:grid;grid-template-columns:repeat(6,minmax(140px,1fr));gap:10px;align-items:stretch}
.grid img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:12px;border:1px solid var(--line);box-shadow:var(--shadow-sm)}
@media (max-width:900px){.grid{grid-template-columns:repeat(auto-fit,minmax(110px,1fr))}}

/* --- Nouvelles sections accueil : petites cartes + vignettes --- */
.home-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:18px 0 8px}
.home-cards .card.sm{border-radius:14px;padding:14px 16px;box-shadow:var(--shadow-sm);background:#fff}
.home-cards .card.sm h3{margin:0 0 6px;font-size:1.05rem}
@media (max-width:768px){.home-cards{grid-template-columns:1fr}}
.home-thumbs{display:grid;grid-template-columns:repeat(6,1fr);gap:12px;margin:10px 0 6px}
.home-thumbs a{display:block}
.home-thumbs img{width:100%;height:auto;border-radius:10px;box-shadow:var(--shadow-xs);aspect-ratio:4/3;object-fit:cover;border:1px solid var(--line)}
@media (max-width:1024px){.home-thumbs{grid-template-columns:repeat(3,1fr)}}
@media (max-width:768px){.home-thumbs{grid-template-columns:repeat(2,1fr)}}

/* =======================================================
   GALERIE ŒUVRES (oeuvres.php)
   ======================================================= */

.gallery-grid{display:grid;grid-template-columns:repeat(4,minmax(220px,1fr));gap:16px;align-items:start;margin:12px 0 16px}
@media (max-width:1200px){.gallery-grid{grid-template-columns:repeat(3,minmax(200px,1fr))}}
@media (max-width:900px){.gallery-grid{grid-template-columns:repeat(2,minmax(180px,1fr))}}
@media (max-width:580px){.gallery-grid{grid-template-columns:1fr}}

.work{
  background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden;
  box-shadow:var(--shadow-sm);display:flex;flex-direction:column;margin:0;
}
.work img{width:100%;aspect-ratio:4/3;object-fit:cover;display:block}

/* Layout final compact (plus de bande blanche) */
.work figcaption{
  display:block;
  padding:.50rem .80rem .28rem;  /* bas court */
  font-size:.98rem;
  line-height:1.32;
}
.work-caption{display:flex;flex-direction:column;gap:.08rem}
.work-header{display:flex;align-items:flex-start;justify-content:space-between;gap:.5rem}
.work-title{font-weight:600;flex:1;line-height:1.22;text-wrap:balance}
.work-size{font-size:.9rem;color:var(--muted);margin-top:0}
.work-header .btn{white-space:nowrap;line-height:1;padding:.40rem .85rem;border-radius:8px;font-size:.9rem;box-shadow:none}

/* "Vendu" */
.btn-sold{background:#C04B00;color:#fff;border:none;box-shadow:0 12px 26px rgba(192,75,0,.18);cursor:not-allowed}
.btn-sold:hover{opacity:1;transform:none}
@media (max-width:480px){.work-header{flex-direction:column;align-items:flex-start;gap:.35rem}}

/* =======================================================
   EXPOSITIONS
   ======================================================= */
.expo-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:4px 0 12px}
.expo-tools{display:flex;gap:10px;flex-wrap:wrap}
.expo-search{padding:.6rem .8rem;border:1px solid var(--line);border-radius:10px;background:#fff;min-width:220px}
.expo-list{display:flex;flex-direction:column;gap:12px}
.expo-item{display:grid;grid-template-columns:70px 1fr;gap:14px;align-items:start;background:var(--panel);
  border:1px solid var(--line);border-radius:14px;padding:12px 14px;box-shadow:var(--shadow-sm)}
.expo-year{font-weight:700;color:var(--accent)}
.expo-place{line-height:1.5}
.expo-note{color:var(--muted);font-size:.95rem}

/* =======================================================
   BIOGRAPHIE
   ======================================================= */
.bio-card{max-width:1040px;margin:0 auto;background:#fff;border:1px solid var(--line);
  border-radius:18px;box-shadow:var(--shadow-md);padding:16px}
.bio-grid{display:grid;grid-template-columns:1.25fr 1fr;gap:16px;align-items:start}
.bio-photo{border-radius:14px;overflow:hidden;box-shadow:var(--shadow-sm)}
.bio-photo img{width:100%;height:auto;display:block;object-fit:cover;border:4px solid #fff;outline:1px solid rgba(0,0,0,.1);box-shadow:0 10px 28px rgba(0,0,0,.15)}
.bio-aside{display:grid;grid-template-columns:1fr;gap:10px}
.bio-panel{background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px;box-shadow:var(--shadow-sm)}
.bio-intro strong{white-space:nowrap;font-weight:700}
.bio-photo figcaption{margin-top:6px;font-size:.9rem;color:#666;font-style:italic;opacity:.9;text-align:center}

/* =======================================================
   FOOTER
   ======================================================= */
.site-footer{margin:2px auto 2px;padding:4px 0;font-size:.92rem;color:var(--muted);
  text-align:center;border-top:1px solid var(--line)}
/* --- Appel visuel sous le H1 de la galerie --- */
:root{
  /* ...tes variables existantes... */
  --warn: #C04B00; /* même teinte que .btn-sold */
}

.update.notice{
  display:inline-block;
  font-weight:700;
  font-size:clamp(1.05rem, 1.6vw, 1.2rem);
  color:var(--warn);
  background:rgba(192,75,0,.08);
  border:1px solid rgba(192,75,0,.22);
  border-radius:12px;
  padding:.55rem .85rem;
  margin:6px auto 14px;
  text-align:center;
}
/* --- Notice sous le H1 (version élégante) --- */
.update.notice{
  display:block;
  text-align:center;
  margin:4px auto 18px;
  padding:0;
  background:transparent;
  border:0;
}
.update.notice .lead{
  display:block;
  font-weight:700;
  font-size:clamp(1.08rem, 1.7vw, 1.26rem);
  color:var(--accent);
  letter-spacing:.2px;
}
.update.notice .muted{
  display:block;
  margin-top:2px;
  font-size:clamp(.98rem, 1.2vw, 1.06rem);
  color:var(--muted);
}

/* petite ligne décorative */
.update.notice::after{
  content:"";
  display:block;
  width:min(560px,72%);
  height:3px;
  margin:10px auto 0;
  background:linear-gradient(90deg,transparent, rgba(31,41,55,.25), transparent);
  border-radius:2px;
}
.update.notice{
  text-align:center;
  font-weight:600;
  font-size:clamp(1.05rem, 1.6vw, 1.25rem);
  color:#C04B00;
  letter-spacing:.25px;
  margin:6px auto 18px;
  text-shadow:0 0 1px rgba(192,75,0,.15); /* légère présence */
}
.update.notice strong{
  font-weight:700;
  color:#A13900; /* accent légèrement plus profond */
}
/* === ACCUEIL — correctifs (index.php / include_index.php) ================= */

/* 1) Figure sans marge par défaut */
.intro-media { margin: 0; }

/* 2) Légende SOUS l'image (et non en badge) quand on utilise .media-caption */
.intro-media .media-caption{
  position: static !important;
  right: auto; top: auto;
  background: transparent;
  border: 0;
  padding: 0;
  margin-top: 6px;
  text-align: center;
  font-size: .92rem;
  color: var(--muted);
}

/* 3) Boutons "Voir la galerie / Expositions / Biographie" en flex aligné */
/* === Alignement parfait des boutons Accueil === */
.cta{
  display:flex;
  justify-content:flex-start;
  align-items:center;
  flex-wrap:nowrap;      /* ne casse plus sur plusieurs lignes */
  gap:12px;
  margin-top:1rem;
}

.cta .btn{
  flex:0 0 auto;         /* évite que les boutons se compressent */
  padding:.95rem 1.2rem;
  white-space:nowrap;    /* empêche la casse du texte */
}

/* Sur petits écrans : on repasse en colonne pour garder la lisibilité */
@media (max-width:600px){
  .cta{
    flex-direction:column;
    align-items:stretch;
  }
  .cta .btn{
    width:100%;
    text-align:center;
  }
}
