/* La Garde de Rannou · une page blanche, de vraies enluminures
   L'ornement vient des manuscrits eux-mêmes : la mise en page reste sobre.
   Mobile d'abord. Tous les espacements sont des multiples de 8 px. */

@font-face { font-family: "Cormorant Upright"; src: url("../assets/fonts/cormorant-upright-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Upright"; src: url("../assets/fonts/cormorant-upright-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Alegreya"; src: url("../assets/fonts/alegreya-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Alegreya"; src: url("../assets/fonts/alegreya-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Alegreya"; src: url("../assets/fonts/alegreya-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --blanc: #FFFFFF;
  --filet: #DAD6D2;
  --encre: #161313;
  --encre-douce: #514B4A;
  --rouge: #AE2223;
  --rouge-fonce: #7E1718;
  --rouge-clair: #EE6A62;
  --sur-noir: #F5F3F1;
  --sur-noir-doux: #C4BFBC;
  --filet-noir: #443E3E;

  --titre: "Cormorant Upright", "Alegreya", Georgia, serif;
  --texte: "Alegreya", Georgia, "Times New Roman", serif;

  --t-petit: 1rem;
  --t-corps: 1.1875rem;
  --t-20: 1.3125rem;
  --t-25: 1.625rem;
  --t-31: 2rem;
  --t-39: 2.5rem;
  --t-49: 3.125rem;

  --gouttiere: 16px;
  --section: 64px;
  --largeur: 1200px;
  --tete: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--tete) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--blanc); color: var(--encre); font-family: var(--texte); font-size: var(--t-corps); line-height: 1.5; overflow-wrap: break-word; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--rouge-fonce); text-underline-offset: 3px; }
a:hover { color: var(--rouge); }
:focus-visible { outline: 3px solid var(--rouge); outline-offset: 3px; }
.noir :focus-visible, .pied :focus-visible, .bandeau :focus-visible { outline-color: var(--blanc); }
h1, h2, h3 { font-family: var(--titre); font-weight: 700; line-height: 1.05; margin: 0; }
h2 { font-size: var(--t-49); }
h2 em { font-style: normal; color: var(--rouge); }
h3 { font-size: var(--t-31); }
sup { font-size: .55em; line-height: 0; }
p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }
ul { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
figcaption { margin-top: 8px; font-size: var(--t-petit); font-style: italic; line-height: 1.35; color: var(--encre-douce); }
.ecart-2 { margin-top: 16px; }
.ecart-3 { margin-top: 24px; }
.ecart-4 { margin-top: 32px; }

.saut { position: absolute; left: 16px; top: -64px; z-index: 30; padding: 8px 16px; background: var(--encre); color: var(--blanc); }
.saut:focus { top: 8px; color: var(--blanc); }
.cadre { width: 100%; max-width: var(--largeur); margin-inline: auto; padding-inline: var(--gouttiere); }
.section { padding-block: var(--section); }

/* Boutons */
.bouton { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px 24px; background: var(--rouge); color: var(--blanc); border: 2px solid var(--rouge); font-family: var(--texte); font-size: var(--t-20); font-weight: 700; line-height: 1.1; text-decoration: none; transition: background-color .15s, border-color .15s; }
.bouton:hover { background: var(--rouge-fonce); border-color: var(--rouge-fonce); color: var(--blanc); }
.lien-suite { display: inline-flex; align-items: center; min-height: 48px; font-weight: 700; }

/* En-tête */
.tete { position: sticky; top: 0; z-index: 20; background: var(--blanc); border-bottom: 1px solid var(--filet); }
.tete .cadre { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--tete); }
.marque { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; color: var(--encre); font-family: var(--titre); font-size: var(--t-25); font-weight: 700; line-height: 1; text-decoration: none; }
.marque:hover { color: var(--encre); }
.marque img { width: 48px; height: 48px; border-radius: 50%; }
.menu-bouton { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 48px; padding: 0 8px; background: none; border: 1px solid var(--encre); color: var(--encre); font-family: var(--texte); font-size: var(--t-petit); cursor: pointer; }
.nav { display: none; position: absolute; left: 0; right: 0; top: 100%; padding: 8px var(--gouttiere) 24px; background: var(--blanc); border-bottom: 1px solid var(--filet); }
.nav.ouvert { display: block; }
.nav a { display: flex; align-items: center; min-height: 48px; color: var(--encre); font-size: var(--t-20); text-decoration: none; border-bottom: 1px solid var(--filet); }
.nav a.bouton { justify-content: center; margin-top: 16px; color: var(--blanc); border-bottom: 2px solid var(--rouge); }

/* Bandes d'entrelacs */
.entrelacs { height: 36px; background: url("../assets/ornaments/entrelacs.svg") center / auto 100% repeat-x; }
.entrelacs-noir { height: 36px; background: var(--encre) url("../assets/ornaments/entrelacs-noir.svg") center / auto 100% repeat-x; }

/* Rubrique : une moucheture d'hermine relevée sur la miniature du duc de Bretagne */
.rubrique { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--rouge); font-size: var(--t-20); font-weight: 700; line-height: 1.2; }
.rubrique::before { content: ""; flex: none; width: 20px; height: 32px; background: url("../assets/img/hermine.png") center / contain no-repeat; }
.noir .rubrique { color: var(--rouge-clair); }
.noir .rubrique::before, .bandeau .rubrique::before { background-image: url("../assets/img/hermine-blanche.png"); }
.bandeau .rubrique { color: var(--blanc); }
.entete-section { max-width: 760px; margin-bottom: 40px; }
.entete-section > p:not(.rubrique) { margin-top: 16px; font-size: var(--t-20); line-height: 1.4; }

/* Lettrine sur fond de mosaïque */
.lettrine::first-letter { float: left; margin: 6px 16px 0 0; padding: 12px 14px 14px; background: var(--rouge) url("../assets/ornaments/mosaique.svg"); border: 1px solid var(--encre); color: var(--blanc); font-family: var(--titre); font-size: 4.25rem; font-weight: 700; line-height: .8; }
.noir .lettrine::first-letter { border-color: var(--sur-noir-doux); }

/* Miniature : l'image seule, un simple filet */
.miniature { border: 1px solid var(--encre); }
.noir .miniature { border-color: var(--filet-noir); }

/* Hero : le texte, puis le duc en hermine */
.hero { padding-block: 32px 40px; overflow: hidden; }
.hero-grille { display: grid; gap: 32px; }
.hero-logo { width: 216px; margin-bottom: 24px; }
.hero h1 { font-size: var(--t-49); line-height: 1; }
.hero h1 em { display: block; font-style: normal; color: var(--rouge); }
.hero .chapo { margin-top: 16px; font-size: var(--t-20); line-height: 1.4; }
.hero .essai { font-weight: 700; color: var(--rouge-fonce); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin-top: 24px; }
.hero-duc { max-width: 440px; }
.hero-duc img { width: 100%; -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent), linear-gradient(to right, #000 82%, transparent); -webkit-mask-composite: source-in; mask-image: linear-gradient(to bottom, #000 72%, transparent), linear-gradient(to right, #000 82%, transparent); mask-composite: intersect; }

/* Les AMHE */
.amhe-grille { display: grid; gap: 40px; }
.quatre { display: grid; gap: 16px; margin: 32px 0 0; }
.quatre div { padding-top: 16px; border-top: 1px solid var(--encre); }
.quatre dt { font-family: var(--titre); font-size: var(--t-31); font-weight: 700; line-height: 1.1; color: var(--rouge); }
.quatre dd { margin: 4px 0 0; }
.page-ancienne { max-width: 440px; }

/* Le légendaire, sur page noire */
.noir { background: var(--encre); color: var(--sur-noir); padding-block: var(--section); }
.noir h2 em { color: var(--rouge-clair); }
.noir h3 { color: var(--blanc); }
.noir figcaption { color: var(--sur-noir-doux); }
.noir a { color: var(--sur-noir); }
.noir a:hover { color: var(--rouge-clair); }
.rannou { display: grid; gap: 40px; }
.rannou-gauche { display: grid; gap: 32px; }
.blason { max-width: 300px; }
.blason img { width: 100%; }
.blason-legende { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; font-style: normal; }
.blason-legende b { display: block; font-family: var(--titre); font-size: var(--t-25); line-height: 1.1; color: var(--blanc); }
.recit-long h3 { font-size: var(--t-39); margin-bottom: 16px; }
.recit-long p { font-size: var(--t-20); line-height: 1.45; }
.recit-long .chute { margin-top: 24px; padding-left: 16px; border-left: 2px solid var(--rouge-clair); font-style: italic; color: var(--blanc); }
.recits { display: grid; gap: 48px; margin-top: 56px; padding-top: 48px; border-top: 1px solid var(--filet-noir); }
.recit figure { margin-bottom: 16px; }
.recit figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.recit h3 { margin-bottom: 4px; }
.recit .ou { display: block; margin-bottom: 8px; color: var(--rouge-clair); font-size: var(--t-petit); font-weight: 700; }
.recit .morale { font-style: italic; color: var(--sur-noir-doux); }
.encore { margin-top: 56px; }
.encore h3 { margin-bottom: 16px; }
.encore ul { display: grid; gap: 16px; }
.encore li { padding-top: 16px; border-top: 1px solid var(--filet-noir); }
.source { margin-top: 32px; font-size: var(--t-petit); color: var(--sur-noir-doux); }

/* Les armes */
.arme { display: grid; gap: 24px; }
.arme + .arme { margin-top: 56px; }
.arme h3 { font-size: var(--t-49); margin-bottom: 8px; }
.arme .quand { margin-bottom: 16px; color: var(--rouge); font-weight: 700; }
.geste { margin-block: 56px; }
.geste img { width: 100%; }
.arme-mineure { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--encre); }
.arme-mineure h3 { margin-bottom: 8px; }

/* Le club */
.club { border-top: 1px solid var(--filet); }
.club-grille { display: grid; gap: 40px; }
.citation { margin: 32px 0 0; padding-left: 16px; border-left: 2px solid var(--rouge); font-size: var(--t-25); font-style: italic; line-height: 1.3; }
.citation footer { margin-top: 8px; font-size: var(--t-petit); font-style: normal; color: var(--encre-douce); }
.principes { display: grid; gap: 24px; margin-top: 40px; }
.principes h3 { font-size: var(--t-25); margin-bottom: 4px; }

/* Les annales */
.annales { border-top: 1px solid var(--filet); }
.annales-grille { display: grid; gap: 40px; }
.annale { display: grid; gap: 8px; padding-block: 24px; border-top: 1px solid var(--encre); }
.annale-date { color: var(--rouge); font-size: var(--t-20); font-weight: 700; line-height: 1.2; }
.annale h3 { margin-bottom: 8px; }
.heritier { margin-block: 16px; padding-left: 16px; border-left: 2px solid var(--rouge); }
.heritier b { display: block; font-family: var(--titre); font-size: var(--t-31); line-height: 1.1; margin-bottom: 4px; }
.regle { list-style: disc; padding-left: 24px; }
.regle li::marker { color: var(--rouge); }
.annales-photos { display: grid; gap: 24px; align-content: start; max-width: 360px; }

/* Nous rejoindre */
.bandeau { position: relative; background: var(--rouge); color: var(--blanc); padding-block: calc(var(--section) + 40px); }
.bandeau::before, .bandeau::after { content: ""; position: absolute; left: 0; right: 0; height: 40px; background: url("../assets/ornaments/mosaique.svg"); border-block: 1px solid var(--encre); }
.bandeau::before { top: 0; }
.bandeau::after { bottom: 0; }
.bandeau h2 { color: var(--blanc); }
.bandeau .entete-section p { color: var(--blanc); }
.essai-grand { display: block; margin-top: 8px; font-family: var(--titre); font-size: var(--t-31); font-weight: 700; line-height: 1.1; color: var(--blanc); }
.rejoindre-grille { display: grid; gap: 24px; }
.feuillet { padding: 24px 16px; background: var(--blanc); color: var(--encre); }
.feuillet h3 { margin-bottom: 16px; }
.creneaux { width: 100%; border-collapse: collapse; }
.creneaux th, .creneaux td { padding: 8px 8px 8px 0; text-align: left; vertical-align: top; border-top: 1px solid var(--filet); }
.creneaux th { font-size: var(--t-20); font-weight: 700; line-height: 1.3; color: var(--rouge); white-space: nowrap; }
.note { margin-top: 16px; font-size: var(--t-petit); font-style: italic; color: var(--encre-douce); }
.faits { display: grid; gap: 8px; }
.feuillet .bouton { margin-top: 24px; width: 100%; }

/* Questions */
.questions { max-width: 800px; margin-inline: auto; }
.questions details { border-top: 1px solid var(--encre); }
.questions details:last-child { border-bottom: 1px solid var(--encre); }
.questions summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding-block: 12px; font-size: var(--t-20); font-weight: 700; line-height: 1.2; cursor: pointer; list-style: none; }
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after { content: "+"; flex: none; color: var(--rouge); font-size: var(--t-31); line-height: 1; }
.questions details[open] summary::after { content: "−"; }
.questions details p { padding-bottom: 16px; }

/* Pied */
.pied { padding-block: 56px 32px; background: var(--encre); color: var(--sur-noir); font-size: var(--t-petit); }
.pied a { color: var(--sur-noir); }
.pied a:hover { color: var(--rouge-clair); }
.pied-grille { display: grid; gap: 32px; }
.pied-marque { display: flex; align-items: center; gap: 16px; }
.pied-marque img { width: 112px; height: 112px; flex: none; border-radius: 50%; }
.pied-marque b { font-family: var(--titre); font-size: var(--t-31); line-height: 1.05; color: var(--blanc); }
.pied h2 { margin-bottom: 8px; font-family: var(--texte); font-size: var(--t-20); color: var(--blanc); }
.pied li a { display: inline-flex; align-items: center; min-height: 32px; }
.pied-bas { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--filet-noir); color: var(--sur-noir-doux); }

/* Page simple */
.texte { max-width: 760px; }
.texte h1 { font-size: var(--t-49); margin-bottom: 24px; }
.texte h2 { font-size: var(--t-31); margin: 32px 0 8px; }

@media (min-width: 768px) {
  :root { --gouttiere: 32px; --section: 88px; --t-49: 3.75rem; }
  .hero-logo { width: 264px; }
  .quatre { grid-template-columns: 1fr 1fr; gap: 24px 32px; }
  .recits { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .encore ul { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .principes { grid-template-columns: repeat(3, 1fr); }
  .rejoindre-grille { grid-template-columns: 3fr 2fr; }
  .feuillet { padding: 32px; }
  .annale { grid-template-columns: 136px 1fr; gap: 24px; }
  .pied-grille { grid-template-columns: 2fr 1fr 1fr; }
}

@media (min-width: 1024px) {
  :root { --section: 112px; --t-49: 4.25rem; }
  .menu-bouton { display: none; }
  .nav, .nav.ouvert { display: flex; position: static; align-items: center; gap: 24px; padding: 0; border: 0; background: none; }
  .nav a { min-height: 48px; font-size: var(--t-petit); border: 0; }
  .nav a:hover { color: var(--rouge); }
  .nav a.bouton { margin: 0; padding-inline: 16px; font-size: var(--t-petit); color: var(--blanc); border: 2px solid var(--rouge); }
  .nav a.bouton:hover { color: var(--blanc); }
  .hero { padding-block: 40px 64px; }
  .hero h1 { font-size: 3.25rem; }
  .hero-grille { grid-template-columns: 5fr 6fr; gap: 56px; align-items: center; }
  .hero-duc { order: -1; max-width: none; margin: 0; }
  .amhe-grille { grid-template-columns: 7fr 4fr; gap: 72px; align-items: start; }
  .rannou { grid-template-columns: 4fr 7fr; gap: 72px; align-items: start; }
  .arme { grid-template-columns: 7fr 5fr; gap: 56px; align-items: center; }
  .arme.inverse { grid-template-columns: 5fr 7fr; }
  .arme.inverse figure { order: 2; }
  .club-grille { grid-template-columns: 7fr 5fr; gap: 56px; align-items: start; }
  .annales-grille { grid-template-columns: 8fr 3fr; gap: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bouton { transition: none; }
}
