/* =========================================================================
   BDC ARTIST NETWORK — univers dédié (thème sombre).
   Chargé sur bdc-map.html et candidature-artist-network.html, après
   style.css et bdc-map.css : c'est la dernière feuille, elle l'emporte.

   Principe : <body class="u-nwk"> redéfinit les tokens de couleur de
   style.css. Tous les composants existants (boutons, formulaires, FAQ,
   fiches, drawer, footer…) basculent donc en sombre sans être réécrits ;
   seules les valeurs codées en dur sont corrigées plus bas.
   Registre : réseau professionnel — grille stricte, libellés capitales,
   numérotation visible, métal sur encre.
   ========================================================================= */

.u-nwk {
  --bg: #0b0b0c;
  --bg-soft: #101012;
  --bg-2: #121214;
  --panel: #171717;
  --panel-2: #1f1f1f;
  --ink: #f0f0f0;
  --ink-2: #c8c8c8;
  --muted: #919191;
  --muted-2: #707070;

  --accent: #b0b0b0;
  --accent-2: #cfcfcf;
  --accent-soft: #c6c6c6;
  --accent-pale: #505050;
  --line: rgba(240, 240, 240, 0.17);
  --line-2: rgba(240, 240, 240, 0.09);

  background: var(--bg);
  color: var(--ink-2);
}

/* --- Reprises des valeurs codées en dur de style.css ------------------ */
.u-nwk .header.is-solid { background: rgba(11, 11, 12, 0.86); }
.u-nwk .mega__panel { background: rgba(18, 18, 20, 0.98); }
.u-nwk .mega__cat:hover, .u-nwk .mega__cat.is-active,
.u-nwk .mega__list a:hover { background: rgba(240, 240, 240, 0.07); }
.u-nwk .footer__q { background: #fff; }
.u-nwk .pt { background: #0b0b0c; }
.u-nwk .iform__err { background: #2a1a17; border-color: #6b3a30; border-left-color: #e08a7a; color: #e8a698; }
/* Le survol du bandeau app est une valeur claire codée en dur : sur fond
   sombre il éclaircissait tout et faisait disparaître le texte. */
.u-nwk .ubar:hover { background: #1c1c1c; }
.u-nwk .drop__list { background: rgba(18, 18, 20, 0.98); }
.u-nwk .drop__list a:hover { background: rgba(240, 240, 240, 0.07); }
.u-nwk .check__box, .u-nwk .opt__box { color: #0b0b0c; }
.u-nwk .opt--radio .opt__box::after { background: #0b0b0c; }

/* --- Libellé de section : pastille + capitales ------------------------ */
.nlabel {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--accent);
}
.nlabel__dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

.nhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-bottom: clamp(1.8rem, 3vw, 2.8rem); }
.nhead__title { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.2rem); line-height: 1.05; margin-top: 0.7rem; color: var(--ink); }
.nhead__title i { font-style: italic; color: var(--accent-soft); }
.nhead__note { font-size: 0.82rem; color: var(--muted); }

/* --- Hero du réseau --------------------------------------------------- */
.nhero {
  position: relative; overflow: hidden;
  padding-top: clamp(8rem, 6rem + 7vw, 11.5rem); padding-bottom: clamp(3rem, 5vw, 5rem);
  border-bottom: 1px solid var(--line-2);
}
/* Trame de points : la « carte » en filigrane, purement décorative. */
.nhero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(176, 176, 176, 0.22) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(80% 65% at 72% 32%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(80% 65% at 72% 32%, #000 0%, transparent 72%);
}
.nhero > .wrap { position: relative; }
.nhero__in { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: clamp(2rem, 4vw, 4.5rem); align-items: center; }
.nhero__title { font-size: clamp(2.6rem, 1.4rem + 5vw, 5.6rem); line-height: 0.98; margin: 0.9rem 0 1.2rem; color: var(--ink); }
.nhero__title i { font-style: italic; color: var(--accent-soft); }
.nhero__lead { max-width: 56ch; color: var(--ink-2); line-height: 1.75; }
.nhero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }
.nhero--form { padding-bottom: clamp(2.5rem, 4vw, 4rem); }
.nhero--form .crumbs { position: relative; }

/* Chiffres clés — colonne de droite du hero, en damier 2×2 */
.nfacts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.nfact { padding: 1rem 1.2rem; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); }
.nfact__n { font-family: var(--serif); font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem); line-height: 1; color: var(--accent-2); }
.nfact__l { margin-top: 0.35rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

/* Carte latérale « votre dossier en bref » */
.ncard { padding: clamp(1.3rem, 2.5vw, 1.9rem); border: 1px solid var(--line-2); border-radius: 14px; background: var(--panel); }
.ncard__t { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.ncard__list { display: flex; flex-direction: column; gap: 0.7rem; margin: 1.2rem 0 1.6rem; }
.ncard__list li { display: flex; align-items: baseline; gap: 0.5em; font-size: 0.88rem; color: var(--muted); border-bottom: 1px solid var(--line-2); padding-bottom: 0.7rem; }
.ncard__list li:last-child { border-bottom: 0; padding-bottom: 0; }
.ncard__list b { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; color: var(--ink); }

/* --- Charte du réseau / étapes ---------------------------------------- */
.ncharte { padding-block: clamp(3.5rem, 5vw, 6rem); background: var(--bg-2); border-bottom: 1px solid var(--line-2); }
.ncharte .nhead__title { margin-bottom: clamp(2rem, 3.5vw, 3rem); }
.ncharte__list { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1.2rem, 2.5vw, 2.4rem); margin-top: clamp(1.8rem, 3vw, 2.6rem); list-style: none; }
.ncharte__item { position: relative; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.ncharte__item::before { content: ''; position: absolute; top: -3px; left: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.ncharte__n { display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.16em; color: var(--accent); margin-bottom: 0.6rem; }
.ncharte__t { font-family: var(--serif); font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.3rem); color: var(--ink); margin-bottom: 0.4rem; }
.ncharte__d { font-size: 0.86rem; line-height: 1.6; color: var(--muted); }

.nsteps { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(1rem, 2vw, 1.8rem); list-style: none; }
.nstep { position: relative; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.nstep::before { content: ''; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.nstep__n { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; color: var(--accent); margin-bottom: 0.7rem; }
.nstep__t { font-family: var(--serif); font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.3rem); color: var(--ink); margin-bottom: 0.45rem; }
.nstep__d { font-size: 0.88rem; line-height: 1.6; color: var(--muted); }
.nsteps__foot {
  max-width: 68ch; margin-top: clamp(2rem, 4vw, 3rem);
  padding-left: 1.2rem; border-left: 2px solid var(--accent);
  color: var(--ink-2); line-height: 1.7;
}

/* --- Avertissement candidature ---------------------------------------- */
.disclaimer {
  display: flex; align-items: flex-start; gap: 0.85rem;
  max-width: 64ch; margin-top: 2rem;
  padding: 1.05rem 1.25rem;
  border: 1px solid var(--accent-pale); border-left: 3px solid var(--accent);
  border-radius: 10px; background: var(--panel);
  color: var(--muted); font-size: 0.88rem; line-height: 1.65;
}
.disclaimer svg { flex-shrink: 0; margin-top: 0.2em; color: var(--accent); }
.disclaimer b { color: var(--ink); font-weight: 600; }

/* --- Annuaire : carte & fiches ---------------------------------------- */
.tm-map { box-shadow: none; border-color: var(--line-2); background: var(--bg-2); }
/* Tuiles déjà sombres (dark_all) : on annule le réchauffement clair. */
.u-nwk .tm-map .leaflet-tile-pane { filter: saturate(0.7) contrast(1.02) brightness(0.95); }
.tm-pin__dot { background: var(--accent-2); border-color: var(--bg); }
.tm-pin--active .tm-pin__dot { background: var(--ink); box-shadow: 0 0 0 3px rgba(176, 176, 176, 0.35), 0 4px 12px rgba(0, 0, 0, 0.6); }

.tm-card { border-radius: 10px; }
.tm-card__head { display: flex; align-items: center; gap: 0.75rem; }
.tm-card__av {
  flex-shrink: 0; width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; color: var(--accent-2);
}
.tm-card__id { flex: 1; min-width: 0; }
.tm-card__badge {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 0.35em;
  padding: 0.28em 0.65em; border: 1px solid var(--accent-pale); border-radius: 999px;
  font-size: 0.58rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent);
}
.tm-card.is-active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.tm-card:hover { border-color: var(--accent-pale); box-shadow: none; }

.tm-spec.is-active { background: var(--accent); color: #0b0b0c; border-color: var(--accent); }
.tm-popup .leaflet-popup-content-wrapper { box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); }

/* --- Bandeau candidature en pied de page ------------------------------ */
.joinmap { background: var(--bg-2); border-top: 1px solid var(--line-2); }
.joinmap__title { color: var(--ink); }
.joinmap__note { color: var(--muted); }

.nfaq { border-top: 1px solid var(--line-2); }

/* =========================================================================
   Formulaire de candidature
   ========================================================================= */
.cform {
  gap: clamp(2rem, 3.5vw, 3rem);
  padding: clamp(1.3rem, 3.5vw, 3rem);
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  scroll-margin-top: 6rem;
}
.cblock { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1.4rem; }
.cblock__lg {
  display: flex; align-items: baseline; gap: 0.8rem;
  width: 100%; padding-bottom: 0.9rem; margin-bottom: 0.3rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif); font-size: clamp(1.15rem, 1rem + 0.6vw, 1.5rem); color: var(--ink);
}
.cblock__n { font-size: 0.72rem; letter-spacing: 0.16em; color: var(--accent); }

.cfield { display: flex; flex-direction: column; gap: 0.5rem; }
.cfield__label { font-size: 0.88rem; font-weight: 600; color: var(--ink); }
.cfield__hint { font-size: 0.82rem; line-height: 1.55; color: var(--muted); margin-top: -0.2rem; }
.cfield textarea, .cfield input[type='url'], .cfield input[type='text'] { margin-top: 0.15rem; }
.cform .iform__note { color: var(--muted); }
.cform input, .cform textarea, .cform select { background: var(--bg-2); }
.cform .iform__ok { background: var(--bg-2); border-color: var(--accent); }
.cform .iform__ok h3 { color: var(--ink); }

/* Cases à cocher / boutons radio en tuiles */
.optgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 0.55rem; }
.optrow { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.optrow .opt { flex: 0 1 auto; min-width: 150px; }
.optgrp + .optgrp { margin-top: 1.1rem; }
.optgrp__t {
  display: block; margin-bottom: 0.5rem;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent);
}

.opt {
  position: relative; display: flex; align-items: center; gap: 0.65rem;
  padding: 0.8rem 0.95rem;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px;
  font-size: 0.88rem; line-height: 1.4; color: var(--ink-2); cursor: pointer;
  transition: border-color 0.25s var(--e), background 0.25s var(--e), color 0.25s var(--e);
}
.opt:hover { border-color: var(--accent-pale); background: var(--panel-2); }
/* L'input couvre la tuile : clic direct, focus clavier et bulle de
   validation native restent fonctionnels malgré l'opacité nulle. */
.iform .opt input {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; margin: 0; padding: 0;
  opacity: 0; cursor: pointer; border: 0; border-radius: 8px;
}
.opt__box {
  flex-shrink: 0; width: 19px; height: 19px;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 4px; background: transparent;
  transition: background 0.2s, border-color 0.2s;
}
.opt--radio .opt__box { border-radius: 50%; }
.opt--radio .opt__box::after {
  content: ''; width: 9px; height: 9px; border-radius: 50%;
  opacity: 0; transition: opacity 0.2s;
}
.opt__box svg { opacity: 0; transition: opacity 0.2s; }
.opt input:checked + .opt__box { background: var(--accent); border-color: var(--accent); }
.opt input:checked + .opt__box svg,
.opt input:checked + .opt__box::after { opacity: 1; }
.opt:has(input:checked) { border-color: var(--accent); background: var(--panel-2); color: var(--ink); }
.opt:has(input:focus-visible) { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(176, 176, 176, 0.25); }
.opt__lbl { position: relative; }

/* Upload de photos */
.upload { position: relative; }
.iform .upload input[type='file'] {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; margin: 0; padding: 0;
  opacity: 0; cursor: pointer; border: 0;
}
.upload__zone {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 1.05rem 1.2rem;
  background: var(--bg-2);
  border: 1px dashed var(--line); border-radius: 10px;
  color: var(--ink-2); cursor: pointer;
  transition: border-color 0.25s var(--e), background 0.25s var(--e);
}
.upload:hover .upload__zone { border-color: var(--accent); background: var(--panel-2); }
.upload__zone svg { flex-shrink: 0; color: var(--accent); }
.upload__zone span { display: flex; flex-direction: column; gap: 0.15rem; }
.upload__zone b { font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.upload__zone i { font-style: normal; font-size: 0.78rem; color: var(--muted); }
.upload__status { position: relative; z-index: 2; margin-top: 0.5rem; font-size: 0.8rem; line-height: 1.5; word-break: break-word; }
.upload__status.is-ok { color: var(--accent-2); }
.upload__status.is-error { color: #e08a7a; }

.check--strong {
  padding: 1rem 1.15rem;
  background: var(--bg-2); border: 1px solid var(--accent-pale); border-radius: 10px;
}
.cform__legal { font-size: 0.82rem; line-height: 1.6; color: var(--muted); }

/* --- Responsive ------------------------------------------------------- */
@media (max-width: 1040px) {
  .nhero__in { grid-template-columns: 1fr; }
  .nfacts { grid-template-columns: repeat(2, 1fr); }
  .ncharte__list { grid-template-columns: repeat(2, 1fr); }
  .nsteps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .nfacts, .ncharte__list, .nsteps { grid-template-columns: 1fr; }
  .optgrid { grid-template-columns: 1fr; }
  .optrow .opt { flex: 1 1 100%; }
  .tm-card__badge { display: none; }
}
