/* =========================================================
   Journal créatif — feuille de style
   Palette : corail / violet / jaune soleil / turquoise
   Display : Fraunces · Corps : Work Sans · Utilitaire : Space Mono
========================================================= */

:root {
  --ink:      #1B1B1F;
  --paper:    #FFF8F0;
  --paper-2:  #FFF1E1;
  --coral:    #FF6B4A;
  --violet:   #6C4AB6;
  --yellow:   #FFC857;
  --teal:     #2EC4B6;
  --line:     rgba(27,27,31,0.12);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;

  --radius: 18px;
  --shadow: 0 10px 30px rgba(27,27,31,0.10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0 0 0.4em;
  line-height: 1.1;
}

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--violet);
}

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.logo {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.4rem;
  text-decoration: none;
  color: var(--ink);
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nav-links a {
  text-decoration: none;
  position: relative;
  padding-bottom: 4px;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--coral);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 3px;
  background: var(--coral);
  border-radius: 3px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--yellow);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }

.btn.btn-outline { background: transparent; }
.btn.btn-coral { background: var(--coral); color: var(--paper); }
.btn.btn-violet { background: var(--violet); color: var(--paper); }
.btn.btn-small { padding: 8px 16px; font-size: 0.75rem; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 90px 0 70px;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.55;
  z-index: 0;
}

.hero .wrap { position: relative; z-index: 1; }

.hero-title {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  margin-bottom: 0.15em;
}

.hero-title .accent {
  font-style: italic;
  color: var(--coral);
}

.hero-sub {
  max-width: 560px;
  font-size: 1.15rem;
  color: rgba(27,27,31,0.78);
  margin-bottom: 32px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Section titles ---------- */

.section { padding: 70px 0; }
.section + .section { border-top: 2px dashed var(--line); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.section-title { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }

/* ---------- Bio card ---------- */

.bio-card {
  background: var(--paper-2);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

/* ---------- CV / parcours timeline ---------- */

.timeline {
  position: relative;
  padding-left: 32px;
  border-left: 3px solid var(--ink);
}

.timeline-item { position: relative; padding-bottom: 34px; }
.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: "";
  position: absolute;
  left: -41px;
  top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--coral);
  border: 3px solid var(--paper);
  outline: 2px solid var(--ink);
}

.timeline-item.formation::before { background: var(--teal); }

.timeline-period {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--violet);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timeline-item h3 { font-size: 1.25rem; margin: 4px 0 2px; }
.timeline-org { font-weight: 600; color: var(--coral); margin-bottom: 6px; }
.timeline-item .timeline-item.formation .timeline-org,
.timeline-item.formation .timeline-org { color: var(--teal); }
.timeline-desc { color: rgba(27,27,31,0.78); margin: 0; }

.timeline-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  margin-bottom: 8px;
}

/* ---------- Journal cards (postcard / diary stamp look) ---------- */

.journal-grid {
  display: grid;
  gap: 28px;
}

.post-card {
  position: relative;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 28px 28px 22px;
  box-shadow: var(--shadow);
}

.post-card:nth-child(3n+1) { transform: rotate(-0.6deg); }
.post-card:nth-child(3n+2) { transform: rotate(0.5deg); }
.post-card:nth-child(3n)   { transform: rotate(-0.3deg); }

.post-stamp {
  position: absolute;
  top: -14px;
  right: 24px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 5px 14px;
  transform: rotate(4deg);
}

.post-mood {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--violet);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.post-card h3 { font-size: 1.5rem; margin-bottom: 10px; }
.post-card h3 a { text-decoration: none; }
.post-card h3 a:hover { color: var(--coral); }

.post-excerpt { color: rgba(27,27,31,0.8); margin-bottom: 18px; }

.post-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: rgba(27,27,31,0.6);
  border-top: 1.5px dashed var(--line);
  padding-top: 14px;
}

.post-meta .like-btn, .post-meta .comment-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.like-btn {
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--ink);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  transition: all 0.15s ease;
}

.like-btn:hover { border-color: var(--ink); }
.like-btn.liked { background: var(--coral); color: #fff; border-color: var(--ink); }

/* ---------- Single post page ---------- */

.post-full {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 42px;
  box-shadow: var(--shadow);
}

.post-full .post-body {
  font-size: 1.1rem;
  white-space: pre-line;
  margin: 24px 0 30px;
}

/* ---------- Comments ---------- */

.comments-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }

.comment {
  background: var(--paper-2);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 16px 20px;
}

.comment-head {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--violet);
  margin-bottom: 6px;
}

.comment-author { font-weight: 700; color: var(--ink); }

.comment-form {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.comment-form input,
.comment-form textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--paper);
}

.comment-form textarea { min-height: 100px; resize: vertical; }

/* ---------- Gallery ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
}

.gallery-item {
  border-radius: var(--radius);
  border: 2px solid var(--ink);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fff;
}

.gallery-swatch {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,0.25);
}

.gallery-caption { padding: 14px 16px 18px; }
.gallery-caption p { margin: 4px 0 0; font-size: 0.92rem; color: rgba(27,27,31,0.7); }

/* ---------- Vidéos ---------- */

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.video-card {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--ink);
}

.video-frame iframe,
.video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

.video-frame--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-frame--fallback a {
  color: var(--yellow);
  font-family: var(--font-mono);
  text-decoration: none;
}

.video-info { padding: 20px 22px 24px; }
.video-info h3 { font-size: 1.3rem; margin-bottom: 4px; }

.video-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--coral);
  margin: 0 0 10px;
  font-size: 1.02rem;
}

.video-description {
  color: rgba(27,27,31,0.75);
  margin: 0;
  font-size: 0.95rem;
}

/* ---------- Admin ---------- */

.admin-shell { max-width: 640px; margin: 60px auto; }

.admin-box {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.admin-box label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 16px 0 6px;
}

.admin-box input,
.admin-box textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 2px solid var(--ink);
  border-radius: 10px;
}

.admin-box textarea { min-height: 160px; resize: vertical; }

.flash {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 10px 16px;
  border-radius: 10px;
  margin-bottom: 18px;
  border: 1.5px solid var(--ink);
}

.flash.error { background: #ffe1da; }
.flash.success { background: #dcf7e3; }

.admin-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.admin-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 0.95rem;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 2px solid var(--ink);
  padding: 34px 0;
  margin-top: 40px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: rgba(27,27,31,0.65);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .nav-links { gap: 16px; font-size: 0.72rem; }
  .hero { padding: 60px 0 44px; }
  .post-full { padding: 26px; }
  .section { padding: 50px 0; }
}

/* ---------- Accessibility ---------- */

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
