/* Paul Vincent — une feuille CSS, aucune dépendance. */
:root {
  --ink: #201d26;
  --muted: #4D367A;
  --line: #e8e8eb;
  --tint: #f6f5f7;
  --blue: #4e377a;
  --violet: #150a28;
  --radius: 10px;
}
* { box-sizing: border-box; }

html {scroll-behavior: smooth;}

body { margin: 0; color: var(--ink); background: #fff; font-family: Arial, Helvetica, sans-serif; font-size: 17px; line-height: 1.65; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 5px; }
a:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid #246b85; outline-offset: 5px; }
img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
h1, h2, h3, p, figure, blockquote { margin: 0; }
h1 { font-size: clamp(2.2rem, 4.5vw, 4.5rem); font-weight: 500; line-height: 1.1; letter-spacing: -.035em; }
h2 { font-size: clamp(1.4rem, 2.15vw, 1.85rem); font-weight: 500; line-height: 1.2; letter-spacing: -.025em; margin-bottom: 24px; }
h3 { font-size: 1rem; font-weight: 500; line-height: 1.45; }
p + p { margin-top: 16px; }

.container { width: min(1300px, calc(100% - 48px)); margin-inline: auto; }
.section { padding-block: 64px; }
.section-rule { border-top: 1px solid var(--line); }
.section-tint { background: var(--tint); }
.reading { max-width: 90%; }
.half {max-width: 66%;}
.muted, .unavailable { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 20px; top: -100px; z-index: 10; background: white; padding: 12px; }
.skip-link:focus { top: 12px; }
/* Navigation native : details / summary pour les deux menus. */
.site-header { min-height: 104px; display: flex; align-items: center; justify-content: space-between; gap: 24px; position: relative; z-index: 5; }
.wordmark { font-size: 19px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.desktop-nav { display: flex; align-items: center; gap: 28px; font-size: 14px; }
.desktop-nav > a, .themes-list a { text-decoration: none; }
[aria-current="page"] { text-decoration: underline !important; text-decoration-color: var(--blue) !important; text-decoration-thickness: 2px !important; }
summary { cursor: pointer; }
.themes-menu { position: relative; }
.themes-menu > summary { list-style: none; position: relative; padding-right: 15px;}
.themes-menu > summary::-webkit-details-marker { display: none; }
.themes-menu > summary::after { content: '⌄';  position: absolute; top: 1px; right: 0;   line-height: 1; font-weight: bold;}
.themes-list { position: absolute; top: calc(100% + 18px); right: 0; width: 270px; background: var(--violet); color: white; padding: 16px 20px; border-radius: var(--radius); }
.themes-list a { display: block; padding-block: 8px; }
.themes-list a:hover { display: block; padding-block: 8px; text-decoration: underline; }
.mobile-menu { display: none; }
/* Les dimensions sont réservées : pas de saut au chargement. */
.hero { position: relative; isolation: isolate; border-radius: var(--radius); overflow: hidden; }
.hero > img { height: clamp(340px, 40vw, 540px); object-fit: cover; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(0 0 0 / .58), rgb(0 0 0 / .1)); z-index: 1; pointer-events: none; }
.hero-copy { position: absolute; left: 5%; right: 5%; bottom: 12%; color: white; z-index: 2; } 
.hero-copy p { margin-top: 18px; font-size: clamp(1rem, 1.7vw, 1.3rem); line-height: 1.45; }
.hero-copy p.small {font-size: 15px;}
/* Accueil */
.theme-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 10px; }
.theme-card { min-width: 0; text-decoration: none; }
.theme-card img { aspect-ratio: 8 / 5; object-fit: cover; opacity: 1; transition: opacity 0.3s linear;}
.theme-card:hover img { aspect-ratio: 8 / 5; object-fit: cover; opacity: 0.8;}
.theme-card h3 { margin-top: 10px; }
.mobile-hint { display: none; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); padding-block: 40px; text-align: center; }
.stats > div + div { border-left: 1px solid var(--line); }
.stats strong { display: block; font-size: 3rem; line-height: 1.2; font-weight: 400; }
.stats p { font-size: .875rem; margin-top: 8px; }
.promos { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.promo { text-decoration: none; }
.promo img { aspect-ratio: 2 / 1; object-fit: cover; opacity: 1; transition: opacity 0.2s linear; }
.promo:hover img {opacity: 0.8;}
.promo h2 { margin-block: 18px 12px; }
.text-link { text-decoration: underline; text-decoration-color: var(--blue); }
/* Médiathèque : code indépendant du titre, même sur plusieurs lignes. */
.library-index { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.library-index a { text-decoration: none; }
.library-index span, .section-number { color: var(--blue); margin-right: 12px; }
.library-section { scroll-margin-top: 24px; }
.resource-list, .plain-list, .footer-links { padding: 0; margin: 0; list-style: none; }
.resource-list a {text-decoration: none;}
.resource-list li + li, .plain-list li + li { border-top: 1px solid var(--line); }
.resource-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; align-items: start; gap: 20px; padding-block: 18px; padding-inline: 10px; text-decoration: none; background-color: transparent; transition: background-color 0.2s ease-in-out; text-transform: uppercase;}
.resource-row:hover {background-color: rgba(19, 8, 39, 0.05);}
.resource-row > span:nth-child(2) { overflow-wrap: anywhere; font-size: 14px; font-weight: bold;}
.resource-code { color: var(--muted); font-variant-numeric: tabular-nums; }
.media-tag { font-size: .55rem; font-weight: bold; letter-spacing: .05em; border: 1px solid var(--line); padding: 2px 6px; white-space: nowrap; background-color: white;}
/* Thèmes et parcours */
.quote { margin-top: 36px; padding: 24px 28px; border-left: 3px solid var(--blue); background: #f1f6f8; border-radius: var(--radius); color: var(--violet); font-size: clamp(1.1rem, 1.8vw, 1.45rem); line-height: 1.5; }
.section > .quote:first-child { margin-top: 0; }
.gallery figure { margin-bottom: 40px; }
.gallery img { aspect-ratio: 16 / 9; object-fit: contain; background: var(--tint); }
figcaption { color: var(--muted); font-size: .8rem; margin-top: 10px; }
.image-placeholder { aspect-ratio: 16 / 9; display: grid; place-items: center; border-radius: var(--radius); background: var(--tint); color: var(--muted); font-size: .9rem; }
.image-placeholder.panorama { aspect-ratio: 3 / 1; }
.theme-pagination { display: flex; justify-content: space-between; gap: 32px; padding-block: 28px 48px; border-top: 1px solid var(--line); font-size: .9rem; }
.theme-pagination a { max-width: 48%; text-decoration: none; }
.theme-pagination a:last-child { text-align: right; }
.cv-links { display: flex; flex-wrap: wrap; gap: 16px; margin-block: 28px 48px; }
.button { display: inline-block; border: 1px solid var(--line); border-radius: 4px; padding: 10px 20px; font-size: .9rem; text-decoration: none; }
.biography h2 { margin-top: 32px; margin-bottom: 12px; }
.plain-list li { padding-block: 20px; }
.plain-list p { color: var(--muted); font-size: .9rem; margin-top: 6px; }

.books {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding-block: 48px;
  margin: 0;
  width: 100%;
  max-width: 800px;
}

.book {
  display: block;
  text-align: center;
  text-decoration: none;
}

.book img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.book h2 {
  margin: 16px 0 8px;
  font-size: 1.25rem;
  font-weight: 500;
}

.book p {
  margin: 0;
  color: var(--muted, #65616b);
  font-size: 0.9rem;
}

.book:hover {
  text-decoration: none;
}

.book:hover h2 {
  text-decoration: underline;
  text-underline-offset: 5px;
}

@media (max-width: 640px) {
  .books {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}


/* Footer commun */
.site-footer { background: var(--violet); color: white; }
.footer-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; padding-block: 80px; }
.footer-links { text-align: right; }
.footer-links a { text-decoration: none; }
.site-footer a:focus-visible { outline-color: white; }
.footer-credit { background: #10071f; padding-block: 18px; font-size: .75rem; }
.footer-credit a { font-weight: 700; text-decoration: none; }
@media (max-width: 1050px) {
  .desktop-nav { display: none; }
  .mobile-menu { display: block; }
  .mobile-menu > summary { list-style: none; padding: 12px; }
  .mobile-menu > summary::-webkit-details-marker { display: none; }
  .burger { display: block; width: 23px; height: 16px; border-top: 2px solid; border-bottom: 2px solid; position: relative; }
  .burger::after { content: ''; position: absolute; top: 5px; width: 100%; border-top: 2px solid; }
  .mobile-menu > nav { position: absolute; top: 100%; left: 0; right: 0; background: white; padding: 16px 24px 24px; border-bottom: 1px solid var(--line); }
  .mobile-menu nav > a, .mobile-menu nav > span, .mobile-menu nav > details { display: block; padding-block: 10px; }
  .mobile-menu a { text-decoration: none; }
  .mobile-menu .themes-list { position: static; width: auto; margin-top: 12px; background: var(--tint); color: var(--ink); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { width: calc(100% - 32px); }
  .site-header { min-height: 80px; gap: 10px; }
  .wordmark { font-size: 15px; letter-spacing: .24em; }
  .section { padding-block: 40px; }
  .hero > img { height: 380px; }
  .hero-copy { left: 24px; right: 24px; bottom: 32px; }
  h1 { font-size: 2.25rem; }
  h2 { margin-bottom: 20px; }
  .mobile-hint { display: block; margin: -6px 0 18px; color: var(--muted); font-size: .8rem; }
  .theme-grid { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 16px; }
  .theme-card { flex: 0 0 75%; scroll-snap-align: start; }
  .theme-card h3 { font-size: .95rem; }
  .stats { padding-block: 28px; }
  .stats strong { font-size: 2.25rem; }
  .stats p { padding-inline: 6px; font-size: .75rem; }
  .promos { grid-template-columns: 1fr; gap: 36px; }
  .library-index { grid-template-columns: 1fr; gap: 0; }
  .library-index a { padding-block: 12px; border-bottom: 1px solid var(--line); }
  .resource-row { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 10px; padding-block: 16px; }
  .resource-code { font-size: .85rem; }
  .media-tag { font-size: .6rem; padding: 3px 4px; }
  .quote { padding: 20px; }
  .cv-links { display: grid; }
  .theme-pagination { font-size: .8rem; gap: 20px; }
  .footer-main { flex-direction: column; padding-block: 64px; gap: 32px; }
  .footer-links { align-self: flex-end; }
}
