/* The Rolling Adventurers — Editorial outdoor aesthetic */

:root {
  /* Palette — Forêt profonde + Terracotta + Sauge */
  --bg: #E8E2D3;
  --bg-soft: #EFEADD;
  --bg-deep: #DDD5C0;
  --ink: #0F1F1A;
  --ink-soft: #2A3A33;
  --ink-mute: #5C6B62;
  --rust: #B85C38;
  --rust-deep: #8E4326;
  --sage: #5C6B47;
  --sage-deep: #3F4A30;
  --line: rgba(15, 31, 26, 0.12);
  --line-strong: rgba(15, 31, 26, 0.22);
  --paper: #F2EDE0;

  --serif: 'Fraunces', 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 18px;

  /* Hauteur de la navbar — utilisée pour calibrer le hero */
  --nav-h: 76px;
}

[data-theme="dark"] {
  --bg: #0F1411;
  --bg-soft: #161C18;
  --bg-deep: #0A0E0C;
  --ink: #EDE5D0;
  --ink-soft: #C9C0AB;
  --ink-mute: #8A8576;
  --rust: #D17048;
  --rust-deep: #B85C38;
  --sage: #8FA070;
  --sage-deep: #6B7A52;
  --line: rgba(237, 229, 208, 0.12);
  --line-strong: rgba(237, 229, 208, 0.22);
  --paper: #1A201C;
}

[data-palette="forest"] {
  --bg: #F2EDE3;
  --ink: #1B3A2F;
  --rust: #C97D3F;
  --sage: #7A8B5C;
  --paper: #F8F4EA;
}

[data-palette="earth"] {
  --bg: #EFE9DD;
  --ink: #3D2817;
  --rust: #C97D3F;
  --sage: #8B7355;
  --paper: #F5EFE2;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Scrollbar custom ─────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--ink-mute); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-soft); }
* { scrollbar-width: thin; scrollbar-color: var(--ink-mute) var(--bg); }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.4s ease, color 0.4s ease;
}

body { min-height: 100vh; overflow-x: hidden; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }

/* Type scale */
.serif { font-family: var(--serif); font-optical-sizing: auto; font-variation-settings: "SOFT" 50, "WONK" 0; }
.mono { font-family: var(--mono); }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; line-height: 1.05; }
h1 { font-size: clamp(48px, 7vw, 104px); }
h2 { font-size: clamp(36px, 4.5vw, 64px); }
h3 { font-size: clamp(22px, 2vw, 30px); line-height: 1.2; }

p { text-wrap: pretty; }

/* Layout helpers */
.container { max-width: 1440px; margin: 0 auto; padding: 0 32px; }
.container-tight { max-width: 1080px; margin: 0 auto; padding: 0 32px; }

@media (max-width: 720px) {
  .container, .container-tight { padding: 0 20px; }
}

/* Hero — bande texte responsive */
@media (max-width: 820px) {
  .hero-text-grid { grid-template-columns: 1fr !important; gap: 20px !important; }
}

/* Hairline */
.rule { height: 1px; background: var(--line); width: 100%; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 999px;
  transition: all 0.25s cubic-bezier(.2,.7,.3,1);
  white-space: nowrap;
}
.btn-primary {
  background: var(--rust);
  color: #FFF8EE;
}
.btn-primary:hover {
  background: var(--rust-deep);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn-dark {
  background: var(--ink);
  color: var(--bg);
}
.btn-dark:hover { background: var(--ink-soft); }

.btn-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  position: relative;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ink);
  transition: gap 0.25s;
}
.btn-arrow:hover { gap: 14px; }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background 0.4s, border-color 0.4s;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 32px;
  max-width: 1440px;
  margin: 0 auto;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: -0.01em;
}
.nav-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
}
.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
}
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.2s;
  position: relative;
}
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--ink); }
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -22px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--rust);
}

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-inner { padding: 10px 20px; }
  .nav-hamburger { display: flex !important; }
  :root { --nav-h: 72px; }
}


/* Footer */
.footer {
  background: var(--ink);
  color: var(--bg);
  padding: 32px 0;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 64px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-col h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 18px;
  font-weight: 500;
}
.footer-col a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--rust); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  font-family: var(--mono);
}

@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; }
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.8s cubic-bezier(.2,.7,.3,1) both; }

@keyframes kenburns {
  from { transform: scale(1.0); }
  to { transform: scale(1.06); }
}
.carousel-img-wrapper {
  transform-origin: center center;
  will-change: transform;
}

/* Image placeholder */
.img-placeholder {
  background:
    repeating-linear-gradient(
      135deg,
      var(--bg-deep) 0 1px,
      transparent 1px 8px
    ),
    var(--bg-soft);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.img-placeholder-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  background: var(--bg);
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  text-align: center;
  max-width: 80%;
}

/* Marquee */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  background: var(--bg-soft);
}
.marquee-track {
  display: flex;
  gap: 64px;
  white-space: nowrap;
  animation: scroll 50s linear infinite;
  font-family: var(--serif);
  font-size: 28px;
  color: var(--ink-soft);
  font-style: italic;
}
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee-track span { display: inline-flex; align-items: center; gap: 64px; }
.marquee-dot {
  width: 6px; height: 6px; background: var(--rust); border-radius: 50%;
  display: inline-block;
}

/* Selection */
::selection { background: var(--rust); color: #FFF8EE; }

/* ── Quill rich text editor ─────────────────────────────── */
.ql-toolbar.ql-snow {
  border: none;
  border-bottom: 1px solid var(--line-strong);
  background: var(--paper);
  padding: 10px 14px;
  font-family: var(--sans);
}
.ql-container.ql-snow {
  border: none;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
}
.ql-editor {
  min-height: 220px;
  padding: 16px 18px;
  line-height: 1.7;
  color: var(--ink);
}
.ql-editor.ql-blank::before {
  color: var(--ink-mute);
  font-style: normal;
  font-size: 16px;
}
.ql-snow .ql-stroke { stroke: var(--ink-mute); }
.ql-snow .ql-fill { fill: var(--ink-mute); }
.ql-snow .ql-picker { color: var(--ink-mute); }
.ql-snow.ql-toolbar button:hover .ql-stroke,
.ql-snow.ql-toolbar button.ql-active .ql-stroke { stroke: var(--rust); }
.ql-snow.ql-toolbar button:hover .ql-fill,
.ql-snow.ql-toolbar button.ql-active .ql-fill { fill: var(--rust); }
.ql-snow.ql-toolbar button:hover,
.ql-snow.ql-toolbar button.ql-active { color: var(--rust); }
.ql-snow .ql-picker-options { background: var(--paper); border-color: var(--line-strong); }
[data-theme="dark"] .ql-toolbar.ql-snow { background: var(--bg-soft); }
[data-theme="dark"] .ql-snow .ql-picker-options { background: var(--bg-soft); }

/* ── Contact page — fancy inputs ──────────────────────────── */
/* Supprime l'outline natif sur tous les inputs du formulaire contact */
.contact-card input:focus { outline: none; }
/* Caret rust sur tous les inputs */
.contact-card input { caret-color: var(--rust); }
/* Sélection texte dans les inputs */
.contact-card input::selection { background: var(--rust); color: #FFF8EE; }
/* Placeholder subtil */
.contact-card input::placeholder { color: var(--ink-mute); opacity: 0.55; font-size: 14px; }

/* ── Mobile responsiveness ─────────────────────────────────── */
@media (max-width: 900px) {
  .story-overlay-img { display: none !important; }
}

@media (max-width: 640px) {
  .marquee-track { font-size: 18px !important; gap: 32px !important; }
  .marquee-track span { gap: 32px !important; }
  .hero-controls { bottom: 20px !important; padding: 0 16px !important; }
  .hero-nav { display: none !important; }
}

@media (max-width: 480px) {
  .announcement-banner { width: calc(100vw - 32px) !important; right: 16px !important; bottom: 16px !important; }
}

@media (max-width: 820px) {
  .admin-layout { grid-template-columns: 1fr !important; }
  .admin-sidebar { height: auto !important; position: relative !important; top: auto !important; flex-direction: row !important; flex-wrap: wrap !important; }
  .admin-sidebar nav { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; overflow-x: auto !important; padding: 4px 8px !important; -webkit-overflow-scrolling: touch; }
  .admin-sidebar nav button { width: auto !important; white-space: nowrap !important; padding: 10px 12px !important; font-size: 12px !important; flex-shrink: 0 !important; }
  .admin-content { padding: 24px 16px !important; }
  .admin-sidebar-bottom { flex-direction: row !important; padding: 8px 16px !important; gap: 16px !important; }
}

/* ── Accessibilité : animations réduites ─────────────────── */
@media (prefers-reduced-motion: reduce) {
  .fade-up { animation: none !important; }
  * { transition-duration: 0.01ms !important; }
}
