/* ============================================================
   GraphPhon - CSS Global selon maquettes officielles
   Identité visuelle officielle du projet
   ============================================================ */

:root {
  /* Couleurs principales — bleu sombre GraphPhon (aligné graphphon-admin) */
  --primary-color: #004080;
  --primary-dark: #1F2937;
  --primary-hover: #003366;
  --secondary-color: #F8FAFC;
  --text-color: #111827;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --border-color: #E5E7EB;
  --success-color: #059669;
  --warning-color: #F59E0B;
  --danger-color: #DC2626;
  
  /* Effets */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);
  
  /* Layout */
  --max-width: 1200px;
  --navbar-height: 64px;
}

/* ============================================================
   Reset & Base
   ============================================================ */

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--secondary-color);
  color: var(--text-color);
  line-height: 1.6;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-hover);
}

/* ============================================================
   Navbar - Style maquette (bleu foncé #1F2937)
   ============================================================ */

.gp-navbar {
  background-color: var(--primary-dark) !important;
  color: white;
  padding: 0 !important;
  min-height: var(--navbar-height);
  box-shadow: var(--shadow-sm);
  width: 100%;
  position: relative;
  z-index: 1030;
  flex-shrink: 0;
}

.gp-navbar .container {
  min-height: var(--navbar-height);
  display: flex;
  align-items: center;
}

.gp-navbar .navbar-brand {
  font-size: 1.35rem;
  font-weight: 700;
  color: white !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gp-navbar .navbar-brand .brand-icon {
  width: 32px;
  height: 32px;
  background: var(--primary-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.gp-navbar .nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 1rem !important;
  transition: all 0.2s;
  border-radius: var(--radius-sm);
}

.gp-navbar .nav-link:hover,
.gp-navbar .nav-link.active {
  color: white !important;
  background-color: rgba(255, 255, 255, 0.1);
}

.gp-navbar .nav-link.active {
  font-weight: 600;
}

/* Sous-menu « À propos » lisible sur fond sombre (# cohérence Bootstrap dropdown) */
.gp-navbar .dropdown-menu {
  background-color: var(--primary-dark);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-md);
}

.gp-navbar .dropdown-item {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.gp-navbar .dropdown-item:hover,
.gp-navbar .dropdown-item:focus {
  background-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.gp-navbar .dropdown-item.active,
.gp-navbar .dropdown-item:active {
  background-color: var(--primary-color);
  color: #fff;
}

.gp-navbar .dropdown-toggle::after {
  margin-left: 0.35em;
  vertical-align: 0.15em;
}

/* Fond explicite : le collapse est transparent par défaut ; avec retour à la ligne, une zone pouvait laisser voir le main (gris/blanc). */
.gp-navbar .navbar-collapse {
  background-color: var(--primary-dark) !important;
}

/* Navbar : menu toujours visible sur desktop (évite conflit Tailwind/Bootstrap .collapse) */
@media (min-width: 992px) {
  /*
   * Ligne 1 : marque ; ligne 2 : liens sur toute la largeur du container.
   * Sinon, la 2e rangée n’occupe que la colonne à droite du logo : à gauche, le fond du contenu (blanc/gris) transparaît.
   */
  .gp-navbar .container {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 0.35rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .gp-navbar .navbar-collapse {
    display: flex !important;
    flex-basis: 100% !important;
    flex-grow: 1 !important;
    justify-content: flex-end;
    align-items: center;
  }

  .gp-navbar .navbar-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 0.15rem;
    width: 100%;
  }
}

/*
 * Navbar mobile : fond plein + texte contrasté (# Tailwind preflight / pages type Assistant
 * peuvent sinon laisser des liens gris sur fond blanc dans le panneau replié).
 */
@media (max-width: 991.98px) {
  .gp-navbar {
    overflow: visible;
  }

  .gp-navbar .container {
    height: auto;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 0;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
  }

  /* Panneau déroulant = même teinte que la barre, toute largeur, au-dessus du contenu */
  .gp-navbar .navbar-collapse {
    flex-basis: 100%;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.5rem 0 0.75rem;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    background-color: var(--primary-dark) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    z-index: 1050;
  }

  .gp-navbar .navbar-collapse.collapsing,
  .gp-navbar .navbar-collapse.show {
    background-color: var(--primary-dark) !important;
  }

  .gp-navbar .navbar-nav {
    width: 100%;
    background-color: transparent !important;
  }

  .gp-navbar .navbar-toggler {
    min-width: 48px;
    min-height: 48px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.25);
  }

  .gp-navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
  }

  .gp-navbar .nav-link {
    min-height: 48px;
    padding: 14px 1rem !important;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.95) !important;
    /* Améliore la réactivité tactile (évite parfois le premier tap ignoré sur iOS). */
    touch-action: manipulation;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.12);
  }

  .gp-navbar .navbar-collapse,
  .gp-navbar .navbar-collapse.collapsing {
    transition: height 0.4s ease !important;
  }

  /* 560px coupait la liste (15+ entrées × ~48px) : les derniers liens semblaient « disparus » sans scroll évident */
  .gp-navbar .navbar-collapse.show {
    max-height: min(92vh, 1000px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.gp-navbar .navbar-brand-subtitle {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  opacity: 0.9;
  margin-top: 0.1rem;
  letter-spacing: 0.02em;
}

/* ============================================================
   Footer
   ============================================================ */

.gp-footer {
  background-color: var(--border-color);
  color: var(--text-color);
  margin-top: 4rem;
  padding: 3rem 0 1.5rem;
}

.footer-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.footer-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary-color);
}

.footer-copyright {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-bottom {
  border-top: 1px solid rgba(0,0,0,0.08);
  margin-top: 2rem;
  padding-top: 1.5rem;
}

/* ============================================================
   Conteneur principal
   ============================================================ */

main {
  min-height: calc(100vh - 250px);
  padding: 2rem 0;
}

.container-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (max-width: 768px) {
  .container-main {
    padding: 0 1rem;
  }
}

/* ============================================================
   Titres de page (selon maquettes)
   ============================================================ */

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 600px;
}

/* Intro SEO (plusieurs paragraphes) — détails typographiques ; justification portée par .page-header .page-subtitle */
.page-subtitle.seo-intro-rich {
  max-width: 42rem;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-wrap: pretty;
  hyphens: auto;
  -webkit-hyphens: auto;
  line-height: 1.72;
}

.page-subtitle.seo-intro-rich p {
  margin-bottom: 1rem;
  color: var(--text-muted);
  text-wrap: pretty;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.page-subtitle.seo-intro-rich p:last-child {
  margin-bottom: 0;
}

/* Blocs de prose institutionnelle (mission, etc.) */
.gp-prose-justify p {
  text-align: justify;
  text-wrap: pretty;
  hyphens: auto;
  -webkit-hyphens: auto;
  line-height: 1.75;
}

.gp-prose-justify ul,
.gp-prose-justify ol {
  text-align: justify;
  text-wrap: pretty;
  hyphens: auto;
  -webkit-hyphens: auto;
  line-height: 1.65;
  padding-inline-start: 1.35rem;
}

.gp-prose-justify li {
  margin-bottom: 0.45rem;
}

.gp-prose-justify li:last-child {
  margin-bottom: 0;
}

.gp-prose-justify .mb-0 {
  text-align: center;
}

/* Paragraphe d’intro centré sous un titre de section (ex. accueil dictionnaire) */
.gp-section-intro {
  max-width: 44rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.75rem;
  text-align: justify;
  text-wrap: pretty;
  hyphens: auto;
  -webkit-hyphens: auto;
  line-height: 1.72;
  color: var(--text-muted);
}

.gp-temple-tagline {
  max-width: 44rem;
  margin-left: auto;
  margin-right: auto;
  text-align: justify;
  text-wrap: pretty;
  hyphens: auto;
  -webkit-hyphens: auto;
  line-height: 1.65;
  color: var(--text-muted);
  font-size: 0.98rem;
}

@media (max-width: 575.98px) {
  .gp-showcase-desc {
    text-align: start;
  }
}

.page-header {
  /* Ne pas centrer tout le header : sinon les sous-titres héritent de text-align:center et la justification ne s’applique pas (ex. /graphphon). */
  text-align: initial;
  padding: 3rem 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
}

.page-header .page-title {
  width: 100%;
  text-align: center;
}

/* Tout texte d’intro sous le titre (une ou plusieurs lignes / paragraphes) */
.page-header .page-subtitle {
  text-align: justify;
  text-wrap: pretty;
  hyphens: auto;
  -webkit-hyphens: auto;
  line-height: 1.72;
  max-width: 42rem;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.page-header .page-subtitle.seo-intro-rich {
  align-self: center;
}

/* Alertes et rangées de boutons sous l’intro : conserver l’alignement centré */
.page-header > .alert,
.page-header > .mt-2 {
  text-align: center;
  align-self: center;
}

@media (max-width: 768px) {
  .page-title {
    font-size: 1.75rem;
  }
  
  .page-subtitle {
    font-size: 1rem;
  }
}

/* ============================================================
   Vitrine éditoriale / diaporama (entre titre et outils)
   ============================================================ */

.gp-page-showcase {
  margin-bottom: 2rem;
}

.gp-page-showcase-inner {
  max-width: 100%;
}

.gp-showcase-carousel {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.gp-showcase-carousel .carousel-indicators {
  margin-bottom: 0.5rem;
  z-index: 2;
}

/* Chevauchement éléments voisins : garder les flèches cliquables. */
.gp-showcase-carousel .carousel-control-prev,
.gp-showcase-carousel .carousel-control-next {
  z-index: 2;
}

.gp-showcase-single {
  background: white;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.gp-showcase-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 0;
  min-height: 220px;
  align-items: stretch;
}

/* Une seule colonne de contenu (pas d’image) : évite le texte coincé à gauche sur une grille 2 cols. */
.gp-showcase-card > .gp-showcase-body:only-child {
  grid-column: 1 / -1;
  max-width: 100%;
}

.gp-showcase-card > .gp-showcase-body:only-child .gp-showcase-title {
  text-align: center;
}

.gp-showcase-card > .gp-showcase-body:only-child .gp-showcase-desc {
  text-align: justify;
}

@media (max-width: 767.98px) {
  .gp-showcase-card {
    grid-template-columns: 1fr;
  }
}

.gp-showcase-media {
  background: var(--secondary-color);
  min-height: 180px;
}

.gp-showcase-img {
  width: 100%;
  height: 100%;
  min-height: 200px;
  object-fit: cover;
  display: block;
}

@media (max-width: 767.98px) {
  .gp-showcase-img {
    min-height: 160px;
    max-height: 220px;
  }
}

.gp-showcase-body {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.gp-showcase-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.gp-showcase-desc {
  color: var(--text-color);
  margin-bottom: 0.75rem;
  font-size: 0.98rem;
  line-height: 1.55;
  white-space: pre-line;
  text-align: justify;
  text-wrap: pretty;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.gp-showcase-actions {
  margin-top: auto;
}

/* Liens contextuels sous l’intro dictionnaire */
.gp-page-context-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: center;
  margin: 1rem 0 0;
  font-size: 0.95rem;
}

.gp-page-context-nav a {
  color: var(--primary-color);
  font-weight: 500;
}

.gp-page-context-nav a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* ============================================================
   Cartes (Cards) selon maquettes
   ============================================================ */

.gp-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: box-shadow 0.2s, transform 0.2s;
  border: 1px solid var(--border-color);
}

.gp-card:hover {
  box-shadow: var(--shadow-md);
}

.gp-card-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gp-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
}

/* ============================================================
   Boutons
   ============================================================ */

.btn {
  font-weight: 500;
  border-radius: var(--radius);
  padding: 0.75rem 1.5rem;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-outline-primary {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background: transparent;
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  color: white;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

/* ============================================================
   Hero Section
   ============================================================ */

.gp-hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, #005a9e 100%);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
  margin-bottom: 3rem;
  border-radius: var(--radius);
}

.gp-hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.gp-hero p {
  font-size: 1.25rem;
  opacity: 0.95;
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Textes sous le titre du hero dictionnaire : justification (lisible sur fond dégradé) */
.gp-hero.gp-hero-prose p {
  text-align: justify;
  text-wrap: pretty;
  hyphens: auto;
  -webkit-hyphens: auto;
  line-height: 1.68;
  max-width: 44rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-hero {
  padding: 1rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1.05rem;
  display: inline-block;
  transition: all 0.2s;
}

.btn-hero-primary {
  background-color: white;
  color: var(--primary-color);
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--primary-color);
}

.btn-hero-secondary {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid white;
}

.btn-hero-secondary:hover {
  background-color: white;
  color: var(--primary-color);
}

@media (max-width: 768px) {
  .gp-hero {
    padding: 2.5rem 1.5rem;
  }
  
  .gp-hero h1 {
    font-size: 2rem;
  }
  
  .gp-hero p {
    font-size: 1rem;
  }
}

/* ============================================================
   Statistiques (Stats Cards) - selon maquettes
   ============================================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem;
  text-align: center;
  border: 1px solid var(--border-color);
}

.stat-value {
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.stat-label {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 500;
}

/* ============================================================
   Tableaux selon maquettes
   ============================================================ */

.gp-table {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.gp-table table {
  width: 100%;
  border-collapse: collapse;
}

.gp-table thead {
  background-color: var(--secondary-color);
}

.gp-table th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.9rem;
  border-bottom: 2px solid var(--border-color);
}

.gp-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color);
}

.gp-table tbody tr:last-child td {
  border-bottom: none;
}

.gp-table tbody tr:hover {
  background-color: var(--secondary-color);
}

/* ============================================================
   Timeline / Roadmap (selon maquettes)
   ============================================================ */

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
  padding-left: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0.25rem;
  width: 14px;
  height: 14px;
  background: var(--primary-color);
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 0 2px var(--primary-color);
}

.timeline-item.current::before {
  width: 18px;
  height: 18px;
  left: -1.65rem;
}

.timeline-date {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.timeline-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.timeline-content {
  color: var(--text-muted);
  line-height: 1.6;
}

.timeline-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

/* ============================================================
   Badges selon maquettes (cercles colorés)
   ============================================================ */

.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1.5rem;
}

.badge-item {
  text-align: center;
}

.badge-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 0.75rem;
  color: white;
}

.badge-icon.blue {
  background: linear-gradient(135deg, #004080, #003366);
}

.badge-icon.green {
  background: linear-gradient(135deg, #10B981, #059669);
}

.badge-icon.orange {
  background: linear-gradient(135deg, #F59E0B, #D97706);
}

.badge-icon.purple {
  background: linear-gradient(135deg, #8B5CF6, #6D28D9);
}

.badge-name {
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.95rem;
}

.badge-icon-locked {
  opacity: 0.4;
  filter: grayscale(0.8);
}

.badge-item.badge-locked .badge-name {
  color: var(--text-muted);
}

.badge-icon.reward-earned {
  background: linear-gradient(135deg, #10B981, #059669) !important;
}

/* ============================================================
   Tag "En cours" selon maquettes
   ============================================================ */

.tag {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

.tag-urgent {
  background-color: #FEE2E2;
  color: #DC2626;
}

.tag-primary {
  background-color: var(--primary-color);
  color: white;
}

.tag-success {
  background-color: var(--success-color);
  color: white;
}

.tag-warning {
  background-color: var(--warning-color);
  color: white;
}

/* ============================================================
   Section À propos avec équipe
   ============================================================ */

.about-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 1.25rem;
}

.about-text p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem 1.5rem;
}

.team-member {
  text-align: center;
}

.team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.5rem;
  overflow: hidden;
  position: relative;
}
/* Quand une photo est présente : fond neutre, image bien visible (évite effet saturé) */
.team-avatar:has(img),
.team-avatar.team-avatar-with-photo {
  background: transparent;
}
.team-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: none;
  opacity: 1;
  z-index: 1;
}

.team-avatar-clickable {
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.team-avatar-clickable:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.team-avatar-initials {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.team-name {
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.15rem;
  font-size: 0.95rem;
}

.team-role {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.team-biography {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.35;
  max-width: 260px;
  margin-left: auto;
  margin-right: auto;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.team-rubric-jump {
  font-size: 0.75rem;
  margin-top: 0.45rem;
}

.team-rubric-jump a {
  color: var(--primary-color);
}

.team-member-rubric .team-rubric-prose {
  color: var(--text-color);
  line-height: 1.65;
  white-space: pre-line;
  text-align: justify;
  text-wrap: pretty;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.team-task-list {
  padding-left: 1.25rem;
  line-height: 1.5;
  color: var(--text-color);
  text-align: justify;
  text-wrap: pretty;
  hyphens: auto;
  -webkit-hyphens: auto;
}

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

/* ============================================================
   Communauté - Cartes selon maquettes
   ============================================================ */

.community-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.community-card {
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}

.community-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.community-card-icon {
  width: 64px;
  height: 64px;
  background: var(--secondary-color);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 1rem;
}

.community-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.community-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  text-align: justify;
  text-wrap: pretty;
  hyphens: auto;
  -webkit-hyphens: auto;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .community-cards {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Bandeau inscription Communauté
   ============================================================ */

.community-register-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, rgba(0, 64, 128, 0.12), rgba(0, 90, 158, 0.08));
  border: 1px solid rgba(0, 64, 128, 0.25);
  border-radius: var(--radius);
}

.community-register-text {
  color: var(--text-color);
  font-size: 0.95rem;
  text-align: center;
}

.community-register-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.community-register-form .form-control {
  width: auto;
  min-width: 120px;
}

.community-register-or {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.btn-register-cta {
  font-weight: 600;
  white-space: nowrap;
}

/* ============================================================
   Volontaires en vedette
   ============================================================ */

.volunteers-section {
  background: var(--secondary-color);
  padding: 3rem;
  border-radius: var(--radius);
  margin-top: 3rem;
}

.volunteer-cta-card {
  text-align: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.6);
  border-radius: var(--radius);
  border: 2px dashed var(--border-color);
}

.volunteer-avatar-placeholder {
  background: linear-gradient(135deg, #94a3b8, #64748b) !important;
  opacity: 0.9;
}

#comment-contribuer,
#volontaires-vedette,
#annonces-recrutement,
#actualites {
  scroll-margin-top: 2rem;
}

.community-news-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.community-news-item {
  padding: 1rem;
  background: var(--secondary-color);
  border-radius: var(--radius);
  border-left: 4px solid var(--primary-color);
}

.community-news-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.community-news-title {
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 0.35rem;
}

.community-news-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.85;
  white-space: pre-line;
  max-width: 65ch;
}

.community-how-contribute {
  border-left: 4px solid var(--primary-color);
  scroll-margin-top: 2rem;
}

#comment-contribuer:target {
  animation: highlight-contribute 1.5s ease-out;
}

@keyframes highlight-contribute {
  0% { box-shadow: 0 0 0 4px var(--primary-color); }
  100% { box-shadow: none; }
}

.volunteers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.volunteer-card {
  text-align: center;
}

.volunteer-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), #005a9e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: white;
  margin: 0 auto 0.75rem;
  font-weight: 700;
}

/* ============================================================
   Statistiques page (locuteurs, vitalité)
   ============================================================ */

.stat-section {
  margin-bottom: 3rem;
}

.stat-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.stat-section-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}

.stat-section-text {
  color: var(--text-muted);
  line-height: 1.7;
}

.stat-highlight {
  background: var(--secondary-color);
  padding: 1.5rem 2.5rem;
  border-radius: var(--radius);
  text-align: center;
}

.stat-highlight-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.stat-highlight-label {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.vulnerability-tag {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1.25rem;
}

/* ============================================================
   Responsive Utilities
   ============================================================ */

@media (max-width: 768px) {
  .stat-section-content {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Form Elements
   ============================================================ */

.form-control {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.15);
  outline: none;
}

.form-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

/* ============================================================
   Search Box
   ============================================================ */

.search-box {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
}

.search-box input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: all 0.2s;
}

.search-box input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
  outline: none;
}

.search-box .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* ============================================================
   Utility Classes
   ============================================================ */

.text-primary { color: var(--primary-color) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-center { text-align: center; }

.bg-primary { background-color: var(--primary-color) !important; }
.bg-white { background-color: white !important; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.py-section { padding: 3rem 0; }
.px-section { padding: 0 2rem; }

.rounded { border-radius: var(--radius); }
.shadow { box-shadow: var(--shadow-md); }

/* ============================================================
   Animations
   ============================================================ */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.4s ease-out;
}
