:root {
  --bg: #f4f1ec;
  --ink: #0f1a23;
  --muted: #5e6b75;
  --card: #ffffff;
  --line: rgba(15,26,35,.10);
  --navy: #0e2433;
  --teal: #1e7a7a;
  --sand: #d4a843;
  --sand-hover: #c49a38;
  --rust: #b8623b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "DM Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ── Nav ── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px clamp(16px, 4vw, 44px);
  background: rgba(244,241,236,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.05rem;
}

.brand img { border-radius: 50%; width: 34px; height: 34px; }

.nav-right { display: flex; align-items: center; gap: 4px; }

.links { display: flex; gap: 4px; align-items: center; }

.links a {
  padding: 8px 13px; border-radius: 999px;
  color: var(--muted); font-weight: 700; font-size: .9rem;
  transition: .15s;
}

.links a:hover { background: rgba(15,26,35,.06); color: var(--ink); }
.links a.active { background: var(--navy); color: #fff; }

.lang-switch {
  display: flex; margin-left: 8px;
  border: 1px solid var(--line); border-radius: 999px; overflow: hidden;
}

.lang-switch a {
  padding: 6px 10px; font-size: .82rem; font-weight: 700;
  color: var(--muted); transition: .15s;
}

.lang-switch a:hover { background: rgba(15,26,35,.04); }
.lang-switch a.active { background: var(--ink); color: #fff; }

.menu-btn {
  display: none; background: transparent;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 12px; font-size: 1.1rem; cursor: pointer; color: var(--ink);
}

/* ── Hero ── */
.hero {
  display: grid; grid-template-columns: 1.15fr .85fr;
  gap: 16px; padding: 20px clamp(16px, 4vw, 44px) 16px;
  align-items: stretch;
}

.hero-main {
  border-radius: 28px;
  color: #fff; padding: clamp(28px, 4vw, 48px);
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 500px; position: relative; overflow: hidden;
  background: url('/fr/images/2023/996932638082825.jpg') center/cover;
}

.hero-main::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(
    180deg,
    rgba(14,36,51,.72) 0%,
    rgba(14,36,51,.40) 35%,
    rgba(14,36,51,.55) 65%,
    rgba(14,36,51,.85) 100%
  );
}

.hero-main > * { position: relative; z-index: 1; }

.eyebrow {
  text-transform: uppercase; letter-spacing: .16em;
  color: #7dd8d8; font-size: .72rem; font-weight: 800;
}

.hero-main h1 {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: .95; margin: 10px 0 16px; font-weight: 400;
  max-width: 520px;
}

.hero-main p {
  color: #e2eef0; font-size: 1rem; max-width: 460px; line-height: 1.5;
}

.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; padding: 11px 17px;
  font-weight: 700; font-size: .92rem; transition: .15s;
  border: none; cursor: pointer;
}

.btn-primary { background: var(--sand); color: #1a1205; }
.btn-primary:hover { background: var(--sand-hover); }
.btn-ghost {
  background: rgba(255,255,255,.16); color: #fff;
  border: 1px solid rgba(255,255,255,.32);
}
.btn-ghost:hover { background: rgba(255,255,255,.18); }

/* Latest post card (inline) */
.latest-card {
  display: flex; align-items: center; gap: 16px;
  margin-top: 18px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px; padding: 14px 18px;
  max-width: 560px;
  transition: .15s;
}
.latest-card:hover {
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.24);
}
.latest-card img {
  width: 80px; height: 60px; object-fit: cover;
  border-radius: 10px; flex-shrink: 0;
}
.lc-thumb-empty {
  width: 80px; height: 60px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(126,216,216,.22), rgba(212,168,67,.20));
}
.lc-body { flex: 1; min-width: 0; }
.lc-label {
  display: block; font-size: .72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em; color: var(--sand);
  margin-bottom: 2px;
}
.lc-title {
  font-weight: 700; font-size: 1rem; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lc-date {
  font-size: .78rem; color: #b0cdd4; margin-top: 2px;
}
.lc-arrow {
  color: var(--sand); font-weight: 800; font-size: 1.2rem; flex-shrink: 0;
  transition: transform .15s;
}
.latest-card:hover .lc-arrow { transform: translateX(3px); }
.lc-loading { color: #b0cdd4; font-size: .88rem; }

/* Stats bar */
.stats-bar {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; margin-top: 16px;
}

.stat {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px; padding: 14px 10px; text-align: center;
}

.stat strong { display: block; font-size: 1.35rem; color: #fff; font-weight: 700; }
.stat span { display: block; color: #d9e7e9; font-size: .8rem; margin-top: 2px; }

/* ── Quick tiles ── */
.quick {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.tile {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 22px; padding: 20px;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 236px;
  box-shadow: 0 6px 24px rgba(15,26,35,.04);
  transition: .18s; position: relative; overflow: hidden;
}

.tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(15,26,35,.08);
}

.tile.photo {
  background: linear-gradient(180deg, rgba(14,36,51,.30) 0%, rgba(14,36,51,.72) 100%),
              url('/fr/images/2023/996932641416158.jpg') center/cover;
  color: #fff; border-color: transparent;
}

.tile.boat {
  background: linear-gradient(180deg, rgba(14,36,51,.22) 0%, rgba(14,36,51,.52) 42%, rgba(14,36,51,.90) 100%),
              url('/fr/images/boat-tile.jpg') center/cover;
  color: #fff; border-color: transparent;
}

.tile.route-tile {
  background: linear-gradient(180deg, rgba(6,18,30,.12) 0%, rgba(6,18,30,.46) 42%, rgba(6,18,30,.88) 100%),
              url('/fr/images/route-map-thumb.jpg?v=20260526a') center/cover;
  color: #fff; border-color: transparent;
}

.tile.refit-tile {
  background: linear-gradient(180deg, rgba(14,36,51,.22) 0%, rgba(14,36,51,.52) 42%, rgba(14,36,51,.90) 100%),
              url('/fr/images/2026/2026-travaux-v2-04.jpg') center/cover;
  color: #fff; border-color: transparent;
}

.tile.crew-tile {
  background: linear-gradient(180deg, rgba(14,36,51,.30) 0%, rgba(14,36,51,.55) 40%, rgba(14,36,51,.90) 100%),
              url('/fr/images/crew-family.jpg') center/cover;
  color: #fff; border-color: transparent;
}

.tile h2 {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.4rem; line-height: 1.1; margin: 0; font-weight: 400;
}

.tile p { color: var(--muted); margin: 6px 0 0; font-size: .9rem; line-height: 1.4; }
.tile.photo p, .tile.boat p, .tile.route-tile p, .tile.refit-tile p, .tile.crew-tile p { color: #d6e7ea; }

.badge {
  align-self: start;
  background: rgba(255,255,255,.92); color: var(--navy);
  border-radius: 999px; padding: 5px 11px;
  font-size: .72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em;
}

.tile-arrow {
  position: absolute; bottom: 16px; right: 16px;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(15,26,35,.06);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; color: var(--muted);
  transition: .15s;
}

.tile:hover .tile-arrow { background: var(--teal); color: #fff; }
.tile.photo .tile-arrow, .tile.boat .tile-arrow, .tile.route-tile .tile-arrow, .tile.refit-tile .tile-arrow, .tile.crew-tile .tile-arrow {
  background: rgba(255,255,255,.14); color: #fff;
}
.tile.photo:hover .tile-arrow, .tile.boat:hover .tile-arrow, .tile.route-tile:hover .tile-arrow, .tile.refit-tile:hover .tile-arrow, .tile.crew-tile:hover .tile-arrow {
  background: var(--sand); color: #1a1205;
}

/* ── Below section ── */
.below {
  display: grid; grid-template-columns: 1fr 320px;
  gap: 16px; padding: 4px clamp(16px, 4vw, 44px) 48px;
}

/* Feed */
.feed {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 24px; padding: 22px;
}

.feed-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}

.feed-head h2 { margin: 0; font-size: 1.35rem; font-weight: 700; }
.feed-head a { color: var(--teal); font-weight: 700; font-size: .9rem; }
.feed-head a:hover { text-decoration: underline; }

/* Filter chips */
.filter {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px;
}

.chip {
  border: 1px solid var(--line); background: transparent;
  color: var(--muted); border-radius: 999px;
  padding: 6px 12px; font-size: .82rem; font-weight: 600;
  cursor: pointer; transition: .15s; font-family: inherit;
}

.chip:hover { background: rgba(15,26,35,.04); }
.chip.active { background: var(--teal); color: #fff; border-color: var(--teal); }

/* Log rows */
.row {
  display: grid; grid-template-columns: 80px 1fr auto;
  gap: 12px; align-items: center;
  padding: 12px 0; border-top: 1px solid var(--line);
  transition: .15s;
}

.row:hover {
  background: rgba(15,26,35,.02);
  margin: 0 -10px; padding-left: 10px; padding-right: 10px;
  border-radius: 12px;
}

.row img, .row-thumb {
  width: 80px; height: 62px; object-fit: cover;
  border-radius: 12px; display: block;
  background: var(--bg);
}

.row-thumb-empty {
  background: linear-gradient(135deg, rgba(30,122,122,.14), rgba(212,168,67,.18));
  border: 1px solid var(--line);
}

.row h3 { margin: 0 0 2px; font-size: 1rem; font-weight: 700; }
.row p { margin: 0; color: var(--muted); font-size: .88rem; }
.row .meta {
  color: var(--teal); font-size: .76rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 1px;
}
.arrow { color: var(--teal); font-weight: 800; font-size: 1.1rem; }

/* ── Side panel ── */
.side { display: flex; flex-direction: column; gap: 14px; }

/* ── Timeline ── */
.timeline-aside {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px 18px;
}
.timeline {
  display: flex;
  flex-direction: column;
  position: relative;
}
/* continuous vertical line */
.timeline::before {
  content: '';
  position: absolute;
  top: 6px; bottom: 6px;
  left: 38px;
  width: 2px;
  background: var(--line);
  border-radius: 1px;
}
.tl-row {
  display: grid;
  grid-template-columns: 36px 20px 1fr;
  align-items: start;
  gap: 0;
  padding: 5px 0;
  position: relative;
  cursor: pointer;
  border-radius: 6px;
  transition: background .15s;
}
.tl-row:hover {
  background: rgba(0,0,0,.04);
}
.tl-year {
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
  text-align: right;
  padding-top: 2px;
  font-variant-numeric: tabular-nums;
}
.tl-active .tl-year {
  color: var(--navy);
  font-weight: 800;
  font-size: .78rem;
}
.tl-active .tl-label {
  color: var(--navy);
  font-weight: 700;
}
.tl-active {
  background: rgba(14,42,58,.06);
}
.tl-bar {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--teal);
  border: 2px solid var(--card);
  box-shadow: 0 0 0 2px var(--teal);
  margin: 3px auto 0;
  position: relative;
  z-index: 1;
}
.tl-bar-accent {
  background: #e8a838;
  box-shadow: 0 0 0 2px #e8a838;
  width: 12px; height: 12px;
  margin-top: 2px;
}
.tl-bar-dim {
  background: var(--line);
  box-shadow: 0 0 0 2px var(--line);
}
.tl-highlight .tl-year {
  color: var(--navy);
  font-weight: 800;
}
.tl-label {
  font-size: .76rem;
  color: var(--muted);
  line-height: 1.35;
  padding-left: 6px;
}
.tl-highlight .tl-label {
  color: var(--navy);
  font-weight: 600;
}

.panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 24px; padding: 22px;
}

.panel h2 { margin: 0 0 12px; font-size: 1.15rem; font-weight: 700; }
.panel p { color: var(--muted); font-size: .9rem; margin: 0 0 10px; line-height: 1.5; }
.panel ul { padding-left: 16px; color: var(--muted); font-size: .88rem; margin: 0; }
.panel li { margin-bottom: 5px; line-height: 1.45; }
.panel a.teal { color: var(--teal); font-weight: 700; }

.refit-link { display: inline-block; margin-top: 8px; }

.refit-panel {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #071c27;
  isolation: isolate;
  min-height: 320px;
}

.refit-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(7, 28, 39, .30) 0%, rgba(7, 28, 39, .76) 56%, rgba(7, 28, 39, .94) 100%),
    url('/fr/images/2026/2026-travaux-v2-04.jpg') center / cover no-repeat;
  transform: scale(1.02);
}

.refit-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 18%, rgba(126, 216, 216, .22), transparent 34%),
    radial-gradient(circle at 82% 76%, rgba(212, 168, 67, .22), transparent 32%);
  pointer-events: none;
}

.refit-panel h2 { color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.45); }
.refit-panel p { color: #e6f3f5; text-shadow: 0 2px 14px rgba(0,0,0,.45); }

.refit-posts {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.refit-posts a {
  display: block;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  background: rgba(5, 22, 34, .72);
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
  backdrop-filter: blur(10px);
  transition: .15s;
}

.refit-posts a:hover { background: rgba(5, 22, 34, .84); transform: translateY(-1px); }
.refit-posts span { display: block; color: var(--sand); font-size: .72rem; font-weight: 800; letter-spacing: .08em; }
.refit-posts strong { display: block; margin-top: 2px; color: #fff; }
.refit-posts em { display: block; margin-top: 2px; color: #cfe7eb; font-size: .78rem; font-style: normal; }

.loading-state { padding: 20px; color: var(--muted); }

.loading-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2px solid var(--line);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Route panel */
.route-panel {
  position: relative;
  overflow: hidden;
  min-height: 290px;
  padding: 0;
  background: #061923;
  color: #fff;
  isolation: isolate;
  display: flex;
  flex-direction: column;
}

.route-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(6, 18, 30, .08) 0%, rgba(6, 18, 30, .38) 42%, rgba(6, 18, 30, .86) 100%),
    url('/fr/images/route-map-thumb.jpg?v=20260526a') center / cover no-repeat;
  transform: scale(1.02);
}

.route-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 22% 16%, rgba(126, 216, 216, .26), transparent 36%),
    radial-gradient(circle at 78% 70%, rgba(212, 168, 67, .20), transparent 34%);
  pointer-events: none;
}

.route-panel h2 {
  color: #fff;
  margin: 0;
  padding: 22px 22px 0;
  text-shadow: 0 2px 14px rgba(0,0,0,.45);
}

.route-panel > p {
  color: #e6f3f5;
  margin: 0;
  padding: 12px 22px 0;
  text-shadow: 0 2px 14px rgba(0,0,0,.45);
}

.route-link {
  display: flex; align-items: center; gap: 10px;
  padding: 14px; margin-top: 12px;
  background: var(--navy); color: #fff;
  border-radius: 16px; transition: .15s;
}
.route-panel .route-link {
  margin: auto 16px 16px;
  background: rgba(5, 22, 34, .78);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 16px 36px rgba(0,0,0,.24);
  backdrop-filter: blur(10px);
}
.route-link:hover { opacity: .92; }
.route-link svg { flex-shrink: 0; }
.route-link div { flex: 1; }
.route-link strong { display: block; font-size: .95rem; }
.route-link span { font-size: .78rem; color: #8aaab0; }
.route-panel .route-link span { color: #cfe7eb; }
.route-link .go { color: var(--sand); font-weight: 700; font-size: .85rem; }

/* Footer */
.footer {
  text-align: center; padding: 28px clamp(16px, 4vw, 44px);
  color: var(--muted); font-size: .82rem;
  border-top: 1px solid var(--line);
}
.footer a { color: var(--teal); font-weight: 600; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; }
  .hero-main { min-height: 440px; }
  .below { grid-template-columns: 1fr; }
  .side { flex-direction: row; }
  .side .panel { flex: 1; }
  .stats-bar { grid-template-columns: repeat(4, 1fr); }
  .timeline-aside { order: 2; }
}

@media (max-width: 680px) {
  .menu-btn { display: block; }
  .links, .lang-switch { display: none; }
  .menu-open .links {
    display: flex; position: absolute;
    right: 16px; top: 58px; flex-direction: column;
    background: var(--card); border: 1px solid var(--line);
    border-radius: 16px; padding: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,.12);
    z-index: 30;
  }
  .menu-open .lang-switch {
    display: flex; position: absolute;
    right: 16px; top: 190px;
    background: var(--card); border: 1px solid var(--line);
    border-radius: 16px; padding: 4px;
    box-shadow: 0 10px 40px rgba(0,0,0,.12);
    z-index: 30;
  }
  .quick { grid-template-columns: 1fr; }
  .hero-main { min-height: 420px; border-radius: 20px; }
  .tile, .feed, .panel { border-radius: 18px; }
  .row { grid-template-columns: 64px 1fr; }
  .row img, .row-thumb { width: 64px; height: 52px; }
  .arrow { display: none; }
  .side { flex-direction: column; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .hero-main h1 { font-size: 2.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .tile, .row, .btn, .route-link { transition: none; }
  .tile:hover { transform: none; }
  .loading-spinner { animation: none; }
}

@media screen and (prefers-color-scheme: dark) {
  :root {
    --bg: #121820;
    --ink: #e4eaf0;
    --muted: #9aabb8;
    --card: #1e2a38;
    --line: rgba(200, 215, 230, .10);
    --navy: #8ab4d6;
    --teal: #58b9d6;
    --sand: #e8a838;
    --sand-hover: #d99a22;
    --rust: #d98a66;
  }

  body {
    background:
      radial-gradient(circle at 10% 0%, rgba(232, 168, 56, .08), transparent 30%),
      radial-gradient(circle at 86% 12%, rgba(88, 185, 214, .08), transparent 32%),
      linear-gradient(180deg, #1a2430 0%, var(--bg) 58%, #0e141a 100%);
  }

  .tile:not(.boat):not(.route-tile):not(.refit-tile):not(.crew-tile):not(.photo),
  .feed,
  .timeline-aside,
  .panel {
    background: rgba(30, 42, 56, .78);
    border-color: rgba(200, 215, 230, .10);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .24);
  }

  .tile:hover,
  .row:hover {
    box-shadow: 0 18px 46px rgba(0, 0, 0, .28);
  }

  .row:hover,
  .tl-row:hover,
  .tl-active {
    background: rgba(200, 215, 230, .06);
  }

  .chip {
    background: rgba(30, 42, 56, .56);
    border-color: rgba(200, 215, 230, .12);
    color: var(--ink-soft, var(--muted));
  }

  .chip:hover {
    background: rgba(40, 55, 72, .84);
    color: var(--ink);
  }

  .chip.active {
    background: var(--navy);
    border-color: var(--navy);
    color: #0e141a;
  }

  .badge {
    background: rgba(228, 234, 240, .92);
    color: #0e141a;
  }

  .tile:not(.boat):not(.route-tile):not(.refit-tile):not(.crew-tile):not(.photo) .tile-arrow {
    background: rgba(200, 215, 230, .08);
    color: var(--ink);
  }

  .row-thumb-empty {
    background: linear-gradient(135deg, rgba(88, 185, 214, .16), rgba(232, 168, 56, .16));
    border-color: rgba(200, 215, 230, .10);
  }

  .tl-bar {
    border-color: var(--card);
  }

  .tl-active .tl-year,
  .tl-active .tl-label,
  .tl-highlight .tl-year,
  .tl-highlight .tl-label {
    color: var(--navy);
  }

  .route-link {
    background: rgba(10, 22, 34, .78);
    border: 1px solid rgba(200, 215, 230, .10);
  }
}
