/* =========================================================
   alleslogesch.lu – style « carnet d'enseignant »
   Polices : uniquement celles installées sur l'appareil
   (aucune police téléchargée → aucun service externe).
   ========================================================= */
:root {
  /* Palette claire : papier lumineux, encre gris-bleu douce, accent bleu ciel (Luxembourg) */
  --paper: #fefcf8;
  --paper-2: #f3f0e8;
  --ink: #3a4048;
  --muted: #747a83;
  --line: #e8e3d8;
  --line-strong: #c9cfd6;
  --red: #2b86c2;          /* accent principal (anciennement rouge) */
  --red-dark: #1f6c9f;
  --blue: #2a7fa8;          /* liens */
  --warm: #e2954a;          /* touche chaude : annotations manuscrites */
  --marker: #fdeaa0;
  --photo: #ffffff;

  /* noms utilisés aussi par admin.html */
  --bg: var(--paper);
  --surface: #ffffff;
  --text: var(--ink);
  --border: var(--line);
  --accent: var(--red);
  --accent-2: var(--blue);
  --accent-soft: #e6f2fa;
  --focus: var(--red);
  --radius: 6px;
  --shadow: none;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --hand: "Bradley Hand", "Segoe Print", Noteworthy, "Chalkboard SE", "Comic Neue", cursive;

  --t-video: #d77a3c;
  --t-site: #2b86c2;
  --t-fiche: #4f9a5c;
  --t-presentation: #b0812a;
  --t-tutoriel: #7a68b8;
  --t-article: #3f8f8a;
  --t-lien: var(--muted);
  color-scheme: light;
}


/* ===== Mode sombre (bouton en haut à droite) : bleu nuit doux, jamais noir ===== */
:root[data-theme="dark"] {
  --paper: #1f2732;
  --paper-2: #28323f;
  --ink: #e4e8ee;
  --muted: #a1abb8;
  --line: #36424f;
  --line-strong: #4a5868;
  --red: #62b2e6;
  --red-dark: #8cc8ef;
  --blue: #7cc0ea;
  --warm: #f2b072;
  --marker: rgba(253, 234, 160, .28);
  --photo: #2e3846;
  --surface: #26303c;
  --accent-soft: #23384a;
  --t-video: #f0a066;
  --t-site: #62b2e6;
  --t-fiche: #84c98e;
  --t-presentation: #e0b45c;
  --t-tutoriel: #b2a4ec;
  --t-article: #7cc9c2;
  color-scheme: dark;
}
:root[data-theme="dark"] .btn-primary { color: #10202e; }
:root[data-theme="dark"] .thumb img { filter: brightness(.92); }

/* bouton mode sombre */
.theme-toggle { border: 0; background: none; cursor: pointer; padding: 4px; margin-left: 2px; color: var(--muted); display: inline-grid; place-items: center; border-radius: 50%; }
.theme-toggle:hover { color: var(--ink); background: var(--paper-2); }
.theme-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ===== Base ===== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  background: var(--paper);
  color: var(--ink);
}
a { color: var(--blue); text-underline-offset: 3px; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
mark { background: linear-gradient(transparent 45%, var(--marker) 45%); color: inherit; padding: 0 1px; }

/* ===== En-tête ===== */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner { padding-top: 22px; padding-bottom: 16px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 24px; }
.logo { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 1.65rem; text-decoration: none; color: var(--ink); letter-spacing: -.01em; }
.logo span { color: var(--red); }
.tagline { margin: 0; color: var(--muted); font-size: .95rem; font-style: italic; flex: 1 1 260px; min-width: 0; }
.main-nav { margin-left: auto; display: flex; align-items: center; gap: 4px 20px; flex-wrap: wrap; font-family: var(--sans); font-size: .92rem; flex: none; }
.main-nav > a { color: var(--muted); text-decoration: none; }
.main-nav > a:hover { color: var(--ink); text-decoration: underline; }
.main-nav > a[aria-current="page"] { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.lang-switch { display: inline-flex; gap: 2px; color: var(--line); }
.lang-switch button { border: 0; background: none; padding: 2px 4px; font-size: .85rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.lang-switch button + button::before { content: "/"; color: var(--line); margin-right: 6px; font-weight: 400; }
.lang-switch button[aria-pressed="true"] { color: var(--red); }

/* ===== Introduction ===== */
.intro { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; margin: 40px 0 8px; }
.intro h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); line-height: 1.05; margin: 0 0 12px; font-weight: 600; color: var(--red-dark); letter-spacing: -.02em; }
.intro p { margin: 0; font-size: 1.15rem; max-width: 60ch; }
.intro .sign { font-family: var(--hand); color: var(--warm); font-size: 1.5rem; margin-top: 10px; transform: rotate(-2deg); transform-origin: left; display: inline-block; }
.intro-photo { margin: 0; width: 150px; background: var(--photo); padding: 7px 7px 22px; box-shadow: 0 1px 4px rgba(0,0,0,.15); transform: rotate(2.5deg); position: relative; }
.intro-photo img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.intro-photo::before { content: ""; position: absolute; top: -10px; left: 50%; width: 64px; height: 20px; transform: translateX(-50%) rotate(-3deg);
  background: rgba(240, 225, 170, .75); box-shadow: 0 1px 1px rgba(0,0,0,.06); }

/* ===== Recherche ===== */
.search-bar { display: flex; gap: 12px; align-items: flex-end; margin: 34px 0 18px; }
.search-field { position: relative; flex: 1; }
.search-field svg { position: absolute; left: 2px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%);
  fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
#q { width: 100%; padding: 10px 8px 10px 32px; font-size: 1.2rem; font-family: var(--serif);
  border: 0; border-bottom: 2px solid var(--line-strong); border-radius: 0; background: transparent; -webkit-appearance: none; }
#q::placeholder { color: var(--muted); font-style: italic; }
#q:focus { outline: none; border-bottom-color: var(--red); }
.note-search { position: absolute; right: 0; top: -26px; font-family: var(--hand); color: var(--warm); font-size: 1.1rem; transform: rotate(-3deg); pointer-events: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--radius); border: 1.5px solid var(--line-strong);
  background: transparent; cursor: pointer; text-decoration: none; color: var(--ink);
  font-family: var(--sans); font-weight: 600; font-size: .92rem;
}
.btn:hover { background: var(--paper-2); }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-filters { display: none; }
.badge { background: var(--red); color: #fff; border-radius: 999px; font-size: .72rem; padding: 0 6px; }
.link { background: none; border: 0; color: var(--blue); cursor: pointer; padding: 0; font-family: var(--sans); font-size: .85rem; text-decoration: underline; }
.close { background: none; border: 0; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 4px 8px; }

/* ===== Rubriques (comme un sommaire) ===== */
.rubs { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0 0 36px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tile { border: 0; background: none; cursor: pointer; padding: 3px 8px; font-family: var(--serif); font-size: 1.02rem; color: var(--ink); border-radius: 2px; }
.tile:hover span { text-decoration: underline; text-decoration-color: var(--red); }
.tile .n { font-family: var(--sans); font-size: .7rem; color: var(--muted); margin-left: 2px; }
.tile.active { background: linear-gradient(transparent 35%, var(--marker) 35%, var(--marker) 90%, transparent 90%); font-weight: 700; }

/* ===== Mise en page ===== */
.layout { display: grid; grid-template-columns: 210px 1fr; gap: 40px; align-items: start; padding-bottom: 56px; }

/* ===== Filtres ===== */
.filters { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; font-family: var(--sans); font-size: .9rem; }
.filters-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.filters-head h2 { font-family: var(--serif); font-size: 1.1rem; margin: 0; flex: 1; }
.filters-head .close, .filters .apply { display: none; }
.f-group { border: 0; padding: 12px 0 8px; margin: 0; min-width: 0; border-top: 1px dashed var(--line); }
.f-group legend { float: left; width: 100%; padding: 0; margin: 0 0 6px; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.f-group legend + * { clear: left; }
.f-opt { display: flex; align-items: center; gap: 8px; padding: 3px 0; cursor: pointer; }
.f-opt input { width: 16px; height: 16px; accent-color: var(--red); margin: 0; flex: none; }
.f-opt span:not(.n) { min-width: 0; overflow-wrap: anywhere; }
.f-opt .n { margin-left: auto; color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.f-opt.off { opacity: .4; }

/* ===== Résultats ===== */
.results-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; font-family: var(--sans); font-size: .9rem; }
#count { margin: 0; color: var(--muted); font-style: italic; font-family: var(--serif); font-size: 1rem; }
.sort { color: var(--muted); display: flex; gap: 8px; align-items: center; }
.sort select { padding: 4px 6px; border: 0; border-bottom: 1px solid var(--muted); background: transparent; border-radius: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 0 4px; border: 0; cursor: pointer; font-size: .92rem;
  background: linear-gradient(transparent 40%, var(--marker) 40%); }
.chip span { color: var(--red); font-family: var(--sans); padding: 0 2px; }

/* liste des ressources */
.grid { list-style: none; margin: 0; padding: 0; }
.card {
  width: 100%; display: grid; grid-template-columns: 176px 1fr; gap: 20px; align-items: start; text-align: left;
  cursor: pointer; background: none; border: 0; border-bottom: 1px dashed var(--line); padding: 20px 0; color: var(--ink);
}
.card:hover h3 { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.card:hover .thumb img { filter: none; }
.thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-2); border: 1px solid var(--line); }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.9); }
.thumb .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--tc); opacity: .75;
  background-image: repeating-linear-gradient(var(--paper-2) 0 15px, var(--line) 15px 16px); }
.thumb .ph svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.thumb.has-img .ph { display: none; }
.play-mini { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 38px; height: 38px; border-radius: 50%;
  background: rgba(0,0,0,.55); display: none; place-items: center; }
.thumb.has-img .play-mini { display: grid; }
.play-mini svg { width: 15px; height: 15px; fill: #fff; margin-left: 2px; }
.card-body { min-width: 0; }
.meta-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-family: var(--sans); font-size: .76rem; color: var(--muted); margin-bottom: 4px; }
.meta-top .kind { color: var(--tc); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.stamp { display: inline-block; font-family: var(--sans); font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  color: var(--blue); border: 1.5px solid var(--blue); border-radius: 3px; padding: 0 5px; transform: rotate(-3deg); opacity: .85; }
.note-new { font-family: var(--hand); color: var(--warm); font-size: 1.05rem; line-height: 1; transform: rotate(-4deg); display: inline-block; }
.card h3 { margin: 0 0 4px; font-size: 1.25rem; line-height: 1.25; font-weight: 700; }
.card p { margin: 0; color: var(--ink); opacity: .85; font-size: 1rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .tags { margin-top: 6px; font-family: var(--sans); font-size: .8rem; color: var(--muted); font-style: italic; }

.empty { text-align: center; padding: 48px 16px; color: var(--muted); }

/* ===== À ne pas manquer ===== */
.featured { margin: 0 0 44px; }
.featured h2 { font-family: var(--hand); font-weight: 400; color: var(--warm); font-size: 1.7rem; margin: 0 0 18px; transform: rotate(-1.5deg); transform-origin: left; display: inline-block; }
.grid-featured { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card-big { display: block; border: 0; padding: 0; }
.card-big .thumb { background: var(--photo); border: 0; padding: 7px; aspect-ratio: auto; box-shadow: 0 1px 4px rgba(0,0,0,.14); overflow: visible; margin-bottom: 14px; }
.card-big .thumb img, .card-big .thumb .ph { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; }
.card-big .thumb .ph { display: grid; }
.card-big .thumb.has-img .ph { display: none; }
.card-big .thumb::before { content: ""; position: absolute; z-index: 1; top: -9px; left: 50%; width: 70px; height: 20px; transform: translateX(-50%) rotate(-4deg);
  background: rgba(240, 225, 170, .75); box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.grid-featured > li:nth-child(1) .thumb { transform: rotate(-1.2deg); }
.grid-featured > li:nth-child(2) .thumb { transform: rotate(.8deg); }
.grid-featured > li:nth-child(3) .thumb { transform: rotate(-.5deg); }
.card-big h3 { font-size: 1.2rem; }

/* ===== Fiche détaillée ===== */
dialog {
  width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0;
  border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); box-shadow: 0 18px 50px rgba(0,0,0,.25);
}
dialog::backdrop { background: rgba(40, 60, 80, .35); }
.d-inner { padding: 24px 26px 28px; position: relative; }
.d-close { position: absolute; top: 8px; right: 8px; }
.d-type { display: inline-flex; align-items: center; gap: 6px; color: var(--tc); font-family: var(--sans); font-weight: 600; font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; }
.d-type svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#d-title { margin: 6px 40px 4px 0; font-size: 1.7rem; line-height: 1.2; }
.d-meta { color: var(--muted); font-family: var(--sans); font-size: .85rem; margin: 0 0 16px; }
.d-desc { margin: 16px 0; white-space: pre-line; font-size: 1.08rem; }
.d-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.d-section { font-family: var(--sans); font-size: .72rem; text-transform: uppercase; color: var(--muted); letter-spacing: .1em; margin: 20px 0 6px; }
.video { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-consent { position: absolute; inset: 0; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 16px; text-align: center; color: #fff; background: #3d5a73; border: 0; cursor: pointer;
  background-size: cover; background-position: center; font-family: var(--sans); }
.video-consent .play { width: 60px; height: 60px; border-radius: 50%; background: var(--red); display: grid; place-items: center; }
.video-consent .play svg { width: 24px; height: 24px; fill: #fff; margin-left: 4px; }
.video-consent small { opacity: .85; max-width: 420px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-family: var(--sans); font-size: .8rem; padding: 1px 8px; border-radius: 2px; background: var(--paper-2); border: 0; color: var(--ink); }
button.tag { cursor: pointer; }
button.tag:hover { background: var(--marker); }
.related { list-style: none; margin: 0; padding: 0; }
.related button { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer;
  padding: 8px 0; border: 0; border-bottom: 1px dashed var(--line); background: none; font-size: 1.02rem; }
.related button:hover span { text-decoration: underline; }
.related svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--tc); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.related small { display: block; color: var(--muted); font-family: var(--sans); font-size: .76rem; }

/* ===== Pied de page ===== */
.site-footer { border-top: 1px solid var(--line); background: var(--paper-2); color: var(--muted); font-size: .85rem; font-style: italic; }
.site-footer p { margin: 0; padding: 22px 0 30px; }
.site-footer p.footer-links { padding-top: 0; margin-top: -18px; }
.site-footer a { color: var(--muted); }

/* ===== Page À propos ===== */
.about { max-width: 720px; padding: 40px 16px 64px; }
.about h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); letter-spacing: -.02em; margin: 0 0 18px; line-height: 1.15; }
.about h2 { font-size: 1.3rem; margin: 36px 0 8px; }
.about p, .about li { font-size: 1.08rem; }
.about-card { display: flex; gap: 18px; align-items: center; padding: 16px 0; margin: 12px 0 24px; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.avatar { flex: none; width: 76px; height: 76px; border-radius: 50%; background: var(--paper-2); color: var(--red);
  display: grid; place-items: center; font-family: var(--hand); font-size: 1.6rem; object-fit: cover; border: 2px solid var(--line); }
.about-card strong { font-size: 1.15rem; display: block; }
.about-card span { color: var(--muted); font-style: italic; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
[data-l="de"] { display: none; }
html[lang="de"] [data-l="fr"] { display: none; }
html[lang="de"] [data-l="de"] { display: revert; }


/* ===== Newsletter ===== */
.nl-latest { margin: 14px 0 0; font-family: var(--sans); font-size: .92rem; color: var(--muted); }
.nl-latest a { font-family: var(--serif); font-size: 1.05rem; font-style: italic; }
.nl-page { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 56px; align-items: start; padding-top: 40px; padding-bottom: 64px; }
.nl-page > div { display: contents; }
.nl-issue { max-width: 680px; min-width: 0; }
.nl-eyebrow { font-family: var(--sans); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--red); margin: 0 0 8px; font-weight: 600; }
.nl-issue h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.15; margin: 0 0 22px; letter-spacing: -.01em; text-wrap: balance; }
.nl-body { font-size: 1.1rem; line-height: 1.65; }
.nl-body p { margin: 0 0 1em; }
.nl-body h3 { font-size: 1.3rem; margin: 1.6em 0 .5em; }
.nl-body ul, .nl-body ol { margin: 0 0 1em; padding-left: 1.4em; }
.nl-body li { margin: .25em 0; }
.nl-body li::marker { color: var(--red); font-weight: 700; }
.nl-sub { font-family: var(--hand); font-weight: 400; color: var(--warm); font-size: 1.5rem; margin: 34px 0 6px; transform: rotate(-1.5deg); transform-origin: left; display: inline-block; }
.nl-res { list-style: none; margin: 0; padding: 0; }
.nl-res a { display: block; padding: 10px 0; border-bottom: 1px dashed var(--line); text-decoration: none; color: var(--ink); font-size: 1.08rem; }
.nl-res a:hover { text-decoration: underline; text-decoration-color: var(--red); }
.nl-kind { display: block; font-family: var(--sans); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.nl-pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); font-family: var(--sans); font-size: .92rem; }
.nl-list { position: sticky; top: 16px; border-left: 1px dashed var(--line); padding-left: 22px; }
.nl-list h2 { font-size: 1.05rem; margin: 0 0 10px; }
.nl-list ol { list-style: none; margin: 0; padding: 0; }
.nl-list a { display: block; padding: 7px 0; text-decoration: none; color: var(--ink); line-height: 1.3; }
.nl-list a:hover { text-decoration: underline; }
.nl-list .cur .nl-t { background: linear-gradient(transparent 55%, var(--marker) 55%); }
.nl-n { font-family: var(--sans); font-size: .72rem; color: var(--red); font-weight: 700; margin-right: 4px; }
.nl-list small { display: block; font-family: var(--sans); font-size: .74rem; color: var(--muted); margin-top: 2px; }
.nl-empty { font-style: italic; color: var(--muted); font-size: 1.15rem; }
@media (max-width: 860px) {
  .nl-page { grid-template-columns: 1fr; gap: 36px; }
  .nl-list { position: static; border-left: 0; padding-left: 0; border-top: 3px double var(--line); padding-top: 18px; }
}


/* ===== Lu pour vous (articles et études) ===== */
.read-intro { margin: 0 0 14px; padding: 12px 16px; background: var(--accent-soft); border-left: 3px solid var(--t-article); font-style: italic; border-radius: 0 var(--radius) var(--radius) 0; }
.d-ref { font-size: .98rem; color: var(--muted); margin: 0 0 4px; padding-left: 12px; border-left: 2px solid var(--line-strong); }
.d-ref span { display: block; font-family: var(--sans); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 2px; }
.d-retenir { margin: 6px 0 16px; padding: 12px 16px; background: var(--paper-2); border-radius: var(--radius); }
.d-retenir strong { display: block; font-family: var(--hand); font-weight: 400; color: var(--warm); font-size: 1.3rem; margin-bottom: 4px; }
.d-retenir p { margin: 0; white-space: pre-line; }


/* ===== Lien Instagram ===== */
.insta { display: inline-flex; align-items: center; gap: 4px; }
.ig { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; vertical-align: -0.12em; }
.ig circle:last-child { fill: currentColor; stroke: none; }
.ig-btn { width: 18px; height: 18px; }


/* ===== Newsletter : aperçu et téléchargement du PDF ===== */
.nl-pdf { margin: 6px 0 26px; }
.nl-pages { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr); gap: 18px; overflow-x: auto;
  padding: 6px 4px 12px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.nl-page { position: relative; display: block; background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(0,0,0,.10);
  scroll-snap-align: start; transition: transform .15s, box-shadow .15s; }
.nl-page:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.14); }
.nl-page img { display: block; width: 100%; height: auto; aspect-ratio: 992 / 1404; }
.nl-page span { position: absolute; right: 8px; bottom: 6px; font-family: var(--sans); font-size: .72rem; color: #5b616a;
  background: rgba(255,255,255,.92); padding: 1px 7px; border-radius: 10px; }
.nl-hint { margin: 2px 0 0; font-family: var(--sans); font-size: .8rem; color: var(--muted); }
.nl-embed { display: block; width: 100%; height: 80vh; border: 1px solid var(--line); background: #fff; }
.nl-pdf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.nl-pdf-actions svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.nl-size { font-family: var(--sans); font-size: .82rem; color: var(--muted); }
.nl-textv { border-top: 1px dashed var(--line); padding-top: 12px; }
.nl-textv > summary { cursor: pointer; font-family: var(--sans); font-weight: 600; font-size: .95rem; color: var(--blue); margin-bottom: 14px; }
.nl-thumb { float: left; width: 56px; margin: 2px 10px 4px 0; border: 1px solid var(--line); box-shadow: 0 1px 4px rgba(0,0,0,.1); background: #fff; }
.nl-list li { overflow: hidden; }
@media (max-width: 640px) { .nl-pages { grid-auto-columns: 72%; } }

/* ===== Mobile / tablette ===== */
/* Slogan : seulement sur grand écran */
@media (max-width: 1100px) { .tagline { display: none; } }

/* Tablette (iPad portrait et petit paysage) : filtres toujours visibles, colonnes plus serrées */
@media (min-width: 768px) and (max-width: 1023px) {
  .layout { grid-template-columns: 180px 1fr; gap: 26px; }
  .card { grid-template-columns: 140px 1fr; gap: 16px; }
  .card h3 { font-size: 1.15rem; }
  .grid-featured { gap: 20px; }
  .intro-photo { width: 130px; }
}

/* Téléphone : filtres dans un panneau (bouton « Filtres ») */
@media (max-width: 767px) {
  .layout { grid-template-columns: 1fr; }
  .btn-filters { display: inline-flex; }
  .filters {
    position: fixed; z-index: 50; top: 0; left: 0; bottom: 0; width: min(330px, 88vw); max-height: none;
    background: var(--paper); padding: 18px; box-shadow: 4px 0 30px rgba(0,0,0,.25);
    transform: translateX(-105%); transition: transform .25s ease;
  }
  .filters.open { transform: none; }
  .filters-head .close { display: block; }
  .filters .apply { display: flex; width: 100%; margin-top: 14px; }
  .backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(40,60,80,.3); }
  .grid-featured { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 46%; overflow-x: auto;
    scroll-snap-type: x mandatory; padding: 12px 4px 8px; gap: 22px; }
  .grid-featured > li { scroll-snap-align: start; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .header-inner { position: relative; }
  .main-nav { margin-left: 0; width: 100%; gap: 16px; flex: auto; flex-wrap: nowrap; overflow-x: auto;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav > a { white-space: nowrap; }
  /* FR / DE en haut à droite, à côté du bouton mode sombre */
  .main-nav .lang-switch { position: absolute; top: max(24px, env(safe-area-inset-top, 0px)); right: max(54px, calc(env(safe-area-inset-right, 0px) + 42px)); }
  .theme-toggle { position: absolute; top: max(18px, env(safe-area-inset-top, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); margin: 0; }
  .tagline { display: none; }
  /* « Moien ! » à côté d'une petite photo, puis le texte sur toute la largeur */
  .intro { display: grid; grid-template-columns: 1fr 88px; column-gap: 14px; row-gap: 0; margin-top: 22px; align-items: center; }
  .intro .sign { margin-top: 2px; }
  .intro .nl-latest { margin-top: 6px; }
  .intro-text { display: contents; }
  .intro h1 { grid-column: 1; grid-row: 1; }
  .intro-photo { grid-column: 2; grid-row: 1; width: 88px; padding: 5px 5px 14px; margin: 6px 2px 10px 0; }
  .intro p, .intro .sign, .intro .nl-latest { grid-column: 1 / -1; }
  .intro-photo::before { width: 44px; height: 14px; top: -7px; }
  .intro h1 { font-size: 2.1rem; margin-bottom: 8px; }
  .intro p { font-size: 1.02rem; }
  .intro .sign { font-size: 1.3rem; margin-top: 4px; }
  .search-bar { margin-top: 22px; }
  /* rubriques sur une ligne qu'on fait glisser */
  .rubs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin-bottom: 26px; }
  .rubs::-webkit-scrollbar { display: none; }
  .tile { white-space: nowrap; flex: none; }
  /* fiche détaillée : s'ouvre comme une feuille depuis le bas */
  dialog { width: 100%; max-width: 100%; margin: auto 0 0; max-height: 92vh; border-radius: 14px 14px 0 0; }
  .note-search { display: none; }
  .card { grid-template-columns: 110px 1fr; gap: 14px; padding: 16px 0; }
  .card h3 { font-size: 1.08rem; }
  .card p { -webkit-line-clamp: 2; font-size: .95rem; }
  .card .tags { display: none; }
  .grid-featured { grid-auto-columns: 78%; }
  .d-inner { padding: 20px 16px 24px; }
  #d-title { font-size: 1.35rem; }
}
@media (pointer: coarse) {
  .f-opt { padding: 7px 0; }
  .tile { padding: 6px 10px; }
  .lang-switch button { padding: 6px 6px; }
  .theme-toggle { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
