:root {
  --papier: #faf8f4;
  --encre: #1d1b19;
  --gris: #5f5a54;
  --ligne: #e3ddd3;
  --rouge: #b3261e;
  --carte: #ffffff;
  --largeur: 46rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font: 1.0625rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: normal;
  line-height: 1.25;
}
h1 { font-size: 2.1rem; margin: 0 0 1rem; }
h2 { font-size: 1.5rem; margin: 2.5rem 0 .75rem; }
h3 { font-size: 1.15rem; margin: 1.5rem 0 .4rem; }

a { color: var(--rouge); }
a:hover { text-decoration-thickness: 2px; }

/* En-tête */
.entete {
  border-bottom: 1px solid var(--ligne);
  background: var(--carte);
}
.entete .conteneur {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  padding-top: .9rem;
  padding-bottom: .9rem;
}
.logo {
  font-family: Georgia, serif;
  font-size: 1.15rem;
  color: var(--encre);
  text-decoration: none;
}
.logo span { color: var(--rouge); }
nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
nav a {
  color: var(--gris);
  text-decoration: none;
  padding: .2rem 0;
  border-bottom: 2px solid transparent;
}
nav a:hover, nav a[aria-current="page"] {
  color: var(--encre);
  border-bottom-color: var(--rouge);
}

.conteneur {
  max-width: var(--largeur);
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

main { padding-top: 2.5rem; padding-bottom: 3rem; }

/* Accueil */
.accroche {
  font-size: 1.2rem;
  color: var(--gris);
  margin-top: 0;
}
.boutons { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0; }
.bouton {
  display: inline-block;
  padding: .6rem 1.1rem;
  border: 1px solid var(--rouge);
  border-radius: 4px;
  text-decoration: none;
}
.bouton.plein { background: var(--rouge); color: #fff; }

/* Encadrés */
.encadre {
  background: var(--carte);
  border: 1px solid var(--ligne);
  border-left: 4px solid var(--rouge);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}
.encadre > :first-child { margin-top: 0; }
.encadre > :last-child { margin-bottom: 0; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .5rem .5rem .5rem 0; border-bottom: 1px solid var(--ligne); vertical-align: top; }
th { font-weight: 600; white-space: nowrap; padding-right: 1rem; }

dl.principes dt { font-weight: 600; letter-spacing: .02em; margin-top: .6rem; }
dl.principes dd { margin: 0 0 0 0; color: var(--gris); }

blockquote {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--ligne);
  font-family: Georgia, serif;
  font-size: 1.15rem;
  font-style: italic;
}

/* Actualités */
.actu {
  border-bottom: 1px solid var(--ligne);
  padding: 1.5rem 0;
}
.actu:first-of-type { padding-top: 0; }
.actu h2, .actu h3 { margin-top: 0; }
.actu time { display: block; color: var(--gris); font-size: .9rem; margin-bottom: .5rem; }
.signature { font-style: italic; color: var(--gris); }

/* Pied de page */
footer {
  border-top: 1px solid var(--ligne);
  color: var(--gris);
  font-size: .9rem;
  padding: 1.5rem 0 2rem;
}
footer p { margin: .2rem 0; }

@media (max-width: 30rem) {
  h1 { font-size: 1.75rem; }
  th { white-space: normal; }
}

/* Photos des actualités */
.actu img { display: block; max-width: 100%; height: auto; border-radius: 4px; margin: .5rem 0 1rem; }

/* Administration */
.alerte { padding: .75rem 1rem; border-radius: 4px; margin: 0 0 1.5rem; }
.alerte.succes { background: #e8f3e8; color: #1e5b23; }
.alerte.erreur { background: #fbe9e7; color: #8c1d18; }
.formulaire { display: flex; flex-direction: column; gap: .35rem; max-width: 40rem; }
.formulaire label { font-weight: 600; margin-top: .75rem; }
.formulaire label.case { font-weight: normal; margin-top: 0; }
.formulaire input[type=text], .formulaire input[type=password], .formulaire input[type=date], .formulaire textarea {
  font: inherit; padding: .55rem .65rem; border: 1px solid #c9c1b5; border-radius: 4px; background: #fff; width: 100%;
}
.formulaire textarea { resize: vertical; }
.formulaire .aide { color: var(--gris); font-size: .9rem; margin: 0; }
.formulaire .apercu { max-width: 14rem; border-radius: 4px; }
button.bouton { font: inherit; cursor: pointer; }
.ligne-actu { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--ligne); }
.ligne-actu small { color: var(--gris); }
.ligne-actu .actions { display: flex; gap: 1rem; align-items: center; white-space: nowrap; }
.ligne-actu form { margin: 0; }
.lien-supprimer { background: none; border: 0; padding: 0; font: inherit; color: var(--rouge); text-decoration: underline; cursor: pointer; }

/* Petit logo (page d'administration) */
.logo { display: inline-flex; align-items: center; gap: .75rem; }
.logo img { width: 50px; height: auto; flex-shrink: 0; }

/* Bandeau en tête de page, menu centré dessous */
.bandeau { display: block; max-width: calc(587px + 2rem); margin: 0 auto; padding: .5rem 1rem; }
.bandeau img { display: block; width: 100%; height: auto; }
.entete .bandeau ~ .conteneur { justify-content: center; border-top: 1px solid var(--ligne); }

@media (max-width: 30rem) {
  .bandeau { padding: .5rem .5rem .25rem; }
  .entete .bandeau ~ .conteneur { padding-top: .5rem; padding-bottom: .5rem; }
  nav ul { justify-content: center; gap: .15rem 1rem; }
  nav a { font-size: .95rem; }
}
.aide { color: var(--gris); font-size: .9rem; }

/* Fiches du staff */
.personne { padding: 1rem 0; border-bottom: 1px solid var(--ligne); }
.personne:last-of-type { border-bottom: 0; }
.personne h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; margin: 0 0 .35rem; font-size: 1.3rem; }
.personne .grade {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: .85rem; color: var(--rouge); border: 1px solid var(--rouge);
  border-radius: 999px; padding: .05rem .6rem; white-space: nowrap;
}
.personne .role { font-weight: 600; margin: 0 0 .5rem; }
.personne p { margin: 0 0 .6rem; }
.personne p:last-child { margin-bottom: 0; }

/* Photos dans le texte */
.photo { margin: .25rem 0 1rem; }
.photo img { display: block; width: 100%; height: auto; border-radius: 4px; }
.photo figcaption { color: var(--gris); font-size: .85rem; margin-top: .35rem; line-height: 1.4; }
.photo.droite { float: right; width: 38%; max-width: 15rem; margin-left: 1.5rem; }
.photo.gauche { float: left; width: 42%; max-width: 17rem; margin-right: 1.5rem; }
h2 { clear: both; }
@media (max-width: 30rem) {
  .photo.droite, .photo.gauche { float: none; width: 100%; max-width: 20rem; margin: .5rem auto 1rem; }
}
