/* ================================================================
   KTF — news-detail.css  |  Détail d'un article
   Même structure que le fichier source — couleurs KTF
   ================================================================ */

/* ── Barre de progression lecture ── */
.nd-scroll-bar {
  position: fixed; top: 0; left: 0; z-index: 9999;
  height: 3px; width: 0%;
  background: linear-gradient(90deg,
    var(--blue) 0%, var(--red) 33%, var(--orange) 66%, var(--yellow) 100%);
  transition: width .1s linear;
  pointer-events: none;
}

/* ════════════════════════════════════════════════
   SECTION PRINCIPALE
   ════════════════════════════════════════════════ */
.nd-section {
  padding: 4.5rem 0 5.5rem;
  background: var(--white);
}
.nd-inner {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3.5rem;
  align-items: start;
}

/* ════════════════════════════════════════════════
   ARTICLE
   ════════════════════════════════════════════════ */
.nd-article {}

/* Image de couverture */
.nd-cover {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  border-radius: var(--r3);
  margin-bottom: 2.25rem;
  display: block;
  box-shadow: var(--sh-lift);
}

/* Ligne méta */
.nd-meta {
  display: flex; align-items: center;
  gap: 1.1rem; flex-wrap: wrap;
  margin-bottom: 1.35rem;
}
.nd-meta-item {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--fd); font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
}
.nd-meta-item--date { color: var(--blue); }
.nd-meta-item--cat  { color: var(--orange); }
.nd-meta-item--by   { color: var(--g500); }
.nd-meta-item i     { font-size: .72rem; }
.nd-meta-sep {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--g100); flex-shrink: 0;
}

/* Titre */
.nd-title {
  font-family: var(--fd); font-weight: 700;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  line-height: 1.1; letter-spacing: .03em; text-transform: uppercase;
  color: var(--dark); margin-bottom: 2rem;
}

/* ════════════════════════════════════════════════
   CONTENU HTML RICHE
   ════════════════════════════════════════════════ */
.nd-content {
  font-family: var(--fs);
  font-size: .98rem; line-height: 1.9; color: var(--g700);
}
.nd-content p        { margin-bottom: 1.25em; }
.nd-content p:last-child { margin-bottom: 0; }
.nd-content h2,
.nd-content h3,
.nd-content h4 {
  font-family: var(--fd); font-weight: 700;
  color: var(--dark); text-transform: uppercase; letter-spacing: .04em;
  margin: 2em 0 .8em; line-height: 1.15;
}
.nd-content h2 { font-size: 1.45rem; color: var(--blue); }
.nd-content h3 { font-size: 1.15rem; }
.nd-content h4 { font-size: 1rem; }
.nd-content img {
  max-width: 100%; border-radius: var(--r2);
  margin: 1.5rem 0; display: block;
  box-shadow: var(--sh-card);
}
.nd-content ul,
.nd-content ol { padding-left: 1.75rem; margin-bottom: 1.25em; }
.nd-content ul li { list-style: disc; margin-bottom: .4em; }
.nd-content ol li { margin-bottom: .4em; }
.nd-content li    { color: var(--g700); line-height: 1.7; }
.nd-content blockquote {
  border-left: 4px solid var(--blue);
  padding: 1.1rem 1.5rem; margin: 1.75rem 0;
  background: rgba(30,170,226,.05);
  border-radius: 0 var(--r2) var(--r2) 0;
  font-style: italic; color: var(--g700);
}
.nd-content blockquote p { margin-bottom: 0; }
.nd-content a { color: var(--blue); text-decoration: underline; transition: color .2s; }
.nd-content a:hover { color: var(--blue-dk); }
.nd-content strong { color: var(--dark); font-weight: 700; }
.nd-content table {
  width: 100%; border-collapse: collapse; margin: 1.5rem 0;
  font-size: .9rem; overflow-x: auto; display: block;
}
.nd-content table th {
  background: var(--dark); color: rgba(255,255,255,.85);
  padding: .75rem 1rem; text-align: left; font-size: .75rem;
  letter-spacing: .06em; text-transform: uppercase; font-family: var(--fd);
}
.nd-content table td {
  padding: .75rem 1rem; border-bottom: 1px solid var(--g100); color: var(--g700);
}
.nd-content table tr:nth-child(even) td { background: var(--off); }

/* ════════════════════════════════════════════════
   BARRE DE PARTAGE
   ════════════════════════════════════════════════ */
.nd-share {
  display: flex; align-items: center; gap: .75rem;
  flex-wrap: wrap;
  margin-top: 2.75rem; padding-top: 1.75rem;
  border-top: 1px solid var(--g100);
}
.nd-share__label {
  font-family: var(--fd); font-size: .72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .14em; color: var(--g500);
}
.nd-share__btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid currentColor;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .88rem; text-decoration: none; cursor: pointer;
  background: none;
  transition: background .2s, color .2s, transform .2s;
}
.nd-share__btn:hover       { color: #fff !important; transform: translateY(-2px); }
.nd-share__btn--fb         { color: #1877f2; }
.nd-share__btn--fb:hover   { background: #1877f2; border-color: #1877f2; }
.nd-share__btn--tw         { color: #000; }
.nd-share__btn--tw:hover   { background: #000; border-color: #000; }
.nd-share__btn--wa         { color: #25d366; }
.nd-share__btn--wa:hover   { background: #25d366; border-color: #25d366; }
.nd-share__btn--cp         { color: var(--g500); }
.nd-share__btn--cp:hover   { background: var(--g500); border-color: var(--g500); }
#nd-copy-msg {
  font-family: var(--fd); font-size: .76rem; font-weight: 700;
  color: #25d366; letter-spacing: .06em;
  display: none; animation: ndFadeIn .3s ease;
}
@keyframes ndFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ════════════════════════════════════════════════
   NAVIGATION ← → articles
   ════════════════════════════════════════════════ */
.nd-nav {
  display: flex; gap: 1rem;
  margin-top: 2.25rem; flex-wrap: wrap;
}
.nd-nav__btn {
  flex: 1; min-width: 160px;
  display: flex; align-items: center; gap: .85rem;
  padding: 1.1rem 1.35rem;
  background: var(--off); border: 1px solid var(--g100);
  border-radius: var(--r2); text-decoration: none;
  transition: background .2s, border-color .2s, transform .2s;
}
.nd-nav__btn:hover { background: var(--white); border-color: var(--blue); transform: translateY(-3px); box-shadow: var(--sh-card); }
.nd-nav__btn--prev { flex-direction: row; }
.nd-nav__btn--next { flex-direction: row-reverse; text-align: right; }
.nd-nav__btn-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; flex-shrink: 0;
  transition: background .2s;
}
.nd-nav__btn:hover .nd-nav__btn-icon { background: var(--blue-dk); }
.nd-nav__btn span {
  font-family: var(--fd); font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; color: var(--g500);
  display: block; margin-bottom: .15rem;
}
.nd-nav__btn strong {
  font-family: var(--fd); font-size: .92rem; font-weight: 700;
  color: var(--dark); display: block; line-height: 1.3;
}

/* ════════════════════════════════════════════════
   SIDEBAR
   ════════════════════════════════════════════════ */
.nd-sidebar {
  position: sticky;
  top: calc(82px + 1.25rem);
  display: flex; flex-direction: column; gap: 1.75rem;
}

/* Widget générique */
.nd-widget {
  background: var(--white);
  border: 1px solid var(--g100);
  border-radius: var(--r3);
  overflow: hidden;
  box-shadow: var(--sh-card);
}
.nd-widget__head {
  padding: .9rem 1.25rem;
  background: var(--dark);
  display: flex; align-items: center; gap: .6rem;
  border-left: 4px solid var(--blue);
}
.nd-widget__head-title {
  font-family: var(--fd); font-size: .9rem; font-weight: 700;
  color: #fff; text-transform: uppercase; letter-spacing: .06em;
}
.nd-widget__head i { color: var(--yellow); font-size: .9rem; }
.nd-widget__body { padding: 1.25rem; }

/* Articles récents */
.nd-recent-list { display: flex; flex-direction: column; gap: .9rem; }
.nd-recent-item {
  display: flex; gap: .9rem; align-items: flex-start;
  text-decoration: none;
  padding-bottom: .9rem;
  border-bottom: 1px solid var(--g100);
  transition: transform .2s;
}
.nd-recent-item:last-child { border-bottom: none; padding-bottom: 0; }
.nd-recent-item:hover { transform: translateX(4px); }
.nd-recent-item__img {
  width: 70px; height: 54px; flex-shrink: 0;
  border-radius: var(--r1); object-fit: cover;
  border: 1px solid var(--g100);
}
.nd-recent-item__title {
  font-family: var(--fd); font-size: .88rem; font-weight: 700;
  color: var(--dark); line-height: 1.35; text-transform: uppercase;
  letter-spacing: .02em; transition: color .2s;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nd-recent-item:hover .nd-recent-item__title { color: var(--blue); }
.nd-recent-item__date {
  font-family: var(--fs); font-size: .72rem; color: var(--g500);
  margin-top: .25rem;
  display: flex; align-items: center; gap: .3rem;
}
.nd-recent-item__date i { font-size: .65rem; color: var(--blue); }

/* Widget CTA */
.nd-widget-cta {
  background: var(--dark-2); border-radius: var(--r3);
  padding: 1.75rem; position: relative; overflow: hidden;
}
.nd-widget-cta::before {
  content: '';
  position: absolute; top: -2rem; right: -2rem;
  width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(30,170,226,.1) 0%, transparent 65%);
  pointer-events: none;
}
.nd-widget-cta::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--red), var(--orange));
}
.nd-widget-cta h3 {
  font-family: var(--fd); font-weight: 700; font-size: 1.4rem;
  text-transform: uppercase; letter-spacing: .04em;
  color: #fff; margin-bottom: .5rem;
  position: relative; z-index: 1; line-height: 1.1;
}
.nd-widget-cta h3 em { font-style: italic; color: var(--blue-lt); }
.nd-widget-cta p {
  font-family: var(--fs); font-size: .85rem;
  color: rgba(255,255,255,.5); margin-bottom: 1.25rem;
  line-height: 1.65; position: relative; z-index: 1;
}
.nd-widget-cta__btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem; background: var(--blue); color: #fff;
  font-family: var(--fd); font-size: .88rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  border-radius: var(--r1); text-decoration: none; margin-bottom: .6rem;
  position: relative; z-index: 1;
  box-shadow: 0 4px 14px rgba(30,170,226,.4);
  transition: background .2s, transform .15s;
}
.nd-widget-cta__btn:hover { background: var(--blue-dk); transform: translateY(-2px); }
.nd-widget-cta__link {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem; border: 1.5px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.7);
  font-family: var(--fd); font-size: .82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  border-radius: var(--r1); text-decoration: none;
  position: relative; z-index: 1;
  transition: border-color .2s, color .2s;
}
.nd-widget-cta__link:hover { border-color: var(--orange); color: var(--orange); }

/* ════════════════════════════════════════════════
   GALERIE PHOTOS
   ════════════════════════════════════════════════ */
.gal-section {
  padding: 4rem 0 5rem;
  background: var(--off);
}
.gal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 2rem; flex-wrap: wrap; gap: .75rem;
}
.gal-title {
  font-family: var(--fd); font-size: 1.35rem; font-weight: 700;
  color: var(--dark); text-transform: uppercase; letter-spacing: .06em;
  position: relative; padding-left: 1rem; margin: 0;
}
.gal-title::before {
  content: ''; position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 4px; background: var(--blue); border-radius: 2px;
}
.gal-count {
  font-family: var(--fd); font-size: .8rem; font-weight: 700;
  color: var(--g500);
  background: var(--white); border: 1px solid var(--g100);
  border-radius: 20px; padding: .25rem .9rem;
}
.gal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .85rem;
}
.gal-item {
  position: relative; border-radius: var(--r2); overflow: hidden;
  background: var(--g100); cursor: pointer;
  aspect-ratio: 4 / 3;
  opacity: 0; transform: translateY(20px);
  animation: galFadeUp .5s ease forwards;
}
.gal-item:nth-child(1)    { animation-delay: .05s; }
.gal-item:nth-child(2)    { animation-delay: .10s; }
.gal-item:nth-child(3)    { animation-delay: .15s; }
.gal-item:nth-child(4)    { animation-delay: .20s; }
.gal-item:nth-child(5)    { animation-delay: .25s; }
.gal-item:nth-child(6)    { animation-delay: .30s; }
.gal-item:nth-child(n+7)  { animation-delay: .35s; }
@keyframes galFadeUp { to { opacity: 1; transform: translateY(0); } }

.gal-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  pointer-events: none;
  transition: transform .5s var(--ease);
}
.gal-item:hover img { transform: scale(1.08); }
.gal-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(6,17,31,.82) 0%, transparent 55%);
  opacity: 0; transition: opacity .3s;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: .9rem 1rem;
}
.gal-item:hover .gal-overlay { opacity: 1; }
.gal-num {
  font-family: var(--fd); font-size: .68rem; letter-spacing: .14em;
  color: rgba(255,255,255,.6); text-transform: uppercase; font-weight: 600;
}
.gal-zoom {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: .88rem;
  transform: scale(.6) rotate(-20deg);
  transition: transform .3s ease;
}
.gal-item:hover .gal-zoom { transform: scale(1) rotate(0); }
.gal-broken {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .5rem; background: var(--g100); color: var(--g500); font-size: .82rem;
}
.gal-broken i { font-size: 1.8rem; opacity: .35; }
.gal-loader {
  grid-column: 1/-1; text-align: center; padding: 3rem 1rem;
  color: var(--g500); font-family: var(--fs); font-size: .9rem;
}
.gal-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--g100); border-top-color: var(--blue);
  border-radius: 50%; animation: galSpin .7s linear infinite;
  margin: 0 auto .75rem;
}
@keyframes galSpin { to { transform: rotate(360deg); } }
.gal-empty {
  grid-column: 1/-1; text-align: center; padding: 4rem 1.5rem;
  background: var(--white); border-radius: var(--r2);
  border: 2px dashed var(--g100); color: var(--g500);
}
.gal-empty i { font-size: 3rem; opacity: .25; margin-bottom: .75rem; display: block; }
.gal-empty p { font-family: var(--fs); font-size: .9rem; }

/* ════════════════════════════════════════════════
   LIGHTBOX (identique source, couleurs KTF)
   ════════════════════════════════════════════════ */
.gp-lb {
  display: none; position: fixed; inset: 0;
  background: rgba(5,10,20,.97); z-index: 9999;
  align-items: center; justify-content: center;
}
.gp-lb.open { display: flex; }
.gp-lb-inner {
  position: relative; max-width: min(1100px, 94vw); width: 100%;
  animation: lbIn .28s ease;
}
@keyframes lbIn { from { opacity:0; transform:scale(.92); } to { opacity:1; transform:scale(1); } }
.gp-lb-imgbox {
  background: #000; border-radius: var(--r2); overflow: hidden;
  max-height: 85vh; display: flex; align-items: center; justify-content: center;
}
.gp-lb-imgbox img {
  max-width: 100%; max-height: 85vh;
  object-fit: contain; display: block;
  transition: opacity .22s ease; pointer-events: none;
}
.gp-lb-close {
  position: absolute; top: -14px; right: -14px;
  width: 44px; height: 44px;
  background: var(--blue); border: none; border-radius: 50%;
  color: #fff; font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .3s, background .2s; z-index: 2;
}
.gp-lb-close:hover { background: var(--orange); transform: rotate(90deg); }
.gp-lb-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  background: rgba(255,255,255,.1); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.2); border-radius: 50%;
  color: #fff; font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .2s;
}
.gp-lb-arrow:hover { background: var(--blue); border-color: var(--blue); transform: translateY(-50%) scale(1.1); }
.gp-lb-prev { left: -64px; }
.gp-lb-next { right: -64px; }
.gp-lb-footer { display: flex; align-items: center; justify-content: center; gap: 1.1rem; margin-top: 1rem; }
.gp-lb-counter { color: rgba(255,255,255,.45); font-family: var(--fd); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.gp-lb-dots   { display: flex; gap: 6px; }
.gp-lb-dot    { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.22); cursor: pointer; transition: background .2s, transform .2s; }
.gp-lb-dot.on { background: var(--blue); transform: scale(1.4); }

/* ════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════ */
@media (max-width: 1060px) {
  .nd-inner { grid-template-columns: 1fr; }
  .nd-sidebar { position: static; }
}
@media (max-width: 768px) {
  .nd-section   { padding: 3.5rem 0 4rem; }
  .nd-cover     { aspect-ratio: 16/9; }
  .nd-nav       { flex-direction: column; }
  .gal-grid     { grid-template-columns: repeat(2, 1fr); }
  .gal-section  { padding: 3rem 0 4rem; }
  .gp-lb-prev   { left: 8px; }
  .gp-lb-next   { right: 8px; }
}
@media (max-width: 480px) {
  .gal-grid  { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .nd-title  { font-size: 1.6rem; }
  .nd-cover  { aspect-ratio: 4/3; border-radius: var(--r2); }
}
