/* Hors-la-loi : papier & encre, ambiance polar.
   Un seul accent rouge sourd, le meme que celui des illustrations.
   Aucun degrade, aucune ombre portee decorative, aucune card generique. */

/* Polices variables self-hostees : pas d'appel a un tiers (RGPD). */
@font-face {
  font-family: 'Fraunces';
  src: url('/assets/fonts/fraunces.woff2') format('woff2');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Newsreader';
  src: url('/assets/fonts/newsreader.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Newsreader';
  src: url('/assets/fonts/newsreader-italic.woff2') format('woff2');
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --papier: #f6f2ea;
  --papier-fonce: #ede7db;
  --encre: #1a1714;
  --encre-douce: #4a443c;
  --gris: #8a8378;
  --rouge: #a32e24;
  --rouge-sombre: #7e231b;
  --filet: #d8d0c0;
  --titrage: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --labeur: 'Newsreader', Charter, 'Iowan Old Style', Georgia, serif;
  --mesure: 68ch;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--papier);
  color: var(--encre);
  font-family: var(--labeur);
  font-size: 1.1875rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Manchette ---------- */

.manchette {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 0;
  text-align: center;
}

.manchette .surtitre {
  font-family: var(--labeur);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--encre-douce);
}

.manchette h1.marque, .manchette p.marque {
  font-family: var(--titrage);
  font-weight: 900;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  letter-spacing: 0.01em;
  line-height: 1;
  margin: 0.35rem 0 0.2rem;
}

.manchette .marque a { color: var(--encre); text-decoration: none; }
.manchette .marque .point { color: var(--rouge); }

.manchette .devise {
  font-style: italic;
  color: var(--encre-douce);
  font-size: 1rem;
}

/* Double filet de presse sous la manchette */
.filets {
  max-width: 72rem;
  margin: 1.1rem auto 0;
  border-top: 2.5px solid var(--encre);
  border-bottom: 1px solid var(--encre);
  height: 5px;
}

nav.rubriques {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.65rem 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.6rem;
  border-bottom: 1px solid var(--filet);
}

nav.rubriques a {
  font-family: var(--labeur);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--encre);
  text-decoration: none;
  padding: 0.15rem 0;
}

nav.rubriques a:hover, nav.rubriques a.active { color: var(--rouge); }

/* ---------- Blocs communs ---------- */

main { max-width: 72rem; margin: 0 auto; padding: 2.2rem 1.25rem 4rem; }

.kicker {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rouge);
  font-weight: 700;
}

a { color: var(--encre); text-decoration-color: var(--rouge); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--rouge); }

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

.une {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 2.2rem;
  align-items: center;
  padding-bottom: 2.2rem;
  border-bottom: 2.5px solid var(--encre);
}

.une img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--encre);
}

.une h2 {
  font-family: var(--titrage);
  font-weight: 900;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1.08;
  margin: 0.45rem 0 0.7rem;
}

.une h2 a, .liste-articles h3 a, .grappe h3 a { text-decoration: none; }
.une h2 a:hover, .liste-articles h3 a:hover, .grappe h3 a:hover { color: var(--rouge); }

.une .chapo { color: var(--encre-douce); font-size: 1.05rem; }

.liste-articles { list-style: none; }

.liste-articles li {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--filet);
  display: grid;
  grid-template-columns: 1fr 10rem;
  gap: 1.4rem;
  align-items: center;
}

.liste-articles li img {
  width: 100%;
  height: auto;
  border: 1px solid var(--encre);
}

.liste-articles h3 {
  font-family: var(--titrage);
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.15;
  margin: 0.2rem 0 0.3rem;
}

.liste-articles .chapo { font-size: 0.98rem; color: var(--encre-douce); }

.date { font-size: 0.82rem; color: var(--gris); font-variant-numeric: oldstyle-nums; }

/* Grappes par rubrique sur l'accueil */
.grappes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 2.4rem;
  margin-top: 2.4rem;
}

.grappe { border-top: 2.5px solid var(--encre); padding-top: 0.8rem; margin-bottom: 2.4rem; }

.grappe h3 { font-family: var(--titrage); font-weight: 600; font-size: 1.08rem; line-height: 1.2; margin: 0.75rem 0 0.15rem; }

.grappe .date { font-size: 0.78rem; }

.grappe .tout-voir { font-size: 0.85rem; font-style: italic; }

/* ---------- Article ---------- */

article.papier { max-width: var(--mesure); margin: 0 auto; }

.fil-ariane { font-size: 0.82rem; color: var(--gris); margin-bottom: 1.4rem; }
.fil-ariane a { color: var(--gris); text-decoration: none; }
.fil-ariane a:hover { color: var(--rouge); }

article.papier h1 {
  font-family: var(--titrage);
  font-weight: 900;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.06;
  margin: 0.5rem 0 1rem;
}

.chapo-article {
  font-size: 1.28rem;
  font-style: italic;
  color: var(--encre-douce);
  line-height: 1.5;
  margin-bottom: 1.2rem;
}

.signature {
  display: flex;
  gap: 0.8rem;
  align-items: baseline;
  font-size: 0.85rem;
  color: var(--gris);
  border-top: 1px solid var(--filet);
  border-bottom: 1px solid var(--filet);
  padding: 0.55rem 0;
  margin-bottom: 1.6rem;
}

.hero { margin: 0 0 1.8rem; }
.hero img { width: 100%; height: auto; display: block; border: 1px solid var(--encre); }
.hero figcaption { font-size: 0.78rem; color: var(--gris); margin-top: 0.4rem; font-style: italic; }

.sommaire {
  border: 1px solid var(--encre);
  padding: 1rem 1.3rem;
  margin: 0 0 2rem;
  background: var(--papier-fonce);
}

.sommaire strong {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
}

.sommaire ol { margin: 0.5rem 0 0 1.2rem; font-size: 0.95rem; }
.sommaire a { text-decoration: none; }
.sommaire a:hover { color: var(--rouge); }

.corps > p:first-of-type::first-letter {
  font-family: var(--titrage);
  font-weight: 900;
  font-size: 3.4em;
  float: left;
  line-height: 0.82;
  padding: 0.06em 0.12em 0 0;
  color: var(--rouge);
}

.corps h2 {
  font-family: var(--titrage);
  font-weight: 600;
  font-size: 1.65rem;
  line-height: 1.15;
  margin: 2.4rem 0 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--filet);
}

.corps h3 { font-family: var(--titrage); font-weight: 600; font-size: 1.22rem; margin: 1.7rem 0 0.6rem; }

.corps p { margin-bottom: 1.05rem; }

.corps ul, .corps ol { margin: 0 0 1.05rem 1.4rem; }
.corps li { margin-bottom: 0.35rem; }

.corps img { max-width: 100%; height: auto; border: 1px solid var(--encre); margin: 1.4rem 0; }

.corps figure.illustration { margin: 1.4rem 0; }
.corps figure.illustration img { margin: 0; }
.corps figure.illustration figcaption { font-size: 0.78rem; color: var(--gris); margin-top: 0.4rem; font-style: italic; }

/* Encadre « Ce que dit la loi » : les blockquotes du corps */
.corps blockquote {
  border-left: 4px solid var(--rouge);
  background: var(--papier-fonce);
  padding: 1rem 1.3rem;
  margin: 1.6rem 0;
  font-size: 1.02rem;
}

.corps blockquote p { margin-bottom: 0.5rem; }
.corps blockquote p:last-child { margin-bottom: 0; }

.tableau-deroulant { overflow-x: auto; margin: 1.6rem 0; }

.corps table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }

.corps th {
  font-family: var(--labeur);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: left;
  border-bottom: 2px solid var(--encre);
  padding: 0.5rem 0.7rem;
}

.corps td { border-bottom: 1px solid var(--filet); padding: 0.55rem 0.7rem; }

/* FAQ */
.faq { margin-top: 2.6rem; border-top: 2.5px solid var(--encre); padding-top: 1rem; }

.faq h2 { font-family: var(--titrage); font-weight: 900; font-size: 1.5rem; margin-bottom: 1rem; }

.faq details { border-bottom: 1px solid var(--filet); padding: 0.7rem 0; }

.faq summary {
  font-family: var(--titrage);
  font-weight: 600;
  font-size: 1.08rem;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 1.6rem;
}

.faq summary::after { content: '+'; position: absolute; right: 0.2rem; color: var(--rouge); font-weight: 700; }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin-top: 0.55rem; font-size: 1rem; color: var(--encre-douce); }

/* Sources et avertissement */
.sources {
  margin-top: 2.4rem;
  padding: 1rem 1.3rem;
  border: 1px solid var(--filet);
  font-size: 0.88rem;
  color: var(--encre-douce);
}

.sources strong { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; }
.sources ul { list-style: none; margin-top: 0.4rem; }
.sources li { margin-bottom: 0.2rem; overflow-wrap: anywhere; }

.avertissement { font-size: 0.82rem; font-style: italic; color: var(--gris); margin-top: 1.2rem; }

/* A lire aussi */
.a-lire { margin-top: 2.6rem; }
.a-lire strong.titre-bloc { font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--rouge); }
.a-lire ul { list-style: none; margin-top: 0.7rem; }
.a-lire li { border-top: 1px solid var(--filet); padding: 0.6rem 0; font-family: var(--titrage); font-weight: 600; font-size: 1.05rem; }
.a-lire a { text-decoration: none; }
.a-lire a:hover { color: var(--rouge); }

/* ---------- Encart newsletter ---------- */

.encart-lettre {
  margin-top: 3rem;
  border: 2.5px solid var(--encre);
  padding: 1.6rem 1.8rem;
  background: var(--encre);
  color: var(--papier);
}

.encart-lettre .kicker { color: #d98a80; }

.encart-lettre h2 {
  font-family: var(--titrage);
  font-weight: 900;
  font-size: 1.55rem;
  margin: 0.3rem 0 0.5rem;
  color: var(--papier);
}

.encart-lettre p { font-size: 0.98rem; color: #cfc8ba; margin-bottom: 0.9rem; }

.encart-lettre form { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.encart-lettre input[type="email"] {
  flex: 1 1 14rem;
  font-family: var(--labeur);
  font-size: 1rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--papier);
  background: var(--papier);
  color: var(--encre);
}

.encart-lettre button {
  font-family: var(--labeur);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.6rem 1.4rem;
  border: none;
  background: var(--rouge);
  color: var(--papier);
  cursor: pointer;
}

.encart-lettre button:hover { background: var(--rouge-sombre); }

.pot-de-miel { position: absolute; left: -9999px; }

/* ---------- Categorie ---------- */

.tete-rubrique { border-bottom: 2.5px solid var(--encre); padding-bottom: 1.2rem; margin-bottom: 0.5rem; }

.tete-rubrique h1 { font-family: var(--titrage); font-weight: 900; font-size: clamp(1.8rem, 4vw, 2.6rem); }

.tete-rubrique p { color: var(--encre-douce); font-style: italic; max-width: var(--mesure); }

.pagination { display: flex; gap: 1rem; justify-content: center; margin-top: 2rem; font-size: 0.95rem; }
.pagination .actuelle { color: var(--rouge); font-weight: 700; }

/* ---------- Pages, 404 ---------- */

.page-simple { max-width: var(--mesure); margin: 0 auto; }
.page-simple h1 { font-family: var(--titrage); font-weight: 900; font-size: 2.2rem; margin-bottom: 1.2rem; }
.page-simple h2 { font-family: var(--titrage); font-weight: 600; font-size: 1.4rem; margin: 1.8rem 0 0.7rem; }
.page-simple p { margin-bottom: 1rem; }
.page-simple ul { margin: 0 0 1rem 1.4rem; }

.message-bandeau {
  border: 1px solid var(--rouge);
  background: var(--papier-fonce);
  color: var(--rouge-sombre);
  padding: 0.9rem 1.2rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

/* ---------- Auteurs ---------- */

.portrait-auteur {
  width: 10rem;
  height: 10rem;
  object-fit: cover;
  border: 1px solid var(--encre);
  flex-shrink: 0;
}

.tete-auteur, .fiche-plume {
  display: flex;
  gap: 1.4rem;
  align-items: center;
}

.tete-auteur { margin-bottom: 1rem; }

.fiche-plume {
  align-items: flex-start;
  border-top: 1px solid var(--filet);
  padding: 1.4rem 0 0.4rem;
  margin-top: 1.4rem;
}

.fiche-plume h2 { margin: 0 0 0.2rem; }
.fiche-plume a { text-decoration: none; }
.fiche-plume h2 a:hover { color: var(--rouge); }

/* Sur mobile, le portrait prend toute la largeur du contenu, en carre :
   jamais plus large que l'ecran, jamais une vignette timbre-poste. */
@media (max-width: 36rem) {
  .fiche-plume, .tete-auteur { flex-direction: column; align-items: stretch; }
  .portrait-auteur { width: 100%; height: auto; aspect-ratio: 1 / 1; }
}

/* ---------- Pied ---------- */

footer.pied {
  border-top: 2.5px solid var(--encre);
  margin-top: 2rem;
}

footer.pied .interieur {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.6rem 1.25rem 2.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.4rem;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--encre-douce);
}

footer.pied a { color: var(--encre-douce); text-decoration: none; }
footer.pied a:hover { color: var(--rouge); }
footer.pied nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }

/* ---------- Gestion (admin utilitaire) ---------- */

.gestion { max-width: 72rem; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; font-size: 1rem; }
.gestion h1 { font-family: var(--titrage); font-weight: 900; font-size: 1.8rem; margin: 0.8rem 0 1.2rem; }
.gestion h2 { font-family: var(--titrage); font-weight: 600; font-size: 1.25rem; margin: 1.6rem 0 0.7rem; }

.gestion nav.onglets { display: flex; flex-wrap: wrap; gap: 0.3rem 1.4rem; border-bottom: 2.5px solid var(--encre); padding-bottom: 0.6rem; }
.gestion nav.onglets a { font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; }

.gestion table { border-collapse: collapse; width: 100%; font-size: 0.9rem; margin: 0.8rem 0 1.5rem; }
.gestion th { text-align: left; border-bottom: 2px solid var(--encre); padding: 0.4rem 0.6rem; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; }
.gestion td { border-bottom: 1px solid var(--filet); padding: 0.45rem 0.6rem; vertical-align: top; }

.gestion .pastille { display: inline-block; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.1rem 0.5rem; border: 1px solid currentColor; }
.pastille.publie { color: #22633a; }
.pastille.brouillon { color: #8a6d1a; }
.pastille.depublie, .pastille.echec, .pastille.expire, .pastille.annule { color: var(--rouge); }
.pastille.disponible, .pastille.en_attente { color: var(--encre-douce); }
.pastille.utilise, .pastille.place, .pastille.confirme { color: #22633a; }

.gestion form.en-ligne { display: inline; }

.gestion input[type="text"], .gestion input[type="email"], .gestion input[type="password"],
.gestion input[type="url"], .gestion input[type="date"], .gestion select, .gestion textarea {
  font-family: var(--labeur);
  font-size: 0.95rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--encre);
  background: #fff;
  width: 100%;
  max-width: 34rem;
}

.gestion textarea { min-height: 8rem; }
.gestion textarea.grand { min-height: 28rem; font-family: ui-monospace, monospace; font-size: 0.85rem; }

.gestion label { display: block; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0.9rem 0 0.25rem; }

.gestion button, .gestion .bouton {
  font-family: var(--labeur);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--encre);
  background: var(--encre);
  color: var(--papier);
  cursor: pointer;
}

.gestion button.discret { background: transparent; color: var(--encre); }
.gestion button.danger { background: var(--rouge); border-color: var(--rouge); }

.cartes-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem; margin: 1.2rem 0; }
.cartes-chiffres div { border: 1px solid var(--encre); padding: 0.8rem 1rem; }
.cartes-chiffres .chiffre { font-family: var(--titrage); font-weight: 900; font-size: 2rem; display: block; }
.cartes-chiffres .libelle { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--encre-douce); }

/* ---------- Responsive ---------- */

@media (max-width: 56rem) {
  .une { grid-template-columns: 1fr; gap: 1.2rem; }
  .grappes { grid-template-columns: 1fr; }
  .liste-articles li { grid-template-columns: 1fr; }
  .liste-articles li img { max-width: 16rem; }
}

/* ---------- Annuaire ---------- */

.bandeau-annuaire {
  border: 1px solid var(--filet);
  background: var(--papier-fonce);
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  color: var(--encre-douce);
  margin: 1.2rem 0;
}

.bloc-annuaire { margin: 2rem 0; }
.bloc-annuaire h2 { margin-bottom: 0.8rem; }
.bloc-annuaire h3 { margin: 1rem 0 0.3rem; }
.bloc-annuaire ul { padding-left: 1.2rem; }

.corps-annuaire p { margin: 0.8rem 0; max-width: var(--mesure); }
.bloc-annuaire > p { max-width: var(--mesure); }

.liste-villes {
  list-style: none;
  padding-left: 0 !important;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0.35rem 1.5rem;
}

.liste-villes .nb { color: var(--gris); font-size: 0.85rem; }

.liste-pros {
  list-style: none;
  padding-left: 0 !important;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1rem;
}

.carte-pro { border: 1px solid var(--filet); padding: 0.9rem 1.1rem; background: #fff; }
.carte-pro h3 { margin: 0 0 0.3rem; font-size: 1.05rem; }
.carte-pro-detail { color: var(--encre-douce); font-size: 0.9rem; }
.carte-pro-adresse { color: var(--gris); font-size: 0.85rem; }

.infos-fiche { list-style: none; padding-left: 0 !important; }
.infos-fiche li { margin: 0.35rem 0; }

.encart-source {
  border-left: 3px solid var(--filet);
  padding-left: 0.9rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--encre-douce);
}

.note-liste { font-size: 0.85rem; color: var(--encre-douce); margin-bottom: 0.8rem; }
.retour-annuaire { margin: 2rem 0 1rem; font-size: 0.9rem; }
.erreur-formulaire { color: var(--rouge); font-weight: 700; }

.formulaire-opposition input,
.formulaire-opposition textarea {
  font: inherit;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--encre);
  background: #fff;
  width: 100%;
  max-width: 28rem;
}

.formulaire-opposition p { margin: 0.9rem 0; }

.formulaire-opposition button {
  font-family: var(--labeur);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--encre);
  background: var(--encre);
  color: var(--papier);
  cursor: pointer;
}
