:root {
  --sable: #f7f3ec;
  --sable-2: #efe8dc;
  --ocean: #0b4f6c;
  --ocean-deep: #083a50;
  --corail: #e07a5f;
  --corail-dark: #c45f45;
  --encre: #1c1c1c;
  --muted: #5a5a5a;
  --line: #d9d0c3;
  --paper: #fffdf8;
  --header-h: 72px;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Libre Baskerville", Georgia, "Times New Roman", serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  color: var(--encre);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(11, 79, 108, 0.08), transparent 60%),
    radial-gradient(900px 400px at 100% 0%, rgba(224, 122, 95, 0.08), transparent 55%),
    var(--sable);
  line-height: 1.55;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ocean); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--corail); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(247, 243, 236, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ocean);
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  max-width: 100%;
  background: var(--sable);
  padding-right: 0.35rem;
}

.brand img {
  width: 52px;
  height: auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: 0.04em;
}

.brand-text span {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.main-nav {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 18px), transparent 100%);
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0 0.5rem;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem 0.85rem;
  justify-content: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.main-nav ul.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  user-select: none;
}

.main-nav ul.is-dragging a {
  pointer-events: none;
}

.main-nav ul::-webkit-scrollbar { display: none; }

.main-nav a {
  text-decoration: none;
  color: var(--encre);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.main-nav a:hover {
  color: var(--ocean);
}

.main-nav a.active {
  color: var(--ocean);
  border-bottom-color: var(--corail);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.lang-btn {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  background: none;
  padding: 0;
}

.lang-btn.active { color: var(--ocean); }

.join-btn {
  display: inline-block;
  text-decoration: none;
  color: #fff;
  background: var(--corail);
  padding: 0.45rem 0.9rem;
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid var(--corail-dark);
}

.join-btn:hover {
  background: var(--corail-dark);
  color: #fff;
}

.logout-form {
  display: inline;
  margin: 0;
}

button.join-btn {
  font: inherit;
  cursor: pointer;
  font-family: inherit;
}

.search-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ocean);
  cursor: pointer;
  padding: 0;
}

.search-toggle:hover,
.search-toggle[aria-expanded="true"] {
  color: var(--corail);
  border-color: var(--line);
  background: var(--paper);
}

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: start center;
  padding: 5.5rem 1rem 1rem;
  background: rgba(28, 28, 28, 0.4);
}

.search-overlay[hidden] { display: none; }

.search-panel {
  width: min(100%, 420px);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1.1rem 1.2rem 1.25rem;
}

.search-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.search-panel-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ocean);
}

.search-close {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.2rem;
}

.search-close:hover { color: var(--encre); }

.search-panel-form {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.search-panel-form label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  margin-top: 0.35rem;
}

.search-bar,
.search-date,
.search-cat {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.55rem 0.65rem;
  font: inherit;
  color: var(--encre);
}

.search-button {
  margin-top: 0.85rem;
  border: 1px solid var(--ocean);
  background: var(--ocean);
  color: #fff;
  padding: 0.65rem 0.85rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.search-button:hover { background: var(--ocean-deep); }

body.search-open { overflow: hidden; }

.burger {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: var(--paper);
  place-items: center;
  gap: 5px;
  cursor: pointer;
  flex-shrink: 0;
}

.burger .line {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--encre);
}

.sidebar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  border: none;
  box-shadow: none;
  transform: none;
  background: var(--sable);
  padding: 1.25rem 1.5rem 2rem;
  z-index: 10000;
  overflow-y: auto;
  box-sizing: border-box;
}

.sidebar.open {
  display: flex;
  flex-direction: column;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 1.5rem;
}

.sidebar-close {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ocean);
  cursor: pointer;
  padding: 0.45rem;
  line-height: 0;
  border-radius: 8px;
}

.sidebar .menu {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1;
}

.sidebar .menu a {
  display: block;
  padding: 0.85rem 0.15rem;
  color: var(--ocean);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 650;
  border: none;
  border-bottom: 1px solid var(--line);
}

.sidebar .menu a:hover,
.sidebar .menu a.active {
  color: var(--corail);
  background: transparent;
}

.backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11, 79, 108, 0.28);
  z-index: 9990;
}

.backdrop.show { display: block; }

body.nav-open { overflow: hidden; }

main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.messages {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.messages li {
  padding: 0.75rem 1rem;
  background: #e8f3ea;
  border-left: 3px solid #2f6b3a;
  margin-bottom: 0.5rem;
}

.hero-une {
  position: relative;
  margin: 0 0 1.5rem;
  min-height: 300px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--ocean-deep), #1a6b7c 55%, #3d7a6a);
  color: #fff;
  overflow: hidden;
}

.hero-une.has-image {
  background-size: cover;
  background-position: center;
}

.hero-une::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 40, 55, 0.72), rgba(8, 40, 55, 0.25));
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 2.75rem 1.5rem;
}

.hero-date {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  opacity: 0.9;
  text-transform: capitalize;
}

.hero-title {
  margin: 0;
  max-width: 18ch;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.15;
  font-weight: 650;
}

.section-label {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--ocean);
}

.une-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.25rem;
  align-items: start;
}

.teaser {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--rubrique-color, var(--ocean));
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.teaser:hover {
  transform: translateY(-2px);
  border-color: var(--ocean);
  color: inherit;
}

.une-grid > .teaser .teaser-media {
  aspect-ratio: 16 / 9;
}

.teaser-media {
  aspect-ratio: 16 / 10;
  background: var(--sable-2);
  overflow: hidden;
}

.teaser-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.teaser-body { padding: 1rem 1.1rem 1.2rem; }

.teaser-cat {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ocean);
}

.teaser-title {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.25;
}

.teaser-excerpt {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.teaser-meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.teaser-more {
  margin-top: 0.75rem;
  font-weight: 700;
  color: var(--corail);
  text-decoration: none;
}

.side-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.side-stack .teaser-title { font-size: 1.05rem; }

.page-heading {
  margin: 0 0 1.25rem;
}

.page-heading h1 {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--ocean);
}

.page-heading p {
  margin: 0;
  color: var(--muted);
}

.week-band,
.month-band {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0 0 1rem;
  padding: 0;
}

.week-band summary,
.month-band summary {
  list-style: none;
  cursor: pointer;
  padding: 0.9rem 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ocean);
}

.week-band summary::-webkit-details-marker,
.month-band summary::-webkit-details-marker { display: none; }

.teaser-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.teaser-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--rubrique-color, var(--ocean));
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}

.teaser-row:hover { border-color: var(--ocean); color: inherit; }

.teaser-row .teaser-media {
  aspect-ratio: 1;
  min-height: 120px;
}

.teaser-row .teaser-body { padding: 0.9rem 1rem; }

.articles-wrapper-mobile { display: none; }

.full-article-page {
  max-width: none;
  width: 100%;
  margin: 0;
  background: transparent;
  border: none;
  padding: 0 0 2rem;
}

.return-btn {
  display: inline-block;
  margin: 0 0 1rem;
  color: var(--ocean);
  font-weight: 600;
  text-decoration: none;
}

.return-btn:hover { color: var(--corail); }

.return-btn-top {
  font-size: 0.95rem;
}

.article-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ocean);
  text-decoration: none;
  margin-bottom: 0.5rem;
}

.full-article-page h2,
.full-article-page > h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  line-height: 1.2;
  margin: 0.2rem 0 0.8rem;
  max-width: 40ch;
}

.article-meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.article-hero-img,
.full-article-page > img {
  display: block;
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  object-position: center;
  margin: 0.75rem 0 1rem;
}

.article-body {
  font-family: var(--font-body);
  font-size: 1.12rem;
  line-height: 1.75;
  width: 100%;
  max-width: none;
  color: var(--encre);
}

.article-body * {
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  color: inherit;
}

.article-body strong,
.article-body b { font-weight: 700; }

.article-body em,
.article-body i { font-style: italic; }

.article-body p {
  margin: 0 0 0.9em;
  max-width: none;
}

.article-body p:last-child { margin-bottom: 0; }

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4 {
  font-family: var(--font-display) !important;
  font-size: 1.25em !important;
  line-height: 1.3 !important;
  margin: 1.1em 0 0.5em;
  max-width: none;
}

.article-body img {
  display: block;
  width: 100%;
  height: auto;
  margin: 1rem 0;
}

.article-body ul,
.article-body ol {
  margin: 0 0 0.9em;
  padding-left: 1.3em;
}

.teaser-full {
  margin: 0 0 0.85rem;
  color: var(--encre);
  font-family: var(--font-body);
  font-size: 0.98rem;
  line-height: 1.65;
}

.teaser-full * {
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
}

.teaser-full p {
  margin: 0 0 0.7em;
}

.teaser-full p:last-child { margin-bottom: 0; }

.media-comment {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  margin: 0 0 1rem;
}

.article-actions {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  margin: 0.75rem 0 0.25rem;
  padding: 0;
  border: none;
}

.article-actions-top { margin-bottom: 0.75rem; }

.heart-btn,
.calendar-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--encre);
  padding: 0.15rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.heart-btn .heart-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.heart-btn.liked {
  color: var(--corail);
}

.heart-btn.liked .heart-icon {
  fill: var(--corail);
  stroke: var(--corail);
}

.calendar-btn {
  color: var(--encre);
}

.calendar-btn:hover,
.calendar-btn.active {
  color: var(--corail);
}

.heart-btn:hover { color: var(--corail); }

.like-count { display: none; }

.sources {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 70ch;
}

.search-results-container h2 {
  font-family: var(--font-display);
  color: var(--ocean);
}

.article-result {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.article-result .thumb {
  aspect-ratio: 1;
  background: var(--sable-2);
  overflow: hidden;
}

.article-result .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-container {
  max-width: 420px;
  margin: 2rem auto;
  padding: 1.75rem;
  background: var(--paper);
  border: 1px solid var(--line);
}

.login-container h2 {
  margin-top: 0;
  font-family: var(--font-display);
  color: var(--ocean);
}

.login-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ocean);
}

.login-intro {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #4a4a4a;
}

.login-links {
  margin: 1.25rem 0 0;
  font-size: 0.9rem;
  text-align: center;
}

.login-links a {
  color: var(--ocean);
  text-decoration: underline;
}

.login-form p { margin: 0 0 1rem; }
.login-form label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.login-form input {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  box-sizing: border-box;
}

.login-form .password-wrap {
  position: relative;
  display: block;
  width: 100%;
}

.login-form .password-wrap input {
  display: block;
  width: 100%;
  padding-right: 2.4rem;
}

.login-form .password-toggle {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  width: 2.4rem;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  color: #8a8a8a;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.login-form .password-toggle:hover,
.login-form .password-toggle:focus-visible {
  color: var(--ocean);
  background: transparent !important;
  outline: none;
}

.login-form .password-toggle .eye-slash {
  opacity: 0;
}

.login-form .password-toggle.is-visible .eye-slash {
  opacity: 1;
}

.hp-wrap {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.login-errors {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  background: #fdecea;
  color: #8a1f11;
  border: 1px solid #f5c2c0;
}

.login-field-error {
  display: block;
  margin-top: 0.35rem;
  color: #8a1f11;
  font-size: 0.9rem;
}

.login-locked {
  margin: 0;
  padding: 1rem;
  background: #fdecea;
  color: #8a1f11;
  border: 1px solid #f5c2c0;
}

.cf-turnstile {
  margin: 0 0 1rem;
}

.btn-login {
  width: 100%;
  border: none;
  background: var(--ocean);
  color: #fff;
  padding: 0.7rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.btn-login:hover { background: var(--ocean-deep); }

.footer {
  border-top: 1px solid var(--line);
  background: var(--sable-2);
  margin-top: auto;
}

.footer-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  width: 100%;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.footer-links a:hover { color: var(--ocean); }

.footer-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  width: 100%;
  text-align: center;
}

.cookie-banner {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.15rem;
  background: rgba(8, 58, 80, 0.38);
}

.cookie-banner.hidden { display: none; }

body.cookie-dialog-open {
  overflow: hidden;
}

.cookie-inner {
  width: min(30rem, 100%);
  max-height: min(90vh, 42rem);
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1.2rem 1.35rem 1.15rem;
  box-shadow: 0 14px 36px rgba(8, 58, 80, 0.16);
}

.cookie-logo {
  display: block;
  width: 64px;
  height: auto;
  margin: 0 auto 0.85rem;
}

.cookie-title {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 650;
  line-height: 1.25;
  color: var(--ocean-deep);
  text-align: center;
}

.cookie-lead {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--encre);
}

.cookie-lead p {
  margin: 0 0 0.7rem;
}

.cookie-lead p:last-child {
  margin-bottom: 0;
}

.cookie-cat {
  margin: 0 0 0.55rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  background: var(--sable);
}

.cookie-cat h3 {
  margin: 0 0 0.28rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--ocean);
}

.cookie-cat p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
}

.cookie-more {
  margin: 0.85rem 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
}

.cookie-link {
  color: var(--ocean);
}

.cookie-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.cookie-btn {
  flex: 1 1 10rem;
  width: auto;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0.62rem 0.7rem;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--ocean-deep);
}

.cookie-btn.accept {
  background: var(--ocean);
  color: #fff;
  border-color: var(--ocean);
}

.cookie-btn.accept:hover {
  background: var(--ocean-deep);
}

.cookie-btn.reject:hover {
  border-color: var(--ocean);
}

.idle-logout-dialog {
  z-index: 4100;
}

body.idle-dialog-open {
  overflow: hidden;
}

.jaune, .a_la_une, .cat-a-la-une { --rubrique-color: #c9a227; }
.orange, .info_hebdo, .cat-info-hebdo { --rubrique-color: #d97706; }
.bleu_fonce, .vie_etudiante, .cat-vie-etudiante { --rubrique-color: #0b4f6c; }
.bleu_clair, .vie_associative, .cat-vie-associative { --rubrique-color: #3d7ea6; }
.vert_fonce, .vie_culturelle, .cat-vie-culturelle { --rubrique-color: #3f6b4a; }
.jaune_fonce, .vie_sportive, .cat-vie-sportive { --rubrique-color: #b45309; }
.violet_fonce, .festivites, .cat-festivites { --rubrique-color: #6b4c7a; }
.vert_clair, .evenements, .cat-evenements { --rubrique-color: #4f7c59; }
.violet_clair, .politique, .cat-politique { --rubrique-color: #5b4b8a; }
.rouge_clair, .articles_universitaires, .cat-articles-universitaires { --rubrique-color: #b54a3c; }
.argent, .bon_plan, .cat-bon-plan { --rubrique-color: #6b7280; }

@media (max-width: 900px) {
  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.55rem 0.75rem;
  }

  .main-nav { display: none !important; }

  .brand {
    min-width: 0;
    gap: 0.4rem;
  }

  .brand img { width: 36px; }

  .brand-text strong { font-size: 1.1rem; }

  .brand-text span {
    display: block;
    font-size: 0.58rem;
    letter-spacing: 0.02em;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    max-width: none;
    line-height: 1.2;
  }

  .header-actions {
    gap: 0.35rem;
  }

  .burger { display: grid; }

  .join-btn {
    display: inline-block;
    padding: 0.35rem 0.55rem;
    font-size: 0.72rem;
  }

  .lang-btn { font-size: 0.78rem; }

  .search-toggle {
    width: 34px;
    height: 34px;
  }

  main { padding: 1rem 1rem 2.5rem; }

  .hero-une {
    min-height: 220px;
    margin-bottom: 1.1rem;
  }

  .hero-content { padding: 1.75rem 1rem; }
  .hero-title { font-size: 1.65rem; }

  .une-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .side-stack {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(72%, 260px);
    gap: 0.85rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.35rem;
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    scrollbar-width: none;
  }

  .side-stack::-webkit-scrollbar { display: none; }

  .side-stack .teaser {
    scroll-snap-align: start;
    border-radius: 14px;
  }

  .side-stack .teaser-media { aspect-ratio: 1 / 1; }
  .side-stack .teaser-full,
  .side-stack .teaser-excerpt,
  .side-stack .teaser-more { display: none; }
  .side-stack .teaser-title { font-size: 0.98rem; }

  .related-articles .related-grid,
  .related-articles.une-related .related-grid {
    grid-auto-columns: calc((100% - 1rem) / 2);
  }

  .teaser-featured {
    border-radius: 0;
  }

  .teaser-row {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    gap: 0;
  }

  .teaser-row .teaser-media {
    width: 100%;
    aspect-ratio: 16 / 10;
    min-height: 0;
  }

  .teaser-row .teaser-body {
    padding: 0.85rem 0.95rem 1rem;
  }

  .teaser-list { margin-top: 1.25rem; }

  .footer-links {
    justify-content: space-between;
  }

  .footer-text { text-align: left; }
}

@media (max-width: 640px) {
  .article-hero-img,
  .full-article-page > img {
    max-height: 260px;
  }
}

.embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 1rem 0;
  background: #000;
}

.embed iframe,
.embed video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.bienvenue-message { display: none; }

.offline-banner {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0.55rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: #fff;
  background: var(--ocean-deep);
  border-bottom: 2px solid var(--corail);
}

.offline-banner[hidden] {
  display: none !important;
}

/* Enrichissements : partage, badges, liés */
.updated-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: var(--corail);
  border-radius: 999px;
  white-space: nowrap;
}

.article-share {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 1.25rem;
}

.share-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--ocean);
  background: transparent;
  color: var(--ocean);
  font: inherit;
  font-size: 0.85rem;
  text-decoration: none;
  cursor: pointer;
}

.share-btn:hover,
.share-btn.copied {
  background: var(--ocean);
  color: #fff;
}

.related-articles {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  max-width: 70ch;
}

.related-articles.une-related {
  max-width: none;
}

.related-articles h2 {
  font-family: var(--font-display);
  color: var(--ocean);
  font-size: 1.45rem;
  margin: 0 0 1rem;
}

.related-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 1rem) / 2);
  grid-template-columns: none;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.4rem;
  scrollbar-width: thin;
}

@media (min-width: 901px) {
  .related-articles.une-related .related-grid {
    grid-auto-columns: calc((100% - 3rem) / 4);
  }
}

.related-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  padding-bottom: 0.5rem;
  scroll-snap-align: start;
  min-width: 0;
}

.related-card:hover {
  border-color: var(--line);
  color: inherit;
}

.related-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--sable-2);
}

.related-cat {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--corail);
}

.related-card strong {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--ocean);
  line-height: 1.25;
}

.related-date {
  font-size: 0.8rem;
  color: var(--muted);
}

.related-cat,
.related-card strong,
.related-date {
  overflow-wrap: anywhere;
}

.search-filters-used {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0.75rem 0 1.25rem;
}

.filter-chip {
  display: inline-block;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ocean);
  font-size: 0.82rem;
}

.results-count {
  color: var(--muted);
  font-size: 0.9rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
