/* ============================================================
   Gravelement Vôtre — Feuille de style principale
   ============================================================ */

/* ─── Variables ─────────────────────────────────────────── */
:root {
  --orange:        #E8640A;
  --orange-dark:   #BF4E00;
  --orange-light:  #FFF3E8;
  --orange-mid:    #F5800A;
  --dark:          #1C1C1C;
  --text:          #2E2E2E;
  --text-muted:    #666;
  --bg:            #F7F5F2;
  --white:         #FFFFFF;
  --border:        #E0DDD8;
  --card-bg:       #FFFFFF;

  --radius:        8px;
  --radius-lg:     14px;
  --shadow:        0 2px 10px rgba(0,0,0,0.07);
  --shadow-hover:  0 8px 28px rgba(0,0,0,0.13);

  --nav-h:         78px;
  --max-w:         1180px;
}

/* ─── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  padding-top: var(--nav-h);
}
a { color: var(--orange); text-decoration: none; transition: color .2s; }
a:hover { color: var(--orange-dark); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ─── Utilitaires ───────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 3rem 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ─── Navigation ────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--white);
  border-bottom: 3px solid var(--orange);
  box-shadow: var(--shadow);
  z-index: 1000;
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav-brand { display: flex; align-items: center; }
.nav-logo { height: 58px; width: auto; }
.nav-list { display: flex; gap: 2rem; }
.nav-list a {
  color: var(--dark); font-weight: 600; font-size: .9rem;
  text-transform: uppercase; letter-spacing: .06em;
  padding-bottom: 3px; border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav-list a:hover { color: var(--orange); border-color: var(--orange); }
.nav-burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-burger span { display: block; width: 26px; height: 2px; background: var(--dark); border-radius: 2px; transition: .3s; }

/* ─── Hero ──────────────────────────────────────────────── */
.hero {
  background:
    url('../images/hero-bg.jpg') center center / cover no-repeat;
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* Couche sombre sur la photo pour lisibilité du texte */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 8, 2, 0.72) 0%,
    rgba(20, 12, 0, 0.80) 50%,
    rgba(10, 8, 2, 0.72) 100%
  );
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }
.hero-logo {
  max-width: 300px; margin: 0 auto 1.5rem;
  filter: drop-shadow(0 4px 20px rgba(232,100,10,.55));
}
.hero-tagline { color: rgba(255,255,255,.75); font-size: 1.2rem; font-style: italic; margin-bottom: 2.5rem; }
.hero-stats { display: flex; justify-content: center; gap: 3.5rem; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat-num { display: block; font-size: 2.4rem; font-weight: 700; color: var(--orange); line-height: 1; }
.hero-stat-lbl { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.5); margin-top: .3rem; }

/* ─── En-têtes de section ───────────────────────────────── */
.section-hd { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 2rem; gap: 1rem; }
.section-title {
  font-size: 1.65rem; font-weight: 700; color: var(--dark);
  padding-bottom: .5rem; position: relative;
}
.section-title::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 44px; height: 3px; background: var(--orange); border-radius: 2px;
}
.section-more { color: var(--orange); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }

/* ─── Carte trace ───────────────────────────────────────── */
.traces-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 1.5rem; }
.trace-card {
  background: var(--card-bg); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.trace-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.trace-card-thumb {
  height: 190px; background: #2C2200; overflow: hidden; position: relative;
}
.trace-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.trace-card:hover .trace-card-thumb img { transform: scale(1.04); }
.trace-card-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2C2C2C, #3D2200);
  font-size: 3.5rem; color: rgba(255,255,255,.15);
}
.trace-card-body { padding: 1.2rem; }
.trace-card-region { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-muted); margin-bottom: .2rem; }
.trace-card-title { font-size: 1.05rem; font-weight: 700; color: var(--dark); margin-bottom: .8rem; }
.trace-card-title a { color: inherit; }
.trace-card-title a:hover { color: var(--orange); }
.trace-kpis { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: .8rem; }
.trace-kpi { font-size: .82rem; color: var(--text-muted); display: flex; align-items: center; gap: .25rem; }
.trace-card-foot { display: flex; align-items: center; justify-content: space-between; padding-top: .75rem; border-top: 1px solid var(--border); }

/* ─── Badges ────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: .18rem .55rem;
  border-radius: 20px; font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
}
.badge-facile    { background: #D4EDDA; color: #155724; }
.badge-modere,
.badge-modéré    { background: #FFF3CD; color: #856404; }
.badge-difficile { background: #F8D7DA; color: #721C24; }
.badge-expert    { background: #2D0000; color: #FFD0D0; }
.badge-article   { background: #D1ECF1; color: #0C5460; }
.badge-video,
.badge-vidéo     { background: #F8D7DA; color: #721C24; }
.badge-podcast   { background: #E2D9F3; color: #4A2070; }
.badge-site      { background: #D4EDDA; color: #155724; }

/* ─── Étoiles ───────────────────────────────────────────── */
.stars { display: inline-flex; gap: 2px; line-height: 1; }
.star { font-size: .95rem; color: var(--border); }
.star.on { color: var(--orange); }

/* ─── Cartes liens ──────────────────────────────────────── */
.links-list { display: flex; flex-direction: column; gap: 1rem; }
.link-card {
  background: var(--card-bg); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.1rem 1.2rem;
  display: flex; align-items: flex-start; gap: 1rem;
  border-left: 4px solid var(--orange);
  transition: transform .2s, box-shadow .2s;
}
.link-card:hover { transform: translateX(4px); box-shadow: var(--shadow-hover); }
.link-card-ico { font-size: 1.7rem; flex-shrink: 0; line-height: 1; padding-top: .1rem; }
.link-card-body { flex: 1; min-width: 0; }
.link-card-title { font-weight: 700; font-size: .97rem; color: var(--dark); margin-bottom: .25rem; }
.link-card-title a { color: inherit; }
.link-card-title a:hover { color: var(--orange); }
.link-card-meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .4rem; }
.link-card-source { font-size: .72rem; color: var(--text-muted); }
.link-card-summary { font-size: .85rem; color: var(--text-muted); line-height: 1.5; }
.link-card-arrow { color: var(--orange); font-size: 1.3rem; flex-shrink: 0; align-self: center; }

/* ─── En-tête de page (catégories, pages) ───────────────── */
.page-hd {
  background: linear-gradient(135deg, #1C1C1C 0%, #2C2200 100%);
  color: var(--white); padding: 3rem 0 2.5rem; margin-bottom: 3rem;
}
.page-hd-title { font-size: 2.2rem; font-weight: 700; }
.page-hd-sub { color: rgba(255,255,255,.65); margin-top: .4rem; font-size: 1rem; }
.page-hd-line { display: block; width: 48px; height: 4px; background: var(--orange); border-radius: 2px; margin-top: 1rem; }

/* ─── Page article trace ────────────────────────────────── */
.trace-map-wrap {
  height: 480px; border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow); margin-bottom: 2rem;
  background: #cde;
}
#trace-map { width: 100%; height: 100%; }

.trace-stats-bar {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: .75rem; background: var(--white); border-radius: var(--radius-lg);
  padding: 1.4rem; box-shadow: var(--shadow); margin-bottom: 2rem;
}
.tsb-item { text-align: center; }
.tsb-val { display: block; font-size: 1.4rem; font-weight: 700; color: var(--orange); margin-bottom: .2rem; }
.tsb-lbl { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); }

.trace-layout { display: grid; grid-template-columns: 1fr 280px; gap: 2rem; align-items: start; }
.trace-main { background: var(--white); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow); }
.trace-main h1 { font-size: 1.8rem; margin-bottom: .5rem; color: var(--dark); }
.trace-meta-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.5rem; color: var(--text-muted); font-size: .85rem; }
.trace-content { line-height: 1.8; }
.trace-content p { margin-bottom: 1rem; }
.trace-content h2 { margin: 1.5rem 0 .6rem; color: var(--dark); font-size: 1.15rem; }
.trace-content ul { padding-left: 1.2rem; list-style: disc; }
.trace-content li { margin-bottom: .3rem; }

.trace-sidebar {}
.trace-dl-btn {
  display: block; background: var(--orange); color: var(--white) !important;
  text-align: center; padding: .85rem 1.2rem; border-radius: var(--radius);
  font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 1.2rem; transition: background .2s;
}
.trace-dl-btn:hover { background: var(--orange-dark); }

.trace-info-card { background: var(--white); border-radius: var(--radius-lg); padding: 1.2rem; box-shadow: var(--shadow); margin-bottom: 1.2rem; }
.trace-info-card h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); margin-bottom: .75rem; }
.trace-info-list { display: flex; flex-direction: column; gap: .5rem; }
.trace-info-item { display: flex; justify-content: space-between; font-size: .875rem; }
.trace-info-key { color: var(--text-muted); }
.trace-info-val { font-weight: 600; color: var(--dark); }

/* ─── Galerie photos ────────────────────────────────────── */
.photo-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; margin-top: 1.5rem; }
.photo-gallery-item { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; }
.photo-gallery-item img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; transition: transform .3s; }
.photo-gallery-item img:hover { transform: scale(1.06); }

/* ─── Page article lien ─────────────────────────────────── */
.link-article-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 2rem; box-shadow: var(--shadow); margin-bottom: 2rem;
  border-top: 4px solid var(--orange);
}
.link-article-card h1 { font-size: 1.8rem; margin-bottom: .75rem; color: var(--dark); }
.link-article-meta { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.25rem; align-items: center; }
.link-article-url {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--orange); color: var(--white) !important;
  padding: .7rem 1.4rem; border-radius: var(--radius);
  font-weight: 700; transition: background .2s; margin-top: .5rem;
}
.link-article-url:hover { background: var(--orange-dark); }
.link-article-body { margin-top: 1.5rem; line-height: 1.8; color: var(--text); }
.link-article-body p { margin-bottom: 1rem; }

/* ─── Page statique ─────────────────────────────────────── */
.page-content { background: var(--white); border-radius: var(--radius-lg); padding: 2.5rem; box-shadow: var(--shadow); max-width: 820px; margin: 0 auto; }
.page-content h1 { font-size: 2rem; margin-bottom: 1.5rem; color: var(--dark); }
.page-content h2 { font-size: 1.3rem; margin: 1.5rem 0 .6rem; color: var(--dark); }
.page-content p { margin-bottom: 1rem; line-height: 1.8; }
.page-content ul { padding-left: 1.2rem; list-style: disc; margin-bottom: 1rem; }
.page-content li { margin-bottom: .35rem; }

/* ─── Lightbox ──────────────────────────────────────────── */
.lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.9); z-index: 9999;
  align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: var(--radius); box-shadow: 0 0 60px rgba(0,0,0,.6); }
.lightbox-close {
  position: absolute; top: 1.2rem; right: 1.5rem;
  color: white; font-size: 2.2rem; line-height: 1;
  background: none; border: none; cursor: pointer; opacity: .8;
  transition: opacity .2s;
}
.lightbox-close:hover { opacity: 1; }

/* ─── Footer ────────────────────────────────────────────── */
.footer {
  background: var(--dark); color: rgba(255,255,255,.5);
  padding: 2rem 0; text-align: center; font-size: .85rem; margin-top: 4rem;
}
.footer a { color: var(--orange); }
.footer strong { color: rgba(255,255,255,.8); }

/* ─── Archives / Tags ───────────────────────────────────── */
.archive-list { display: flex; flex-direction: column; gap: .6rem; }
.archive-item { display: flex; justify-content: space-between; align-items: center; padding: .75rem 1rem; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }
.archive-item a { color: var(--dark); font-weight: 600; }
.archive-item a:hover { color: var(--orange); }
.archive-date { font-size: .8rem; color: var(--text-muted); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: .6rem; padding: 2rem 0; }
.tag-cloud a { padding: .35rem .8rem; background: var(--white); border-radius: 20px; box-shadow: var(--shadow); font-size: .85rem; color: var(--dark); }
.tag-cloud a:hover { background: var(--orange-light); color: var(--orange-dark); }

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 900px) {
  .trace-layout { grid-template-columns: 1fr; }
  .trace-sidebar { order: -1; }
  .trace-map-wrap { height: 360px; }
}

@media (max-width: 768px) {
  .nav-burger { display: flex; }
  .nav-list {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--white); flex-direction: column;
    padding: .5rem 1.25rem 1rem; gap: 0;
    box-shadow: 0 8px 20px rgba(0,0,0,.1);
    border-top: 1px solid var(--border);
    transform: translateY(-110%); opacity: 0; pointer-events: none;
    transition: transform .3s, opacity .3s;
  }
  .nav-list.open { transform: translateY(0); opacity: 1; pointer-events: all; }
  .nav-list li { border-bottom: 1px solid var(--border); }
  .nav-list li:last-child { border-bottom: none; }
  .nav-list a { display: block; padding: .75rem .25rem; border-bottom: none; }

  .hero { padding: 3.5rem 0 3rem; }
  .hero-logo { max-width: 240px; }
  .hero-stats { gap: 2rem; }
  .hero-stat-num { font-size: 1.8rem; }

  .section-hd { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .traces-grid { grid-template-columns: 1fr; }
  .trace-stats-bar { grid-template-columns: repeat(3, 1fr); }
  .page-hd-title { font-size: 1.6rem; }
}

@media (max-width: 480px) {
  .trace-stats-bar { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { gap: 1.2rem; }
}
