/* =========================
   MISC
   ========================= */
.center {
  text-align: center;
}

p,
li {
  line-height: 1.8;
}

/* =========================
   BOUTON BURGER (mobile)
   ========================= */
.sidebar-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 6px 8px;
  margin-right: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--ink);
  border-radius: var(--radius);
}
.sidebar-toggle:hover {
  background: var(--bg-soft);
}

/* =========================
   TOP BAR
   ========================= */
.topbar {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}
.topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-brand img {
  height: 38px;
  border-radius: 6px;
}
.topbar-actions {
  display: flex;
  gap: 18px;
  align-items: center;
}

/* Newsletter bouton */
.topbar-actions .btn-newsletter {
  background: var(--brand-dark);
  color: #fff !important;
  padding: 10px 16px;
  border-radius: var(--radius);
}
.topbar-actions .btn-newsletter:hover {
  background: #a01c40;
}

/* =========================
   LAYOUT GENERAL
   ========================= */
.layout-wrapper {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: calc(100vh - 70px);
}

/* CONTENT */
.content-area {
  padding: 30px 40px;
  max-width: 1400px;
  width: 100%;
}
.content-area h1,
.content-area h2 {
  color: var(--brand);
}

/* =========================
   COMPOSANTS GÉNÉRIQUES
   ========================= */
.btn-primary {
  cursor: pointer;
}

.notice.success {
  background: #e7f7ee;
  color: #0a6;
  padding: 12px;
  border-radius: 6px;
  margin: 10px 0;
  font-size: 0.9rem;
}
.notice.error {
  background: #fdecea;
  color: #b00020;
  padding: 12px;
  border-radius: 6px;
  margin: 10px 0;
  font-size: 0.9rem;
}

.hp-wrap {
  position: absolute;
  left: -5000px;
  height: 0;
  overflow: hidden;
}

/* =========================
   BLOG / COMMUNAUTÉ – CARTES
   (Corrige le problème d’images: ratio + overflow)
   ========================= */
.grid-cards {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.card-body {
  padding: 22px 22px 20px;
}

.card-title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 700;
  color: #111;
}
.card-title a {
  color: inherit;
  text-decoration: none;
}

.card-excerpt {
  margin: 0 0 14px;
  color: rgba(0, 0, 0, 0.72);
  line-height: 1.55;
  font-size: 15px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent, #b0005a);
}
.card-link:hover {
  text-decoration: underline;
}

/* Zone image (comme V1: bannière visible, pas de “crop bizarre”) */
.grid-cards .card .card-media {
  display: block;
  overflow: hidden;
  border-radius: 14px 14px 0 0; /* suit le radius de .card */
  aspect-ratio: 16 / 9; /* rendu “bannière” comme ton V1 */
  background: #111;
  position: relative;
}

.grid-cards .card .card-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
}

/* Zoom au hover */
.card:hover .card-media img {
  transform: scale(1.05);
}

/* Pagination */
.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-top: 26px;
  flex-wrap: wrap;
}
.page-link {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  background: #fff;
}
.page-link.active,
.page-link:hover {
  border-color: #b30059;
  color: #b30059;
}

/* =========================
   BLOG – Article (plus large sans toucher auth-box global)
   ========================= */
.article-wrap.auth-box {
  max-width: 1200px;
  padding: 2.5rem 3rem;
}

/* =========================
   CONTACT
   ========================= */
.contact-intro {
  text-align: center;
  color: var(--ink-soft);
  margin: 0 0 1.5rem 0;
}

.contact-form {
  max-width: 650px;
  margin: 0 auto 1.5rem auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-form label {
  font-weight: 500;
  margin-bottom: 4px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font: inherit;
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-form .cf-turnstile,
.contact-form .g-recaptcha {
  margin-top: 8px;
}

.contact-form .btn-primary {
  align-self: center;
  padding: 10px 22px;
  border-radius: 999px;
  border: none;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
}
.contact-form .btn-primary:hover {
  background: var(--brand-dark);
}

.form-privacy-note {
  max-width: 650px;
  margin: 0 auto 1rem auto;
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-align: left;
}

/* =========================
   ESPACE MEMBRE
   ========================= */
.member-intro {
  margin-bottom: 0.5rem;
}

.member-confidentialite {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 1.3rem;
}

.member-block h2 {
  font-size: 1.05rem;
  margin: 0 0 0.5rem 0;
}

.member-info {
  list-style: none;
  padding-left: 0;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
}
.member-info .hint {
  font-style: italic;
  color: var(--ink-soft);
  margin-left: 4px;
}

.member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 1rem;
}

.btn-ghost {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg-soft);
}

/* Dropdown header membre */
.header-member-menu {
  position: relative;
  display: inline-block;
}

.member-toggle {
  background: transparent;
  border: none;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius);
}
.member-toggle:hover {
  background: var(--bg-soft);
}

.member-avatar {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, 0.12);
  display: inline-block;
}

.member-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 180px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  display: none;
  flex-direction: column;
  padding: 6px 0;
  z-index: 9999;
}
.member-dropdown a {
  padding: 10px 14px;
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--ink);
  font-size: 0.95rem;
}
.member-dropdown a:hover {
  background: var(--bg-soft);
}

.header-member-menu.active .member-dropdown {
  display: flex;
}

/* =========================
   FAQ
   ========================= */
.faq-section {
  max-width: 800px;
  margin: 0 auto;
}
.faq-section h1 {
  margin-bottom: 1.5rem;
}

.faq-item {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}
.faq-item h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.05rem;
}
.faq-item p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* =========================
   FOOTER
   ========================= */
.site-footer {
  background: #000;
  color: #fff;
  padding: 30px 20px;
  margin-top: 40px;
  border-top: 2px solid var(--brand);
}
.site-footer .footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-copy {
  margin: 0;
  font-size: 0.95rem;
  color: #ddd;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--brand);
  font-weight: 500;
}
.footer-links a:hover {
  color: #fff;
  opacity: 0.9;
}
.footer-tagline {
  margin-top: 8px;
  font-size: 0.9rem;
  font-style: italic;
  color: #ccc;
}

/* =========================
   LOGIN / AUTH
   ========================= */
.auth-box {
  max-width: 520px;
  margin: 0 auto;
  padding: 2rem 2.5rem;
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}
.auth-box h1 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 1rem;
}
.auth-row label {
  font-weight: 500;
}

.auth-row input {
  padding: 8px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font: inherit;
  box-sizing: border-box;
}

.auth-actions {
  margin-top: 1rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
}
.auth-actions .btn-primary {
  padding: 10px 22px;
  border-radius: 999px;
  border: none;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}
.auth-actions .btn-primary:hover {
  background: var(--brand-dark);
}

.auth-links {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* =========================
   PROFIL – Formulaire (clean)
   ========================= */
.profile-form-wrap.auth-box {
  max-width: 820px;
  padding: 2.2rem 2.8rem;
}
.profile-form-wrap h1 {
  margin-bottom: 1.3rem;
}

.profile-form .form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.profile-form .form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-form .form-row label {
  font-weight: 600;
  font-size: 0.95rem;
}

/* Champs */
.profile-form .form-row input,
.profile-form .form-row select,
.profile-form .form-row textarea {
  box-sizing: border-box;
  padding: var(--field-pad-y) var(--field-pad-x);
  border-radius: var(--field-radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease,
    background-color 0.18s ease;
  width: 100%;
}

/* Placeholders */
.profile-form .form-row input::placeholder,
.profile-form .form-row textarea::placeholder {
  color: rgba(34, 34, 34, 0.45);
}

/* Focus */
.profile-form .form-row input:focus,
.profile-form .form-row select:focus,
.profile-form .form-row textarea:focus {
  outline: none;
  border-color: rgba(179, 0, 89, 0.55);
  box-shadow: 0 0 0 4px rgba(179, 0, 89, 0.14);
}

/* Hover */
.profile-form .form-row input:hover,
.profile-form .form-row select:hover,
.profile-form .form-row textarea:hover {
  border-color: rgba(179, 0, 89, 0.28);
}

/* Textarea */
.profile-form .form-row textarea {
  min-height: 160px;
  resize: vertical;
}

/* Select stylé */
.profile-form .form-row select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 42px;
  background-image: linear-gradient(
      45deg,
      transparent 50%,
      rgba(34, 34, 34, 0.65) 50%
    ),
    linear-gradient(135deg, rgba(34, 34, 34, 0.65) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

/* File input */
.profile-form .form-row input[type="file"] {
  padding: 9px 10px;
  background: var(--bg-soft);
}
.profile-form .form-row input[type="file"]::file-selector-button {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  padding: 9px 12px;
  border-radius: 999px;
  margin-right: 10px;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.profile-form .form-row input[type="file"]::file-selector-button:hover {
  border-color: rgba(179, 0, 89, 0.35);
  box-shadow: 0 0 0 3px rgba(179, 0, 89, 0.1);
}

/* Avatar preview */
.profile-form .avatar-preview {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}
.profile-form .avatar-preview img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

/* Hints */
.profile-form .hint {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* Actions */
.profile-form .form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
}

/* CTA Enregistrer */
.profile-form .btn-save {
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff !important;
  border: none;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.2px;
  box-shadow: 0 10px 22px rgba(179, 0, 89, 0.18);
  transition: transform 0.08s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.profile-form .btn-save:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(179, 0, 89, 0.22);
  filter: brightness(1.02);
}
.profile-form .btn-save:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(179, 0, 89, 0.16);
}

/* Boutons secondaires */
.profile-form .btn-secondary {
  padding: 11px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--brand);
  font-weight: 600;
  transition: background-color 0.18s ease, border-color 0.18s ease,
    transform 0.08s ease;
}
.profile-form .btn-secondary:hover {
  background: var(--bg-soft);
  border-color: rgba(179, 0, 89, 0.25);
  transform: translateY(-1px);
}

/* Checkbox "Retirer mon avatar" */
.profile-form .form-row input[type="checkbox"] {
  width: auto !important;
  accent-color: var(--brand);
}

.profile-form .form-row label.hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  cursor: pointer;
  user-select: none;
}
.profile-form .form-row label.hint:hover {
  color: var(--brand);
}

.profile-form .form-row input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(179, 0, 89, 0.35);
  outline-offset: 3px;
}
