/* WELABS — compléments pour la version dynamique (PHP) :
   sélecteur de langue en liens, actualités, article, pages légales,
   formulaire de contact réel, états d'erreur. Chargé après style-v3-color.css. */

/* ---- Sélecteur de langue : <a> au lieu de <button> ---- */
.lang-switch a {
  display: inline-block;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  text-decoration: none;
  line-height: 1.2;
  transition: background 0.2s, color 0.2s;
}
.lang-switch a.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.site-footer .lang-switch { background: rgba(255, 255, 255, 0.08); }
.site-footer .lang-switch a { color: rgba(255, 255, 255, 0.6); }
.site-footer .lang-switch a.is-active { background: #fff; color: var(--ink); }
.main-nav > .lang-switch a { font-size: 14px; padding: 8px 14px; }

/* ---- Navigation : page courante ---- */
.main-nav__list > li.is-current > a,
.main-nav__list > li.is-current > .nav-dropdown__trigger { font-weight: 700; }

/* ---- Conteneur étroit (article, pages légales) ---- */
.container--narrow { max-width: 860px; }

/* ---- Actualités ---- */
.news-teaser { padding-top: 40px; }
.news-teaser__head { margin-bottom: 36px; }
.news-teaser__head h2 { font-size: clamp(28px, 3.6vw, 44px); margin-top: 8px; }
.news-teaser__more { margin-top: 36px; }
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.post-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -24px rgba(90, 112, 222, 0.45); }
.post-card__media { display: block; aspect-ratio: 16 / 10; background: var(--bg-alt); overflow: hidden; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card__placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(90, 112, 222, 0.18), rgba(147, 78, 200, 0.18)); }
.post-card__body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card__date { font-size: 13px; color: var(--ink-soft); }
.post-card__title { font-size: 20px; line-height: 1.25; }
.post-card__title a { color: inherit; text-decoration: none; }
.post-card__title a:hover { color: var(--site-accent-a); }
.post-card__excerpt { color: var(--ink-soft); font-size: 15px; margin: 0; flex: 1; }
.post-card__link { font-weight: 600; font-size: 14px; color: var(--site-accent-a); text-decoration: none; }
.news-empty { color: var(--ink-soft); text-align: center; padding: 40px 0; }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 44px; }
.pagination__link {
  min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; border: 1px solid var(--border); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px;
}
.pagination__link.is-active { background: var(--site-accent-grad); color: #fff; border-color: transparent; }

/* ---- Article ---- */
.page-hero--post h1 { font-size: clamp(30px, 4vw, 52px); }
.post__back { display: inline-block; font-size: 14px; font-weight: 600; color: var(--site-accent-a); text-decoration: none; margin-bottom: 18px; }
.post__date { display: block; font-size: 14px; color: var(--ink-soft); margin-bottom: 12px; }
.post__lead { font-size: 19px; color: var(--ink-soft); margin-top: 16px; }
.post__cover { margin: 8px 0 0; border-radius: var(--radius-lg); overflow: hidden; }
.post__cover img { display: block; width: 100%; height: auto; }
.post__notice { font-size: 13px; color: var(--ink-soft); background: var(--bg-alt); border-radius: 10px; padding: 10px 14px; margin-bottom: 20px; }
.post__footer { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--border); }

/* ---- Contenu riche (articles, pages légales) ---- */
.prose { font-size: 17px; line-height: 1.7; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 26px; margin: 40px 0 14px; }
.prose h3 { font-size: 21px; margin: 30px 0 10px; }
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 24px; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--site-accent-a); }
.prose blockquote { margin: 24px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--site-accent-a); color: var(--ink-soft); font-style: italic; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius-md); }
.prose figure { margin: 24px 0; }
.prose figcaption { font-size: 13px; color: var(--ink-soft); margin-top: 8px; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 15px; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }

/* ---- Formulaire de contact réel ---- */
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.field.has-error input, .field.has-error textarea { border-color: #d0453b; background: #fff6f5; }
.field__error { margin: 6px 0 0; font-size: 13px; color: #c0392b; }
.field--check label { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-soft); font-weight: 500; cursor: pointer; }
.field--check input { width: 18px; height: 18px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--site-accent-a); }
.field--check a { color: var(--site-accent-a); }
.form-alert { padding: 12px 16px; border-radius: 12px; font-size: 14px; margin-bottom: 18px; }
.form-alert--error { background: #fff0ee; color: #a1261c; border: 1px solid #f3c4bf; }
.form-alert--success { background: #edf9f1; color: #1b6b3a; border: 1px solid #bfe6cd; }
.contact-form .btn[disabled] { opacity: 0.6; cursor: wait; }
.contact-form--done { text-align: center; }
.form-done svg { width: 56px; height: 56px; color: var(--site-accent-a); margin-bottom: 14px; }
.form-done h2 { font-size: 28px; margin-bottom: 10px; }
.form-done p { color: var(--ink-soft); margin-bottom: 24px; }

/* ---- Assistant : bulle d'erreur et lien CTA ---- */
.ai-live__bubble--error { background: #fff0ee; color: #a1261c; }
.ai-live__bubble a { color: inherit; font-weight: 600; }

/* ---- Page 404 ---- */
.page-hero .eyebrow { margin-bottom: 8px; }

@media (max-width: 900px) {
  .news-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .news-grid { grid-template-columns: 1fr; }
  .post__footer .btn { width: 100%; }
}
