/* Musée virtuel de la musique maçonnique : maquette de refonte (novembre 2026) */

:root {
  --papier: #fbf8f1;
  --papier-fonce: #f2ecdf;
  --encre: #1f2433;
  --bleu: #1d3474;        /* le bleu du site d'origine, assombri */
  --bleu-clair: #e6ebf6;
  --or: #9c7a2b;
  --or-clair: #e9dcb8;
  --gris: #5b6070;
  --filet: #d9cfb8;
  --largeur: 46rem;
}

* { box-sizing: border-box; }

html { font-size: 112.5%; }   /* 18 px : confortable à lire */

body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: "EB Garamond", Garamond, Georgia, "Times New Roman", serif;
  line-height: 1.6;
}

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

a { color: var(--bleu); text-decoration-color: var(--or); text-underline-offset: 3px; }
a:hover { color: #a3271f; }

/* ---------- En-tête ---------- */

.devise {
  background: var(--bleu);
  color: var(--or-clair);
  text-align: center;
  font-style: italic;
  font-size: .9rem;
  padding: .35rem 1rem;
  letter-spacing: .02em;
}

.entete {
  border-bottom: 1px solid var(--filet);
  background: var(--papier);
}

.entete-int {
  max-width: 68rem;
  margin: 0 auto;
  padding: 1rem 1rem .6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .6rem 2rem;
}

.logo {
  text-decoration: none;
  color: var(--bleu);
  display: flex;
  align-items: center;
  gap: .7rem;
}
.logo-signe {
  font-size: 2rem;
  color: var(--or);
  line-height: 1;
}
.logo-titre {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.15;
}
.logo-titre small {
  display: block;
  font-size: .8rem;
  font-weight: 400;
  color: var(--gris);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.menu { display: flex; flex-wrap: wrap; gap: .2rem 1.1rem; font-size: .95rem; }
.menu a { text-decoration: none; color: var(--encre); padding: .2rem 0; border-bottom: 2px solid transparent; }
.menu a:hover, .menu a[aria-current] { color: var(--bleu); border-bottom-color: var(--or); }

/* ---------- Fil d'Ariane ---------- */

.ariane {
  max-width: var(--largeur);
  margin: 1.2rem auto 0;
  padding: 0 1rem;
  font-size: .85rem;
  color: var(--gris);
}
.ariane a { color: var(--gris); }

/* ---------- Contenu ---------- */

main { max-width: var(--largeur); margin: 0 auto; padding: 0 1rem 3rem; }

h1, h2, h3 { color: var(--bleu); font-weight: 600; line-height: 1.2; }
h1 { font-size: 2.3rem; margin: 1rem 0 .3rem; text-align: center; }
h2 { font-size: 1.45rem; margin: 2.4rem 0 .6rem; }
h2::after {
  content: "";
  display: block;
  width: 3rem;
  height: 2px;
  background: var(--or);
  margin-top: .35rem;
}
h3 { font-size: 1.15rem; margin: 1.6rem 0 .4rem; }

.sous-titre { text-align: center; color: var(--gris); font-style: italic; margin: 0 0 1.5rem; }

.ornement { text-align: center; color: var(--or); letter-spacing: .6em; margin: 1.5rem 0; }

blockquote {
  margin: 1.2rem 0;
  padding: .6rem 1.2rem;
  border-left: 3px solid var(--or);
  background: var(--papier-fonce);
  font-style: italic;
}
blockquote footer { font-style: normal; font-size: .85rem; color: var(--gris); margin-top: .4rem; }

.source { font-size: .85rem; color: var(--gris); }

/* Encadré de faits (fiche compositeur, fiche chanson) */
.fiche {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .25rem 1rem;
  background: var(--bleu-clair);
  border: 1px solid #c9d3ea;
  border-radius: 6px;
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  font-size: .95rem;
}
.fiche dt { color: var(--gris); }
.fiche dd { margin: 0; font-weight: 500; }

/* Figure à côté du texte */
.figure-droite { float: right; width: 40%; max-width: 15rem; margin: .3rem 0 1rem 1.5rem; }
figure { margin: 1.5rem 0; }
figure img { display: block; border: 1px solid var(--filet); border-radius: 3px; background: #fff; }
figcaption { font-size: .8rem; color: var(--gris); margin-top: .35rem; line-height: 1.4; }
.clair { clear: both; }

/* Lecteur de son */
.ecoute {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1rem;
  background: var(--papier-fonce);
  border: 1px solid var(--filet);
  border-radius: 6px;
  padding: .8rem 1rem;
  margin: 1.5rem 0;
}
.ecoute-titre { flex: 1 1 14rem; font-size: .95rem; }
.ecoute-titre strong { color: var(--bleu); }
.ecoute audio { flex: 1 1 16rem; width: 100%; }

/* Texte bilingue (livret) */
.bilingue { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: 1rem 0; }
.bilingue p { margin: 0; font-style: italic; }
.bilingue .vo { color: var(--gris); }
.bilingue .langue { font-style: normal; font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--or); display: block; margin-bottom: .3rem; }

/* Lettre */
.lettre {
  background: #fff;
  border: 1px solid var(--filet);
  padding: 1.2rem 1.5rem;
  margin: 1rem 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.lettre .date { text-align: right; font-style: italic; }
.lettre .signature { text-align: right; margin-top: 1rem; }

/* ---------- Chanson ---------- */

.chanson {
  background: #fff;
  border: 1px solid var(--filet);
  border-radius: 4px;
  padding: 1.8rem 1.5rem;
  margin: 2rem 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.chanson-titre { text-align: center; color: var(--bleu); letter-spacing: .05em; margin-bottom: 1.6rem; line-height: 1.5; }
.chanson-titre .grand { font-size: 1.2rem; font-weight: 600; }
.chanson-titre .petit { font-size: .85rem; font-style: italic; color: var(--gris); }
.couplets { counter-reset: couplet; display: grid; gap: 1.4rem; justify-content: center; }
.couplet { counter-increment: couplet; position: relative; margin: 0; padding-left: 2.2rem; }
.couplet::before {
  content: counter(couplet);
  position: absolute;
  left: 0;
  top: .1rem;
  font-size: .8rem;
  color: var(--or);
  font-weight: 600;
}
.couplet .ret { padding-left: 1.5rem; display: inline-block; }
.chanson-auteur { text-align: right; font-variant: small-caps; margin-top: 1.6rem; color: var(--bleu); }

/* Fac-similé : vignettes cliquables */
.facsimile { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: .8rem; margin: 1rem 0; }
.facsimile a { display: block; text-decoration: none; color: var(--gris); font-size: .75rem; text-align: center; }
.facsimile img { border: 1px solid var(--filet); background: #fff; display: block; width: 100%; margin-bottom: .2rem; }

/* ---------- Accueil ---------- */

.accueil-titre { text-align: center; padding: 2rem 1rem 0; }
.accueil-titre .surtitre { color: var(--or); font-style: italic; font-size: 1.15rem; margin: 0; }
.accueil-titre h1 { font-size: 2.6rem; margin: .3rem 0 0; }

.intro { display: grid; grid-template-columns: 15rem 1fr; gap: 1.8rem; align-items: start; margin-top: 2rem; }

.salles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.2rem 0; }
.salle {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--filet);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: var(--encre);
  transition: transform .15s, box-shadow .15s;
}
.salle:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(29,52,116,.12); color: var(--encre); }
.salle img { width: 100%; height: 9rem; object-fit: cover; object-position: top; display: block; border-bottom: 1px solid var(--filet); }
.salle-texte { padding: .8rem 1rem 1rem; }
.salle-num { font-size: .75rem; letter-spacing: .15em; text-transform: uppercase; color: var(--or); }
.salle-nom { display: block; font-size: 1.15rem; color: var(--bleu); font-weight: 600; line-height: 1.25; margin-top: .15rem; }

.pages-part { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.page-part {
  display: flex; align-items: center; gap: 1rem;
  background: #fff; border: 1px solid var(--filet); border-radius: 6px;
  padding: .6rem; text-decoration: none; color: var(--bleu); font-size: 1.1rem; font-weight: 600;
}
.page-part img { width: 4rem; height: 4rem; object-fit: cover; border-radius: 3px; }

.recherche { display: flex; gap: .5rem; margin: 1rem 0; }
.recherche input {
  flex: 1; font: inherit; padding: .55rem .8rem;
  border: 1px solid var(--filet); border-radius: 4px; background: #fff;
}
.recherche button, .bouton {
  font: inherit; padding: .55rem 1.1rem; border: 0; border-radius: 4px;
  background: var(--bleu); color: #fff; cursor: pointer; text-decoration: none; display: inline-block;
}
.recherche button:hover, .bouton:hover { background: #142657; color: #fff; }

.nouveautes { list-style: none; padding: 0; margin: 0; }
.nouveautes li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; padding: .55rem 0; border-bottom: 1px dotted var(--filet); }
.nouveautes time { color: var(--or); font-size: .9rem; }

.hommage {
  margin: 3rem 0 0;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--or-clair);
  background: #fffaf0;
  border-radius: 6px;
  text-align: center;
}
.hommage p { margin: .3rem 0; }

/* ---------- Bas de page ---------- */

.pied {
  border-top: 1px solid var(--filet);
  background: var(--papier-fonce);
  font-size: .85rem;
  color: var(--gris);
  text-align: center;
  padding: 1.5rem 1rem 2rem;
}
.pied p { margin: .3rem auto; max-width: 40rem; }

.bandeau-maquette {
  background: #fff4d6;
  border-bottom: 1px solid #ecd9a0;
  color: #6b5414;
  text-align: center;
  font-size: .8rem;
  padding: .3rem 1rem;
  font-family: system-ui, sans-serif;
}

/* ---------- Téléphone ---------- */

@media (max-width: 720px) {
  html { font-size: 106.25%; }
  h1, .accueil-titre h1 { font-size: 1.85rem; }
  .intro { grid-template-columns: 1fr; }
  .intro figure { max-width: 14rem; margin: 0 auto; }
  .salles, .pages-part, .bilingue { grid-template-columns: 1fr; }
  .salle img { height: 7rem; }
  .figure-droite { float: none; width: 100%; max-width: 14rem; margin: 1rem auto; }
  .chanson { padding: 1.2rem .9rem; }
  .couplet { padding-left: 1.6rem; }
  .nouveautes li { grid-template-columns: 1fr; gap: 0; }
}

@media print {
  .devise, .entete, .ariane, .pied, .bandeau-maquette, .ecoute, .recherche { display: none; }
  body { background: #fff; }
}

.a-choisir { background: #fff4d6; padding: 0 .3rem; }

/* Hommage en ouverture de l'accueil */
.hommage-ouverture {
  max-width: var(--largeur);
  margin: 2rem auto 0;
  margin-left: max(1rem, calc((100% - var(--largeur)) / 2));
  margin-right: max(1rem, calc((100% - var(--largeur)) / 2));
  border-top: 3px double var(--or);
  border-bottom: 3px double var(--or);
}
.hommage-sur { font-style: italic; color: var(--gris); letter-spacing: .05em; }
.hommage-nom { font-size: 2rem; color: var(--bleu); font-weight: 600; font-variant: small-caps; letter-spacing: .04em; line-height: 1.2; }
.hommage-date { font-style: italic; color: var(--or); }
.hommage-ouverture .ornement { margin: .6rem 0; }
@media (max-width: 720px) { .hommage-nom { font-size: 1.6rem; } }

/* ---------- Pages converties automatiquement ---------- */
.page-convertie { max-width: 52rem; }
.page-convertie > h1 { margin-bottom: 1.2rem; }
.page-convertie img { height: auto; }
.centre { text-align: center; }
.droite { text-align: right; }
.flottant-gauche { float: left; margin: .3rem 1.2rem .8rem 0; max-width: 45%; }
.flottant-droite { float: right; margin: .3rem 0 .8rem 1.2rem; max-width: 45%; }
.bloc { margin: 1rem 0; }
.bloc::after, .colonnes td::after { content: ""; display: table; clear: both; }

table.colonnes { width: 100%; border-collapse: collapse; margin: 1rem 0; }
table.colonnes td, table.colonnes th { vertical-align: top; padding: .5rem .8rem; }

.defile { overflow-x: auto; margin: 1.2rem 0; -webkit-overflow-scrolling: touch; }
table.tableau { border-collapse: collapse; width: 100%; background: #fff; font-size: .95rem; }
table.tableau td, table.tableau th { border-bottom: 1px solid var(--filet); padding: .35rem .6rem; vertical-align: top; }
table.tableau tr:first-child td { font-weight: 600; color: var(--bleu); background: var(--bleu-clair); }
table.tableau tr:hover td { background: #faf6ea; }

.video { position: relative; width: 100%; max-width: 40rem; margin: 1.2rem auto; aspect-ratio: 16 / 9; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 4px; }
.page-convertie iframe { max-width: 100%; }
.page-convertie audio { vertical-align: middle; height: 2rem; max-width: 100%; margin: .2rem 0; }
.retours { text-align: center; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--filet); }
.fleche { font-size: 1.2rem; }

@media (max-width: 720px) {
  table.colonnes, table.colonnes tbody, table.colonnes tr, table.colonnes td, table.colonnes th { display: block; width: 100% !important; }
  table.colonnes td { padding: .4rem 0; }
  .flottant-gauche, .flottant-droite { float: none; display: block; margin: 1rem auto; max-width: 100%; }
}
table.tableau td p, table.tableau th p, table.colonnes td > p:first-child { margin-top: 0; }
table.tableau td p, table.tableau th p { margin-bottom: 0; }
blockquote blockquote { border: 0; padding: 0; background: none; margin: 0; }
h2.centre { text-align: center; }
h2.centre::after { margin-left: auto; margin-right: auto; }
table.colonnes img { max-width: 100%; }

.lien-perdu { color: var(--gris); }
.note-perdu { font-size: .8em; font-style: italic; color: #a3271f; white-space: nowrap; }

/* Recueil de 1782 : vers en retrait */
.page-convertie dd { margin: 0 0 0 2.5rem; }
.page-convertie dd + br { display: none; }

/* Bouton de contact (adresse protégée contre les robots) */
.bouton-contact {
  font: inherit; color: var(--bleu, #1d3577); background: none; border: 1px solid var(--or, #b08d3c);
  border-radius: 4px; padding: .1rem .6rem; cursor: pointer;
}
.bouton-contact:hover { background: var(--or-clair, #f3e6c4); }

/* Notes ajoutées par le copiste (distinctes du texte de Jean-Pierre Bouyer) */
.note-copiste {
  font-size: .92rem; color: var(--gris); background: var(--papier-fonce); border-left: 3px solid var(--or);
  padding: .6rem 1rem; margin: 1rem 0; font-style: normal;
}

/* Accueil : cadre « Les derniers ajouts du copiste » (01/12/2026) */
.ajouts-copiste { margin-top: 1.5rem; }
.ajouts-copiste h3 { margin: .2rem 0 .4rem; font-size: 1.1rem; color: var(--bleu, #1d2b53); }
.ajouts-copiste .nouveautes { margin: .5rem 0; }

/* Accueil : bandeau de la salle « Le blog du Musée » (02/12/2026) */
.blog-accueil img { display: block; width: 100%; border: 1px solid var(--filet); border-radius: 3px; background: #fff; }
