/* ================================
   Catalogue raisonné André Breuillaud
   Style global – corps, index, volumes, notices
   ================================ */

/* Base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 24px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background-color: #f8f1e6; /* beige doux */
  color: #2a2a2a;
}

/* Liens */

a {
  color: #b1642b;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Titres généraux */

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: 0.02em;
}

h1 {
  font-size: 30px;
  margin: 0 0 16px;
}

h2 {
  font-size: 22px;
  margin: 32px 0 12px;
}

h3 {
  font-size: 18px;
  margin: 24px 0 10px;
}

/* Images */

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Utility containers */

.home-container,
.catalogue-shell,
.catalogue-main,
.page-container {
  max-width: 1160px;
  margin: 0 auto;
}

/* Petits textes en haut de page (fil d’Ariane, liens) */

.notice-breadcrumb,
.catalogue-header small,
.topmenu,
.breadcrumb {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8a6a4a;
}

.notice-breadcrumb a,
.topmenu a,
.breadcrumb a {
  color: #b1642b;
}

/* ================================
   Page d’accueil du catalogue
   (catalogue/index.php)
   ================================ */

.catalogue-header {
  margin-bottom: 32px;
}

.catalogue-header h1 {
  font-size: 30px;
  margin-bottom: 8px;
}

.catalogue-header p {
  margin: 0;
  color: #6c5a45;
}

.index-intro {
  margin-top: 12px;
  max-width: 700px;
}

/* Grille des volumes */

.volume-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin: 32px 0 24px;
}

.volume-card {
  background: #fdf7ee;
  border-radius: 14px;
  padding: 20px 20px 18px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.volume-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.volume-period {
  font-size: 14px;
  color: #7b6650;
  margin-bottom: 10px;
}

.volume-card p {
  margin: 0 0 16px;
  font-size: 14px;
}

.access-link {
  display: inline-block;
  align-self: flex-start;
  padding: 7px 14px;
  font-size: 13px;
  border-radius: 999px;
  border: 1px solid #b1642b;
  color: #b1642b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.access-link:hover {
  background: #b1642b;
  color: #fff;
}

/* Liens bas de page index catalogue */

.index-links {
  margin-top: 18px;
  font-size: 14px;
}

.index-links a {
  margin-right: 18px;
}

/* ================================
   Index général des œuvres
   (catalogue/index-oeuvres.php)
   ================================ */

.page-intro {
  margin: 16px 0 20px;
  max-width: 720px;
}

.topmenu {
  margin-bottom: 8px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 28px 0 32px;
}

/* Carte d’œuvre dans l’index général */

.art-card {
  background: #fdf7ee;
  border-radius: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: 0 8px 20px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.art-image {
  border-radius: 8px;
  overflow: hidden;
  background: #e7dfd3;
}

.art-image img {
  width: 100%;
  display: block;
}

.art-info {
  font-size: 14px;
}

.art-id {
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 12px;
  color: #8f6b47;
  margin-bottom: 2px;
}

.art-button {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 13px;
  font-size: 13px;
  border-radius: 999px;
  border: 1px solid #b1642b;
  color: #b1642b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.art-button:hover {
  background: #b1642b;
  color: #fff;
}

.return-button {
  margin-top: 4px;
  font-size: 13px;
}

/* ================================
   Page Volume I (volume1/index.php)
   ================================ */

.catalogue-shell {
  padding: 8px 20px 40px;
}

.catalogue-header {
  margin-bottom: 18px;
}

.catalogue-titre {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8a6a4a;
  margin-bottom: 4px;
}

.catalogue-vol-title {
  font-size: 28px;
  margin: 0 0 6px;
}

.catalogue-volume {
  font-size: 15px;
  color: #6c5a45;
}

.volume-header {
  margin: 26px 0 18px;
}

.volume-title {
  font-size: 22px;
  margin: 0 0 8px;
}

.volume-subtitle {
  font-size: 15px;
  color: #7b6650;
  margin-bottom: 10px;
}

.volume-intro {
  font-size: 14px;
  max-width: 900px;
}

/* Grille des œuvres du volume */

.volume-works {
  margin-top: 28px;
}

.works-heading {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.volume-works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

/* Carte d’œuvre du volume */

.work-card {
  background: #fdf7ee;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 10px 24px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
}

.work-thumb {
  width: 100%;
  background: #e7dfd3;
}

.work-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

.work-meta {
  padding: 10px 14px 12px;
  font-size: 14px;
}

.work-id {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8f6b47;
  margin-bottom: 4px;
}

.work-title {
  font-weight: 600;
  margin-bottom: 2px;
}

.work-meta small {
  font-size: 13px;
  color: #7b6650;
}

/* Lien retour / bas de page */

.catalogue-footer-links {
  margin-top: 32px;
  font-size: 14px;
}

.catalogue-footer-links a {
  margin-right: 18px;
}

.catalogue-footer {
  margin-top: 32px;
  font-size: 12px;
  color: #8a6a4a;
  text-align: right;
}

/* ================================
   Notices individuelles (oeuvres/*.php)
   ================================ */

body.notice-page {
  padding-top: 24px;
}

.notice-page .notice-wrapper {
  max-width: 1100px;
  margin: 0 auto;
}

/* Style générique quand la classe notice-page n’est pas présente */

body:not(.notice-page) > img:first-of-type,
body > center img:first-of-type {
  max-width: 820px;
}

/* Tableau / textes fiche technique */

.notice-wrapper table,
table {
  border-collapse: collapse;
}

.notice-wrapper td,
td {
  padding: 3px 0;
  font-size: 14px;
}

/* Bouton notice suivante */

.notice-next {
  text-align: right;
  margin-top: 10px;
}

/* ================================
   Responsif
   ================================ */

@media (max-width: 768px) {
  body {
    padding: 18px;
  }

  .catalogue-shell {
    padding: 8px 12px 28px;
  }

  h1 {
    font-size: 24px;
  }

  .volume-works-grid,
  .gallery-grid,
  .volume-grid {
    grid-template-columns: 1fr;
  }
}


/* Placeholder si image absente */
.work-thumb-empty{
  width: 100%;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.45);
  border: 1px dashed rgba(0,0,0,0.15);
  border-radius: 12px;
  font-size: 0.9rem;
  color: rgba(0,0,0,0.55);
  padding: 14px;
  text-align: center;
}


/* =========================================================
   CR V3 — En-tête (Volumes / Index) + Cartouches œuvres
   Objectifs :
   - Ligne 1 : liens (gauche)
   - Ligne 2 : titre général centré
   - Ligne 3 : volume centré
   - Grille 3 colonnes (responsive) + images proportionnelles (contain)
   - Boutons alignés en bas
   ========================================================= */

.cr-shell{
  max-width: 1180px;
  margin: 0 auto;
}

.cr-toplinks{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  font-size: 14px;
  margin: 8px 0 14px;
}

.cr-toplinks a{
  color: #6f4b2f;
  text-decoration: none;
  border-bottom: 1px solid rgba(177,100,43,0.22);
  padding-bottom: 1px;
}

.cr-toplinks a:hover{
  color: #b1642b;
  border-bottom-color: rgba(177,100,43,0.55);
}

.cr-header{
  text-align: center;
  margin: 0 0 18px;
}

.cr-header .cr-title{
  margin: 0;
  font-size: 28px;
  letter-spacing: 0.02em;
}

.cr-header .cr-subtitle{
  margin: 6px 0 0;
  font-size: 18px;
  color: #7b6650;
  font-weight: 600;
}

.cr-header .cr-subtitle span{
  font-weight: 500;
  color: #7b6650;
}

/* Grille des œuvres (3 colonnes) */
.volume-works-grid,
.works-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 24px 0 20px;
}

@media (max-width: 980px){
  .volume-works-grid,
  .works-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px){
  .volume-works-grid,
  .works-grid{
    grid-template-columns: 1fr;
  }
}

/* Carte d’œuvre */
.work-card{
  background: #fdf7ee;
  border-radius: 14px;
  padding: 14px 14px 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.work-thumb{
  border-radius: 10px;
  overflow: hidden;
  background: #e7dfd3;
  border: 1px solid rgba(0,0,0,0.05);
  height: 180px;              /* fenêtre image */
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-thumb img{
  width: 100%;
  height: 100%;
  object-fit: contain;        /* PAS de recadrage */
}

.work-meta{
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.work-id{
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8f6b47;
}

.work-title{
  font-size: 15px;
  font-weight: 700;           /* gras */
  margin: 0;
}

.work-year{
  font-size: 14px;
  color: #7b6650;
}

.work-actions{
  margin-top: auto;           /* pousse le bouton en bas */
  padding-top: 10px;
  display: flex;
  justify-content: center;
}

.work-actions .art-button,
.work-actions .work-button{
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #b1642b;
  color: #b1642b;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.work-actions .art-button:hover,
.work-actions .work-button:hover{
  background: rgba(177,100,43,0.08);
}



.notice-missing-img{padding:22px; text-align:center; opacity:.8; font-style:italic;}

.thumb-missing{width:100%;height:100%;min-height:170px;display:flex;align-items:center;justify-content:center;text-align:center;opacity:.8;font-style:italic;}


/* ================================
   Ajustements v11 — vignettes & notices
   ================================ */

/* Vignettes : hauteur cohérente sans recadrage (portrait/paysage) */
.work-thumb{
  aspect-ratio: 4 / 3;
  display:flex;
  align-items:center;
  justify-content:center;
}
.work-thumb img{
  max-width:100%;
  max-height:100%;
  width:auto;
  height:auto;
  object-fit:contain;
}

/* Notice : limiter les portraits trop hauts */
.notice-image img{
  max-height:72vh;
  width:auto;
  height:auto;
  object-fit:contain;
}



/* v17 Notice readability */

/* Amélioration esthétique des notices générées (titres, fiche technique, lisibilité) */
.notice-page .catalogue-header{
  max-width: 980px;
  margin: 0 auto 14px;
}

.notice-page .notice-wrapper{
  max-width: 980px;
  margin: 0 auto;
  line-height: 1.65;
}

.notice-page .notice-wrapper p{
  font-size: 16px;
  margin: 10px 0;
}

.notice-page .notice-wrapper h2{
  margin: 26px 0 10px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
}

.notice-page .notice-wrapper ul{
  margin: 10px 0 16px 18px;
}

.notice-page .notice-wrapper li{
  margin: 4px 0;
}

/* Bloc "Fiche technique" (généré à partir de lignes "Label : valeur") */
.notice-page .notice-wrapper ul.notice-tech{
  list-style: none;
  margin: 12px 0 18px;
  padding: 14px 16px;
  border: 1px solid #eadfce;
  background: #f3eadb;
  border-radius: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 18px;
}

.notice-page .notice-wrapper ul.notice-tech li{
  margin: 0;
}

@media (max-width: 720px){
  .notice-page .notice-wrapper ul.notice-tech{
    grid-template-columns: 1fr;
  }
}


/* v18 Notice title + meta */

/* Titre de notice : en normal (pas gras) */
.notice-title{
  font-weight: 400;
}

/* Meta sous image (ID + titre + ligne technique) */
.notice-meta{
  margin: 12px auto 22px;
  max-width: 980px;
}
.notice-meta-idtitle{
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: #6d5b45;
}
.notice-meta-line{
  font-size: 15px;
  font-weight: 400;
  margin-top: 6px;
  color: #6d5b45;
}
