/* =============================  
   FONTS — utilisées par <body>
============================= */
@font-face {
  font-family: 'Unageo';
  src: url('/fonts/Unageo-ExtraBoldItalic.ttf') format('truetype');
  font-weight: 800;
  font-style: italic;
}
@font-face {
  font-family: 'Unageo';
  src: url('/fonts/Unageo-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
}
@font-face {
  font-family: 'Unageo';
  src: url('/fonts/Unageo-BoldItalic.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
}
@font-face {
  font-family: 'Unageo';
  src: url('/fonts/Unageo-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: 'Unageo';
  src: url('/fonts/Unageo-SemiBoldItalic.ttf') format('truetype');
  font-weight: 600;
  font-style: italic;
}
@font-face {
  font-family: 'Unageo';
  src: url('/fonts/Unageo-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
}
@font-face {
  font-family: 'Unageo';
  src: url('/fonts/Unageo-MediumItalic.ttf') format('truetype');
  font-weight: 500;
  font-style: italic;
}
@font-face {
  font-family: 'Unageo';
  src: url('/fonts/Unageo-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: 'Unageo';
  src: url('/fonts/Unageo-RegularItalic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
}
@font-face {
  font-family: 'Unageo';
  src: url('/fonts/Unageo-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'Unageo';
  src: url('/fonts/Unageo-LightItalic.ttf') format('truetype');
  font-weight: 300;
  font-style: italic;
}
@font-face {
  font-family: 'Unageo';
  src: url('/fonts/Unageo-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
}

/* =============================
   THEME GLOBAL / VARIABLES
============================= */
:root {
  /* Thème global */
  --color-principal: #14676A;
  --color-principal-hover: #1b7d81;
  --color-secondaire: #235b63;
  --color-fond-clair: #f8f8f8;
  --color-texte: #123235;
  --color-danger: #dc2626;
  --color-white: #ffffff;
  --color-grey: #8fa4a9;

  /* Shell / ombres */
  --shell-bg: rgba(255, 255, 255, 0.75);
  --shadow: 0 10px 30px rgba(0, 0, 0, .12);

  /* Thème index / layout */
  --naotc-green: #065653;
  --corner: 28px;
  --frame-h: 56px;
  --gap: calc(var(--frame-h) * 0.05);
  --elev: 0 12px 30px rgba(0, 0, 0, .25);
  --icon-size: 1.6rem;
  --between-bg: #FAF7F0;
  --align-offset: 30px;
  --quick-width: 80%;
}

/* =============================
   RESET & BASE utilisés par index.php
============================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Unageo', sans-serif;
  background-color: var(--color-fond-clair);
  color: var(--color-texte);
  line-height: 1.6;
  padding-top: 0;
}

h1,
h2,
h3,
h4,
h5 {
  font-weight: 700;
  color: var(--color-principal);
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1rem;
}

/* =============================
   STYLES SPECIFIQUES A index.php
   (ex-bloc <style> inline)
============================= */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes zoomInSoft {
  from { transform: scale(1.02); }
  to   { transform: 1; }
}

@keyframes slideUp {
  from {
    transform: translateY(18px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

@keyframes popIn {
  0% {
    transform: translateY(10px);
    opacity: 0;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}

html,
body {
  overflow-x: hidden;
  margin: 0;
  background: #fff;
}

/* HERO */
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.hero img {
  width: 100%;
  height: auto;
  display: block;
  transform-origin: center;
  animation: zoomInSoft .8s ease-out both;
}

/* Bandes entre photos */
.between-photos {
  background: var(--between-bg);
  padding: 40px 0 48px;
  position: relative;
  z-index: 1;
}

.between-photos-yellow {
  background: #FFEFAA;
  padding: 40px 0 48px;
  position: relative;
  z-index: 1;
}

.between-photos-blue {
  background: #B1DFFF;
  padding: 40px 0 48px;
  position: relative;
  z-index: 1;
}

.between-photos-orange {
  background: #FFD3AC;
  padding: 40px 0 48px;
  position: relative;
  z-index: 1;
}

.between-photos-green {
  background: #BAE3BB;
  padding: 40px 0 48px;
  position: relative;
  z-index: 1;
}

/* Titres */
.title-container {
  width: var(--quick-width);
  margin: 14px auto 12px;
}

.title {
  margin: 14px 0 12px var(--align-offset);
  color: var(--naotc-green);
  font-weight: 700;
  font-style: italic;
  font-size: 2rem;
  letter-spacing: .2px;
}

.subtitle {
  margin: 10px 0 8px var(--align-offset);
  color: var(--naotc-green); /* texte standard pour ne pas concurrencer .title */
  font-weight: 700;
  font-size: 1.125rem;       /* ~ h5 */
  line-height: 1.25;
  letter-spacing: .2px;
}

/* =============================
   Recherche rapide
============================= */
.quick-shell {
  width: var(--quick-width);
  margin: -78px auto 24px;
  background: var(--naotc-green);
  border-radius: var(--corner);
  padding: 26px 20px;
  box-shadow: var(--elev);
  position: relative;
  z-index: 2;
  color: #fff;
  animation: slideUp .5s ease-out .1s both;
}

.quick-title {
  color: #fff;
  font-weight: 700;
  font-style: italic;
  font-size: 2rem;
  margin: 0 0 4px 4px;
  letter-spacing: .2px;
}

.search-frame {
  height: var(--frame-h);
  display: flex;
  align-items: center;
  border: 2px solid rgba(255, 255, 255, .95);
  border-radius: var(--corner);
  background: transparent;
  padding: var(--gap) var(--gap) var(--gap) 12px;
  transition:
    border-color .25s ease,
    box-shadow .25s ease,
    transform .25s ease;
}

.search-frame:hover {
  border-color: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}

.search-frame:focus-within {
  border-color: #fff;
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, .08),
    0 10px 28px rgba(0, 0, 0, .30);
  transform: translateY(-1px);
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: #fff;
  font-size: 1.05rem;
  padding: 0 10px 0 2px;
  height: 100%;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, .92);
}

.search-btn {
  height: 100%;
  min-width: 72px;
  border: none;
  border-radius: var(--corner);
  background: #fff;
  color: #naotc-green;
  display: grid;
  place-items: center;
  cursor: pointer;
  line-height: 0;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .08) inset;
  transition:
    background .2s ease,
    transform .14s ease,
    box-shadow .2s ease,
    filter .2s ease;
}

.search-btn:hover {
  background: #f2f2f2;
  filter: brightness(1.02);
}

.search-btn:active {
  transform: scale(.98);
  box-shadow: none;
}

.search-btn .icon-chevron {
  width: var(--icon-size);
  height: var(--icon-size);
  display: block;
}

#search-results {
  margin-top: 18px;
}

#search-results .card {
  border-radius: 10px;
  transition:
    transform .16s ease,
    box-shadow .16s ease;
  animation: popIn .25s ease-out both;
}

#search-results .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .18);
}

#search-results .card-title {
  font-size: 1.05rem;
}

/* =============================
   Les réseaux
============================= */
.networks-wrap {
  width: 80%;
  margin: 0 auto;
}

.social-wrap {
  width: 80%;
  margin: 0 auto;
}

.filters-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.region-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: #065653;
  color: #fff;
  border: none;
  border-radius: 18px;
  padding: 12px 18px;
  min-width: 230px;
  font-size: 1.2rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='white'><path d='M5 7l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

.region-select:hover {
  filter: brightness(1.04);
}

.region-select:focus {
  outline: 3px solid rgba(6, 86, 83, .25);
}

.dept-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 1;
}

.pill {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  font-size: 24px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
  transition:
    transform .2s ease,
    box-shadow .2s ease,
    background .2s ease,
    color .2s ease;
}

.pill--active {
  background: #065653;
  color: #fff;
}

.pill--inactive {
  background: #fff;
  color: #065653;
}

.pill:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .15);
}

.cat {
  margin: 14px 0px 12px;
  border-radius: 18px;
  overflow: hidden;
  background: transparent;
}

.cat-header {
  background: #065653;
  color: #fff;
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 1.25rem;
  cursor: pointer;
  transition:
    filter .2s ease,
    transform .15s ease;
}

.cat-header:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.cat-body {
  overflow: hidden;
  transition:
    grid-template-rows .35s cubic-bezier(.2, .8, .2, 1),
    opacity .25s ease,
    padding .25s ease;
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  padding: 0 10px;
}

.cat-body.open {
  grid-template-rows: 1fr;
  opacity: 1;
  padding: 12px 12px 2px;
}

.cat-body > div {
  min-height: 0;
}

.list-two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 40px;
  padding: 6px 6px 12px;
}

.list-two-cols a {
  font-size: 1.05rem;
  font-weight: normal;
  color: #065653;
  text-decoration: none;
  transition:
    transform .2s ease,
    color .2s ease;
  display: inline-block;
}

.list-two-cols a:hover {
  transform: scale(1.05);
  color: #1b7d81;
}

/* =============================
   Les articles : styles custom
============================= */
.articles-shell {
  width: var(--quick-width);
  margin: -78px auto 24px;
  background: var(--naotc-green);
  border-radius: var(--corner);
  padding: 26px 20px;
  box-shadow: var(--elev);
  position: relative;
  z-index: 2;
  color: #fff;
  animation: slideUp .5s ease-out .1s both;
  overflow: hidden;
}

/* ✅ Watermark qui peut déborder, tout en gardant le clip pour le contenu */
.articles-shell--watermark {
  overflow: visible;            /* le watermark n’est plus coupé */
}

/* on clippe uniquement le contenu interne (carrousels, etc.) */
.articles-shell--watermark .articles-inner {
  overflow: hidden;             /* remplace le rôle de l’ancien overflow hidden du shell */
  border-radius: inherit;       /* garde l’arrondi au même rayon */
}

/* le watermark au-dessus de tout */
.articles-shell--watermark .articles-watermark {
  z-index: 50;
  pointer-events: none;
}

.articles-sub {
  margin: 0 0 12px 4px;
  font-size: 16px;
  color: #000;
}

/* ===== Les articles : images + layout (plus petit) ===== */
.slider-row{
  display: grid;
  grid-template-columns: 140px 1fr 140px; /* au lieu de 180/1fr/180 */
  gap: 18px;                               /* un peu plus compact */
  align-items: center;
}

.thumb{
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  object-fit: cover;
  opacity: .95;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
}

/* Image principale plus petite */
.main-img{
  width: 70%;              /* au lieu de 85% */
  max-width: 560px;        /* limite sur grands écrans */
  margin: 0 auto;
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .18);
}

.thumb--right {
  justify-self: end;
}

.thumb:hover {
  transform: translateY(-2px);
}

.main-img-wrap {
  position: relative;
}

.main-img {
  width: 85%;
  margin: 0 auto;
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: 26px;
  object-fit: cover;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .18);
  opacity: 1;
  transform: translateY(0) scale(1);
  transition:
    opacity .45s ease,
    transform .45s ease,
    filter .45s ease;
  will-change: transform, opacity;
}

.main-img.is-fading-out {
  opacity: 0;
  transform: translateY(6px) scale(.98);
  filter: saturate(.9);
}

.main-img.is-fading-in {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: saturate(1);
}

.main-img.dir-left.is-fading-out {
  transform: translateX(-14px) scale(.985);
  opacity: 0.15;
}

.main-img.dir-right.is-fading-out {
  transform: translateX(14px) scale(.985);
  opacity: 0.15;
}

.slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 14px 0;
}

.ctl {
  background: transparent;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.dots {
  display: flex;
  align-items: center;
  gap: 15px;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid #000;
  padding: 0;
  display: inline-block;
  cursor: pointer;
  transition: all .25s ease;
}

.dot.active {
  width: 36px;
  height: 14px;
  border-radius: 999px;
  background: #000;
  border: 2px solid #000;
}

.articles-title {
  font-weight: 700;
  font-size: 20px;
  margin: 14px 0 6px;
  color: #000;
}

.articles-desc {
  font-size: 16px;
  color: #000;
  margin: 0 0 6px;
}

.articles-meta {
  font-size: .95rem;
  color: #333;
  margin: 6px 0;
}

.articles-link-block {
  text-decoration: none;
  color: inherit;
  display: inline-block;
}

.articles-link-block:hover .articles-title {
  text-decoration: none;
}

.articles-link-block:hover .articles-desc {
  text-decoration: none;
}

.articles-watermark {
  position: absolute;
  right: -13px;
  bottom: 14px;
  width: 120px;
  pointer-events: none;
  display: none;
}

@media (min-width: 1000px) {
  .articles-watermark {
    display: block;
  }
}

@media (max-width: 992px) {
  .slider-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .thumb {
    display: none;
  }
}

@media (max-width: 1000px) {
  :root {
    --frame-h: 50px;
  }

  .quick-shell {
    width: 92%;
    margin: -48px auto 18px;
    padding: 20px 14px;
  }

  .articles-shell {
    width: 92%;
    margin: -48px auto 18px;
    padding: 20px 14px;
  }

  .quick-title {
    font-size: 1.6rem;
  }

  .search-btn {
    min-width: 64px;
  }

  .networks-wrap {
    width: 92%;
  }

  .social-wrap {
    width: 92%;
  }

  .list-two-cols {
    grid-template-columns: 1fr;
    gap: 8px 12px;
  }

  .filters-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    justify-content: flex-start;
  }

  .region-select {
    width: 100%;
    min-width: 0;
    font-size: 1.05rem;
    padding: 10px 16px;
  }

  .dept-pills {
    width: 100%;
    gap: 6px;
  }

  .pill {
    width: 44px;
    height: 44px;
    font-size: 18px;
    border-radius: 10px;
  }
}

/* =============================
   Gestion libellés desktop vs mobile
============================= */
.news-nav-btn .label-mobile {
  display: none; /* desktop par défaut */
}

.news-nav-btn .label-desktop {
  display: inline;
}

/* Mobile : ne garder que « Actu suivante » (sans flèche) + compteur */
@media (max-width: 768px) {
  #newsPrev {
    display: none; /* masquer le précédent */
  }

  .news-nav-btn .label-desktop {
    display: none; /* masquer versions avec chevrons */
  }

  .news-nav-btn .label-mobile {
    display: inline; /* afficher libellé mobile */
  }

  .news-controls {
    position: static;
    padding-left: var(--align-offset);
  }
}

/* =============================
   Carrousel PHOTOS
============================= */
.photo-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto 8px;
  flex-wrap: nowrap;
  width: 100%;
}

.photo-square {
  background: #fff; 
  border-radius: 48px; /* ++ border radius */
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .12);
  overflow: hidden;
  flex: 0 0 auto;
  transition:
    transform .25s ease,
    opacity .25s ease;
}

/* Thumbnails dans le carrousel photos */
.photo-thumb{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;      /* recadrage propre */
  object-position: 50% 50%;
}

.photo-square--center {
  width: 200px;
  height: 200px;
}

.photo-square--side {
  width: 130px;
  height: 130px;
  opacity: .95;
}

.photo-logo {
  max-width: 70%;
  max-height: 70%;
  object-fit: contain;
}

.photo-fallback {
  font-weight: 700;
  font-size: 1.05rem;
  color: #00468C;
  text-align: center;
  padding: 10px;
}

/* Texte sous le carrousel (section bleue) */
.photos-title {
  font-weight: 700;
  font-size: 20px;
  margin: 14px 0 6px;
  color: #ffffff;
}

.photos-meta {
  font-size: .95rem;
  color: #ffffff;
  margin: 6px 0;
  opacity: .95;
}

/* Contrôles du slider PHOTOS */
#photoControls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

#photoControls .ctl {
  color: #ffffff;
}

#photoControls .ctl:disabled {
  opacity: .6;
}

#photoControls .photo-dots {
  display: flex;
  align-items: center;
  gap: 15px;
}

#photoControls .photo-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  padding: 0;
  cursor: pointer;
  border: 2px solid #ffffff;
  background: #00468C;
  transition: all .2s ease;
  display: inline-block;
}

#photoControls .photo-dot.active {
  width: 36px;
  height: 14px;
  background: #ffffff;
  border: 2px solid #ffffff; /* pilule blanche */
}

/* Responsive: sous 1000px, n'afficher que 3 carrés (masquer extrêmes) */
@media (max-width: 1000px) {
  #photoSlot0,
  #photoSlot4 {
    display: none;
  }

  .photo-strip {
    gap: 14px;
  }
}

/* Sous 650px, n'afficher qu'un seul carré (le centre) */
@media (max-width: 650px) {
  #photoSlot1,
  #photoSlot3 {
    display: none;
  }

  .photo-strip {
    justify-content: center;
    gap: 12px;
  }

  .photo-square--center {
    width: 170px;
    height: 170px;
  }

  .photo-square--side {
    display: none;
  }
}

@media (max-width: 560px) {
  .photo-square--center {
    width: 150px;
    height: 150px;
  }
}

/* =============================
   CTA buttons (pilules)
============================= */
.btn-pill-outline {
  display: inline-block;
  padding: 0.75rem 3rem;
  border: 2px solid #0A457D;
  border-radius: 999px;
  color: #0A457D;
  font-style: italic;
  font-weight: 500;
  font-size: 1.2rem;
  text-decoration: none;
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    transform 0.15s ease;
  white-space: nowrap;
}

.btn-pill-outline:hover {
  background-color: #9FCCFF;
  color: #0A457D;
  transform: translateY(-1px);
}

.btn-pill-outline4 {
  display: inline-block;
  padding: 0.75rem 3rem;
  border: 2px solid #ffffff;
  border-radius: 999px;
  color: #ffffff;
  font-style: italic;
  font-weight: 500;
  font-size: 1.2rem;
  text-decoration: none;
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    transform 0.15s ease;
  white-space: nowrap;
}

.btn-pill-outline4:hover {
  background-color: #9FCCFF;
  color: #0A457D;
  transform: translateY(-1px);
}

.btn-pill-outline2 {
  display: inline-block;
  padding: 0.75rem 3rem;
  border: 2px solid #000000;
  border-radius: 999px;
  color: #000000;
  font-style: italic;
  font-weight: 500;
  font-size: 1.2rem;
  text-decoration: none;
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    transform 0.15s ease;
  white-space: nowrap;
}

.btn-pill-outline2:hover {
  background-color: #D1FFD1;
  color: #000000;
  transform: translateY(-1px);
}

.btn-pill-outline3 {
  display: inline-block;
  padding: 0.75rem 3rem;
  border: 2px solid #000000;
  border-radius: 999px;
  color: #000000;
  font-style: italic;
  font-weight: 500;
  font-size: 1.2rem;
  text-decoration: none;
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    transform 0.15s ease;
  white-space: nowrap;
}

.btn-pill-outline3:hover {
  background-color: #ffba7d;
  color: #000000;
  transform: translateY(-1px);
}

/* =============================
   Actus du site
============================= */
.news-shell {
  background: #9C2741;
  color: #fff;
  position: relative;
  z-index: 3;        /* passe au-dessus de la photo suivante */
  margin-bottom: -75px; /* chevauche légèrement la photo d'après (photo5) */
  overflow: visible; /* laisse dépasser le watermark */
  min-height: 350px;
}

.news-card {
  margin: 16px auto 18px;
  background: #fff;
  color: #000;
  border-radius: 18px;
  padding: 24px 22px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
  min-height: 84px; /* confort visuel */
}

/* pied : titre à gauche + nav à droite (au niveau du watermark à droite) */
.news-title {
  font-weight: 700;
  color: #fff;
}

/* progression 1/3 (première définition, quelques valeurs revues plus bas) */
.news-progress {
  text-align: center;
  color: #fff;
  opacity: .9;
  margin: 4px 0 2px;
  font-weight: 600;
}

/* watermark (hérite déjà de .articles-watermark) */
.news-watermark {
  right: -10px;
  bottom: 8px;
  width: 120px;
}

/* Responsive */
@media (max-width: 768px) {
  .news-card {
    width: 90%;
    padding: 18px 16px;
  }
}

/* --- Titre DANS la carte blanche --- */
.news-card-title {
  margin: 0 0 10px 0;
  color: #9C2741;
  font-size: 1.5rem; /* plus gros */
  font-weight: 700;
  line-height: 1.25;
}

/* Corps du texte de l'actu */
.news-card-body {
  font-size: 1rem;
}

/* --- Pied : flèches à droite + progression juste dessous --- */
.news-footer {
  margin: 6px auto;
  padding-right: var(--align-offset);
  min-height: 0;
}

/* Colonne à droite contenant les flèches + statut */
.news-controls {
  position: absolute;
  bottom: 12px; /* pile en bas */
  display: flex;
  flex-direction: column; /* flèches puis compteur en dessous */
  align-items: flex-start; /* à gauche */
  gap: 6px;
}

/* Ligne des flèches */
.news-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Boutons plus gros + animation de couleur douce au hover */
.news-nav-btn {
  border: none;
  border-radius: 18px;
  background: #ffffff;
  color: #9C2741;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 12px 22px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color .30s ease,
    color .30s ease,
    box-shadow .25s ease,
    transform .15s ease;
}

.news-nav-btn:hover {
  background: #FFD6DF; /* teinte douce */
  color: #6D1228;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
  transform: translateY(-1px);
}

/* Compteur juste sous les flèches, aligné à gauche (seconde définition) */
.news-progress {
  margin-top: 4px;
  text-align: left;
  color: #ffffff;
  font-weight: 600;
  opacity: .95;
}

/* Fallback mobile : on repasse en flux normal pour éviter le chevauchement */
@media (max-width: 768px) {
  .news-controls {
    position: static;
    padding-left: 0;
  }

  .news-footer {
    padding-left: var(--align-offset);
  }
}

/* =============================
   Exploitants (bande jaune)
============================= */
.ops-lead {
  color: #000;
  font-style: italic;
  opacity: .85;
}

.ops-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); /* occupe toute la largeur */
  gap: 22px;
  padding: 6px 0 0;
}

.op-chip {
  background: #FFD245;
  color: #fff;
  width: 100%;          /* prend toute la largeur de sa colonne */
  aspect-ratio: 1 / 1;  /* carré */
  max-height: 100px;    /* hauteur max */
  border: 0;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .12);
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    background-color .18s ease;
  cursor: pointer;
  padding: 0;
}

.op-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .16);
}

.op-chip.active {
  background: #F7C22F; /* jaune + foncé au clic */
}

.op-chip img {
  max-width: 70%;
  max-height: 70%;
  object-fit: contain;
}

.op-chip-fallback {
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  padding: 10px;
  color: #fff;
}

.op-chip--other {
  font-weight: 800;
  font-size: 3rem;
}

/* Bloc d’infos sélection */
.ops-info {
  padding: 14px 0 0;
}

.ops-title {
  margin: 14px 0 8px;
  font-weight: 700;
  color: #000;
}

.ops-desc {
  margin: 0 0 8px;
  color: #000;
}

.ops-source {
  margin: 0 0 8px;
  color: #000;
  font-style: italic;
}

.ops-link {
  color: inherit;
  text-decoration: none; /* lien cliquable sans aspect hypertexte */
}

@media (max-width: 1200px) {
  .op-chip--other {
    font-weight: 800;
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  .ops-chips {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  }

  .op-chip--other {
    font-weight: 800;
    font-size: 1.5rem;
  }
}

/* =============================
   Stats (bande verte)
============================= */
.stats-shell {
  background: #065653;
  color: #ffffff;
  position: relative;
  z-index: 3;
  margin-top: 40px;
  margin-bottom: -60px; /* chevauche légèrement la photo6 */
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)); /* 4 items sur desktop */
  gap: 22px 32px;
  align-items: center;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: transparent;
  border-radius: 16px;
  padding: 6px 4px;
}

.stat-icon {
  font-size: 2rem;
  line-height: 1;
  color: #ffffff;
  opacity: .95;
}

.stat-value {
  font-weight: 800;
  font-size: 2rem;
  line-height: 1;
  color: #ffffff;
}

.stat-label {
  font-size: 1rem;
  margin-top: 4px;
  line-height: 1.1;
  color: #ffffff;
  opacity: .9;
}

@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================
   Footer / Social cards
============================= */
.footer-wrap-cream {
  background: #FAF7F0;
  margin: 0;
  padding: 0;
}

/* Si le footer interne a des marges, on les neutralise */
.footer-wrap-cream > footer {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Social cards (en haut du footer) */
.social-cards-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 12px 0 6px;
}

.social-card-custom {
  background: #065653;
  border-radius: 18px;
  padding: 10px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 96px; /* compact */
  box-shadow: 0 8px 18px rgba(0, 0, 0, .08);
  transition:
    transform .15s ease,
    box-shadow .2s ease,
    filter .2s ease;
}

.social-card-custom:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .14);
  filter: brightness(1.02);
}

@media (max-width: 768px) {
  .social-cards-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* === FIX débordement modale photo (mobile + desktop) === */
body.modal-open {
  /* empêche l’élargissement de page quand la modale s’ouvre */
  --bs-body-padding: 0 !important;
  padding-right: 0 !important;
}

/* =============================
   Quick access cards
============================= */
.qa-grid {
  /* >=1400px: nb de colonnes piloté par la variable --qa-cols (capé à 5) */
  display: grid;
  grid-template-columns: repeat(var(--qa-cols, 5), minmax(0, 1fr));
  gap: 12px;
}

/* Conserver tes règles en dessous */
@media (max-width: 1400px) {
  .qa-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1200px) {
  .qa-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .qa-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .qa-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

.qa-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1rem;
  border: 1px solid rgba(6, 86, 84, .12);
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(6, 86, 84, .06);
  transition:
    transform .12s ease,
    box-shadow .18s ease,
    border-color .12s ease,
    background .12s ease;
  text-decoration: none;
  color: #123;
}

.qa-card:hover {
  transform: translateY(-2px);
  border-color: rgba(6, 86, 84, .25);
  box-shadow: 0 8px 22px rgba(6, 86, 84, .12);
  text-decoration: none;
  color: #0F5553;
  background: #f7fbfb;
}

.qa-ico {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(6, 86, 84, .15);
  background: #fff;
  flex: 0 0 auto;
}

.qa-ico i {
  font-size: 1.2rem;
  color: #065654;
}

.qa-body {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.qa-title {
  font-weight: 700;
  color: #065654;
}

.qa-sub {
  font-size: .85rem;
  color: #6c757d;
}

.qa-card[aria-disabled="true"],
.qa-card.disabled {
  pointer-events: none;
  opacity: .55;
  filter: grayscale(.1);
}

/* Ex: classes globales optionnelles si tu veux les réutiliser ailleurs */
.theme-blanc  { --quick-bg: #065653; --quick-text: #ffffff; --between-bg: #FAF7F0; }
.theme-jaune  { --quick-bg: #FFD245; --quick-text: #000000; --between-bg: #FFEFAA; }
.theme-bleu   { --quick-bg: #00468C; --quick-text: #ffffff; --between-bg: #B1DFFF; }
.theme-rouge  { --quick-bg: #9C2741; --quick-text: #ffffff; --between-bg: #FFD3AC; }
.theme-vert   { --quick-bg: #065653; --quick-text: #ffffff; --between-bg: #BAE3BB; }

/* =============================
   Header auteur / cartes photo
============================= */
.pm-author {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .5rem;
}

.pm-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, .08);
}

.pm-surnom a {
  color: #065653;
  text-decoration: none;
  font-weight: 600;
}

.pm-surnom a:hover {
  text-decoration: underline;
}

.pm-date {
  font-size: .9rem;
  color: #6c757d;
}

/* Cards véhicules */
.veh-card {
  border: 1px dashed rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  padding: .6rem .75rem;
  margin-bottom: .6rem;
  background: #fff;
  color: #065653;
}

.veh-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .35rem;
}

.veh-idents {
  font-weight: 600;
}

.veh-idents small {
  color: #6c757d;
  font-weight: 500;
}

.veh-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.veh-comment {
  font-size: .95rem;
  color: #495057;
  margin-top: .25rem;
}

/* EXIF cam */
.pm-exif {
  margin-top: .5rem;
  color: #6c757d;
  font-size: .95rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

/* =============================
   Galerie "Les photos"
============================= */
.photos-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

/* Responsive */
@media (max-width: 1400px) {
  .photos-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .photos-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .photos-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .photos-grid {
    grid-template-columns: 1fr;
  }
}

/* Cartes de photo : ratio fixe + image qui couvre (crop) et centre */
.photo-card {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
  border: 1px solid rgb(255, 255, 255);
  aspect-ratio: 4 / 3; /* desktop/tablette */
  transform: translateY(0);
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease;
  will-change: transform, box-shadow;
}

/* Mobile : vignettes rectangulaires 16:9 */
@media (max-width: 640px) {
  .photo-card {
    aspect-ratio: 16 / 9;
  }
}

.photo-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;          /* Remplit la vignette */
  object-position: 50% 50%;   /* Centre toujours au milieu */
  transition:
    transform .25s ease,
    filter .25s ease;
  will-change: transform, filter;
}

/* Hover / focus : élévation + zoom léger de l’image */
.photo-card:hover,
.photo-card:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
  border-color: rgb(255, 255, 255);
}

.photo-card:hover img,
.photo-card:focus-within img {
  transform: scale(1.03);
  filter: saturate(1.03) contrast(1.01);
}

/* Petit feedback à l’activation (clic) */
.photo-card:active {
  transform: translateY(-1px) scale(.998);
}

/* Accessibilité : anneau au focus clavier */
.photo-card:focus-visible {
  outline: 3px solid rgba(13, 110, 253, .45);
  outline-offset: 2px;
}

/* Respecte la préférence utilisateur pour réduire les animations */
@media (prefers-reduced-motion: reduce) {
  .photo-card,
  .photo-card img {
    transition: none !important;
  }
}

/* =============================
   TABLES
============================= */

/* Variante transparente à bordure verte, sans marge négative */
.surface-outline {
  width: var(--quick-width);
  margin: 24px auto;
  background: transparent;
  border: 2px solid #065653;
  border-radius: var(--corner);
  padding: 26px 20px;
  box-shadow: 0 6px 18px rgba(6, 86, 84, .08);
  position: relative;
  z-index: 2;
  color: inherit;
  animation: slideUp .5s ease-out .1s both;
  backdrop-filter: saturate(110%);
}

.surface-outline:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(6, 86, 84, .12);
}

.surface-outline .quick-title {
  color: #065653 !important;
}

.surface-outline .articles-sub {
  color: #065653;
}

@media (max-width: 1000px) {
  .surface-outline {
    width: 92%;
    margin: 18px auto;
    padding: 20px 14px;
  }
}

/* Zone fluide, centrée — aucune bordure/fond/padding */
.surface-zone {
  width: var(--quick-width, 80%);
  margin-left: auto;
  margin-right: auto;
  margin-top: 2rem;
  box-sizing: border-box;
}

@media (max-width: 1000px) {
  .surface-zone {
    width: 92%;
  }
}

.surface-zone:first-of-type {
  margin-top: 0; /* garde le premier bloc collé au héros */
}

@media (max-width: 576px) {
  .surface-zone {
    margin-top: 1.25rem; /* un peu moins sur mobile */
  }
}

/* ===== HERO BANNIÈRE ===== */
.hero-banner {
  position: relative;
  min-height: unset;
  height: clamp(380px, 60vh, 470px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* on remonte le cadrage */
.hero-banner .hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 80%;
}
@media (min-width: 1200px) {
  .hero-banner .hero-bg {
    object-position: center 75%; /* essaie 60% / 70% selon tes visuels */
  }
}

/* =============================
   HERO — variante "première photo"
   (plus haute)
============================= */

/* Variante du conteneur */
.hero-banner.hero-banner--first{
  /* plus haut que ta valeur actuelle clamp(380px, 60vh, 470px) */
  height: clamp(400px, 70vh, 600px);
}

/* Variante de l'image de fond (si tu veux ajuster le cadrage) */
.hero-banner.hero-banner--first .hero-bg{
  object-position: center 75%; /* ajuste si besoin (65%/70%/80%) */
}

/* Optionnel : sur très grands écrans, encore un poil plus haut */
@media (min-width: 1400px){
  .hero-banner.hero-banner--first{
    height: clamp(500px, 75vh, 700px);
  }
}

/* =============================
   HERO — mobile : rendu + rectangle (pas carré)
============================= */
@media (max-width: 576px){

  /* le conteneur devient un rectangle type "bannière" */
  .hero-banner{
    height: auto;              /* on laisse l’aspect-ratio gérer */
    aspect-ratio: 16 / 9;      /* ✅ rectangle */
    min-height: unset;
  }

  /* l'image remplit le rectangle proprement */
  .hero-banner .hero-bg{
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 70%; /* ajuste si besoin */
  }

  /* si tu utilises la variante première photo */
  .hero-banner.hero-banner--first{
    height: auto;
    aspect-ratio: 16 / 9;      /* ou 3/2 si tu veux un peu plus haut */
  }

  .hero-banner.hero-banner--first .hero-bg{
    object-position: center 72%;
  }
}

.btn-veh-cta {
  border: 1px solid rgba(6, 86, 84, .25);
  background: #ffffff;
  color: #065654;
  padding: .35rem .9rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}

.btn-veh-cta:hover {
  background: #f4f9f9;
  box-shadow: 0 2px 8px rgba(6, 86, 84, .10);
}

/* ===== Tableau État de parc (style commun) ===== */

/* Conteneur + table arrondie */
.table-responsive {
  overflow-x: auto;
  margin-bottom: 2rem;
}

.table-rounded {
  border: 1px solid rgba(6, 86, 84, .12);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

/* En-têtes & cellules */
#etatParcTable thead th {
  background: #f8fbfb;
  color: #0f3f41;
  font-weight: 800;
  border-bottom: 1px solid rgba(6, 86, 84, .12);
  white-space: nowrap;
  text-align: center;
}

#etatParcTable tbody td {
  color: #0f3f41;
  vertical-align: middle;
  border-top: 1px solid rgba(6, 86, 84, .08);
  text-align: center;
}

#etatParcTable tbody tr:hover {
  background: #f7fbfb;
  cursor: pointer;
}

/* Numéro de parc interne grisé */
.np-internal {
  font-size: .9em;
  opacity: .8;
}

/* État vide */
.empty-state {
  padding: 18px;
  text-align: center;
  color: #6c757d;
  background: #fff;
}

/* Animations d’apparition */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.tbody-anim {
  animation: fadeInUp .25s ease-out both;
}

.row-fade {
  animation: fadeInUp .22s ease-out both;
}

/* Colonne statut (fine bande colorée à gauche) */
th.col-statut,
td.col-statut {
  width: 20px;
  max-width: 20px;
  padding: 0 !important;
  text-align: center;
}

td.col-statut {
  border-right: 1px solid rgba(6, 86, 84, .08);
}

/* Masque proprement la colonne statut si nécessaire */
#etatParcTable.hide-status th.col-statut,
#etatParcTable.hide-status td.col-statut {
  display: none;
}

/* Légende des statuts (si affichée au-dessus du tableau) */
.status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem .9rem;
  align-items: center;
  margin-top: .4rem;
}

.status-legend .legend-item {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  padding: .2rem .6rem;
  font-weight: 700;
}

.status-legend .legend-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, .15);
  flex: 0 0 14px;
}

/* Pagination sous le tableau (mêmes couleurs) */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.pager .meta {
  color: #065654;
  font-weight: 700;
}

.pagination .page-link {
  color: #065654;
}

.pagination .page-item.active .page-link {
  background: #065654;
  border-color: #065654;
  color: #fff;
}

@media (max-width: 768px) {
  .pager {
    flex-direction: column;
    gap: .5rem;
    align-items: flex-start;
  }
}

/* ===== Mini état de parc (widget) ===== */
.ep-wrap {
  margin-top: 1rem;
}

.ep-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin: .25rem 0 .5rem;
}

.ep-title {
  margin: 0;
  font-weight: 800;
  color: #065654;
}

.ep-open {
  border: 1px solid rgba(6, 86, 84, .25);
  background: #ffffff;
  color: #065654;
  padding: .35rem .9rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}

.ep-open:hover {
  background: #f4f9f9;
  box-shadow: 0 2px 8px rgba(6, 86, 84, .10);
}

/* ===== Tableau EP : cadre arrondi + centrage ===== */
.table-responsive {
  border-radius: 14px;
  overflow: hidden;
}

.ep-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.ep-table thead th {
  background: #f8fbfb;
  color: #065654;
  font-weight: 700;
  border-bottom: 1px solid #e5e7eb;
  padding: .55rem .6rem;
  text-align: center;
}

.ep-table tbody td {
  padding: .5rem .6rem;
  border-bottom: 1px solid #f0f2f4;
  text-align: center;
}

/* Colonne statut : fine barre colorée à gauche */
.ep-status {
  width: 10px;
  padding: 0;
  border-bottom: none;
}

.ep-status .dot {
  display: inline-block;
  width: 8px;
  height: 28px;
  border-radius: 3px;
}

/* Hover & focus des lignes */
.ep-table tbody tr:hover {
  background: #f7fbfb;
}

.ep-table tbody tr:focus-within {
  outline: 2px solid #06565355;
  background: #f7fbfb;
}

/* Etat vide */
.ep-empty {
  padding: .9rem;
  text-align: center;
  color: #6c757d;
}

/* ===== Header titre + recherche (bandeau outil EP) ===== */
.veh-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0 12px 0;
}

.veh-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.veh-search-wrap {
  min-width: 260px;
  max-width: 420px;
  flex: 0 1 420px;
}

.veh-search-wrap #veh-search {
  width: 100%;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, .95);
  background: rgba(255, 255, 255, .95);
  color: #123;
  padding: .5rem .9rem;
  outline: none;
}

@media (max-width: 600px) {
  .veh-header {
    flex-direction: column;
    align-items: stretch;
  }

  .veh-search-wrap {
    flex: 1 1 auto;
    max-width: none;
  }
}

/* ===== Pagination (aux couleurs #065653) ===== */
.pagination .page-link {
  color: #065653;
  border-color: #d7e6e5;
}

.pagination .page-link:hover {
  background: #f4f9f9;
  color: #065653;
}

.pagination .page-item.active .page-link {
  background: #065653;
  border-color: #065653;
  color: #fff;
}

.pagination .page-item.disabled .page-link {
  color: #8aa5a3;
}

/* ===== Petits ajustements du bloc #veh-zone ===== */
#veh-zone .veh-tools {
  margin-bottom: .25rem !important;
}

#veh-zone .table-responsive {
  margin-top: .25rem !important;
}

#veh-zone #veh-pagination {
  margin-top: .25rem !important;
}

/* =============================
   Quick actions overlay
============================= */
.quick-actions-overlay {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: .4rem;
  background: rgba(255, 255, 255, .75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
}

/* boutons compacts, un par ligne */
.qa-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .6rem;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1;
  background: rgba(255, 255, 255, .95);
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  color: #0f3f41;
  white-space: nowrap;
}

.qa-btn i {
  font-size: 1.1rem;
  line-height: 1;
}

.qa-btn:hover {
  background: #fff;
  border-color: rgba(0, 0, 0, .12);
}

/* état favori actif */
.qa-btn.qa-fav.active {
  background: #ffe5ea;
  border-color: #ffb3c2;
  color: #b71833;
}

/* 1) Entre 800px et 1430px : on remonte le bloc de 30px */
@media (min-width: 770px) and (max-width: 1430px) {
  .quick-actions-overlay {
    bottom: 42px; /* 12px (valeur actuelle) + 30px */
  }
}

/* 2) Mobile : barre d’actions en ligne (icônes seules) */
@media (max-width: 576px) {
  .quick-actions-overlay {
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    right: 8px;
    bottom: 8px;
    padding: .25rem;
    gap: .3rem;
    display: flex;
    flex-direction: row;      /* en ligne */
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;        /* une seule ligne */
  }

  /* on garde les icônes seules pour gagner de la place */
  .qa-btn .label {
    display: none;
  }

  /* compacte les boutons icône */
  .qa-btn {
    padding: .4rem;
  }
}

/* =============================
   BADGE LIGNE — RÈGLES GLOBALES
============================= */
a[data-line-badge] {
  /* Forcing/anti-conflits */
  display: inline-flex !important;
  height: auto !important;
  max-height: none !important;
  overflow: hidden !important; /* pour les arrondis */
  min-width: 12px !important;  /* toujours au moins 12px */

  /* Aspect/spacing */
  margin: 0 .25rem .25rem 0 !important;
  border-radius: 6px !important;
  border: 1px solid rgba(6, 86, 84, .12) !important;
  background: #fff !important;
  text-decoration: none !important;
  vertical-align: middle !important;

  /* Hover/feel */
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04) !important;
  transition:
    transform .25s cubic-bezier(.2, .8, .2, 1) !important,
    box-shadow .2s ease !important;
}

a[data-line-badge]:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .10) !important;
}

/* === BLOC LOGO === */
a[data-line-badge] .badge-logo {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 4px 8px !important;
  background: #fff !important;
}

/* Clé anti "0x0" : on force une hauteur explicite au logo */
a[data-line-badge] .badge-logo img {
  display: block !important;
  height: 22px !important; /* taille affichée non nulle (mobile) */
  width: auto !important;
  max-height: 22px !important;
  max-width: 72px !important;
  object-fit: contain !important;
}

@media (min-width: 601px) {
  a[data-line-badge] .badge-logo img {
    height: 24px !important;   /* desktop */
    max-height: 24px !important;
  }
}

/* === NOM DE LIGNE === */
a[data-line-badge] .badge-name {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.35rem 0.6rem !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  font-size: 1rem !important;
  white-space: nowrap !important;
}

/* Variante SANS LOGO — via classe .badge--no-logo */
a[data-line-badge].badge--no-logo {
  margin: 0 .15rem .15rem 0 !important;
  min-width: 20px !important; /* redondance de sécurité */
}

a[data-line-badge].badge--no-logo .badge-name {
  padding: 0.25rem 0.5rem !important;
  font-size: 0.95rem !important;
  line-height: 1.15 !important;
}

@media (min-width: 601px) {
  a[data-line-badge].badge--no-logo .badge-name {
    padding: 0.28rem 0.55rem !important;
    font-size: 0.98rem !important;
  }
}

/* =============================
   Quick stats – version responsive
============================= */
.quick-stats {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: stretch;
  margin-top: .75rem;
}

.qs-card {
  position: relative;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .25);
  backdrop-filter: blur(2px);
  border-radius: 12px;
  padding: .7rem .9rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 70px;
  opacity: 0;
  transform: translateY(8px) scale(.98);
  animation: qsIn .38s cubic-bezier(.2, .8, .2, 1) forwards;
  animation-delay: var(--stagger, 0s);
}

/* un peu plus serré sur très petits écrans */
@media (max-width: 430px) {
  .quick-stats {
    grid-template-columns: 1fr;
  }
}

/* on force de jolies cartes sur les écrans moyens */
@media (min-width: 768px) and (max-width: 1199px) {
  .quick-stats {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

/* grands écrans : les cartes ne deviennent pas trop larges */
@media (min-width: 1200px) {
  .quick-stats {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  }
}

/* mobile : 2 cards par ligne */
@media (max-width: 576px) {
  .quick-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* =============================
   CAROUSEL STACK (Articles + Photos) — 16/9 + hauteur responsive + mobile = centre seul
============================= */
.carousel-stack{
  position: relative;
  width: min(780px, 100%);
  margin: 0 auto;

  /* ratio demandé */
  aspect-ratio: 16 / 9;

  /* ✅ réduction de hauteur + responsive (on garde le ratio) */
  max-height: 340px;          /* desktop : moins haut */
  height: auto;               /* laisse l’aspect-ratio calculer */
  
  isolation: isolate;
  overflow: visible;          /* le parent (.articles-shell) clip déjà avec overflow:hidden */
}

/* base commune (button ou a) */
.stack-item{
  position: absolute;
  top: 50%;
  left: calc(50% + var(--offset, 0%));
  width: calc(100% * var(--s, 1));
  height: calc(100% * var(--s, 1));
  transform: translate(-50%, -50%);

  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: block;
}

.stack-item img{
  width: 100%;
  height: 100%;
  display: block;

  object-fit: cover;
  object-position: 50% 50%;

  border-radius: 26px;
  box-shadow: 0 16px 36px rgba(0,0,0,.18);
}

/* Centre */
.stack-item--current{
  --offset: 0%;
  --s: 1;
  z-index: 5;
}

/* ✅ Niveau 1 : rapproché de 20% vers le centre */
.stack-item--prev1{
  --offset: -30%;
  --s: .85;
  z-index: 4;
}
.stack-item--next1{
  --offset: 30%;
  --s: .85;
  z-index: 4;
}

/* ✅ Niveau 2 (52.5%) */
.stack-item--prev2{
  --offset: -52.5%;
  --s: .7225;
  z-index: 3;
}
.stack-item--next2{
  --offset: 52.5%;
  --s: .7225;
  z-index: 3;
}

/* léger recul visuel */
.stack-item--prev2 img,
.stack-item--next2 img{
  opacity: .92;
  filter: saturate(.96);
}

/* =============================
   ✅ Responsive hauteur (plus petit écran => moins haut)
============================= */
@media (max-width: 1200px){
  .carousel-stack{ max-height: 300px; }
}
@media (max-width: 992px){
  .carousel-stack{ max-height: 260px; }
}
@media (max-width: 768px){
  .carousel-stack{ max-height: 220px; }
}

/* =============================
   ✅ Portable / mobile : centre seul
============================= */
@media (max-width: 768px){
  .stack-item--prev1,
  .stack-item--next1,
  .stack-item--prev2,
  .stack-item--next2{
    display: none;
  }

  .carousel-stack{
    width: min(620px, 100%);
  }
}

/* =============================
   CAROUSEL STACK — spacing + animations (entre chaque changement d’état)
============================= */

/* ✅ marge haut/bas par rapport aux autres éléments */
.carousel-stack{
  margin: 38px auto;          /* au lieu de 0 auto */
}

/* Responsive : un peu moins d’air sur petits écrans */
@media (max-width: 992px){
  .carousel-stack{ margin: 14px auto; }
}
@media (max-width: 768px){
  .carousel-stack{ margin: 10px auto; }
}

/* ✅ Animations quand les classes (current/prev/next) changent */
.stack-item{
  will-change: left, width, height, transform;
  transition:
    left   .55s cubic-bezier(.2,.8,.2,1),
    width  .55s cubic-bezier(.2,.8,.2,1),
    height .55s cubic-bezier(.2,.8,.2,1),
    transform .55s cubic-bezier(.2,.8,.2,1);
}

.stack-item img{
  will-change: transform, opacity, filter;
  transition:
    transform .55s cubic-bezier(.2,.8,.2,1),
    opacity   .45s ease,
    filter    .45s ease,
    box-shadow .55s ease;
}

/* petit “pop” sur l’image qui devient centrale */
@keyframes stackPop {
  0%   { transform: scale(.985); filter: saturate(.95); }
  60%  { transform: scale(1.012); }
  100% { transform: scale(1); filter: saturate(1); }
}
.stack-item--current img{
  animation: stackPop .45s cubic-bezier(.2,.8,.2,1);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .stack-item,
  .stack-item img{
    transition: none !important;
    animation: none !important;
  }
}

@media (max-width: 768px){

  /* garde ton espacement compact si tu veux */
  .slider-controls{
    gap: 8px;
    margin: 10px 0;
  }

  .slider-controls .dots{
    gap: 8px;
  }

  /* ✅ dots plus gros sur portable */
  .slider-controls .dot{
    width: 16px;     /* + large */
    height: 16px;    /* + haut */
  }

  /* ✅ actif plus large ET un peu plus haut */
  .slider-controls .dot.active{
    width: 32px;     /* + large */
    height: 16px;    /* même hauteur que les autres */
  }

  /* Flèches agrandies */
  .slider-controls .ctl {
    font-size: 28px;  /* Augmente la taille de la flèche */
    padding: 10px;    /* Augmente la zone cliquable autour des flèches */
  }
}
