/* === Nova Connexions - Grille Opportunités (style premium) === */
:root {
  --nc-bg: #f2f3f5;
  --nc-card-bg: #fff;
  --nc-text: #001233;
  --nc-muted: #6b7280;
  --nc-border: #e2e8f0;
  --nc-green: #2fb36a;
  --nc-orange: #d97706;
  --nc-red: #dc2626;
  --nc-primary: #001233;
  --nc-radius: 18px;
  --nc-shadow: 0 6px 25px rgba(0,0,0,0.08);
}

body {
  background: var(--nc-bg);
}

/* Structure globale */
.nc-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 40px;
}

.nc-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
}

@media (max-width: 980px) {
  .nc-layout {
    grid-template-columns: 1fr;
  }
}

/* Sidebar */
.nc-side {
  background: var(--nc-card-bg);
  border-radius: var(--nc-radius);
  border: 1px solid var(--nc-border);
  padding: 24px;
  height: max-content;
  box-shadow: var(--nc-shadow);
}
.nc-side h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--nc-text);
}
.nc-group {
  border-bottom: 1px solid var(--nc-border);
  margin-bottom: 18px;
  padding-bottom: 18px;
}
.nc-group:last-child {
  border-bottom: none;
}
.nc-check {
  display: block;
  font-size: 0.8vw;
  color: #333;
}
.nc-check input {
  margin-right: 6px;
}
.nc-input {
  width: 100%;
  border: 1px solid var(--nc-border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
}
.nc-btn {
  border: none;
  background: var(--nc-primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s;
}
.nc-btn:hover {
  opacity: 0.9;
}

/* Grille projets en 3 / 2 / 1 colonnes */
.nc-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:32px;
}
@media (max-width: 1280px){ .nc-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px){ .nc-grid{ grid-template-columns: 1fr; } }


/* Card */
.nc-card {
  background: var(--nc-card-bg);
  border-radius: var(--nc-radius);
  overflow: hidden;
  box-shadow: var(--nc-shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.nc-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.12);
}

/* Image */
.nc-cover {
  position: relative;
  overflow: hidden;
}
.nc-cover img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}


/* Badge montant */
.nc-badge-amount {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #b8914f;
  color: #fff;
  font-weight: 700;
  border-radius: 50%;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  text-align: center;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  padding-top:0%
}

/* Contenu */
.nc-body {
  padding: 5%;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding-top: 0%;
}
.nc-state {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}
.nc-state.encours { color: var(--nc-green); }
.nc-state.prochainement { color: var(--nc-orange); }
.nc-state.termine, .nc-state.finance { color: var(--nc-red); }

.nc-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--nc-primary);
  margin-bottom: 10px;
  line-height: 1.3;
}
.nc-desc {
  flex-grow: 1;
  font-size: 15px;
  color: var(--nc-text);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Bouton */
.nc-cta {
  background: var(--nc-primary);
  color: #fff;
  font-weight: 700;
  border-radius: 30px;
  padding: 12px 24px;
  text-decoration: none;
  display: inline-block;
  width: fit-content;
  align-self: flex-start;
  transition: all 0.3s ease;
}
.nc-cta:hover {
  background: #0f2347;
  transform: translateY(-2px);
}

/* Aucune correspondance */
.nc-empty {
  display: none;
  justify-content: center;
  align-items: center;
  background: var(--nc-card-bg);
  padding: 40px;
  border-radius: var(--nc-radius);
  border: 1px dashed var(--nc-border);
  color: var(--nc-muted);
}
.nc-empty.is-visible {
  display: flex;
}

/* Scope largeur uniquement à la page Opportunités */
.nc-opps .et_pb_section,
.nc-opps .et_pb_row,
.nc-opps .et_pb_column {
  width: 100%;
  max-width: 100%;
}

/* Option : container large mais pas bord à bord */
.nc-opps .nc-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding-left: 40px;
  padding-right: 40px;
}

/* Si tu veux bord à bord total pour cette page, utilise plutôt :
.nc-opps .nc-wrap { max-width: 100%; padding-left: 0; padding-right: 0; }
*/

/* Pleine largeur uniquement pour la section #nc-opps */
#nc-opps.et_pb_section { padding-left: 0; padding-right: 0; }
#nc-opps .et_pb_row      { width:100% !important; max-width:100% !important; padding:0 !important; }
#nc-opps .et_pb_column   { padding:0 !important; }

/* Notre conteneur interne */
#nc-opps .nc-wrap { max-width: 1400px; margin: 0 auto; padding: 30px 40px; }

/* Si tu veux bord à bord total pour la grille : */
/* #nc-opps .nc-wrap { max-width: 100%; padding-left: 20px; padding-right: 20px; } */

/* FULL WIDTH pour la section Opportunités */
#nc-opps .et_pb_code_inner{ padding:0 !important; }         /* enlève le padding par défaut du module Code */
#nc-opps .et_pb_row{ width:100% !important; max-width:100% !important; padding:0 !important; }

#nc-opps .nc-wrap{
  max-width: 100% !important;   /* <-- clé : plus de 1400px */
  width: 100% !important;
  margin: 0 !important;
  padding-left: min(4vw, 32px) !important;  /* un peu d’air aux bords */
  padding-right: min(4vw, 32px) !important;
}

/* 1) Sidebar plus large */
.nc-layout{
  grid-template-columns: 360px 1fr;  /* avant 280px */
  gap: 40px;
}
@media (max-width: 980px){
  .nc-layout{ grid-template-columns: 1fr; }
}

/* 2) Groupes de cases en 2 colonnes (État + Secteur) */
.nc-group--choices{
  display: grid;
  grid-template-columns: 1fr 1fr;  /* 2 colonnes */
  column-gap: 16px;
  row-gap: 8px;
  align-items: start;
}
.nc-group--choices h3{
  grid-column: 1 / -1;              /* le titre prend toute la ligne */
  margin-bottom: 6px;
}
.nc-group--choices .nc-check{
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

/* Option : si tu veux des colonnes un peu plus larges à gauche */
@media (min-width: 1281px){
  .nc-layout{ grid-template-columns: 400px 1fr; } /* monte à 400 si tu veux encore + large */
}

/* 3) Cacher le header de la page Opportunités */
.nc-wrap .nc-header{ display: none; }


/* === Cards : image inset, marges, typo harmonisée, badge 2 lignes === */

/* un peu d'air interne pour la carte */
.nc-card{
  padding: 14px 14px 18px;
  border-radius: 18px;
}

/* Image : pas 100% de la largeur + petite marge haute + coins arrondis */
.nc-cover{
  position: relative;
  width: calc(100% - 28px);      /* image plus étroite que la carte */
  margin: 10px auto 0;           /* petite marge au-dessus + centrée */
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 9;          /* ratio constant */
}
.nc-cover img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Badge : rond, légèrement décalé vers l'extérieur + 2 lignes */
.nc-badge-amount{
  position: absolute;
  top: -10px;          /* léger décalage hors du coin */
  right: -10px;
  width: 4.5vw;
  height: 4.5vw;
  border-radius: 50%;
  background: #b8914f;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 8px;
}
.nc-badge-amount .nc-badge-top{
  font-size: 0.7vw;           /* plus petit */
  line-height: 1.1;
  font-weight: 700;
  opacity: .95;
  margin-bottom: 2px;
}
.nc-badge-amount .nc-badge-val{
  font-size: 1vw;           /* plus grand pour le montant */
  line-height: 1;
  font-weight: 500;
}

/* État, titre, texte : ratios de taille alignés */
.nc-state{
  margin: 16px 4px 6px;
  font-size: 15px;
  font-weight: 700;
}
.nc-state.encours{ color:#2fb36a; }
.nc-state.prochainement{ color:#d97706; }
.nc-state.termine, .nc-state.finance{ color:#dc2626; }

.nc-title{
  font-size: 1.2vw;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 4px 0px;
  font-family: 'Kanit';
}

.nc-desc{
  font-size: 0.8vw;
  line-height: 1.7;
  color: #333;
  margin: 0 4px 18px;
}

/* Bouton : un peu plus présent */
.nc-cta{
  border-radius: 28px;
  padding: 7%;
  font-size: 14px;
  letter-spacing: .2px;
  padding-top: 3%;
  padding-bottom: 3%;
}

/* Petites adaptations responsives */
@media (max-width: 640px){
  .nc-cover{ width: calc(100% - 20px); }
  .nc-badge-amount{ width: 88px; height: 88px; }
  .nc-badge-amount .nc-badge-val{ font-size: 20px; }
  .nc-title{ font-size: 24px; }
  .nc-desc{ font-size: 15px; }
}

/* Permet au badge de dépasser sans être coupé */
.nc-card{
  position: relative;
  overflow: visible !important;   /* important pour écraser le overflow hérité */
  z-index: 1;
}

.nc-cover{
  position: relative;
  z-index: 2;                     /* image au-dessus du fond */
  overflow: visible !important;   /* on autorise le dépassement */
}

/* Badge toujours au-dessus de tout */
.nc-badge-amount{
  position: absolute;
  z-index: 5;                     /* priorité haute */
  top: -10px;
  right: -10px;
}

.nc-badge-amount .nc-badge-top {
    font-weight: 500;
}

.nc-cover img {
    border-radius: 6px;
}

@media (max-width: 640px){ 
.nc-cover {
    width: 100%;
    margin: 0;
} 

.nc-cover img {
    width: 100%;
    box-shadow: var(--nc-shadow);
}

.nc-body {
    padding: 0;
}

.nc-cta {
    padding: 1.5% 4%;
    font-size: 2.9vw;
text-transform:uppercase;
    box-shadow: var(--nc-shadow);
}

    .nc-title {
        font-size: 5vw;
        font-family: 'Forma DJR Micro Extra Bold', Helvetica, Arial, Lucida, sans-serif;
font-weight: 900;
        margin-bottom: 2% !important;
letter-spacing:0;
margin:0;
    }

.nc-state {
    margin: 0;
    font-size: 3.5vw;
    font-weight: 600;
    letter-spacing: 0px;
    margin-top: 4%;
    margin-bottom: 1%;
}

    .nc-badge-amount {
        width: 76px;
        height: 76px;
    }

/* ========= Slider Montant ========= */
.nc-range-wrap { margin-top: 8px; }
.nc-range-values { margin-top: 6px; font-size: 14px; font-weight: 700; color: var(--nc-primary, #001233); }
.nc-range-scale { display:flex; justify-content:space-between; font-size:12px; color:#6b7280; margin-top:2px; }

/* Slider minimal cross-browser */
.nc-range { width:100%; -webkit-appearance:none; appearance:none; height:6px; border-radius:4px; background:#e5e7eb; outline:none; }
.nc-range::-webkit-slider-thumb { -webkit-appearance:none; appearance:none; width:22px; height:22px; border-radius:50%; background:#001233; border:2px solid #fff; box-shadow:0 1px 4px rgba(0,0,0,.25); cursor:pointer; }
.nc-range::-moz-range-thumb { width:22px; height:22px; border-radius:50%; background:#001233; border:2px solid #fff; box-shadow:0 1px 4px rgba(0,0,0,.25); cursor:pointer; }
.nc-range::-moz-range-track { height:6px; border-radius:4px; background:#e5e7eb; }

/* ========= Accordéon mobile ========= */
@media (max-width: 980px){
  .nc-side .nc-group{
    border:1px solid var(--nc-border, #e2e8f0);
    border-radius:12px;
    margin-bottom:12px;
    overflow:hidden;
    background:#fff;
  }
  .nc-side .nc-group h3{
    margin:0;
    padding:12px 44px 12px 14px;
    background:#1f2937;
    color:#fff;
    position:relative;
    cursor:pointer;
  }
  .nc-side .nc-group h3::after{
    content:'▾';
    position:absolute;
    right:14px; top:50%;
    transform:translateY(-50%) rotate(0deg);
    transition:transform .2s ease;
    opacity:.9;
  }
  .nc-side .nc-group.collapsed h3::after{
    transform:translateY(-50%) rotate(-90deg);
  }
  .nc-side .nc-group.collapsed > *:not(h3){ display:none; }
  .nc-side .nc-group .nc-check,
  .nc-side .nc-group .nc-input,
  .nc-side .nc-group .nc-range-wrap{ padding:12px 14px; }
}

/* (déjà en place) deux colonnes pour Etat + Secteur */
.nc-group--choices{
  display:grid; grid-template-columns:1fr 1fr; column-gap:16px; row-gap:8px; align-items:start;
}
.nc-group--choices h3{ grid-column:1 / -1; margin-bottom:6px; }
.nc-group--choices .nc-check{ display:flex; align-items:center; gap:8px; margin:4px 0; }

/* ====== Slider "règle graduée" ====== */
.nc-range-wrap{
  position: relative;
  padding-top: 18px;    /* place pour la règle au-dessus du track */
}

/* La règle : ligne + petits/ grands ticks grâce à 2 gradients */
.nc-ruler{
  position: absolute;
  left: 0; right: 0; top: 6px;
  height: 14px;
  background:
    /* petits ticks (chaque 0.5 M€) */
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc(100%/31 - 1px),
      #9ca3af calc(100%/31 - 1px),
      #9ca3af calc(100%/31)
    ),
    /* grands ticks (0, 5, 10, 15) */
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc(100%/10 - 1px),
      #111827 calc(100%/10 - 1px),
      #111827 calc(100%/10)
    );
}

/* Track + thumb du slider */
.nc-range{
  position: relative;
  z-index: 2;
  width: 100%;
  -webkit-appearance: none; appearance: none;
  height: 6px; border-radius: 4px;
  background: #e5e7eb;
  outline: none;
  margin-top: 8px;
}
.nc-range::-webkit-slider-thumb{
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: #001233; border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: pointer;
}
.nc-range::-moz-range-thumb{
  width: 22px; height: 22px; border-radius: 50%;
  background: #001233; border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: pointer;
}
.nc-range::-moz-range-track{
  height: 6px; border-radius: 4px; background: #e5e7eb;
}

.nc-range-values{
  margin-top: 8px; font-size: 14px; font-weight: 700; color: #001233;
}
.nc-range-ends{
  display: flex; justify-content: space-between;
  font-size: 12px; color: #6b7280; margin-top: 4px;
}

/* On masque d'anciennes graduations s'il en reste par erreur */
.nc-range-scale{ display:none !important; }

/* ====== Checkboxes : espacement réduit ====== */
.nc-group--choices .nc-check{
  margin: 2px 0 !important;          /* moitié moins qu'avant */
  line-height: 1.2;
}
.nc-group--choices .nc-check input{ margin-right: 8px; }

/* ===== Slider Montant : règle + ticks + min/max alignés ===== */

.nc-range-wrap{
  position: relative;
  /* on réserve la hauteur pour les min/max + règle + track */
  padding-top: 40px;
}

/* La règle (au-dessus du track) */
.nc-ruler{
  position: absolute;
  left: 0; right: 0;
  top: 20px;                 /* ligne de la règle */
  height: 12px;
  /* petits ticks tous les 0,5 M€ (≈ 30 segments de 0 à 15) */
  background:
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc(100%/30 - 1px),
      #9ca3af calc(100%/30 - 1px),
      #9ca3af calc(100%/30)
    ),
    /* grands ticks à 0, 5, 10, 15 (3 intervalles) */
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc(100%/3 - 2px),
      #111827 calc(100%/3 - 2px),
      #111827 calc(100%/3)
    );
}

/* Min / Max sur la même ligne que la règle (au-dessus du track) */
.nc-range-ends{
  position: absolute;
  left: 0; right: 0;
  top: 0;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #6b7280;
  pointer-events: none;
}

/* Le slider est posé sur la règle */
.nc-range{
  position: absolute;
  left: 0; right: 0;
  top: 24px;                /* track au centre de la règle */
  z-index: 2;
  width: 100%;
  -webkit-appearance: none; appearance: none;
  height: 6px; border-radius: 4px;
  background: #e5e7eb;
  outline: none;
}

.nc-range::-webkit-slider-thumb{
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: #001233; border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
  cursor: pointer;
}
.nc-range::-moz-range-thumb{
  width: 22px; height: 22px; border-radius: 50%;
  background: #001233; border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
  cursor: pointer;
}
.nc-range::-moz-range-track{ height: 6px; border-radius: 4px; background: #e5e7eb; }

/* Valeur sélectionnée (sous la règle) */
.nc-range-values{
  margin-top: 52px;        /* descend sous la règle/track */
  font-size: 14px; font-weight: 700; color: #001233;
}

/* Si un ancien marqueur existe encore, on le masque */
.nc-range-scale{ display:none !important; }

/* ===== Checkboxes : espace réduit de moitié ===== */
.nc-group--choices .nc-check{
  margin: 2px 0 !important;
  line-height: 1.2;
}
.nc-group--choices .nc-check input{ margin-right: 8px; }

/* ===== Slider Montant : règle + ticks + min/max alignés ===== */

.nc-range-wrap{
  position: relative;
  padding-top: 40px; /* place pour libellés + règle */
}

.nc-ruler{
  position: absolute;
  left: 0; right: 0;
  top: 20px;
  height: 12px;
  z-index: 1;
  pointer-events: none;
  background:
    /* petits ticks tous les 0,5 M€ (de 0 à 15 => 30 pas) */
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc(100%/30 - 1px),
      #9ca3af calc(100%/30 - 1px),
      #9ca3af calc(100%/30)
    ),
    /* grands ticks à 0 / 5 / 10 / 15 */
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc(100%/3 - 2px),
      #111827 calc(100%/3 - 2px),
      #111827 calc(100%/3)
    );
}

.nc-range-ends{
  position: absolute;
  left: 0; right: 0;
  top: 0;
  display: flex !important;       /* force si Divi override */
  justify-content: space-between;
  font-size: 12px;
  color: #6b7280;
  pointer-events: none;
}

.nc-range{
  position: absolute !important;
  left: 0; right: 0;
  top: 24px;
  z-index: 2;
  width: 100%;
  -webkit-appearance: none; appearance: none;
  height: 6px; border-radius: 4px;
  background: #e5e7eb;
  outline: none;
}
.nc-range::-webkit-slider-thumb{
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: #001233; border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
  cursor: pointer;
}
.nc-range::-moz-range-thumb{
  width: 22px; height: 22px; border-radius: 50%;
  background: #001233; border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
  cursor: pointer;
}
.nc-range::-moz-range-track{ height: 6px; border-radius: 4px; background: #e5e7eb; }

.nc-range-values{
  margin-top: 52px;
  font-size: 14px; font-weight: 700; color: #001233;
}

/* masque toute ancienne échelle si elle traîne encore */
.nc-range-scale{ display:none !important; }

/* Espacement checkboxes réduit */
.nc-group--choices .nc-check{ margin: 2px 0 !important; line-height: 1.2; }
.nc-group--choices .nc-check input{ margin-right: 8px; }

/* ---- Sidebar layout & slider placement ---- */
#nc-app .nc-layout { align-items: flex-start; }

#nc-app .nc-side{
  display: flex;           /* stack groups in a column */
  flex-direction: column;
}

/* default order for groups */
#nc-app .nc-side .nc-group{ 
  position: relative;
  order: 0;
}

/* force the amount filter to be the last one in the sidebar */
#nc-app .nc-side .nc-group.nc-range{
  order: 99;
  margin-top: 12px;        /* a little spacing above the slider block */
}

/* make sure the slider elements are positioned relative to their own block */
#nc-app .nc-side .nc-group.nc-range .nc-range-wrap{
  position: relative;
  padding-top: 40px;       /* space for labels/ruler, already used in inline CSS */
  overflow: hidden;
}
#nc-app .nc-side .nc-group.nc-range .nc-ruler,
#nc-app .nc-side .nc-group.nc-range .nc-range,
#nc-app .nc-side .nc-group.nc-range .nc-range-ends{
  left: 0;
  right: 0;
}

.nc-group:last-child {
    position: initial!important;
}

.nc-range-values {
    margin-top: 5%;
}

.nc-range.nc-range-min {
display:none
}

.nc-group:last-child {
    border-bottom: none;
    display: contents;
}

}
