/* ==========================================================
   STYLE.CSS – VERSION PROPRE ET STABLE (site Montparnasse75)
   - Bandeau cohérent (logo à gauche, titre aligné sur le main)
   - Menu latéral fixe
   - Pages internes + listes + galeries + ambiance
   ========================================================== */

/* ===============================
   VARIABLES
   =============================== */
:root{
  --sepia: #6b4f3a;
  --sepia-dark: #4a372a;
  --paper: #f6f2ee;

  --menu-w: 220px;
  --gap-left: 20px;        /* petit confort visuel */
  --content-pad-x: 3rem;   /* padding horizontal du main */
  --content-pad-y: 2.5rem; /* padding vertical du main */
}

/* ===============================
   BASE / RESET
   =============================== */
html, body{
  margin: 0;
  padding: 0;
  width: 100%;
  font-family: "Times New Roman", Times, serif;
  background: #fff;
  color: #000;
}

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

a{
  color: inherit;
}

/* ===============================
   BANDEAU (header)
   - Logo aligné à gauche au-dessus du menu
   - Titre aligné sur la zone contenu (main)
   =============================== */
.bandeau-haut{
  width: 100%;
  background: #f0f0f0;
  padding: 1.1rem 0;
  border-bottom: 1px solid #e3e3e3;
}

.bandeau-contenu{
  /* Le conteneur du bandeau occupe toute la largeur,
     mais son contenu est aligné comme le site :
     logo = à gauche (même x que le menu)
     titre = centré sur la zone contenu (comme le main) */
  position: relative;
  width: 100%;
  min-height: 64px;
}

/* --- Bloc logo (ancre) --- */
.logo{
  position: absolute;
  left: 0;
  top: 0;
  /* on le “colle” exactement sur le bord du menu */
  margin-left: var(--gap-left);
  width: var(--menu-w);
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-mark{
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid rgba(107,79,58,0.25);
}

.logo-mark svg{
  width: 28px;
  height: 28px;
  fill: var(--sepia);
}

.logo-mark svg path:nth-child(2),
.logo-mark svg path:nth-child(3),
.logo-mark svg path:nth-child(4){
  fill: none;
  stroke: rgba(107,79,58,0.6);
  stroke-width: 2;
  stroke-linecap: round;
}

.logo-text{
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.logo-title{
  display: block;
  font-size: 1.02rem;
  color: var(--sepia-dark);
}

.logo-subtitle{
  display: block;
  margin-top: 2px;
  font-size: 0.9rem;
  color: var(--sepia);
  text-align: center; /* centré sous le titre */
}

/* --- Titre de page (H1 dans le bandeau) --- */
.bandeau-titre{
  /* On centre non pas sur tout l'écran,
     mais sur la zone “contenu” qui commence après le menu */
  margin: 0;
  padding-left: calc(var(--menu-w) + var(--gap-left) + var(--content-pad-x));
  padding-right: var(--content-pad-x);
  text-align: center;

  font-family: "Times New Roman", serif;
  font-size: 2.1rem;
  color: #E3001B;
}

/* ===============================
   MENU FIXE (design1.php)
   =============================== */
.menu-lateral{
  position: fixed;
  top: 92px; /* ˜ hauteur du bandeau ; ajustable si besoin */
  left: 0;
  width: var(--menu-w);
  height: calc(100vh - 92px);
  overflow-y: auto;

  background: #f6f6f6;
  padding: 1.25rem 1rem;
  box-sizing: border-box;
  border-right: 1px solid #e3e3e3;
  z-index: 1000;
  margin-left: var(--gap-left);
}

.menu-principal{
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-principal li{
  margin: 0;
}

.menu-principal a{
  display: block;
  padding: 0.55rem 0.6rem;
  border-radius: 10px;

  font-family: Verdana, sans-serif;
  font-size: 13px;
  color: #222;
  text-decoration: none;

  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.menu-principal a:hover{
  background: #efe6df;
  color: #000;
  transform: translateX(2px);
}

.menu-principal a.active{
  background: var(--sepia);
  color: #fff;
  font-weight: bold;
}

.menu-principal a.important{
  color: #b3001b;
  font-weight: bold;
}

/* Lisibilité au survol sur "important" */
.menu-principal a.important:hover{
  background: rgba(179,0,27,0.10);
  color: #b3001b;
  transform: translateX(2px);
}

.menu-separation{
  height: 1px;
  background: #ddd;
  margin: 1rem 0;
}

.menu-image img{
  border-radius: 10px;
  border: 1px solid #e1e1e1;
}

.menu-coordonnees{
  font-family: Verdana, sans-serif;
  font-size: 12px;
  color: #444;
  text-align: center;
}

.menu-coordonnees a{
  color: #222;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.menu-coordonnees a:hover{
  border-bottom-color: #222;
}

/* ===============================
   CONTENU PRINCIPAL
   =============================== */
main{
  margin-left: calc(var(--menu-w) + var(--gap-left) + var(--content-pad-x));
  padding: var(--content-pad-y) var(--content-pad-x);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

/* Page interne : réserve à droite si alphabet latéral présent */
.page-interne{
  padding-right: 140px;
}

/* ===============================
   TITRES / TEXTES
   =============================== */
h1, .page-interne h1{
  text-align: center;
  font-family: "Times New Roman", serif;
  font-size: 2rem;
  margin: 0 0 1.5rem;
}

h2, .page-interne h2{
  font-family: "Times New Roman", serif;
  margin-top: 2rem;
  border-bottom: 1px solid #ccc;
  padding-bottom: 0.3rem;
}

p{
  line-height: 1.6;
  text-align: justify;
  margin: 1rem 0;
}

/* ===============================
   NAVIGATION HORIZONTALE (accueil / etc.)
   =============================== */
.navigation-principale ul{
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  text-align: center;
}

.navigation-principale ul li{
  display: inline-block;
  margin: 0 1rem;
}

.navigation-principale ul li a{
  text-decoration: none;
  color: var(--sepia);
  font-size: 1rem;
}

.navigation-principale ul li a:hover{
  text-decoration: underline;
}

/* ===============================
   LISTE DES PERSONNALITÉS (AMES)
   - 2 colonnes par défaut
   - 3 colonnes en grand écran
   =============================== */
.liste-personnalites{
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.personnalite{
  flex: 1 1 calc(50% - 2rem);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.2rem;
  box-sizing: border-box;
}

/* Cadre image uniformisé */
.personnalite .portrait{
  width: 110px;
  height: 150px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 6px;
  background: #f2f2f2;
  border: 1px solid #e6e6e6;
}

.personnalite .portrait img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(10%) contrast(1.05);
}

.personnalite .biographie h3{
  margin: 0 0 0.3rem 0;
}

.personnalite .biographie p{
  margin: 0;
  line-height: 1.5;
}

.retour-haut{
  width: 100%;
  text-align: right;
  font-size: 0.9rem;
  margin: 1rem 0 1.2rem;
}

section.lettre{
  margin: 1.2rem 0 1.8rem;
}

section.lettre h2{
  margin: 1.2rem 0 1rem;
}

/* 3 colonnes si très large écran */
@media (min-width: 1200px){
  .personnalite{
    flex: 1 1 calc(33.333% - 2rem);
  }
}

/* ===============================
   ALPHABET LATÉRAL
   =============================== */
.alphabet-lateral{
  position: fixed;
  top: 92px;       /* sous le bandeau */
  right: 14px;
  z-index: 950;

  display: flex;
  flex-direction: column;
  gap: 8px;

  padding: 10px;
  background: rgba(255,255,255,0.92);
  border: 1px solid #ddd;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
  backdrop-filter: blur(4px);

  max-height: calc(100vh - 120px);
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.alphabet-lateral a{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  width: 56px;
  padding: 6px 9px;

  font-family: Verdana, sans-serif;
  font-size: 13px;
  text-decoration: none;

  color: var(--sepia);
  background: var(--paper);
  border: 1px solid #e4d8cf;
  border-radius: 999px;

  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.alphabet-lateral a:hover{
  transform: translateX(-2px);
  background: #efe6df;
  border-color: #d7c5b7;
}

.alphabet-lateral a.is-active{
  background: var(--sepia);
  color: #fff;
  border-color: var(--sepia);
}

.alphabet-lateral .count{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 6px;
  font-size: 11px;
  border-radius: 999px;
  background: rgba(0,0,0,0.08);
  color: inherit;
}

.alphabet-lateral a.is-active .count{
  background: rgba(255,255,255,0.25);
}

/* ===============================
   AMBIANCE.PHP – MISE EN PAGE
   =============================== */
.triptyque{
  display: grid;
  grid-template-columns: 1fr minmax(260px, 520px) 1fr;
  gap: 1.5rem;
  align-items: center;
}

.triptyque-item img{
  width: 100%;
  height: auto;
}

.triptyque-texte p{
  margin: 0 0 1rem;
}

.ambiance-grille{
  display: grid;
  grid-template-columns: 1fr 320px 1fr;
  gap: 2rem;
  align-items: start;
  margin-top: 2rem;
}

.image-ambiance img{
  width: 100%;
  height: auto;
}

/* ===============================
   GALERIE OEUVRES
   =============================== */
.chapo{
  max-width: 820px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
  font-style: italic;
  text-align: center;
}

.galerie-oeuvres{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.carte-oeuvre{
  margin: 0;
  background: #fafafa;
  border: 1px solid #e7e7e7;
  border-radius: 12px;
  overflow: hidden;
}

.carte-oeuvre a{ display:block; }

.carte-oeuvre img{
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.carte-oeuvre figcaption{
  padding: 0.75rem 0.9rem;
  font-family: Verdana, sans-serif;
  font-size: 12px;
  color: #444;
}

@media (min-width: 1400px){
  .galerie-oeuvres{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ===============================
   GALERIE EPITAPHES
   =============================== */
.galerie-epitaphes{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.carte-epitaphe{
  margin: 0;
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  overflow: hidden;
}

.carte-epitaphe img{
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.carte-epitaphe figcaption{
  padding: 1.2rem 1.4rem;
}

.carte-epitaphe blockquote{
  margin: 0;
  font-family: "Times New Roman", serif;
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.5;
}

.carte-epitaphe .source{
  margin-top: 0.6rem;
  font-size: 0.9rem;
  text-align: right;
  color: #666;
}

@media (min-width: 1300px){
  .galerie-epitaphes{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ===============================
   FOOTER
   =============================== */
footer{
  margin-left: calc(var(--menu-w) + var(--gap-left) + var(--content-pad-x));
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: #555;
  box-sizing: border-box;
}

/* ===============================
   RESPONSIVE – MOBILE
   =============================== */
@media (max-width: 900px){
  /* Bandeau */
  .logo{
    position: static;
    width: auto;
    margin: 0 auto 0.8rem;
    justify-content: center;
  }

  .bandeau-titre{
    padding-left: 1rem;
    padding-right: 1rem;
    font-size: 1.8rem;
  }

  /* Menu devient non fixe */
  .menu-lateral{
    position: relative;
    top: 0;
    left: 0;
    width: auto;
    height: auto;
    margin-left: 0;
    border-right: none;
    border-bottom: 1px solid #e3e3e3;
  }

  /* Main et footer reprennent toute la largeur */
  main{
    margin-left: 0;
    padding: 1.5rem;
  }

  footer{
    margin-left: 0;
  }

  /* Alphabet latéral masqué */
  .alphabet-lateral{
    display: none;
  }

  .page-interne{
    padding-right: 0;
  }

  /* Ambiance : 1 colonne */
  .triptyque,
  .ambiance-grille{
    grid-template-columns: 1fr;
  }

  /* Personnalités : 1 colonne */
  .personnalite{
    flex: 1 1 100%;
  }

  /* Galeries : 1 colonne */
  .galerie-oeuvres,
  .galerie-epitaphes{
    grid-template-columns: 1fr;
  }

  .carte-oeuvre img,
  .carte-epitaphe img{
    height: 220px;
  }
}

/* ===============================
   LOGO – AJUSTEMENTS FINS
   =============================== */

/* Le bloc texte du logo prend toute la largeur disponible */
.logo-text {
  align-items: center;        /* centre horizontalement */
  text-align: center;
  white-space: nowrap;        /* empêche le retour à la ligne */
}

/* Titre principal : une seule ligne */
.logo-title {
  font-size: 1.05rem;
  white-space: nowrap;        /* clé du problème */
}

/* Sous-titre parfaitement centré */
.logo-subtitle {
  font-size: 0.9rem;
  text-align: center;
  width: 100%;
}

/* ===============================
   TITRE DE BANDEAU – STYLE DOUX ET LITTÉRAIRE
   =============================== */

.bandeau-titre {
  font-family: "Times New Roman", Times, serif;
  font-weight: normal;
  letter-spacing: 0.04em;
  font-size: 2.2rem;
 color: #E3001B;   /* ?? rouge d’origine restauré */
  margin: 0;
  line-height: 1.2;
}
.bandeau-titre {
  text-transform: none;
  letter-spacing: 0.06em;
}

/* ===============================
   INFORMATIONS.PHP
   =============================== */

.infos-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1rem 0 2rem;
}

.infos-nav a {
  font-family: Verdana, sans-serif;
  font-size: 13px;
  text-decoration: none;
  color: #6b4f3a;
  background: #f6f2ee;
  border: 1px solid #e4d8cf;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
}

.infos-nav a:hover {
  background: #efe6df;
}

.info-bloc {
  max-width: 900px;
  margin: 0 auto 2.2rem;
}

.info-grille {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.info-carte {
  background: #fafafa;
  border: 1px solid #e7e7e7;
  border-radius: 12px;
  padding: 1rem 1.2rem;
}

.info-carte h3 {
  margin: 0 0 0.6rem;
  font-family: Verdana, sans-serif;
  font-size: 13px;
}

@media (max-width: 900px) {
  .info-grille {
    grid-template-columns: 1fr;
  }
}

/* ===============================
   HISTOIRE.PHP – TIMELINE + CARTES
   =============================== */

.histoire-section {
  margin-top: 2.2rem;
}

.timeline {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  margin-top: 1.2rem;
}

.event {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1rem;
  align-items: start;

  background: #fafafa;
  border: 1px solid #e7e7e7;
  border-radius: 12px;
  padding: 0.9rem 1rem;
}

.event-date {
  font-family: Verdana, sans-serif;
  font-weight: bold;
  color: #6b4f3a;
  text-align: center;
  background: #f6f2ee;
  border: 1px solid #e4d8cf;
  border-radius: 999px;
  padding: 0.35rem 0.6rem;
}

.event-text {
  line-height: 1.55;
}

.timeline-compact .event {
  padding: 0.8rem 1rem;
}

/* Cartes figures */
.cartes-figures {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  margin-top: 1.2rem;
}

.carte-figure {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.2rem;

  background: #fafafa;
  border: 1px solid #e7e7e7;
  border-radius: 14px;
  overflow: hidden;
}

.carte-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carte-figure-texte {
  padding: 1rem 1.1rem;
}

.carte-figure-texte h3 {
  margin: 0 0 0.4rem 0;
  font-family: "Times New Roman", serif;
}

.carte-figure-texte p {
  margin: 0.6rem 0 0;
}

/* Desktop : deux colonnes pour les figures */
@media (min-width: 1200px) {
  .cartes-figures {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile */
@media (max-width: 900px) {
  .event {
    grid-template-columns: 1fr;
  }
  .event-date {
    text-align: left;
    width: fit-content;
  }

  .carte-figure {
    grid-template-columns: 1fr;
  }
}

.bandeau-citation{
  margin-top: 0.8rem;
  max-width: 720px;      /* évite les lignes trop longues */
  font-family: "Times New Roman", serif;
  font-size: 1.05rem;
  font-style: italic;
  color: #5a3f2b;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}*/

.bandeau-citation span{
  display: block;
  margin-top: 0.4rem;
  font-size: 0.9rem;
  font-style: normal;
  color: #7a6a5a;
}

.bandeau-titres{
  width: 100%;
  max-width: 900px;
  margin: 0 auto;

  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ===============================
   CONTACT.PHP – FORMULAIRE
   =============================== */

.contact-form {
  max-width: 900px;
  margin: 0 auto;
  background: #fafafa;
  border: 1px solid #e7e7e7;
  border-radius: 14px;
  padding: 1.2rem 1.4rem;
}

.contact-grid {
 display: grid;
  grid-template-columns: 1fr; /* une seule colonne */
  gap: 1rem;
}

.contact-grid label span {
  display: block;
  font-family: Verdana, sans-serif;
  font-size: 13px;
  margin-bottom: 0.35rem;
  color: #333;
}

.contact-grid em { font-style: normal; color: #b3001b; }

.contact-grid input,
.contact-grid textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #dcdcdc;
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  font-family: Verdana, sans-serif;
  font-size: 13px;
  background: #fff;
}

.contact-grid textarea { resize: vertical; }

.contact-wide { grid-column: 1 / -1; }

.contact-actions {
  display: flex;
  gap: 0.8rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.contact-actions button {
  border: 1px solid #d7c5b7;
  background: #f6f2ee;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-family: Verdana, sans-serif;
  font-size: 13px;
  cursor: pointer;
}

.contact-actions button:hover {
  background: #efe6df;
}

.contact-note {
  margin-top: 0.8rem;
  font-size: 0.95rem;
  color: #555;
}

.contact-errors, .contact-success {
  max-width: 920px;
  margin: 1.2rem auto;
  padding: 1rem 1.2rem;
  border-radius: 12px;
  border: 1px solid #e1d2c8;
  background: #fff7f2;
}

.contact-errors ul { margin: 0.6rem 0 0; }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-form textarea {
	min-height: 180px;
}

/* ===== FORMULAIRES (contact.php + visite.php) ===== */

.formulaire {
  max-width: 900px;         /* colonne plus large */
  margin: 0 auto;
  background: #fafafa;
  border: 1px solid #e7e7e7;
  border-radius: 14px;
  padding: 1.4rem 1.6rem;
}

.form-ligne {
  display: grid;
  grid-template-columns: 180px 1fr; /* largeur fixe du label */
  gap: 12px;
  align-items: center;              /* centre vertical pour inputs */
  margin-bottom: 0.9rem;
}

.form-ligne label {
  font-family: Verdana, sans-serif;
  font-size: 13px;
  color: #222;
}

.form-ligne input,
.form-ligne select,
.form-ligne textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: Verdana, sans-serif;
  font-size: 13px;
  padding: 0.55rem 0.65rem;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  background: #fff;
}

/* IMPORTANT : label en haut pour textarea */
.form-ligne.is-textarea {
  align-items: start;
}

.form-ligne.is-textarea label {
  padding-top: 0.55rem; /* aligne au haut de la zone */
}

.form-ligne textarea {
  min-height: 160px;
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  margin-top: 1rem;
}

.form-actions input[type="submit"],
.form-actions input[type="reset"] {
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  border: 1px solid #d8d8d8;
  background: #f6f2ee;
  cursor: pointer;
}

.form-actions input[type="submit"]:hover,
.form-actions input[type="reset"]:hover {
  background: #efe6df;
}

/* Mobile */
@media (max-width: 700px) {
  .form-ligne {
    grid-template-columns: 1fr;
  }
  .form-ligne.is-textarea label {
    padding-top: 0;
  }
}
