:root {
  --soleil: #ff9d42;
  --corail: #ff6b6b;
  --corail-fonce: #e8503f;
  --lagon: #17a6a0;
  --lagon-fonce: #0d8781;
  --jaune: #ffc857;
  --creme: #fff9f0;
  --creme-carte: #ffffff;
  --sable-clair: #fff1de;
  --encre: #3a2e26;
  --gris: #8a7c6d;
  --gris-clair: #f0e4d3;
  --rayon: 20px;
  --ombre: 0 6px 18px rgba(232, 108, 63, 0.12);
  --ombre-hover: 0 12px 26px rgba(232, 108, 63, 0.18);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--creme);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(255, 200, 87, 0.18) 0, transparent 40%),
    radial-gradient(circle at 92% 18%, rgba(23, 166, 160, 0.14) 0, transparent 38%);
  background-attachment: fixed;
  color: var(--encre);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: "Baloo 2", "Nunito", sans-serif;
}

a { color: var(--lagon-fonce); }

header.entete {
  position: relative;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(120deg, var(--soleil) 0%, var(--corail) 65%, var(--corail-fonce) 100%);
  color: #fff;
  padding: 22px 18px 34px;
  text-align: center;
  overflow: hidden;
}

.photo-entete {
  position: absolute;
  inset: 0;
  background-image: url('images/fond-bandeau.jpg');
  background-size: cover;
  background-position: center 60%;
  z-index: 0;
}

.voile-entete {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(40, 18, 10, 0.38) 0%, rgba(40, 18, 10, 0.08) 45%, rgba(40, 18, 10, 0.22) 100%);
}

.entete-interieur {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  max-width: 1000px;
  margin: 0 auto;
}

.entete-contenu {
  text-align: center;
}

.van-entete {
  height: 90px;
  width: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 8px 10px rgba(20, 10, 5, 0.4));
}

header.entete h1 {
  margin: 4px 0 6px;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 14px rgba(90, 30, 10, 0.4);
}

header.entete p {
  margin: 0;
  opacity: 0.97;
  font-size: 1.1rem;
  font-weight: 700;
  text-shadow: 0 1px 8px rgba(90, 30, 10, 0.3);
}

.vague-entete {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 34px;
  fill: var(--creme);
  z-index: 1;
}

nav.barre {
  display: flex;
  justify-content: center;
  gap: 10px;
  background: transparent;
  padding: 4px 14px 14px;
  font-size: 0.92rem;
  font-weight: 700;
  flex-wrap: wrap;
}

nav.barre a {
  text-decoration: none;
  color: var(--corail-fonce);
  background: var(--creme-carte);
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: var(--ombre);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

nav.barre a:hover {
  transform: translateY(-2px);
  box-shadow: var(--ombre-hover);
}

nav.barre a.actif {
  background: linear-gradient(120deg, var(--lagon), var(--lagon-fonce));
  color: #fff;
  box-shadow: 0 6px 16px rgba(13, 135, 129, 0.3);
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.carte {
  background: var(--creme-carte);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  overflow: hidden;
  margin-bottom: 26px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.carte:has(.article-apercu):hover {
  transform: translateY(-3px);
  box-shadow: var(--ombre-hover);
}

.article-apercu {
  display: block;
  text-decoration: none;
  color: inherit;
}

.article-apercu .vignette {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  background: var(--gris-clair);
}

.article-apercu .contenu {
  padding: 18px 20px 20px;
}

.article-apercu h2 {
  margin: 0 0 8px;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--encre);
}

.meta {
  margin: 0 0 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta > * {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
}

.meta .lieu {
  background: var(--sable-clair);
  color: var(--corail-fonce);
}
.meta .lieu::before { content: "📍"; }

.meta .date {
  background: #e7f6f5;
  color: var(--lagon-fonce);
}
.meta .date::before { content: "🗓️"; }

.extrait {
  color: #5a4d40;
  font-size: 0.97rem;
  margin: 0;
}

.vide {
  text-align: center;
  color: var(--gris);
  padding: 50px 20px;
  font-size: 1.05rem;
}

/* Article complet */
.entete-article h1 {
  margin: 0 0 8px;
  font-size: 1.7rem;
  font-weight: 800;
}

.corps-article {
  font-size: 1.04rem;
  color: var(--encre);
}

.corps-article p { margin: 0 0 1em; }

.galerie {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 20px 0;
}

.galerie a { display: block; border-radius: 14px; overflow: hidden; box-shadow: var(--ombre); }

.galerie img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.galerie a:hover img {
  transform: scale(1.06);
}

.galerie.photo-unique {
  grid-template-columns: 1fr;
}
.galerie.photo-unique img {
  height: auto;
  max-height: 480px;
}

.trajet {
  margin: 26px 0 0;
  padding-top: 20px;
  border-top: 3px dashed var(--gris-clair);
}

.trajet h3 {
  font-size: 1.1rem;
  margin: 0 0 12px;
  color: var(--lagon-fonce);
}

.trajet img {
  width: 100%;
  border-radius: 14px;
  box-shadow: var(--ombre);
  display: block;
}

.points-gps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 0;
}

.points-gps a {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  flex-wrap: wrap;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--corail-fonce);
  background: var(--sable-clair);
  padding: 7px 13px;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.points-gps a:hover {
  transform: translateY(-1px);
  box-shadow: var(--ombre);
}

.points-gps .coord {
  font-weight: 400;
  color: var(--gris);
  font-size: 0.78rem;
}

.retour {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--corail-fonce);
  background: var(--creme-carte);
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: var(--ombre);
}
.retour:hover { transform: translateY(-1px); }

/* Commentaires */
.commentaires {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 3px dashed var(--gris-clair);
}

.commentaires h3 {
  font-size: 1.15rem;
  margin-bottom: 14px;
  color: var(--corail-fonce);
}

.commentaire {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--sable-clair);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 12px;
}

.commentaire .avatar {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: "Baloo 2", sans-serif;
  font-size: 0.95rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.commentaire-corps { flex: 1; min-width: 0; }

.commentaire .nom {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--corail-fonce);
}

.commentaire .date-commentaire {
  font-size: 0.78rem;
  color: var(--gris);
  margin-left: 8px;
}

.commentaire p {
  margin: 4px 0 0;
  font-size: 0.94rem;
}

.pas-de-commentaire {
  color: var(--gris);
  font-size: 0.95rem;
}

/* Formulaires */
form.formulaire {
  background: var(--creme-carte);
  border-radius: var(--rayon);
  padding: 20px;
  box-shadow: var(--ombre);
}

.champ { margin-bottom: 17px; }

.champ label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 0.93rem;
  color: var(--encre);
}

.champ .aide {
  display: block;
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--gris);
  margin-top: 2px;
}

input[type=text], input[type=password], input[type=date], input[type=email], textarea, input[type=file] {
  width: 100%;
  padding: 11px 13px;
  border: 2px solid var(--gris-clair);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--creme);
  transition: border-color 0.15s ease, background 0.15s ease;
}

textarea { min-height: 180px; resize: vertical; }

input:focus, textarea:focus {
  outline: none;
  border-color: var(--soleil);
  background: #fff;
}

.bouton, button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(120deg, var(--soleil), var(--corail));
  color: #fff;
  border: none;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 800;
  font-family: "Nunito", sans-serif;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(232, 108, 63, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bouton:hover, button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(232, 108, 63, 0.35);
}

.bouton.discret {
  background: var(--creme-carte);
  color: var(--gris);
  border: 2px solid var(--gris-clair);
  box-shadow: none;
}
.bouton.discret:hover { color: var(--corail-fonce); border-color: var(--corail); box-shadow: var(--ombre); }

.bouton.danger { background: linear-gradient(120deg, #ff6b6b, #d94a3d); }

.message {
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 18px;
  font-size: 0.94rem;
  font-weight: 700;
}
.message.erreur { background: #ffe3dd; color: #b8402f; }
.message.ok { background: #e1f5ea; color: #1f8a53; }

.etiquette {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: 999px;
}
.etiquette-en-ligne { background: #e1f5ea; color: #1f8a53; }
.etiquette-admin { background: var(--jaune); color: #7a4a00; }
.etiquette-neutre { background: var(--gris-clair); color: var(--gris); }

.ligne-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* Admin : liste des articles */
.ligne-admin {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  background: var(--creme-carte);
  border-radius: 14px;
  margin-bottom: 12px;
  box-shadow: var(--ombre);
}

.ligne-admin .info-article { flex: 1; }
.ligne-admin .titre-admin { font-weight: 700; font-family: "Baloo 2", sans-serif; }
.ligne-admin .meta-admin { font-size: 0.83rem; color: var(--gris); margin-top: 2px; }
.ligne-admin .actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.ligne-admin .actions a {
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--sable-clair);
  color: var(--corail-fonce);
}
.ligne-admin .actions a:hover { background: var(--jaune); }
.ligne-admin .actions a.supprimer { background: #ffe3dd; color: #b8402f; }

.miniatures-existantes {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0;
}
.miniatures-existantes .miniature {
  position: relative;
  text-align: center;
}
.miniatures-existantes img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  box-shadow: var(--ombre);
}
.miniatures-existantes label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.72rem;
  color: #b8402f;
  margin-top: 4px;
  font-weight: 700;
}

footer.pied {
  text-align: center;
  color: var(--gris);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 24px;
}

@media (max-width: 680px) {
  .van-entete { display: none; }
}

@media (max-width: 480px) {
  .galerie { grid-template-columns: 1fr 1fr; }
  header.entete h1 { font-size: 1.9rem; }
  .commentaire { flex-direction: column; }
}
