/* ===== DESIGN SYSTEM LES INFLUSTRIELS ===== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&display=swap');

:root {
  --blue: #1A1FB5;
  --blue-deep: #141A8C;
  --green: #1DBF73;
  --green-full: #22C55E;
  --cream: #FDF4E8;
  --white: #FFFFFF;
  --grey-text: #2D2D2D;
  --grey-border: #E5E0F0;
  --radius: 24px;
  --radius-sm: 12px;
  --shadow: 0 4px 24px rgba(26, 31, 181, 0.08);
  --shadow-hover: 0 8px 40px rgba(26, 31, 181, 0.18);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
  color: var(--grey-text);
  background: var(--white);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

/* Compense le sticky header sur les ancres */
[id] { scroll-margin-top: 80px; }
img { display: block; max-width: 100%; }

/* ===== NAV ===== */
.site-nav {
  background: var(--white);
  border-bottom: 2px solid var(--blue);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo img { height: 44px; width: auto; }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--grey-text);
  transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active { color: var(--blue); }

/* ===== HERO ===== */
.hero {
  background: var(--blue);
  color: var(--white);
  padding: 64px 40px 56px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--green);
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero h1 .underline-green {
  position: relative;
  display: inline-block;
}

.hero h1 .underline-green::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--green);
  border-radius: 2px;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
  margin-bottom: 24px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 8px;
}

.hero-stat strong {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--white);
}

.hero-stat span {
  font-size: 0.8rem;
  opacity: 0.75;
  font-weight: 400;
}

/* ===== MAP SECTION ===== */
.map-section {
  background: var(--cream);
  padding: 48px 40px;
}

.map-section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--blue-deep);
  margin-bottom: 24px;
}

#france-map {
  height: 400px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--grey-border);
  box-shadow: var(--shadow);
}

/* Leaflet custom markers */
.custom-marker {
  background: none;
  border: none;
}

.marker-pin {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue);
  border: 3px solid var(--green);
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  box-shadow: 0 2px 8px rgba(26,31,181,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.marker-pin:hover { transform: scale(1.25); background: var(--blue-deep); }
.marker-pin.active { background: var(--green); border-color: var(--blue); }

.marker-cluster {
  background: var(--green);
  border-color: var(--blue);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.map-popup-list {
  min-width: 240px;
  padding: 10px 12px;
}
.map-popup-list-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--grey-border);
}
.map-popup-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--grey-border);
}
.map-popup-list-item:last-child { border-bottom: none; }
.map-popup-list-item img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.map-popup-list-info {
  flex: 1;
  min-width: 0;
}
.map-popup-list-info strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--blue);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.map-popup-list-info span {
  display: block;
  font-size: 0.72rem;
  color: var(--grey-text);
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaflet-popup-content-wrapper {
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-hover) !important;
  border: 1px solid var(--grey-border);
  padding: 0 !important;
}

.leaflet-popup-content {
  margin: 0 !important;
}

.map-popup {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  min-width: 220px;
}

.map-popup img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--grey-border);
  flex-shrink: 0;
}

.map-popup-info strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--blue);
}

.map-popup-info span {
  display: block;
  font-size: 0.78rem;
  color: var(--grey-text);
  opacity: 0.75;
}

/* Vaut pour la pastille seule comme pour la liste groupée. Dans cette
   dernière, la règle générique « .map-popup-list-info span » s'applique
   aussi : on rétablit donc explicitement l'opacité et le retour à la ligne,
   sans quoi la thématique passe pour une seconde ligne de poste tronquée. */
.map-popup-info .tag-mini,
.map-popup-list-info .tag-mini {
  display: inline-block;
  margin-top: 4px;
  background: var(--green);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  opacity: 1;
  white-space: normal;
  overflow: visible;
}

.map-popup-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 12px;
  background: var(--blue);
  color: var(--white);
  font-size: 0.74rem;
  font-weight: 600;
  border-radius: 20px;
  text-decoration: none;
}
.map-popup-btn:hover { opacity: 0.85; }

/* ===== DIRECTORY SECTION ===== */
.directory-section {
  background: var(--white);
  padding: 48px 40px;
}

.directory-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== FILTERS ===== */
.filters-bar {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 36px;
  border: 1px solid var(--grey-border);
}

.filters-top {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.search-input {
  flex: 1;
  min-width: 200px;
  padding: 10px 16px;
  border: 2px solid var(--grey-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  background: var(--white);
}

.search-input:focus { border-color: var(--blue); }

.filter-select {
  padding: 10px 16px;
  border: 2px solid var(--grey-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  background: var(--white);
  color: var(--grey-text);
  outline: none;
  transition: border-color 0.2s;
  min-width: 180px;
}

.filter-select:focus { border-color: var(--blue); }

.btn-reset {
  padding: 10px 20px;
  background: var(--white);
  border: 2px solid var(--grey-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--grey-text);
  transition: border-color 0.2s, color 0.2s;
  white-space: nowrap;
}

.btn-reset:hover { border-color: var(--blue); color: var(--blue); }

.active-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blue);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}

.filter-chip button {
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.7;
  padding: 0;
}

.filter-chip button:hover { opacity: 1; }

/* ===== RESULTS COUNT ===== */
.results-count {
  font-size: 0.9rem;
  color: var(--grey-text);
  opacity: 0.7;
  margin-bottom: 24px;
}

.results-count strong { color: var(--blue); font-weight: 700; }

/* ===== MEMBER GRID ===== */
.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

.member-card {
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.22s, box-shadow 0.22s;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.member-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--blue);
}

/* Square photo container — maintains 1:1 ratio regardless of image dimensions */
.card-img-wrap {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  flex-shrink: 0;
}

.card-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.card-photo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -1px;
}

.card-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--blue-deep);
  margin-bottom: 2px;
}

.card-role {
  font-size: 0.82rem;
  color: var(--grey-text);
  opacity: 0.8;
  margin-bottom: 8px;
}

.card-ville {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: var(--grey-text);
  opacity: 0.65;
  margin-bottom: 12px;
}

.icon-loc { font-size: 0.75rem; }

.card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-thematique {
  display: inline-block;
  background: var(--blue);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

.card-linkedin {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--grey-text);
  opacity: 0.6;
}

/* ===== NO RESULTS ===== */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--grey-text);
  opacity: 0.5;
}

.no-results p { font-size: 1.1rem; margin-top: 12px; }

/* ===== MEMBER PROFILE PAGE ===== */

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  padding: 0 40px;
  padding-top: 32px;
  transition: color 0.2s;
}

.back-link:hover { color: var(--white); }

/* Profile hero */
.profile-hero {
  background: var(--blue);
  color: var(--white);
  padding: 32px 40px 56px;
  position: relative;
}

.profile-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--green);
}

.profile-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 40px;
  align-items: start;
}

.profile-photo-wrap {
  flex-shrink: 0;
}

.profile-photo {
  width: 160px;
  height: 160px;
  border-radius: var(--radius);
  object-fit: cover;
  object-position: top center;
  border: 3px solid rgba(255,255,255,0.25);
}

.profile-photo-placeholder {
  width: 160px;
  height: 160px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 800;
}

.profile-info .tag-thematique {
  background: rgba(255,255,255,0.18);
  color: var(--white);
  margin-bottom: 16px;
  display: inline-block;
}

.profile-name {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 6px;
}

.profile-poste {
  font-size: 1rem;
  font-weight: 600;
  opacity: 0.85;
  margin-bottom: 4px;
}

.profile-entreprise {
  font-size: 0.9rem;
  opacity: 0.75;
  margin-bottom: 16px;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  opacity: 0.8;
}

.meta-item a {
  color: var(--green);
  text-decoration: underline;
  font-weight: 600;
}

.meta-item a:hover { opacity: 0.9; }

/* Signature */
.profile-signature-section {
  background: var(--white);
  padding: 48px 40px;
  border-bottom: 1px solid var(--grey-border);
}

.profile-signature-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.profile-signature {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 700;
  color: var(--blue-deep);
  line-height: 1.35;
  position: relative;
  padding-left: 20px;
  border-left: 4px solid var(--green);
}

/* Bio section */
.profile-bio-section {
  background: var(--white);
  padding: 48px 40px;
}

.profile-bio-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
  align-items: start;
}

.bio-text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--grey-text);
}

.expertise-block h3 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
  margin-bottom: 10px;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tag-expertise {
  background: var(--cream);
  color: var(--blue-deep);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--grey-border);
}

.tag-sollicitation {
  background: var(--white);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--green);
}

/* Video section */
.profile-video-section {
  background: var(--cream);
  padding: 56px 40px;
}

.profile-video-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--blue);
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  padding: 16px 28px;
  border-radius: 40px;
  transition: background 0.2s, transform 0.2s;
}

.video-link-btn:hover {
  background: var(--blue-deep);
  transform: translateY(-2px);
}

/* Interventions section */
.profile-interventions-section {
  background: var(--blue);
  color: var(--white);
  padding: 56px 40px;
}

.profile-interventions-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.profile-interventions-section .section-title { color: var(--white); }

.interventions-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.intervention-item {
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255,255,255,0.12);
  transition: background 0.2s;
}

.intervention-item:hover { background: rgba(255,255,255,0.16); }

.intervention-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.6;
  margin-bottom: 4px;
}

.intervention-titre {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
}

.intervention-meta {
  font-size: 0.78rem;
  opacity: 0.65;
  margin-top: 3px;
}

.intervention-link {
  flex-shrink: 0;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 700;
  border: 1.5px solid var(--green);
  padding: 6px 14px;
  border-radius: 20px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.intervention-link:hover {
  background: var(--green);
  color: var(--white);
}

/* Social networks section */
.profile-reseaux-section {
  background: var(--white);
  padding: 56px 40px;
}

.profile-reseaux-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.reseaux-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
}

.reseau-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--cream);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-sm);
  padding: 16px 22px;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
  min-width: 200px;
}

.reseau-card:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
}

.reseau-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  flex-shrink: 0;
}

.reseau-icon.linkedin { background: #0077B5; color: #fff; font-size: 0.9rem; }
.reseau-icon.instagram { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: #fff; font-size: 0.9rem; }
.reseau-icon.twitter { background: #000; color: #fff; }
.reseau-icon.bluesky { background: #0085ff; color: #fff; font-size: 0.9rem; }
.reseau-icon.youtube { background: #FF0000; color: #fff; }
.reseau-icon.newsletter { background: var(--blue); color: #fff; }
.reseau-icon.tiktok { background: #000; color: #fff; }

.reseau-info strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--blue-deep);
}

.reseau-followers {
  font-size: 0.75rem;
  color: var(--grey-text);
  opacity: 0.6;
}

/* ===== STATUS BADGE ===== */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-badge.en-revision {
  background: #FEF3C7;
  color: #92400E;
  border: 1.5px solid #F59E0B;
}

.status-badge.publiee {
  background: #D1FAE5;
  color: #065F46;
  border: 1.5px solid var(--green);
}

.preview-banner {
  background: #FFFBEB;
  border-bottom: 2px solid #F59E0B;
  padding: 12px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.preview-banner p {
  font-size: 0.85rem;
  color: #92400E;
  font-weight: 600;
}

/* ===== BURGER MOBILE ===== */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.nav-burger span {
  display: block;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
  transform-origin: center;
}

/* Burger → × quand ouvert */
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1050px) {
  .nav-burger { display: flex; }
  .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--white);
    border-bottom: 2px solid var(--blue);
    flex-direction: column;
    padding: 0 28px;
    gap: 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    z-index: 99;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.25s ease;
  }
  .nav-links.nav-open {
    max-height: 500px;
    padding: 12px 28px 20px;
  }
  .nav-links li {
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links a {
    display: block;
    padding: 12px 0;
  }
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--blue-deep);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 32px 40px;
  font-size: 0.82rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.site-footer a { color: var(--green); }

/* ===== LOADING STATE ===== */
.loading-overlay {
  text-align: center;
  padding: 80px 20px;
  color: var(--grey-text);
  opacity: 0.55;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--grey-border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay p { font-size: 0.95rem; font-weight: 600; }

/* Skeleton cards */
.skeleton-card {
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.skeleton-img {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

.skeleton-body { padding: 20px 22px 22px; }

.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  margin-bottom: 10px;
}

.skeleton-line.short { width: 60%; }
.skeleton-line.medium { width: 80%; }

@keyframes shimmer { to { background-position: -200% 0; } }

/* ===== MODE ADMIN ===== */

.admin-banner {
  background: #FEF3C7;
  border-bottom: 2px solid #F59E0B;
  padding: 10px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #92400E;
}

.btn-add-member {
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 20px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 16px;
  cursor: pointer;
  transition: background .2s;
}
.btn-add-member:hover { background: var(--blue-deep); }

/* Inputs dans la modal "Ajouter un membre" */
.am-input {
  background: var(--white) !important;
  border-color: var(--grey-border) !important;
  color: var(--grey-text) !important;
  font-size: 0.95rem;
}
.am-input:focus { border-color: var(--blue) !important; }

.btn-admin-exit {
  background: none;
  border: 1.5px solid #F59E0B;
  border-radius: 20px;
  color: #92400E;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 14px;
  cursor: pointer;
  transition: background .2s;
}
.btn-admin-exit:hover { background: #FDE68A; }

/* Carte en révision (fond orange clair) */
.card-draft .card-body { background: #FFF7ED; }
.card-draft-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #C2410C;
  margin-bottom: 4px;
  display: block;
}

/* Barre de validation admin (fiche en révision) */
.admin-validate-bar {
  background: #FFF7ED;
  border-bottom: 2px solid #F97316;
  padding: 14px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: #C2410C;
}

.btn-validate-fiche {
  background: #16A34A;
  color: #fff;
  border: none;
  border-radius: 40px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 10px 22px;
  cursor: pointer;
  transition: background .2s;
}
.btn-validate-fiche:hover:not(:disabled) { background: #15803D; }
.btn-validate-fiche:disabled { opacity: .5; cursor: default; }

/* ===== MODE ÉDITION ===== */

/* Bannière */
.edit-banner {
  position: sticky;
  top: 72px;
  z-index: 90;
  background: #FFFBEB;
  border-bottom: 2px solid #F59E0B;
  padding: 12px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.edit-banner-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.edit-badge  { font-weight: 700; font-size: 0.9rem; color: #92400E; }
.edit-hint   { font-size: 0.8rem; color: #92400E; opacity: .7; }

.edit-banner-actions { display: flex; gap: 10px; align-items: center; }

.btn-edit-save {
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 40px;
  padding: 10px 22px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-edit-save:hover:not(:disabled) { background: var(--blue-deep); }
.btn-edit-save:disabled { opacity: .5; cursor: default; }

.btn-edit-cancel {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--grey-text);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
}

/* Section en mode edit */
.edit-section { position: relative; }

/* Champs de formulaire */
.edit-field  { display: flex; flex-direction: column; gap: 4px; }
.edit-label  { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .6; }
.edit-label small { text-transform: none; font-weight: 400; letter-spacing: 0; }

.edit-input, .edit-textarea, .edit-select {
  font-family: inherit;
  font-size: 0.95rem;
  border: 2px solid rgba(255,255,255,.3);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  background: rgba(255,255,255,.12);
  color: var(--white);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  width: 100%;
}
.edit-input:focus, .edit-textarea:focus, .edit-select:focus {
  border-color: var(--green);
  background: rgba(255,255,255,.18);
}
.edit-input::placeholder, .edit-textarea::placeholder { opacity: .4; }

/* Sur fond clair (bio, signature) */
.profile-signature-section .edit-input,
.profile-signature-section .edit-textarea,
.profile-bio-section .edit-input,
.profile-bio-section .edit-textarea,
.profile-video-section .edit-input {
  background: var(--white);
  border-color: var(--grey-border);
  color: var(--grey-text);
}
.profile-signature-section .edit-input:focus,
.profile-signature-section .edit-textarea:focus,
.profile-bio-section .edit-input:focus,
.profile-bio-section .edit-textarea:focus,
.profile-video-section .edit-input:focus { border-color: var(--blue); }
.profile-signature-section .edit-input::placeholder,
.profile-bio-section .edit-input::placeholder,
.profile-video-section .edit-input::placeholder,
.profile-signature-section .edit-textarea::placeholder,
.profile-bio-section .edit-textarea::placeholder { color: #aaa; }

.edit-select option { background: var(--blue-deep); color: var(--white); }

.edit-textarea { resize: vertical; }
.edit-signature { font-size: 1.1rem; font-weight: 600; }

.edit-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Tableaux interventions / réseaux */
.edit-table-wrap { overflow-x: auto; margin-bottom: 12px; }

.edit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  color: var(--white);
}

.edit-table thead th {
  text-align: left;
  padding: 8px 10px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .55;
  border-bottom: 1px solid rgba(255,255,255,.15);
  white-space: nowrap;
}

.edit-table-row td {
  padding: 6px 6px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.edit-input-sm, .edit-select-sm {
  font-family: inherit;
  font-size: 0.83rem;
  border: 1.5px solid rgba(255,255,255,.2);
  border-radius: 6px;
  padding: 6px 8px;
  background: rgba(255,255,255,.1);
  color: var(--white);
  outline: none;
  width: 100%;
  min-width: 80px;
  transition: border-color .15s;
}
.edit-input-sm:focus, .edit-select-sm:focus { border-color: var(--green); }
.edit-select-sm option { background: var(--blue-deep); }

/* Réseaux — sur fond blanc */
.profile-reseaux-section .edit-input-sm,
.profile-reseaux-section .edit-select-sm {
  background: var(--white);
  border-color: var(--grey-border);
  color: var(--grey-text);
}
.profile-reseaux-section .edit-select-sm option { background: var(--white); color: var(--grey-text); }
.profile-reseaux-section .edit-table { color: var(--grey-text); }
.profile-reseaux-section .edit-table thead th { color: var(--grey-text); }
.profile-reseaux-section .edit-table-row td { border-bottom-color: var(--grey-border); }

.btn-add-row {
  background: none;
  border: 1.5px dashed rgba(255,255,255,.35);
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.7);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 18px;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.btn-add-row:hover { border-color: var(--green); color: var(--green); }

.profile-reseaux-section .btn-add-row {
  border-color: var(--grey-border);
  color: var(--grey-text);
}
.profile-reseaux-section .btn-add-row:hover { border-color: var(--blue); color: var(--blue); }

.btn-remove-row {
  background: none;
  border: none;
  color: rgba(255,255,255,.4);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
  border-radius: 4px;
  transition: color .15s, background .15s;
}
.btn-remove-row:hover { color: #ef4444; background: rgba(239,68,68,.15); }
.profile-reseaux-section .btn-remove-row { color: var(--grey-border); }
.profile-reseaux-section .btn-remove-row:hover { color: #ef4444; background: rgba(239,68,68,.08); }

/* Compteurs de caractères */
.char-counter {
  font-size: 0.72rem;
  text-align: right;
  margin-top: 4px;
  opacity: .55;
  transition: color .2s;
}
.char-counter.counter-over {
  color: #ef4444;
  opacity: 1;
  font-weight: 700;
}

/* Upload photo */
.btn-photo-upload {
  display: inline-block;
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.3);
  border-radius: 40px;
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 16px;
  cursor: pointer;
  transition: background .2s;
}
.btn-photo-upload:hover { background: rgba(255,255,255,.25); }

.photo-upload-status {
  font-size: 0.78rem;
  margin-top: 5px;
  font-weight: 600;
  min-height: 1.2em;
}
.photo-upload-status.uploading { color: rgba(255,255,255,.7); }
.photo-upload-status.success   { color: var(--green); }
.photo-upload-status.error     { color: #fca5a5; }

/* Barre de progression upload photo */
.photo-progress-wrap {
  height: 6px;
  background: rgba(255,255,255,.2);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
  width: 160px;
}
.photo-progress-bar {
  height: 100%;
  background: var(--green);
  border-radius: 3px;
  width: 0%;
  transition: width .25s ease;
}

/* Autocomplétion villes */
.autocomplete-wrap { position: relative; }
.autocomplete-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 2px);
  left: 0; right: 0;
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hover);
  z-index: 300;
  max-height: 200px;
  overflow-y: auto;
}
.autocomplete-item {
  padding: 9px 14px;
  font-size: .88rem;
  cursor: pointer;
  color: var(--grey-text);
  transition: background .12s;
}
.autocomplete-item:hover { background: #f3f0fc; }

/* Cases à cocher sollicitations */
.soll-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.soll-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--grey-text);
}
.soll-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  flex-shrink: 0;
  cursor: pointer;
}

/* Barre save bas de page */
.edit-save-bar {
  position: sticky;
  bottom: 0;
  background: var(--white);
  border-top: 2px solid var(--grey-border);
  padding: 14px 40px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  z-index: 90;
  box-shadow: 0 -4px 20px rgba(0,0,0,.06);
}
.edit-save-status { font-size: 0.85rem; font-weight: 600; margin-right: auto; }

/* ===== BOUTON PROPRIÉTAIRE ===== */
.owner-zone {
  background: var(--cream);
  text-align: center;
  padding: 32px 40px;
}

.btn-owner {
  background: none;
  border: 1.5px solid var(--grey-border);
  border-radius: 40px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--grey-text);
  opacity: .5;
  padding: 8px 20px;
  cursor: pointer;
  transition: opacity .2s, border-color .2s;
}
.btn-owner:hover { opacity: 1; border-color: var(--blue); color: var(--blue); }

/* ===== MODAL ACCÈS PROPRIÉTAIRE ===== */
.owner-modal-overlay {
  display: none; /* caché par défaut — display:flex écrasait l'attribut hidden */
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  /* Au-dessus de Leaflet, qui place ses calques à 400 et ses contrôles
     de zoom à 1000 : en dessous, la modale passait derrière la carte. */
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.owner-modal-overlay.open {
  display: flex;
}

.owner-modal {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 40px;
  max-width: 440px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}

.owner-modal h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--blue-deep);
  margin-bottom: 10px;
}

.owner-modal p {
  font-size: 0.9rem;
  color: var(--grey-text);
  margin-bottom: 20px;
  line-height: 1.6;
}

.owner-modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--grey-text);
  opacity: .4;
  line-height: 1;
  padding: 4px 8px;
}
.owner-modal-close:hover { opacity: 1; }

#owner-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#owner-form .edit-input {
  background: var(--white);
  border-color: var(--grey-border);
  color: var(--grey-text);
  font-size: 1rem;
}
#owner-form .edit-input:focus { border-color: var(--blue); }

.owner-modal-status {
  margin-top: 14px;
  font-size: 0.875rem;
  font-weight: 600;
  min-height: 1.4em;
}
.owner-modal-status.status-success { color: var(--green); }
.owner-modal-status.status-error   { color: #ef4444; }

/* ===== UTILITIES ===== */
.hidden { display: none !important; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1050px) {
  .site-nav { padding: 0 20px; }
  .hero { padding: 40px 20px 48px; }
  .hero-stats { gap: 24px; }
  .map-section, .directory-section { padding: 36px 20px; }
  .profile-hero-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .profile-photo, .profile-photo-placeholder { width: 120px; height: 120px; }
  .profile-bio-inner { grid-template-columns: 1fr; gap: 32px; }
  .profile-hero, .profile-signature-section, .profile-bio-section,
  .profile-video-section, .profile-interventions-section,
  .profile-reseaux-section { padding: 36px 20px; }
  .back-link { padding: 24px 20px 0; }
  .intervention-item { grid-template-columns: 1fr; }
  .preview-banner { padding: 12px 20px; }
}

@media (max-width: 600px) {
  .member-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.8rem; }
  #france-map { height: 280px; }
  .filters-top { flex-direction: column; align-items: stretch; }
  .filter-select { min-width: 0; }
  .reseau-card { min-width: 0; width: 100%; }
}

/* ===== RECADRAGE PHOTO ===== */
.cropper-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(20, 26, 140, .55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.cropper-modal {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  padding: 24px;
  max-width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.cropper-title {
  margin: 0; font-size: 1.1rem; color: var(--blue);
}
.cropper-hint {
  margin: 0; font-size: .82rem; opacity: .65; text-align: center;
  color: var(--grey-text);
}
.cropper-viewport {
  position: relative; overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--grey-border);
  cursor: grab; touch-action: none; user-select: none;
  max-width: 100%;
}
.cropper-viewport:active { cursor: grabbing; }
.cropper-img {
  position: absolute; max-width: none;
  user-select: none; -webkit-user-drag: none; pointer-events: none;
}
.cropper-zoom {
  display: flex; align-items: center; gap: 10px;
  width: 100%; font-size: .82rem; color: var(--grey-text);
}
.cropper-zoom input { flex: 1; accent-color: var(--blue); }
.cropper-actions {
  display: flex; gap: 10px; justify-content: flex-end; width: 100%;
}

/* ===== BLOC RÉSERVÉ AUX ADMINISTRATEURS (mode édition) ===== */
.admin-only-block {
  margin-top: 6px; padding: 14px 16px;
  border: 1px dashed rgba(255, 255, 255, .35);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .07);
}
.admin-only-title {
  font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; opacity: .75; margin-bottom: 10px;
}
.admin-only-block .edit-textarea { min-height: 90px; }
