/* ============================================================================
   guestbook.css — Livre d'or Elioska (adapté de style-guestbook.css d'Altawayama)
   ----------------------------------------------------------------------------
   Chargé uniquement par temoignages.php ($PAGE_GUESTBOOK). Reprend les
   variables de style.css (:root) pour rester dans la palette du site.
   ============================================================================ */

.guestbook-container {
  max-width: 860px;
  margin: 0 auto 2.5rem;
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  padding: clamp(1.25rem, 4vw, 2rem) clamp(1.1rem, 4vw, 2.25rem);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.guestbook-container:last-child { margin-bottom: 0; }

.guest-title {
  text-align: center;
  color: var(--c-ink);
  font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem);
  margin: 0 0 1.2rem;
}

/* ----------  Formulaire  ---------- */
.guestbook-form label {
  display: block;
  margin-bottom: .3rem;
  color: var(--c-ink);
  font-weight: 500;
}

.guestbook-form input[type="text"],
.guestbook-form textarea {
  width: 100%;
  padding: .7rem .85rem;
  border: 1px solid #b9c4c6;
  border-radius: var(--radius-sm);
  margin-bottom: .9rem;
  font: inherit;
  color: var(--c-body);
  background: #fff;
  transition: border-color var(--t);
}

/* Le liseré de :focus-visible (style.css) se pose sur la bordure du champ. */
.guestbook-form input:focus,
.guestbook-form textarea:focus {
  border-color: var(--c-teal);
  outline: none;
}
.guestbook-form input:focus-visible,
.guestbook-form textarea:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: -1px;
}

.guestbook-form textarea { resize: vertical; margin-bottom: .25rem; }

.guestbook-counter {
  text-align: right;
  font-size: .9em;
  color: #5f6b69;
  margin-bottom: .9rem;
}
.guestbook-counter.is-low { color: #9c3b1d; font-weight: 600; }

.guestbook-privacy {
  font-size: .88em;
  color: #5f6b69;
  margin: 0 0 1.2rem;
}

.guestbook-form .btn { display: flex; margin: 0 auto; }

/* ----------  Messages flash  ---------- */
.guestbook-success,
.guestbook-error {
  max-width: 860px;
  margin: 0 auto 1.5rem;
  padding: .85rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-align: center;
  animation: gbFadeIn .5s ease-in;
}
.guestbook-success { background: #e9f6ea; border: 1px solid #8bc38f; color: #2a5d2e; }
.guestbook-error   { background: #fdeceb; border: 1px solid #e3928b; color: #8f2219; }

@keyframes gbFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}

/* ----------  Liste des messages  ---------- */
.guestbook-empty { text-align: center; color: #5f6b69; margin: 0; }

.guestbook-message { margin: 0; }

.guestbook-meta {
  display: flex;
  align-items: center;
  margin-bottom: .5rem;
}

.guestbook-header-line {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: .75rem;
  width: 100%;
}

.guestbook-avatar {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: #ccc;
  color: #fff;
  font-weight: 700;
  font-size: 1.1em;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: .75rem;
  box-shadow: 0 0 4px rgba(0,0,0,.1);
  line-height: 1;
}

.guestbook-name { font-weight: 700; color: var(--c-ink); }

.guestbook-date {
  font-size: .9em;
  color: #5f6b69;
  white-space: nowrap;
}

.guestbook-text p:last-child { margin-bottom: 0; }
.guestbook-text blockquote {
  margin: 0 0 1em;
  padding: .4rem 0 .4rem 1rem;
  border-left: 3px solid var(--c-accent);
  color: var(--c-ink);
}

.guestbook-separator {
  text-align: center;
  color: #b3bcbd;
  margin: 1.5rem 0;
  letter-spacing: 2px;
}

/* ----------  Pagination  ---------- */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin-top: 1.75rem;
}
.gb-page-link {
  min-width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--c-ink);
  transition: all var(--t);
}
.gb-page-link:hover { background: var(--c-bg-deep); border-color: var(--c-bg-deep); color: #fff; }
.gb-page-link.is-current { background: var(--c-accent); border-color: var(--c-accent); color: #16383c; font-weight: 700; }

@media (max-width: 480px) {
  .guestbook-header-line { grid-template-columns: 1fr; gap: 0; }
}
