/* P9web.com — Portneuf */
:root {
  /* Couleurs de la marque P9web */
  --navy: #0b2a47;
  --orange: #ef7100;
  --teal: #5eb6ca;
  --sky: #4fa3d4;
  --bg: #f5f8fb;
  --surface: #ffffff;
  --ink: #0f2033;
  --muted: #56677a;
  --line: #dde5ee;
  --brand: var(--navy);
  --brand-2: #1f73a8;    /* liens (bleu lisible) */
  --accent: #e56b00;     /* orange (texte) */
  --brand-soft: #e7f0f8;
  --danger: #b3261e;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(11,42,71,.06), 0 6px 18px rgba(11,42,71,.06);
  --serif: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #08131f; --surface: #0f2236; --ink: #e9f0f7; --muted: #9db0c4;
    --line: #1f3650; --brand: #8cc4ec; --brand-2: #7cc0ea; --accent: #ff9a45;
    --brand-soft: #16324d; --danger: #f08a7e;
    --shadow: 0 1px 2px rgba(0,0,0,.35);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); }
a { color: var(--brand-2); }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* En-tête */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.logo { font-family: var(--serif); font-weight: 700; font-size: 1.35rem; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.logo span { color: var(--brand); }
.logo svg { width: 28px; height: 28px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: .95rem; }
.nav a:hover { background: var(--brand-soft); color: var(--ink); }
.nav a.active { background: var(--brand); color: #fff; }

/* Héros */
.hero { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%); color: #fff; padding: 56px 0 48px; }
.hero h1 { font-family: var(--serif); font-size: clamp(1.9rem, 5vw, 3rem); line-height: 1.1; margin: 0 0 12px; max-width: 18ch; }
.hero p { font-size: 1.1rem; opacity: .92; max-width: 56ch; margin: 0 0 24px; }
.hero .btn { background: #fff; color: var(--brand); }
.hero .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.page-head { padding: 36px 0 12px; }
.page-head h1 { font-family: var(--serif); font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 0 6px; }
.page-head p { color: var(--muted); margin: 0; }

/* Boutons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 999px; border: 1px solid transparent; background: var(--brand); color: #fff; font: 600 .95rem var(--sans); text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn.small { padding: 6px 12px; font-size: .85rem; }
.btn.danger { background: var(--danger); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* Sections */
section { padding: 32px 0; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.section-title h2 { font-family: var(--serif); font-size: 1.6rem; margin: 0; }

/* Cartes */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.card h3 { margin: 0; font-size: 1.08rem; line-height: 1.3; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--brand-2); text-decoration: underline; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.tag { display: inline-block; background: var(--brand-soft); color: var(--brand); padding: 2px 10px; border-radius: 999px; font-weight: 600; font-size: .78rem; }
.tag.accent { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.card .links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: auto; padding-top: 6px; font-size: .9rem; }
.card .links a { overflow-wrap: anywhere; }

/* Nouvelle à la une */
.feature { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.feature h3 { font-family: var(--serif); font-size: 1.5rem; margin: 8px 0; line-height: 1.2; }
.feature h3 a { color: var(--ink); text-decoration: none; }

/* Filtres */
.filters { display: grid; gap: 10px; grid-template-columns: 2fr 1fr 1fr; margin: 12px 0 20px; }
@media (max-width: 720px) { .filters { grid-template-columns: 1fr; } }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 20px; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 6px 14px; border-radius: 999px; cursor: pointer; font: 500 .88rem var(--sans); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.count { color: var(--muted); font-size: .9rem; margin-bottom: 12px; }

/* Formulaires */
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: 1rem var(--sans); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-2); outline-offset: 1px; border-color: transparent; }
textarea { min-height: 110px; resize: vertical; }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; max-width: 720px; box-shadow: var(--shadow); }
.form-grid { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.hint { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.hp { position: absolute; left: -9999px; }
.notice { padding: 12px 16px; border-radius: 8px; margin: 12px 0; font-weight: 500; }
.notice.ok { background: var(--brand-soft); color: var(--brand); }
.notice.err { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; border: 1px dashed var(--line); border-radius: var(--radius); }

/* Admin */
.admin-list { display: flex; flex-direction: column; gap: 10px; }
.admin-row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.admin-row .info { min-width: 0; }
.admin-row .info strong { display: block; }
.admin-row .info small { color: var(--muted); overflow-wrap: anywhere; }
.admin-row .btn-row { flex-shrink: 0; }
@media (max-width: 600px) { .admin-row { flex-direction: column; } }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 20px; flex-wrap: wrap; }
.tabs button { background: none; border: none; padding: 10px 14px; font: 600 .95rem var(--sans); color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; }
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand); }
.badge { background: var(--accent); color: #fff; border-radius: 999px; padding: 0 7px; font-size: .75rem; margin-left: 4px; }
dialog { border: none; border-radius: var(--radius); padding: 0; max-width: 640px; width: calc(100% - 32px); background: var(--surface); color: var(--ink); }
dialog::backdrop { background: rgba(0,0,0,.45); }
dialog .form { border: none; box-shadow: none; max-width: none; }

/* Pied de page */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 28px 0; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

/* Vignettes des nouvelles (style aperçu de lien) */
.news-card { padding: 0; overflow: hidden; gap: 0; }
.news-card > a { display: block; text-decoration: none; }
.news-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.thumb { aspect-ratio: 1.91 / 1; background: var(--brand-soft); overflow: hidden; position: relative; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.card:hover .thumb img, .feature:hover .thumb img { transform: scale(1.03); }
.thumb.ph { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%); }
.thumb.ph span { color: #fff; font-family: var(--serif); font-weight: 700; font-size: 1.2rem; opacity: .9; padding: 0 16px; text-align: center; }
.meta.src { text-transform: uppercase; letter-spacing: .04em; font-size: .72rem; font-weight: 600; margin-top: auto; }
.feature { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0; padding: 0; overflow: hidden; border-left-width: 1px; border-top: 5px solid var(--accent); }
.feature > a { display: block; }
.feature .thumb.big { height: 100%; min-height: 240px; aspect-ratio: auto; }
.feature .body { padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.feature .body p { margin: 0; color: var(--muted); }
@media (max-width: 720px) {
  .feature { grid-template-columns: 1fr; }
  .feature .thumb.big { min-height: 0; aspect-ratio: 1.91 / 1; }
}
/* Admin : nouvelles */
.admin-row .mini { width: 96px; flex-shrink: 0; border-radius: 6px; aspect-ratio: 1.91 / 1; }
.admin-row .mini.ph span { font-size: .6rem; }
.admin-row .lead { display: flex; gap: 12px; min-width: 0; align-items: flex-start; }
.admin-row.muted { opacity: .55; }
.status-box { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; font-size: .9rem; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.preview-img { margin-top: 8px; max-width: 280px; }
.preview-img .thumb { border-radius: 8px; }
.inline { display: flex; gap: 8px; }
.inline input { flex: 1; }

main section h2 { font-family: var(--serif); font-size: 1.3rem; margin: 24px 0 8px; }
main section p { color: var(--ink); }

/* ---------- Quoi faire : événements et calendrier ---------- */
.ev-toolbar { display: grid; grid-template-columns: auto 2fr 1fr; gap: 10px; margin-top: 12px; align-items: center; }
@media (max-width: 720px) { .ev-toolbar { grid-template-columns: 1fr; } }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: none; padding: 7px 16px; border-radius: 999px; font: 600 .9rem var(--sans); color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--brand); color: #fff; }
.cal-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.cal-nav h2 { font-family: var(--serif); font-size: 1.5rem; margin: 0; min-width: 190px; text-align: center; }
.cal-nav h2::first-letter { text-transform: uppercase; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-h { text-align: center; font-size: .75rem; font-weight: 600; text-transform: uppercase; color: var(--muted); padding: 4px 0; }
.cal-d { min-height: 92px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px; display: flex; flex-direction: column; gap: 3px; align-items: stretch; text-align: left; font: inherit; color: var(--ink); min-width: 0; }
.cal-d.out { background: transparent; border-color: transparent; }
.cal-d[disabled] { cursor: default; }
.cal-d.has { cursor: pointer; }
.cal-d.has:hover { border-color: var(--brand-2); }
.cal-d.past { opacity: .6; }
.cal-d.today .n { background: var(--accent); color: #fff; border-radius: 999px; padding: 0 7px; }
.cal-d.sel { outline: 2px solid var(--brand); outline-offset: -1px; }
.cal-d .n { font-weight: 600; font-size: .85rem; align-self: flex-start; }
.pill { display: block; font-size: .72rem; line-height: 1.25; padding: 2px 6px; border-radius: 4px; background: var(--brand-soft); color: var(--brand); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.pill.c-marchepublic, .pill.c-marche { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.pill.c-musique, .pill.c-festival { background: color-mix(in srgb, var(--brand-2) 16%, transparent); color: var(--brand-2); }
.cal-d .more { font-size: .7rem; color: var(--muted); }
.cal-d .dots { display: none; gap: 3px; }
.cal-d .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: block; }
@media (max-width: 720px) {
  .cal-d { min-height: 52px; padding: 4px; align-items: center; }
  .cal-d .n { align-self: center; }
  .cal-d .pill, .cal-d .more { display: none; }
  .cal-d .dots { display: flex; }
}
.day-title { font-family: var(--serif); margin: 0 0 12px; }
.day-title::first-letter { text-transform: uppercase; }
.event-card { cursor: pointer; }
.event-card:focus-visible { outline: 2px solid var(--brand-2); }
.thumb-wrap { position: relative; }
.datebadge { position: absolute; top: 10px; left: 10px; background: var(--surface); color: var(--ink); border-radius: 8px; padding: 4px 10px; text-align: center; line-height: 1.1; box-shadow: var(--shadow); }
.datebadge b { display: block; font-size: 1.25rem; font-family: var(--serif); }
.datebadge span { font-size: .7rem; text-transform: uppercase; font-weight: 600; color: var(--accent); }
.meta.when { color: var(--ink); font-weight: 500; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
h2.sub { font-family: var(--serif); font-size: 1.4rem; margin: 36px 0 14px; }
h2.sub small { font-family: var(--sans); font-size: .8rem; color: var(--muted); font-weight: 500; margin-left: 6px; }
details.past { margin-top: 32px; }
details.past summary { cursor: pointer; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
#ev-dlg { max-width: 720px; }
.ev-detail .thumb.big { aspect-ratio: 1.91 / 1; }
.ev-detail .body { padding: 20px 24px 24px; }
.ev-detail h2 { font-family: var(--serif); margin: 8px 0 14px; font-size: 1.7rem; line-height: 1.15; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 14px; }
.facts dt { font-weight: 600; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; padding-top: 2px; }
.facts dd { margin: 0; }
.ev-detail p { color: var(--ink); margin: 0 0 18px; }
.weekdays { display: flex; gap: 6px; flex-wrap: wrap; }
.weekdays label { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; cursor: pointer; margin: 0; }
.weekdays input { width: auto; }

/* Proposer un événement */
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px 16px; margin: 0; min-width: 0; }
legend { font-weight: 700; padding: 0 6px; }
legend small { font-weight: 400; color: var(--muted); }
.seg-radio { display: flex; flex-wrap: wrap; gap: 8px; }
.seg-radio label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; cursor: pointer; font-weight: 500; margin: 0; }
.seg-radio label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.seg-radio input { width: auto; accent-color: var(--brand); }
.date-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
[data-k][hidden] { display: none; }
.cta-box { margin-top: 32px; background: var(--brand-soft); border-radius: var(--radius); padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.cta-box span { color: var(--muted); }
.head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.admin-h { font-size: 1rem; margin: 0 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.admin-row .info small { display: block; }

/* ---------- Bottin : logos et fiches ---------- */
.logo-box { width: 64px; height: 64px; flex-shrink: 0; border-radius: 12px; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.logo-box img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.logo-box .ini { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font: 700 1.3rem var(--serif); color: #fff; background: var(--h); }
.logo-box.big { width: 96px; height: 96px; border-radius: 16px; }
.logo-box.big .ini { font-size: 2rem; }
.logo-box.sm { width: 44px; height: 44px; border-radius: 8px; }
.logo-box.sm .ini { font-size: .95rem; }
.biz-card { cursor: pointer; transition: border-color .15s, transform .15s; }
.biz-card:hover { border-color: var(--brand-2); transform: translateY(-2px); }
.biz-card:focus-visible { outline: 2px solid var(--brand-2); }
.biz-head { display: flex; gap: 12px; align-items: center; }
.biz-id { min-width: 0; }
.biz-id h3 { margin: 0 0 2px; }
.more-link { color: var(--brand); font-weight: 600; }
#biz-dlg { max-width: 640px; }
.biz-detail { padding: 24px; }
.biz-top { display: flex; gap: 18px; align-items: center; margin-bottom: 16px; }
.biz-top h2 { font-family: var(--serif); font-size: 1.6rem; margin: 6px 0 4px; line-height: 1.15; }
.biz-detail .desc p { margin: 0 0 12px; color: var(--ink); }
.biz-detail .facts { margin-top: 8px; }
.biz-detail .facts dd { overflow-wrap: anywhere; }
@media (max-width: 480px) { .biz-top { flex-direction: column; align-items: flex-start; } }
.logo-edit { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.btn-row [hidden] { display: none; }
.file-btn { display: inline-flex; margin: 0; }


/* ================= Identité visuelle P9web ================= */
h1, h2, h3, .section-title h2, .page-head h1 { font-family: var(--serif); letter-spacing: -.01em; }
.btn { background: var(--navy); }
@media (prefers-color-scheme: dark) { .btn { background: var(--orange); color: #fff; } .btn.ghost { background: transparent; color: var(--brand); } }
.btn.accent { background: var(--orange); color: #fff; }
.tag.accent { background: color-mix(in srgb, var(--orange) 14%, transparent); color: var(--accent); }

/* En-tête : logo + mot-symbole */
.site-header { border-bottom: 3px solid transparent; border-image: linear-gradient(90deg, var(--orange) 0 22%, var(--navy) 22% 70%, var(--teal) 70%) 1; }
.logo { gap: 10px; font-family: var(--serif); }
.logo img { height: 42px; width: auto; display: block; }
.wordmark { font-family: var(--serif); font-size: 1.45rem; line-height: 1; color: var(--navy); letter-spacing: -.02em; white-space: nowrap; }
.wordmark b { font-weight: 800; }
.wordmark i { font-style: normal; font-weight: 400; }
.wordmark span { color: var(--sky); font-weight: 500; }
@media (prefers-color-scheme: dark) {
  .logo img { background: #fff; border-radius: 10px; padding: 3px; }
  .wordmark { color: #fff; }
}
.nav a.active { background: var(--navy); color: #fff; box-shadow: inset 0 -3px 0 var(--orange); }
@media (prefers-color-scheme: dark) { .nav a.active { background: var(--brand-soft); color: #fff; } }

/* Héros de l'accueil */
.hero { position: relative; overflow: hidden; color: var(--ink); padding: 48px 0 72px;
  background: radial-gradient(1200px 400px at 85% 0%, color-mix(in srgb, var(--sky) 18%, transparent), transparent 70%), linear-gradient(180deg, var(--surface), var(--bg)); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 32px; align-items: center; position: relative; z-index: 1; }
.hero h1 { color: var(--navy); font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--orange); }
.hero p { color: var(--muted); opacity: 1; }
.hero .btn { background: var(--navy); color: #fff; }
.hero .btn.ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.hero .stats { color: var(--muted); }
.hero .stats strong { color: var(--orange); font-family: var(--serif); font-size: 1.1rem; }
.hero-logo { justify-self: center; width: 100%; max-width: 380px; }
.hero-logo img { width: 100%; height: auto; display: block; filter: drop-shadow(0 10px 24px rgba(11,42,71,.12)); }
.hero .river { position: absolute; left: 0; right: 0; bottom: -2px; width: 100%; height: 70px; z-index: 0; }
@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-logo { display: none; }
}
@media (prefers-color-scheme: dark) {
  .hero h1 { color: #fff; }
  .hero .btn { background: var(--orange); }
  .hero .btn.ghost { color: #fff; border-color: rgba(255,255,255,.6); background: transparent; }
  .hero-logo img { background: #fff; border-radius: 20px; padding: 14px; }
}

/* Vignettes de remplacement et badges aux couleurs de la marque */
.thumb.ph { background: linear-gradient(135deg, var(--navy) 0%, #174a73 60%, var(--teal) 140%); }
.feature { border-top-color: var(--orange); }
.datebadge span { color: var(--orange); }
.cal-d.today .n { background: var(--orange); }
.badge { background: var(--orange); }

/* Pied de page */
.site-footer { background: var(--navy); color: #c9d6e4; border-top: 0; margin-top: 56px; padding: 36px 0 28px; }
.site-footer a { color: #fff; }
.site-footer .foot-brand { display: flex; align-items: center; gap: 12px; }
.site-footer .foot-brand img { height: 44px; background: #fff; border-radius: 10px; padding: 4px; }
.site-footer .wordmark { color: #fff; font-size: 1.3rem; }
.site-footer .tagline { font-size: .85rem; margin-top: 4px; color: #9fb4c9; }
.site-footer .copy { width: 100%; border-top: 1px solid rgba(255,255,255,.12); padding-top: 14px; margin-top: 8px; font-size: .82rem; color: #9fb4c9; }

.site-header .logo .wordmark { color: var(--navy); }
.site-footer .wordmark, .site-footer .logo .wordmark { color: #fff; }
@media (prefers-color-scheme: dark) { .site-header .logo .wordmark { color: #fff; } }
.news-card > a, .feature > a { text-decoration: none; }

/* Liens de cartes et pages de fiches */
.card-link { color: inherit; text-decoration: none; }
.card-link:hover { text-decoration: underline; }
.crumbs { font-size: .85rem; color: var(--muted); margin: 20px 0 14px; }
.crumbs a { color: var(--muted); }
.page-fiche { margin-bottom: 28px; }
.page-fiche h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 6px 0 4px; line-height: 1.15; }
.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.link-list li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.link-list a { font-weight: 600; color: var(--ink); }
.link-list span { color: var(--muted); font-size: .9rem; }

/* ---------- Emplois ---------- */
.jobs-filters { grid-template-columns: 2fr 1fr 1.2fr; }
@media (max-width: 720px) { .jobs-filters { grid-template-columns: 1fr; } }
.job-list { display: flex; flex-direction: column; gap: 12px; }
.job-card { flex-direction: row; align-items: flex-start; gap: 16px; }
.job-card:hover { border-color: var(--sky); }
.job-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.job-main h3 { margin: 0; font-size: 1.12rem; }
.job-main h3 a { color: var(--ink); text-decoration: none; }
.job-main h3 a:hover { color: var(--brand-2); text-decoration: underline; }
.job-co { color: var(--muted); font-weight: 500; font-size: .95rem; }
.job-card .meta { gap: 10px; }
.salary { color: var(--ink); font-weight: 600; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.job-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex-shrink: 0; }
.ago { font-size: .8rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 640px) {
  .job-card { flex-wrap: wrap; }
  .job-card .logo-box { width: 48px; height: 48px; }
  .job-main { flex-basis: calc(100% - 64px); }
  .job-side { flex-direction: row; justify-content: space-between; align-items: center; width: 100%; }
}
.job-detail h2 { font-size: 1.15rem; margin: 22px 0 8px; }
.job-detail p { margin: 0 0 10px; }
.apply-box { margin-top: 24px; background: color-mix(in srgb, var(--orange) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--orange) 30%, transparent); border-radius: var(--radius); padding: 18px 20px; }
.apply-box h2 { margin-top: 0; }
.salary-grid { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 600px) { .salary-grid { grid-template-columns: 1fr 1fr; } }
.hiring { background: var(--brand-soft); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 20px; }
.hiring h2 { margin-top: 0; }
.job-detail p { color: var(--ink); }
/* Menu sur une seule ligne défilante sur petit écran */
@media (max-width: 600px) {
  .site-header .wrap { flex-wrap: nowrap; flex-direction: column; align-items: stretch; gap: 6px; padding-top: 8px; padding-bottom: 6px; }
  .nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 0 16px 4px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; flex-shrink: 0; }
}

/* ---------- Covoiturage ---------- */
.ride-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 8px 0 20px; }
.ride-big { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 18px 20px; border-radius: var(--radius); border: 2px solid transparent; cursor: pointer; font: inherit; color: #fff; box-shadow: var(--shadow); transition: transform .15s; }
.ride-big:hover { transform: translateY(-2px); }
.ride-big span { font-size: 1.8rem; line-height: 1; }
.ride-big b { font-family: var(--serif); font-size: 1.25rem; margin-top: 6px; }
.ride-big small { opacity: .9; }
.ride-big.offre { background: var(--navy); }
.ride-big.demande { background: var(--orange); }
@media (max-width: 560px) { .ride-cta { grid-template-columns: 1fr; } }
#ride-form-wrap { padding-top: 0; }
[data-w][hidden], [data-k][hidden] { display: none; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; margin-top: 12px; }
.check input { width: auto; margin-top: 4px; accent-color: var(--orange); }
.safety { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 20px; }
.safety summary { cursor: pointer; font-weight: 600; }
.safety ul { margin: 10px 0 0; padding-left: 20px; color: var(--muted); }
.safety li { margin-bottom: 4px; }
.ride-filters { display: grid; grid-template-columns: auto 1fr 1fr 170px; gap: 10px; align-items: center; margin-bottom: 12px; }
@media (max-width: 820px) { .ride-filters { grid-template-columns: 1fr 1fr; } .ride-filters .seg { grid-column: 1 / -1; justify-self: start; } }
.ride-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
@media (max-width: 400px) { .ride-grid { grid-template-columns: 1fr; } }
.ride-card { border-left: 5px solid var(--navy); gap: 10px; }
.ride-card.demande { border-left-color: var(--orange); }
.ride-top { display: flex; justify-content: space-between; align-items: center; }
.ride-kind { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--navy); }
.ride-card.demande .ride-kind { color: var(--accent); }
@media (prefers-color-scheme: dark) { .ride-kind { color: var(--sky); } }
.route { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 1.2rem; margin: 0; }
.route i { font-style: normal; color: var(--teal); font-weight: 800; }
.ride-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .92rem; font-weight: 500; }
.ride-card p { color: var(--ink); font-size: .92rem; }
.ride-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; margin-top: auto; }
.ride-actions .who { font-weight: 700; }
.contact-slot { margin-left: auto; }
.contact-shown { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.contact-shown a { font-weight: 600; }
.contact-shown small { width: 100%; color: var(--muted); }
.linkish { background: none; border: 0; color: var(--muted); font-size: .8rem; text-decoration: underline; cursor: pointer; padding: 0; }
.manage { margin-bottom: 20px; border: 2px solid var(--orange); }
.manage-new { margin-bottom: 20px; }

/* ---------- Promotions ---------- */
.promo-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.promo-card { padding: 0; overflow: hidden; gap: 0; }
.promo-visual { position: relative; aspect-ratio: 16 / 10; background: var(--brand-soft); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.promo-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.promo-logo { background: #fff; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.promo-logo .logo-box { border: 0; width: 120px; height: 120px; }
.promo-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 16px; text-align: center; color: #fff; font: 800 1.9rem/1.1 var(--serif); background: linear-gradient(135deg, var(--orange), #c24f00 70%, var(--navy) 160%); }
.promo-hl { position: absolute; top: 12px; right: 12px; background: var(--orange); color: #fff; font: 800 1.05rem var(--serif); padding: 6px 12px; border-radius: 999px; box-shadow: 0 4px 12px rgba(0,0,0,.18); transform: rotate(3deg); }
.promo-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.promo-biz { font-weight: 700; color: var(--muted); font-size: .9rem; }
.promo-biz a { color: inherit; }
.promo-card h3 { margin: 0; font-size: 1.1rem; }
.promo-card p { color: var(--ink); font-size: .92rem; }
.promo-code { align-self: flex-start; border: 2px dashed var(--orange); background: color-mix(in srgb, var(--orange) 8%, var(--surface)); color: var(--ink); border-radius: 8px; padding: 5px 10px; font: 500 .9rem var(--sans); cursor: pointer; }
.promo-code b { letter-spacing: .06em; }
.cond { color: var(--muted); font-size: .78rem; }
.promo-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); }
.ends { font-weight: 600; font-size: .85rem; color: var(--accent); }
.soon { font-weight: 600; font-size: .85rem; color: var(--brand-2); }
.photo-prev { max-width: 260px; max-height: 180px; border-radius: 10px; border: 1px solid var(--line); display: block; }
.mini-photo { width: 64px; height: 44px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }

/* ---------- Babillard ---------- */
.board-grid { columns: 3 300px; column-gap: 16px; }
.board-card { break-inside: avoid; margin-bottom: 16px; border-top: 4px solid var(--teal); background: color-mix(in srgb, var(--teal) 4%, var(--surface)); }
.board-card h3 { font-size: 1.08rem; }
.board-msg { white-space: pre-line; color: var(--ink) !important; }
.board-photo img { width: 100%; max-height: 260px; object-fit: cover; border-radius: 8px; display: block; }
.board-link { font-size: .88rem; overflow-wrap: anywhere; }
.board-card .ago { margin-left: auto; }
.rules { background: var(--brand-soft); border-radius: 8px; padding: 10px 14px; font-size: .9rem; margin-bottom: 16px; }
.promo-on-biz { background: color-mix(in srgb, var(--orange) 10%, var(--surface)); }

/* ---------- Menu déroulant (mobile et tablette) ---------- */
.menu-btn { display: none; align-items: center; gap: 8px; background: var(--navy); color: #fff; border: 0; border-radius: 10px; padding: 9px 14px; font: 600 .95rem var(--sans); cursor: pointer; }
.menu-btn .bars { display: inline-flex; flex-direction: column; gap: 4px; width: 20px; }
.menu-btn .bars i { display: block; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s; }
.site-header.open .menu-btn .bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-header.open .menu-btn .bars i:nth-child(2) { opacity: 0; }
.site-header.open .menu-btn .bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-extra { display: none; }
@media (prefers-color-scheme: dark) { .menu-btn { background: var(--orange); } }

@media (max-width: 960px) {
  .site-header .wrap { flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: space-between; min-height: 60px; padding-top: 8px; padding-bottom: 8px; gap: 12px; }
  .menu-btn { display: inline-flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; flex-wrap: nowrap; gap: 2px; margin: 0; overflow: visible;
    background: var(--surface); border-bottom: 3px solid var(--orange);
    box-shadow: 0 14px 30px rgba(11, 42, 71, .18); padding: 10px 16px 16px;
    max-height: calc(100vh - 70px); overflow-y: auto; overflow-x: hidden;
  }
  .site-header.open .nav { display: flex; animation: menu-drop .18s ease-out; }
  .nav a { padding: 13px 14px; font-size: 1.05rem; border-radius: 10px; white-space: normal; }
  .nav a.active { box-shadow: inset 4px 0 0 var(--orange); }
  .nav-extra { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
  .nav-extra a { font-size: .95rem; color: var(--brand-2); font-weight: 600; }
  body.menu-open::after { content: ""; position: fixed; inset: 0; background: rgba(11, 42, 71, .35); z-index: 5; }
  .site-header { z-index: 20; }
}
@keyframes menu-drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (max-width: 380px) { .menu-btn .menu-lbl { display: none; } .wordmark { font-size: 1.25rem; } }

/* ---------- Partage ---------- */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.share-lbl { font-weight: 700; font-size: .9rem; margin-right: 2px; }
.share-lbl:empty { display: none; }
.sh-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: 600 .85rem var(--sans); text-decoration: none; cursor: pointer; }
.sh-btn:hover { border-color: var(--sky); }
.sh-fb { background: #1877f2; border-color: #1877f2; color: #fff; }
.sh-fb::before { content: "f"; font: 800 1rem/1 Arial, sans-serif; }
.sh-native { background: var(--orange); border-color: var(--orange); color: #fff; }
.sh-btn[hidden] { display: none; }
.share-pop { position: absolute; z-index: 50; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(11,42,71,.2); padding: 8px 10px; }
.share-pop .share { margin: 0; padding: 0; border: 0; }
.share-btn { font-size: .82rem; text-decoration: none; color: var(--brand-2); font-weight: 600; }
.share-cta { background: var(--orange); }
.card-share { display: flex; justify-content: flex-end; }
.share-hl { margin-top: 12px; padding: 12px 14px; background: color-mix(in srgb, var(--orange) 10%, var(--surface)); border-radius: 10px; font-weight: 500; }
.share-hl .share { border: 0; margin-top: 8px; padding-top: 0; }
a.plain { color: inherit; text-decoration: none; }
a.plain:hover { text-decoration: underline; }
.board-page h1 { font-size: 1.6rem; margin: 6px 0; }
.promo-page .body h1 { font-size: 1.5rem; margin: 0; }
.ride-card.flash { animation: flash 1.6s ease 2; }
@keyframes flash { 50% { box-shadow: 0 0 0 4px var(--orange); } }
.job-side .share-btn { margin-top: -2px; }
.ev-detail .share, .biz-detail .share { margin-top: 16px; }

/* ---------- Infolettre ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nl-form { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.nl-row { display: flex; gap: 8px; }
.nl-row[hidden], .nl-consent[hidden] { display: none; }
.nl-row input { flex: 1; min-width: 0; margin: 0; }
.nl-row .btn { white-space: nowrap; flex: none; }
.nl-consent { display: flex; gap: 8px; align-items: flex-start; font-size: .82rem; font-weight: 400; line-height: 1.4; cursor: pointer; margin: 0; }
.nl-consent input { width: auto; margin: 2px 0 0; flex: none; }
.nl-msg .notice { margin: 4px 0 0; }
.site-footer .foot-nl { display: grid; grid-template-columns: 1fr minmax(0, 440px); gap: 16px 32px; align-items: center; padding-bottom: 26px; margin-bottom: 26px; border-bottom: 1px solid rgba(255,255,255,.14); }
.foot-nl h2 { color: #fff; font-size: 1.15rem; margin: 0 0 4px; }
.foot-nl p { margin: 0; color: #c9d6e4; }
.nl-form.dark .nl-consent { color: #c9d6e4; }
.nl-form.dark input[type=email] { background: #fff; color: #0f2033; border-color: transparent; }
.site-footer .nl-form .notice.ok { background: rgba(255,255,255,.12); color: #fff; }
.site-footer .nl-form .notice.err { background: #fff; }
.nl-band { display: grid; grid-template-columns: 1fr minmax(0, 440px); gap: 16px 32px; align-items: center; background: linear-gradient(120deg, color-mix(in srgb, var(--orange) 12%, var(--surface)), var(--surface) 70%); border: 1px solid var(--line); border-left: 5px solid var(--orange); border-radius: var(--radius); padding: 20px 22px; margin: 8px 0 28px; }
.nl-band h2 { margin: 0 0 4px; font-size: 1.25rem; }
.nl-band p { margin: 0; color: var(--muted); }
.nl-page { display: grid; grid-template-columns: 1fr minmax(0, 420px); gap: 24px; align-items: start; margin-bottom: 28px; }
.nl-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.nl-perks li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.nl-box { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--orange); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.nl-confirm { margin: 10px 0 28px; padding: 26px; text-align: center; align-items: center; }
.nl-confirm h1 { margin: 0; }
.nl-confirm.ok { border-top: 4px solid var(--orange); }
.nl-archive { padding-left: 18px; }
.nl-archive li { margin: 6px 0; }
@media (max-width: 760px) {
  .site-footer .foot-nl, .nl-band, .nl-page { grid-template-columns: 1fr; }
  .nl-row { flex-direction: column; }
}
/* Administration de l'infolettre */
.nl-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.nl-stats div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; min-width: 120px; }
.nl-stats b { display: block; font: 800 1.4rem var(--serif); color: var(--accent); }
.nl-stats small { color: var(--muted); }
.nl-frame { width: 100%; height: 720px; border: 1px solid var(--line); border-radius: 10px; background: #eef2f6; margin-top: 12px; }
.pill { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); }
.pill.warn { background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--accent); }
.pill.err { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
