/* ─── Page Accueil v3 ───────────────────────────────────── */

/* Services sur fond gris très clair */
.services-preview { background: var(--color-bg-alt); }
.services-preview .section__header { margin-bottom: var(--sp-6); }

/* About sur blanc */
.about-preview { background: var(--color-bg); }
.about-preview .section__title { font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl)); }
.about-preview p { color: var(--color-text-light); line-height: 1.85; margin-bottom: var(--sp-5); }

/* Valeurs sur blanc — header centré */
.values { background: var(--color-bg); }
.values .section__header { text-align: center; max-width: 680px; margin-inline: auto; }

/* Clients sur gris clair — header centré */
.clients { background: var(--color-bg-alt); }
.clients .section__header { text-align: center; max-width: 600px; margin-inline: auto; }

/* ─── Section Actualités ────────────────────────────────── */
.news-section {
  background: linear-gradient(160deg, #0a1a0a 0%, #0f1f14 40%, #111b11 100%);
  position: relative;
  overflow: hidden;
}

/* Halo décoratif en arrière-plan */
.news-section::before {
  content: '';
  position: absolute;
  top: -120px; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 400px;
  background: radial-gradient(ellipse, rgba(60,183,60,.08) 0%, transparent 70%);
  pointer-events: none;
}

.news-section .section__header {
  text-align: center;
  max-width: 580px;
  margin-inline: auto;
  position: relative;
}

.news-section .section__title  { color: #fff; }
.news-section .section__subtitle { color: rgba(255,255,255,.5); }

/* ── Carrousel ── */
.news-row {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  margin-top: var(--sp-12);
  position: relative;
}

.news-outer {
  flex: 1;
  overflow: hidden;
  min-width: 0;
  /* légère ombre sur les bords pour indiquer le scroll */
  mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%);
}

.news-track {
  display: flex;
  gap: var(--sp-5);
  transition: transform .5s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}

/* ── Carte ── */
.news-card {
  flex: 0 0 calc((100% - 2 * var(--sp-5)) / 3);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 16px;
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  transition: background .25s, border-color .25s, transform .25s;
  cursor: pointer;
  overflow: hidden;
}
.news-card--has-photo { padding-top: 0; }

.news-card__photo {
  margin: 0 -28px;
  height: 180px;
  flex-shrink: 0;
  overflow: hidden;
}
.news-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.news-card:hover .news-card__photo img { transform: scale(1.04); }

/* Trait vert en haut de chaque carte — une seule couleur, celle de la marque */
.news-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  border-radius: 16px 16px 0 0;
  background: var(--color-primary);
  opacity: .7;
  transition: opacity .25s;
}

.news-card:hover {
  background: rgba(60,183,60,.05);
  border-color: rgba(60,183,60,.22);
  transform: translateY(-3px);
}
.news-card:hover::before { opacity: 1; }

/* Supprimer les surcharges de couleurs — tout reste vert */
.news-card--blue::before,
.news-card--purple::before,
.news-card--orange::before,
.news-card--teal::before { background: var(--color-primary); }

/* ── En-tête de carte ── */
.news-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.news-card__badge {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(60,183,60,.12);
  border: 1px solid rgba(60,183,60,.2);
  padding: 3px 10px;
  border-radius: 100px;
  white-space: nowrap;
}

/* Supprimer les surcharges de badge */
.news-card--blue .news-card__badge,
.news-card--purple .news-card__badge,
.news-card--orange .news-card__badge,
.news-card--teal .news-card__badge {
  color: var(--color-primary);
  background: rgba(60,183,60,.12);
  border-color: rgba(60,183,60,.2);
}

.news-card__date {
  font-size: .72rem;
  color: rgba(255,255,255,.3);
  white-space: nowrap;
  font-weight: 500;
}

/* ── Corps de carte ── */
.news-card__title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: rgba(255,255,255,.92);
  line-height: 1.4;
  flex-shrink: 0;
}

.news-card__text {
  font-size: .85rem;
  color: rgba(255,255,255,.48);
  line-height: 1.8;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Lien ── */
.news-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.06);
  transition: gap .2s, color .2s;
}
.news-card__link:hover { gap: 10px; color: #5de85d; }
.news-card__link svg:first-child { width: 14px; height: 14px; flex-shrink: 0; }
.news-card__link svg:last-child  { width: 12px; height: 12px; flex-shrink: 0; }

/* ── Boutons navigation ── */
.news-btn {
  flex-shrink: 0;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.news-btn svg { width: 17px; height: 17px; }
.news-btn:hover:not(:disabled) {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  transform: scale(1.08);
}
.news-btn:disabled { opacity: .2; cursor: default; }

/* ── Points indicateurs ── */
.news-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}
.news-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.2);
  cursor: pointer;
  padding: 0;
  transition: background .3s, transform .3s, width .3s;
}
.news-dot--active {
  background: var(--color-primary);
  transform: scale(1.2);
  width: 20px;
  border-radius: 3px;
}

/* ── CTA LinkedIn ── */
.news-section .section__cta {
  display: flex;
  justify-content: center;
  margin-top: 44px;
}
.news-section .btn--outline {
  color: var(--color-primary);
  border-color: rgba(60,183,60,.4);
  background: rgba(60,183,60,.06);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.news-section .btn--outline:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.news-section .btn--outline svg { width: 16px; height: 16px; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .news-card { flex: 0 0 calc((100% - var(--sp-5)) / 2); }
}
@media (max-width: 640px) {
  .news-card { flex: 0 0 calc(100% - 8px); }
  .news-btn  { width: 36px; height: 36px; }
  .news-row  { gap: var(--sp-3); }
}

/* ─── News Modal ────────────────────────────────────────── */
.nmodal {
  position: fixed; inset: 0; z-index: 900;
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-5);
  opacity: 0; visibility: hidden;
  transition: opacity .25s, visibility .25s;
}
.nmodal.open { opacity: 1; visibility: visible; }

.nmodal__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(5px);
}

.nmodal__panel {
  position: relative; z-index: 1;
  background: var(--color-bg);
  border-radius: 20px;
  width: 100%; max-width: 540px;
  max-height: 92vh; overflow-y: auto;
  display: flex; flex-direction: column;
  box-shadow: 0 32px 80px rgba(0,0,0,.5);
}

.nmodal__close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  background: rgba(0,0,0,.35);
  border: none; border-radius: 50%;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #fff;
  transition: background .2s;
}
.nmodal__close:hover { background: rgba(0,0,0,.6); }

.nmodal__illus {
  height: 200px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 20px 20px 0 0;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.nmodal__illus svg { width: 148px; height: 148px; }

/* Galerie photo dans le modal */
.nmodal__gal-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.nmodal__gal-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,.45); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%; width: 32px; height: 32px;
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
  z-index: 2;
}
.nmodal__gal-btn:hover { background: rgba(0,0,0,.7); }
.nmodal__gal-prev { left: 10px; }
.nmodal__gal-next { right: 10px; }
.nmodal__gal-dots {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 5px; z-index: 2;
}
.nmodal__gal-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255,255,255,.35);
  transition: background .2s, width .2s;
}
.nmodal__gal-dot--active {
  background: #fff;
  width: 14px; border-radius: 3px;
}

.nmodal__body {
  padding: var(--sp-7) var(--sp-8) var(--sp-8);
  display: flex; flex-direction: column; gap: var(--sp-4);
}

.nmodal__meta {
  display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap;
}
.nmodal__badge {
  font-size: .72rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase;
  padding: 4px 12px; border-radius: 99px;
}
.nmodal__date {
  font-size: .8rem; color: var(--color-text-muted);
}
.nmodal__title {
  font-size: 1.25rem; font-weight: 700; line-height: 1.3;
  color: var(--color-heading); margin: 0;
}
.nmodal__text {
  color: var(--color-text-muted); line-height: 1.8;
  white-space: pre-line; margin: 0; font-size: var(--text-sm);
}
.nmodal__cta {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: var(--sp-2);
  margin-top: var(--sp-2);
}

@media (max-width: 600px) {
  .nmodal__panel { border-radius: 16px; }
  .nmodal__illus { height: 160px; border-radius: 16px 16px 0 0; }
  .nmodal__body  { padding: var(--sp-5) var(--sp-5) var(--sp-6); }
}

/* ─── Section Projets : fond CLAIR, pas sombre ──────────── */
/*
   La section a class="section section--dark projects-preview"
   On écrase le fond sombre pour des cartes blanches pro.
*/
.projects-preview.section--dark {
  background: var(--color-bg);
  color: var(--color-text);
}

/* Revert les couleurs des éléments qui héritaient de --dark */
.projects-preview .section__label--light {
  color: var(--color-primary);
}
.projects-preview .section__label--light::before {
  background: var(--color-primary);
}
.projects-preview .section__title--light {
  color: var(--color-dark);
}
.projects-preview .section__subtitle--light {
  color: var(--color-text-light);
}

/* CTA "Voir toutes nos réalisations" sur fond clair */
.projects-preview .btn--outline-light {
  color: var(--color-dark);
  border-color: var(--color-border);
}
.projects-preview .btn--outline-light:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}
