:root {
  --bg: #f7fafc; /* very light */
  --card: #ffffff;
  --muted: #6b7280;
  --text: #0f172a;
  --accent: #2c7a7b; /* turquoise */
  --accent-strong: #245e5f;
  --accent-light: #e6f6f6;
  --radius: 12px;
  --gap: 1.25rem;
  --container: 1100px;
}

/* Basic reset */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  font-size: 16px;
}

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

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

/* ---------------- Header / nav ---------------- */
header {
  background: linear-gradient(0deg, rgba(44,122,123,0.06), rgba(44,122,123,0.02));
  backdrop-filter: saturate(120%);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand__logo {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
}

.brand h1 {
  font-size: 1rem;
  margin: 0;
}

.brand p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------------- Navigation menu ---------------- */
#main-nav.topnav {
  display: flex;
  align-items: center;
  gap: 0.5rem; /* espace entre les liens */
}

#main-nav.topnav a {
  display: inline-block;
  padding: 0.5rem 0.8rem;
  font-size: 1rem;
  letter-spacing: 0.01em;
  transition: background 0.2s ease;
}

#main-nav.topnav a:hover {
  background: var(--accent-light);
  border-radius: 6px;
}

/* Hamburger menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ---------------- Hero slideshow ---------------- */
.hero {
  position: relative;
  margin: 0.1rem 0 2.5rem;
  padding-top: 0.01rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(44,122,123,0.02), transparent);
}

.slides {
  position: relative;
  width: 100%;
  max-height: 500px;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.slides img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: contain;
}

.hero__overlay {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
}

.hero__card {
  margin: 1.25rem;
  background: rgba(255,255,255,0.9);
  padding: 1rem;
  border-radius: 10px;
  max-width: 520px;
  box-shadow: 0 8px 30px rgba(10,10,10,0.06);
}

.hero__card h2 {
  margin: 0 0 0.5rem 0;
  color: var(--accent-strong);
}

.hero__card p {
  margin: 0;
  color: var(--muted);
}

/* Hero update label */
.hero__update {
  position: absolute;
  bottom: 10px;
  right: 15px;
  background: rgba(255,255,255,0.75);
  color: var(--muted);
  font-size: 0.85rem;
  padding: 0.13rem 0.15rem;
  border-radius: 6px;
  z-index: 3;
}

.hero__update a {
  color: var(--accent-strong);
  text-decoration: none;
}

.hero__update a:hover {
  text-decoration: underline;
}

/* Dots */
.dots {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  padding: 0.75rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d1d5db;
  cursor: pointer;
}

.dot.active {
  background: var(--accent);
}

/* ---------------- Main grid / cards ---------------- */
main {
  padding: 2rem 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap);
  align-items: start;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(12,18,26,0.06);
  transition: transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .28s ease;
  padding: 0;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 34px rgba(12,18,26,0.12);
}

.card__img {
  aspect-ratio: 16/9;
  height: auto;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  position: relative;
}

.card:hover .card__img::after {
  background: rgba(0, 0, 0, 0.5);
}

.card__body {
  padding: 1rem;
}

.card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
}

.card p {
  margin: 0 0 1rem 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  font-weight: 600;
  border: 0;
}

.btn.secondary {
  background: #f3f4f6;
  color: var(--accent-strong);
  border: 1px solid #e6eef0;
}

/* ---------------- Footer ---------------- */
footer {
  padding: 1.5rem 0;
  margin-top: 2rem;
  background: transparent;
  border-top: 1px solid rgba(15,23,42,0.04);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------------- Back to top ---------------- */
#topBtn {
  display: none;
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  cursor: pointer;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 820px) {
  .hero__card {
    max-width: 90%;
    margin: 1rem;
  }

  #main-nav.topnav {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    background: white;
    padding: 0.75rem;
    border-radius: 8px;
  }

  .nav-toggle {
    display: inline-block;
  }
}

@media (max-width: 768px) {
  figure.illustration {
    float: none;
    max-width: 90%;
    margin: 1rem auto;
  }
}

@media (max-width: 520px) {
  .slides {
    height: 200px;
  }

  .slides img {
    height: 200px;
  }

  .card__img {
    height: 140px;
  }
}

@media (max-width: 600px) {
  .vignette-item {
    flex-direction: column;
    align-items: center;
  }

  .vignette-item figcaption {
    text-align: center;
  }
}

/* Mobile / desktop menu spacing automatique */
@media (min-width: 821px) {
  .nav-toggle {
    display: none;
  }
}
.illustration-left { float: left; margin: 0 1rem 1rem 0; max-width: 25%; }
.illustration-right { float: right; margin: 0 0 1rem 1rem; max-width: 25%; }

.logo-text {
  display: inline-flex;      /* met le contenu sur la même ligne */
  align-items: center;       /* aligne verticalement le logo et le texte */
  gap: 0.5rem;               /* espace entre texte et logo */
}
.logo-text img {
  display: block;            /* évite que l'image provoque un décalage */
  max-height: 35px;          /* ajuste la hauteur si besoin */
}

/* footer */
footer::after {
  content: " © Jean Troupel • Mis à jour le 31 décembre 2025";
  display: block;
  text-align: center;
  color: #888;
  font-size: 0.9rem;
}

