/* Demeures de Normandie : charte « chaux et ardoise ». */

@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 500 600; font-display: swap;
  src: url(polices/newsreader-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 500 600; font-display: swap;
  src: url(polices/newsreader-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(polices/public-sans-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(polices/public-sans-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Public Sans"; font-style: italic; font-weight: 400 700; font-display: swap;
  src: url(polices/public-sans-italique-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC; }

:root {
  --dn-chaux: #F4F1EA;
  --dn-lin: #E8E3D6;
  --dn-surface: #FBFAF6;
  --dn-ardoise: #36424A;
  --dn-ardoise-profonde: #2C363C;
  --dn-attenue: #5E6A70;
  --dn-brique: #A3452F;
  --dn-brique-fonce: #87381F;
  --dn-serif: "Newsreader", Georgia, serif;
  --dn-sans: "Public Sans", Arial, sans-serif;
  --dn-section: clamp(56px, 8vw, 96px);
  --dn-large: 1240px;
  --dn-etroit: 680px;
  --dn-marge: 1.5rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--dn-chaux);
  color: var(--dn-ardoise);
  font-family: var(--dn-sans);
  font-size: 17px;
  line-height: 1.65;
}
@media (min-width: 1025px) { body { font-size: 18px; } }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--dn-ardoise); }

h1, h2, h3, h4 {
  font-family: var(--dn-serif);
  font-weight: 500;
  color: var(--dn-ardoise-profonde);
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 1.5em 0 0.5em;
}
h1 { font-size: 34px; line-height: 1.08; }
h2 { font-size: 27px; line-height: 1.12; }
h3 { font-size: 22px; line-height: 1.2; }
h4 { font-size: 19px; line-height: 1.3; font-weight: 600; }
@media (min-width: 768px) { h1 { font-size: 44px; } h2 { font-size: 32px; } h3 { font-size: 24px; } h4 { font-size: 20px; } }
@media (min-width: 1025px) { h1 { font-size: 54px; } h2 { font-size: 36px; } h3 { font-size: 26px; } h4 { font-size: 21px; } }
p { margin: 0 0 1.2em; }

.dn-evite { position: absolute; left: -9999px; }
.dn-evite:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--dn-surface); padding: 0.5em 1em; }

.dn-cadre { max-width: var(--dn-large); margin-inline: auto; padding-inline: var(--dn-marge); }
.dn-etroit { max-width: calc(var(--dn-etroit) + 2 * var(--dn-marge)); margin-inline: auto; padding-inline: var(--dn-marge); }

.dn-lien,
.dn-texte a {
  color: var(--dn-ardoise);
  text-decoration: underline;
  text-decoration-color: var(--dn-brique);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 200ms ease-out, text-decoration-thickness 200ms ease-out;
}
.dn-lien:hover,
.dn-texte a:hover { color: var(--dn-brique); text-decoration-thickness: 2px; }

/* ---------- En-tête ---------- */
.dn-tete { background: var(--dn-chaux); }
.dn-tete__rang { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 84px; }
.dn-marque { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.dn-tuile {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 3px;
  background: var(--dn-brique); color: var(--dn-chaux);
  font-family: var(--dn-serif); font-weight: 500; font-size: 27px; line-height: 1;
  padding-top: 2px;
}
.dn-marque__nom { font-family: var(--dn-serif); font-weight: 600; font-size: 26px; line-height: 1.1; color: var(--dn-ardoise-profonde); }
.dn-menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.dn-menu a {
  display: block; padding: 0.6em 0.55em;
  font-weight: 500; font-size: 15px; line-height: 1.4;
  color: var(--dn-ardoise); text-decoration: none;
}
.dn-menu a:hover { color: var(--dn-brique); }
.dn-menu a[aria-current] { color: var(--dn-ardoise-profonde); text-decoration: underline; text-decoration-color: var(--dn-brique); text-underline-offset: 0.35em; }
.dn-tiroir { display: none; }
@media (max-width: 1024px) {
  .dn-menu { display: none; }
  .dn-tete__rang { min-height: 72px; }
  .dn-marque__nom { font-size: 20px; white-space: nowrap; }
  .dn-tuile { width: 30px; height: 30px; font-size: 23px; }
  .dn-tiroir { display: block; }
  .dn-tiroir summary { list-style: none; cursor: pointer; width: 40px; height: 40px; display: grid; align-content: center; gap: 4px; padding: 0 9px; }
  .dn-tiroir summary::-webkit-details-marker { display: none; }
  .dn-tiroir summary span { display: block; height: 1.5px; background: var(--dn-ardoise); transition: transform 200ms ease-out, opacity 200ms ease-out; }
  .dn-tiroir[open] summary span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
  .dn-tiroir[open] summary span:nth-child(2) { opacity: 0; }
  .dn-tiroir[open] summary span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
  .dn-tiroir nav { position: absolute; left: 0; right: 0; top: 72px; z-index: 5; background: var(--dn-surface); border-top: 1px solid var(--dn-lin); box-shadow: 0 12px 24px rgba(44, 54, 60, 0.08); }
  .dn-tiroir ul { list-style: none; margin: 0; padding: 0.5rem var(--dn-marge) 1rem; }
  .dn-tiroir a { display: block; padding: 0.75em 0; border-bottom: 1px solid var(--dn-lin); font-family: var(--dn-serif); font-size: 1.25rem; color: var(--dn-ardoise-profonde); text-decoration: none; }
  .dn-tete { position: relative; }
}

/* ---------- Accueil ---------- */
.dn-masthead { padding-top: clamp(40px, 6vw, 72px); padding-bottom: 8px; }
.dn-masthead__titre {
  font-size: clamp(2.8rem, 7.4vw, 6.6rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0;
}
.dn-masthead__devise { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--dn-attenue); margin: 0.9em 0 0; max-width: 44ch; }

.dn-dossier { padding-top: clamp(36px, 4.5vw, 56px); }
.dn-dossier__label { font-size: 0.95rem; font-weight: 600; color: var(--dn-brique); margin: 0 0 0.6em; }
.dn-dossier__titre { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.06; max-width: 30ch; margin: 0; }
.dn-dossier__titre a { color: inherit; text-decoration: none; }
.dn-dossier__titre a:hover { color: var(--dn-brique); }
.dn-dossier__intro { font-size: clamp(1.1rem, 1.5vw, 1.25rem); line-height: 1.55; max-width: 60ch; margin: 0.9em 0 0; }
.dn-dossier__photo { margin: clamp(28px, 4vw, 48px) 0 0; }
.dn-dossier__photo img { width: 100%; aspect-ratio: 21 / 10; object-fit: cover; }

figcaption { font-size: 0.85rem; line-height: 1.45; color: var(--dn-attenue); margin-top: 0.6em; }
figcaption a { color: var(--dn-attenue); text-decoration: underline; text-decoration-color: var(--dn-brique); text-underline-offset: 0.2em; }

.dn-sommaire { background: var(--dn-lin); padding: var(--dn-section) 0; margin-top: var(--dn-section); }
.dn-sommaire__tete { max-width: 40ch; margin: 0 0 clamp(28px, 4vw, 48px); }
.dn-sommaire__tete h2 { margin: 0 0 0.4em; }
.dn-sommaire__tete p { margin: 0; }
.dn-sommaire__liste {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(32px, 6vw, 96px); row-gap: clamp(28px, 3.5vw, 44px);
}
.dn-sommaire__liste a {
  font-family: var(--dn-serif); font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.1;
  color: var(--dn-ardoise-profonde); text-decoration: none; display: inline-block;
}
.dn-sommaire__liste a:hover { color: var(--dn-brique); }
.dn-sommaire__liste span { display: block; margin-top: 0.45em; color: var(--dn-attenue); max-width: 46ch; }

.dn-derniers { padding-top: var(--dn-section); }
.dn-derniers > h2 { margin: 0 0 0.8em; }
.dn-grille { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 3vw, 40px); }
.dn-grille--trois { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dn-carte__photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.dn-carte__rubrique {
  display: inline-block; margin-top: 1.1em; font-size: 0.8rem; color: var(--dn-ardoise);
  text-decoration: underline; text-decoration-color: var(--dn-brique); text-underline-offset: 0.25em;
}
.dn-carte__rubrique:hover { color: var(--dn-brique); }
.dn-carte h3, .dn-carte h2 { font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.15; margin: 0.45em 0 0.3em; max-width: 26ch; }
.dn-carte h3 a, .dn-carte h2 a { color: var(--dn-ardoise-profonde); text-decoration: none; }
.dn-carte h3 a:hover, .dn-carte h2 a:hover { color: var(--dn-brique); }

.dn-apropos { padding-top: var(--dn-section); padding-bottom: var(--dn-section); }
.dn-apropos p { font-family: var(--dn-serif); font-size: clamp(1.35rem, 2.2vw, 1.75rem); line-height: 1.4; max-width: 34ch; color: var(--dn-ardoise-profonde); margin: 0 0 1em; }
.dn-apropos .dn-lien { font-family: var(--dn-serif); font-size: 1.25rem; color: var(--dn-ardoise-profonde); }

/* ---------- Bandeau des pages et des rubriques ---------- */
.dn-bande { background: var(--dn-lin); text-align: center; padding: clamp(40px, 6vw, 72px) var(--dn-marge); }
.dn-bande h1 { margin: 0; }
.dn-bande__texte { max-width: 68ch; margin: 1.2em auto 0; font-size: 0.95rem; line-height: 1.7; }
.dn-bande__texte p { margin: 0 0 0.9em; }
.dn-bande__texte p:last-child { margin-bottom: 0; }
.dn-bande__texte a { color: var(--dn-brique); text-decoration: underline; text-underline-offset: 0.2em; }
.dn-page { padding-top: clamp(40px, 5vw, 60px); padding-bottom: var(--dn-section); }

/* ---------- Liste d'une rubrique ---------- */
.dn-liste { padding-top: clamp(40px, 5vw, 60px); padding-bottom: var(--dn-section); }
.dn-carte__surtitre { display: block; margin-top: 1.1em; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dn-brique); }
.dn-carte__date { font-size: 0.85rem; color: var(--dn-attenue); margin: 0.6em 0; }
.dn-carte__resume p { margin: 0 0 0.8em; }
.dn-carte__suite { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dn-ardoise-profonde); text-decoration: none; }
.dn-carte__suite:hover { color: var(--dn-brique); }

/* ---------- Article ---------- */
.dn-article__tete { padding-top: clamp(40px, 6vw, 72px); }
.dn-article__rubrique { font-weight: 600; font-size: 0.95rem; color: var(--dn-brique); text-decoration: none; }
.dn-article__tete h1 { margin: 0.35em 0 0.4em; }
.dn-article__date { font-size: 0.9rem; color: var(--dn-attenue); margin: 0 0 1em; }
.dn-article__chapo { font-size: 1.2rem; line-height: 1.55; color: var(--dn-attenue); max-width: 60ch; }
.dn-article__chapo p { margin: 0; }
.dn-une { width: min(1180px, calc(100vw - 3rem)); margin: 1.5em auto 0; }
.dn-une img { width: 100%; aspect-ratio: 21 / 10; object-fit: cover; }
.dn-une figcaption { max-width: var(--dn-etroit); margin-inline: auto; }
.dn-texte { padding-top: clamp(28px, 3vw, 40px); padding-bottom: var(--dn-section); }
.dn-texte p, .dn-texte li { text-wrap: pretty; }
.dn-texte h2 { margin-top: 1.8em; }
.dn-texte h3 { margin-top: 1.4em; }
.dn-texte > :first-child { margin-top: 0; }
.dn-texte ul, .dn-texte ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.dn-texte li { margin-bottom: 0.4em; }
.dn-texte figure { margin: 2em 0; }
.dn-texte table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.dn-texte th { text-align: left; font-weight: 600; background: var(--dn-lin); }
.dn-texte td, .dn-texte th { padding: 0.6em 0.8em; vertical-align: top; }
.dn-texte tbody tr:nth-child(even) { background: rgba(232, 227, 214, 0.45); }
.dn-texte figure:has(table) { overflow-x: auto; }
.dn-texte .dn-sources, .dn-texte .dn-maj { font-size: 0.92rem; color: var(--dn-attenue); }
.dn-texte .dn-sources a { color: var(--dn-attenue); }
.dn-texte p.dn-adresse { margin-top: -0.6em; font-size: 0.92rem; color: var(--dn-attenue); }
.dn-texte .dn-encadre { background: var(--dn-lin); padding: clamp(20px, 3vw, 32px); }
.dn-texte details { margin: 0 0 1.1em; }
.dn-texte summary { font-family: var(--dn-serif); font-size: 1.2rem; cursor: pointer; }

/* ---------- Pied de page ---------- */
.dn-pied { background: var(--dn-lin); color: var(--dn-ardoise); padding-top: clamp(40px, 5vw, 64px); }
.dn-pied__haut { display: grid; grid-template-columns: 2fr 3fr; gap: 30px; padding-bottom: 30px; }
.dn-pied__nom { font-family: var(--dn-serif); font-size: 1.5rem; line-height: 1.2; color: var(--dn-ardoise-profonde); margin: 0 0 0.3em; }
.dn-pied__devise { color: var(--dn-attenue); margin: 0; }
.dn-pied ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4em 1.4em; justify-content: flex-end; }
.dn-pied a { color: var(--dn-attenue); text-decoration: none; }
.dn-pied a:hover { color: var(--dn-brique); }
.dn-pied__bas { text-align: center; margin: 0; padding: 30px var(--dn-marge); font-size: 0.95rem; }

/* ---------- Mobile ---------- */
@media (max-width: 1024px) {
  .dn-grille--trois { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .dn-sommaire__liste, .dn-grille, .dn-grille--trois { grid-template-columns: 1fr; }
  .dn-dossier__photo img, .dn-une img { aspect-ratio: 4 / 3; }
  .dn-pied__haut { grid-template-columns: 1fr; }
  .dn-pied ul { justify-content: center; gap: 0.9em 1.8em; }
}

/* ---------- Apparition légère au défilement ---------- */
@keyframes dn-apparition { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .dn-carte, .dn-sommaire__liste li {
      animation: dn-apparition linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 35%;
    }
  }
}
