:root{
  --brand-black:#000000;
  --brand-red:#BB382A;
  --brand-yellow:#BDA319;
  --ink:#1f1f1f; --bg:#ffffff; --muted:#6c757d;
}
html,body{height:100%}
body{
  font-family:Avenir,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol",sans-serif;
  background:
    radial-gradient(1100px 520px at 10% -10%, rgba(187,56,42,.08), transparent),
    radial-gradient(900px 480px at 120% 20%, rgba(189,163,25,.08), transparent),
    var(--bg);
  color:var(--ink);
  overflow-x:hidden;
  position:relative;
}
/* Filigrane plein écran, responsive */
body::before{
  content:"";
  position:fixed; inset:0;
  background: url("images/logo.png") center / cover no-repeat;
  opacity:.25;
  pointer-events:none; z-index:0;
}
header, main, footer{position:relative; z-index:1;}

.brandbar{background:var(--brand-red);color:#fff;position:relative}
.chips{display:flex; gap:.5rem; align-items:center; justify-content:center}
.chip{display:inline-flex;align-items:center;gap:.5rem;padding:.35rem .75rem;border-radius:999px;font-weight:700;border:1px solid rgba(0,0,0,.15)}
.chip-yellow{background:var(--brand-yellow);color:var(--brand-black)}
.chip-black{background:var(--brand-black);color:#fff;border-color:rgba(255,255,255,.25)}
.chip-red{background:var(--brand-red);color:#fff;border-color:rgba(0,0,0,.25)}

/* Zone cliquable invisible pour l'accès admin */
.admin-hidden-link{
  position:absolute;
  top:0;
  right:0;
  width:80px;
  height:100%;
  background:transparent;
  cursor:default;
  z-index:10;
}
.admin-hidden-link:hover{
  background:rgba(255,255,255,0.02);
}

.card{border:none;box-shadow:0 8px 28px rgba(0,0,0,.08);border-radius:1rem;margin-left:auto;margin-right:auto}
.card-header{background:var(--brand-black);color:#fff;border:none;border-radius:1rem 1rem 0 0 !important;text-align:center}

.display-6{font-size:clamp(1.25rem,2.5vw + .5rem,2rem)}
.lead{font-size:clamp(1rem,1.2vw + .6rem,1.15rem);color:var(--muted)}

/* === Adaptation automatique selon la taille d'écran === */
.container-tight {
  max-width: min(720px, calc(100vw - 2rem));
  margin-left: auto;
  margin-right: auto;
}

/* Espacements adaptatifs */
main {
  padding-top: clamp(2rem, 5vw, 3rem);
  padding-bottom: clamp(2rem, 5vw, 3rem);
}

.form-section {
  padding: clamp(1rem, 3vw, 2rem);
  margin-bottom: clamp(1rem, 2vw, 2rem);
}

.brandbar {
  padding-top: clamp(0.5rem, 2vw, 1rem);
  padding-bottom: clamp(0.5rem, 2vw, 1rem);
}

.chip {
  padding: clamp(0.2rem, 1vw, 0.35rem) clamp(0.4rem, 2vw, 0.75rem);
  font-size: clamp(0.8rem, 2vw, 1rem);
}

.btn-adhesion {
  padding: clamp(0.6rem, 2vw, 0.75rem) clamp(1.2rem, 4vw, 1.5rem);
  font-size: clamp(0.85rem, 2.5vw, 1rem);
}

.form-control, .form-select {
  padding: clamp(0.4rem, 1.5vw, 0.75rem) clamp(0.6rem, 2vw, 1rem);
  font-size: clamp(0.85rem, 2vw, 1rem);
}

.logo-section {
  padding: clamp(0.75rem, 3vw, 1.5rem);
  margin-bottom: clamp(0.75rem, 2vw, 2rem);
}

.logo-text {
  font-size: clamp(0.9rem, 3vw, 1.3rem);
}

.file-upload {
  padding: clamp(1rem, 4vw, 2.5rem);
}

.mandatory-checkboxes {
  padding: clamp(0.75rem, 3vw, 1.5rem);
  margin-bottom: clamp(0.75rem, 2vw, 2rem);
}

footer {
  padding-top: clamp(1.5rem, 4vw, 2rem);
  padding-bottom: clamp(1.5rem, 4vw, 2rem);
}

.card-body {
  padding: clamp(0.75rem, 3vw, 1rem);
}

.card-header {
  padding: clamp(0.5rem, 2vw, 0.75rem) clamp(0.75rem, 3vw, 1rem);
}

.btn {
  padding: clamp(0.4rem, 1.5vw, 0.5rem) clamp(0.8rem, 2.5vw, 1rem);
  font-size: clamp(0.85rem, 2vw, 0.9rem);
}

img[alt="Logo CGT"] {
  max-width: clamp(100px, 15vw, 150px);
}
:focus-visible{outline:3px solid var(--brand-yellow);outline-offset:2px}

.btn-yellow{background:var(--brand-yellow);color:var(--brand-black);border:none}
.btn-yellow:hover{filter:brightness(0.95)}
.btn-adhesion{
  background: linear-gradient(135deg, var(--brand-red) 0%, #d44a3a 100%);
  color: #fff;
  border: 2px solid var(--brand-red);
  border-radius: 50px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(187, 56, 42, 0.3);
  position: relative;
  overflow: hidden;
}
.btn-adhesion::before{
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}
.btn-adhesion:hover{
  background: linear-gradient(135deg, #d44a3a 0%, var(--brand-red) 100%);
  border-color: #d44a3a;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(187, 56, 42, 0.4);
}
.btn-adhesion:hover::before{
  left: 100%;
}
.btn-adhesion:active{
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(187, 56, 42, 0.3);
}
.btn-adhesion i{
  transition: transform 0.3s ease;
}
.btn-adhesion:hover i{
  transform: scale(1.1);
}
.btn-outline-secondary{
  border-color: var(--muted);
  color: var(--muted);
  transition: all 0.3s ease;
}
.btn-outline-secondary:hover{
  background-color: var(--muted);
  border-color: var(--muted);
  color: #fff;
  transform: translateY(-1px);
}
.submit-wrap{display:flex;justify-content:center}

/* === Styles pour la page d'adhésion === */
.form-section {
  border: 2px solid rgba(187, 56, 42, 0.1);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, #fff 0%, #fafafa 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.form-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-red), var(--brand-yellow), var(--brand-red));
}
.form-section:hover {
  border-color: rgba(187, 56, 42, 0.2);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
.form-section-title {
  color: var(--brand-red);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  padding-bottom: 0.5rem;
}
.form-section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--brand-yellow);
  border-radius: 2px;
}
.logo-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--brand-red) 0%, #d44a3a 100%);
  border-radius: 1rem;
  color: #fff;
  box-shadow: 0 4px 15px rgba(187, 56, 42, 0.3);
}
.logo-text {
  font-weight: 700;
  font-size: 1.3rem;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.checkbox-group {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.checkbox-item input[type="checkbox"], .checkbox-item input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--brand-red);
  transition: all 0.3s ease;
}
.checkbox-item input[type="radio"]:hover {
  accent-color: var(--brand-yellow);
}
.checkbox-item input[type="radio"]:checked {
  accent-color: var(--brand-yellow);
}
/* Labels pour la section Fédération des Cheminots (Ex, UFCM, Retraité) */
.logo-section .checkbox-item label {
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.3s ease;
}
.logo-section .checkbox-item:hover label {
  color: var(--brand-yellow);
}
.logo-section .checkbox-item input[type="checkbox"]:checked + label {
  color: var(--brand-yellow);
}

/* Classe spécifique pour le sexe (F, M) */
.sexe-group .checkbox-item label {
  color: var(--brand-red) !important;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.3s ease;
}
.sexe-group .checkbox-item:hover label {
  color: var(--brand-yellow) !important;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.form-row.single {
  grid-template-columns: 1fr;
}
.form-row.triple {
  grid-template-columns: 1fr 1fr 1fr;
}
.form-control {
  border: 2px solid rgba(187, 56, 42, 0.1);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
  background: #fff;
}
.form-control:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 0.2rem rgba(187, 56, 42, 0.15);
  background: #fff;
}
.form-control:hover {
  border-color: rgba(187, 56, 42, 0.2);
}
.form-label {
  color: var(--brand-black);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.file-upload {
  border: 3px dashed rgba(187, 56, 42, 0.3);
  border-radius: 1rem;
  padding: 2.5rem;
  text-align: center;
  background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.file-upload::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(187, 56, 42, 0.05), transparent);
  transition: left 0.5s ease;
}
.file-upload:hover {
  border-color: var(--brand-red);
  background: linear-gradient(135deg, #fff 0%, #fff5f5 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(187, 56, 42, 0.2);
}
.file-upload:hover::before {
  left: 100%;
}
.file-upload.dragover {
  border-color: var(--brand-red);
  background: linear-gradient(135deg, #fff 0%, #fff5f5 100%);
  transform: scale(1.02);
}
.file-upload i {
  color: var(--brand-red);
  transition: transform 0.3s ease;
}
.file-upload:hover i {
  transform: scale(1.1);
}
.mandatory-checkboxes {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  border: 2px solid var(--brand-yellow);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(189, 163, 25, 0.2);
}
.mandatory-checkboxes h6 {
  color: var(--brand-black);
  font-weight: 700;
  margin-bottom: 1rem;
}
.mandatory-checkboxes .form-check {
  margin-bottom: 0.75rem;
}
.mandatory-checkboxes .form-check:last-child {
  margin-bottom: 0;
}
.mandatory-checkboxes .form-check-input {
  accent-color: var(--brand-red);
}
.mandatory-checkboxes .form-check-label {
  color: var(--brand-black);
  font-weight: 500;
}
.mandatory-checkboxes .link-primary {
  color: var(--brand-red) !important;
  font-weight: 600;
  text-decoration: none;
}
.mandatory-checkboxes .link-primary:hover {
  color: #d44a3a !important;
  text-decoration: underline;
}

/* === Animations JavaScript === */
.fade-in {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s ease;
}
.fade-in.animated {
  opacity: 0;
  transform: translateY(30px);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 1;
  transform: translateX(0);
  transition: all 0.6s ease;
}
.slide-in-left.animated {
  opacity: 0;
  transform: translateX(-50px);
}
.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 1;
  transform: translateX(0);
  transition: all 0.6s ease;
}
.slide-in-right.animated {
  opacity: 0;
  transform: translateX(50px);
}
.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 1;
  transform: scale(1);
  transition: all 0.6s ease;
}
.scale-in.animated {
  opacity: 0;
  transform: scale(0.8);
}
.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* Forcer la visibilité de tous les éléments critiques */
.card, .form-control, .form-select, .form-label, .btn, .form-text, .invalid-feedback, 
.form-section, .checkbox-item, .mandatory-checkboxes, .file-upload, .logo-section,
.chip, .brandbar, .display-6, .lead, .social, footer, main, header {
  opacity: 1 !important;
  transform: none !important;
}
.pulse {
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}
.float {
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* === Responsive === */
@media (max-width: 768px) {
  /* Conteneur principal plus compact */
  .container-tight {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Réduction des espacements généraux */
  main {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  /* Sections plus compactes */
  .form-section {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  /* Header plus compact */
  .brandbar {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }
  
  /* Chips plus petits */
  .chip {
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
  }
  
  /* Titre principal plus petit */
  .display-6 {
    font-size: clamp(1.1rem, 4vw + 0.5rem, 1.5rem) !important;
    margin-bottom: 1rem !important;
  }
  
  /* Lead text plus compact */
  .lead {
    font-size: clamp(0.9rem, 2vw + 0.5rem, 1rem) !important;
    margin-bottom: 1.5rem !important;
  }
  
  /* Bouton d'adhésion plus compact */
  .btn-adhesion {
    padding: 0.75rem 1.5rem !important;
    font-size: 0.9rem;
  }
  
  /* Formulaires plus compacts */
  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
  }
  
  .form-row.triple {
    grid-template-columns: 1fr;
  }
  
  /* Labels plus compacts */
  .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
  }
  
  /* Inputs plus compacts */
  .form-control, .form-select {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
  
  /* Logo section plus compacte */
  .logo-section {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .logo-text {
    font-size: 1rem;
  }
  
  /* Checkbox group plus compact */
  .checkbox-group {
    justify-content: center;
    gap: 1rem;
  }
  
  .checkbox-item {
    gap: 0.25rem;
  }
  
  .checkbox-item label {
    font-size: 0.85rem;
  }
  
  /* File upload plus compact */
  .file-upload {
    padding: 1.5rem;
  }
  
  /* Mandatory checkboxes plus compactes */
  .mandatory-checkboxes {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .mandatory-checkboxes h6 {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
  }
  
  /* Footer plus compact */
  footer {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  /* Cartes plus compactes */
  .card {
    margin-bottom: 1rem;
  }
  
  .card-body {
    padding: 1rem !important;
  }
  
  .card-header {
    padding: 0.75rem 1rem !important;
  }
  
  /* Boutons plus compacts */
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
  
  /* Logo en bas plus petit */
  img[alt="Logo CGT"] {
    max-width: 120px !important;
  }
  
  /* Social links plus petits */
  .social i {
    font-size: 1.2rem !important;
  }
  
  /* Toast plus compact */
  .toast {
    font-size: 0.9rem;
  }
}

/* === Très petits écrans (moins de 480px) === */
@media (max-width: 480px) {
  /* Conteneur encore plus compact */
  .container-tight {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  /* Sections encore plus compactes */
  .form-section {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
  }
  
  /* Header encore plus compact */
  .brandbar {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }
  
  /* Chips encore plus petits */
  .chip {
    padding: 0.2rem 0.4rem;
    font-size: 0.8rem;
  }
  
  /* Titre encore plus petit */
  .display-6 {
    font-size: clamp(1rem, 5vw + 0.3rem, 1.3rem) !important;
  }
  
  /* Lead encore plus compact */
  .lead {
    font-size: clamp(0.85rem, 3vw + 0.3rem, 0.95rem) !important;
  }
  
  /* Bouton d'adhésion encore plus compact */
  .btn-adhesion {
    padding: 0.6rem 1.2rem !important;
    font-size: 0.85rem;
  }
  
  /* Inputs encore plus compacts */
  .form-control, .form-select {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
  }
  
  /* Logo section encore plus compacte */
  .logo-section {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
  }
  
  .logo-text {
    font-size: 0.9rem;
  }
  
  /* File upload encore plus compact */
  .file-upload {
    padding: 1rem;
  }
  
  /* Mandatory checkboxes encore plus compactes */
  .mandatory-checkboxes {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
  }
  
  /* Footer encore plus compact */
  footer {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }
  
  /* Cartes encore plus compactes */
  .card-body {
    padding: 0.75rem !important;
  }
  
  .card-header {
    padding: 0.5rem 0.75rem !important;
  }
  
  /* Logo en bas encore plus petit */
  img[alt="Logo CGT"] {
    max-width: 100px !important;
  }
}

/* === Menu de navigation === */
.navbar-cgt {
  background: var(--brand-black);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-cgt .nav-link {
  color: #fff;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  transition: all 0.3s ease;
  position: relative;
}

.navbar-cgt .nav-link:hover {
  color: var(--brand-yellow);
  background: rgba(189, 163, 25, 0.1);
}

.navbar-cgt .nav-link.active {
  color: var(--brand-yellow);
  background: rgba(189, 163, 25, 0.15);
}

.navbar-cgt .navbar-brand {
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-cgt .navbar-toggler {
  border-color: var(--brand-yellow);
}

.navbar-cgt .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(189, 163, 25, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* === Fil d'actualité === */
.feed-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.post-card {
  background: linear-gradient(135deg, #fff 0%, #fafbfc 100%);
  border-radius: 20px;
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.08),
    0 2px 10px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(187, 56, 42, 0.08);
  position: relative;
}

.post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-red), var(--brand-yellow), var(--brand-red));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.post-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 15px 40px rgba(0, 0, 0, 0.12),
    0 5px 15px rgba(187, 56, 42, 0.15);
  border-color: rgba(187, 56, 42, 0.2);
}

.post-card:hover::before {
  opacity: 1;
}

.post-header {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  border-bottom: 1px solid rgba(187, 56, 42, 0.1);
  position: relative;
}

.post-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-red), var(--brand-yellow));
  border-radius: 1px;
}

.post-author-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-red) 0%, #d44a3a 50%, var(--brand-yellow) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.8rem;
  box-shadow: 
    0 4px 15px rgba(187, 56, 42, 0.3),
    0 2px 8px rgba(189, 163, 25, 0.2);
  border: 3px solid #fff;
  position: relative;
  transition: all 0.3s ease;
}

.post-card:hover .post-author-avatar {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 
    0 6px 20px rgba(187, 56, 42, 0.4),
    0 3px 12px rgba(189, 163, 25, 0.3);
}

.post-author-info {
  flex: 1;
}

.post-author-name {
  font-weight: 800;
  color: var(--brand-black);
  margin: 0;
  font-size: 1.1rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.post-date {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-date::before {
  content: '🕒';
  font-size: 0.8rem;
}

.post-content {
  padding: 1.5rem;
  position: relative;
}

.post-text {
  color: var(--ink);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  white-space: pre-wrap;
  font-size: 1.05rem;
  position: relative;
  padding-left: 1rem;
}

.post-text::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--brand-red), var(--brand-yellow));
  border-radius: 2px;
}

.post-image {
  width: 100%;
  height: auto;
  border-radius: 15px;
  margin-top: 1.5rem;
  cursor: pointer;
  transition: all 0.4s ease;
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.1),
    0 3px 10px rgba(0, 0, 0, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.post-image:hover {
  transform: scale(1.03) rotate(1deg);
  box-shadow: 
    0 12px 35px rgba(0, 0, 0, 0.15),
    0 5px 15px rgba(187, 56, 42, 0.1);
  border-color: var(--brand-yellow);
}

.post-footer {
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  display: flex;
  gap: 1.5rem;
  border-top: 1px solid rgba(187, 56, 42, 0.1);
  position: relative;
}

.post-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-red), transparent);
}

.post-action {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0.75rem 1.25rem;
  border-radius: 50px;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.post-action::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(187, 56, 42, 0.1), transparent);
  transition: left 0.5s ease;
}

.post-action:hover {
  color: var(--brand-red);
  background: rgba(187, 56, 42, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(187, 56, 42, 0.15);
  border-color: rgba(187, 56, 42, 0.2);
}

.post-action:hover::before {
  left: 100%;
}

.post-action.liked {
  color: var(--brand-red);
  background: rgba(187, 56, 42, 0.1);
}

.post-action i {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.post-action:hover i {
  transform: scale(1.2);
}

.post-action.liked i {
  transform: scale(1.1);
}

/* Animation pour les nouveaux posts */
.post-card.new-post {
  animation: slideInUp 0.6s ease-out;
}

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

/* Badge pour les posts importants */
.post-card.important {
  border-left: 5px solid var(--brand-red);
  box-shadow: 
    0 8px 25px rgba(187, 56, 42, 0.15),
    0 2px 10px rgba(0, 0, 0, 0.05);
}

.post-card.important::before {
  opacity: 1;
  background: linear-gradient(90deg, var(--brand-red), #ff6b6b);
}

/* Styles pour les images avec effet parallax */
.post-image-container {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
}

.post-image-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(187, 56, 42, 0.1), rgba(189, 163, 25, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.post-image-container:hover::after {
  opacity: 1;
}

/* Bouton de téléchargement sur les images */
.download-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.post-image-container:hover .download-btn {
  opacity: 1;
}

/* Conteneur pour les PDF */
.post-pdf-container {
  margin-top: 1rem;
  padding: 2rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 15px;
  border: 2px dashed #dee2e6;
  text-align: center;
}

.pdf-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.pdf-preview i {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* === Tableau de bord admin === */
.admin-dashboard {
  padding: 2rem 0;
}

.dashboard-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand-red);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dashboard-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 3rem;
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.dashboard-card {
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.dashboard-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-red), var(--brand-yellow));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.dashboard-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.dashboard-card:hover::before {
  transform: scaleX(1);
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: white;
  font-size: 1.8rem;
}

.card-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.card-description {
  color: var(--muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.card-arrow {
  color: var(--brand-red);
  font-size: 1.5rem;
  opacity: 0;
  transition: all 0.3s ease;
}

.dashboard-card:hover .card-arrow {
  opacity: 1;
  transform: translateX(5px);
}

/* Statistiques rapides */
.quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-card i {
  font-size: 2rem;
  color: var(--brand-red);
}

.stat-content {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
}

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

/* === Formulaire de création de post (admin) === */
.create-post-card {
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  border: 2px solid var(--brand-red);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 6px 20px rgba(187, 56, 42, 0.15);
}

.create-post-header {
  color: var(--brand-red);
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.image-preview {
  position: relative;
  margin-top: 1rem;
}

.image-preview img {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 0.5rem;
  border: 2px solid var(--brand-yellow);
}

.remove-image-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--brand-red);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.remove-image-btn:hover {
  background: #d44a3a;
  transform: scale(1.1);
}

/* === Modal d'image === */
.image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.image-modal.active {
  display: flex;
}

.image-modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 0.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.close-modal {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: var(--brand-red);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.close-modal:hover {
  background: #d44a3a;
  transform: rotate(90deg) scale(1.1);
}

/* === Page vide améliorée === */
.empty-feed {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted);
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  border-radius: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  border: 2px dashed rgba(187, 56, 42, 0.2);
  position: relative;
  overflow: hidden;
}

.empty-feed::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(189, 163, 25, 0.05) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
}

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

.empty-feed i {
  font-size: 5rem;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
  animation: pulse 2s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

.empty-feed h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-black);
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.empty-feed p {
  font-size: 1.1rem;
  position: relative;
  z-index: 1;
}

/* === Titre de page amélioré === */
.page-header {
  text-align: center;
  padding: 3rem 1rem;
  background: linear-gradient(135deg, 
    rgba(187, 56, 42, 0.05) 0%, 
    rgba(189, 163, 25, 0.05) 50%, 
    rgba(187, 56, 42, 0.05) 100%);
  border-radius: 20px;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-red), var(--brand-yellow), var(--brand-red));
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-black));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.page-header .lead {
  font-size: 1.2rem;
  color: var(--muted);
  font-weight: 500;
  position: relative;
  z-index: 1;
}

/* === Compteur de publications === */
.posts-counter {
  background: linear-gradient(135deg, var(--brand-red), #d44a3a);
  color: #fff;
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(187, 56, 42, 0.3);
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.posts-counter i {
  font-size: 1rem;
}

/* === Indicateur de chargement === */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(187, 56, 42, 0.2);
  border-top: 4px solid var(--brand-red);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* === Badges pour les catégories === */
.post-category-badge {
  background: linear-gradient(135deg, var(--brand-yellow), #d4ac0d);
  color: var(--brand-black);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(189, 163, 25, 0.3);
}

.post-category-badge i {
  font-size: 0.7rem;
}

/* === Indicateur "nouveau" === */
.new-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, #ff6b6b, var(--brand-red));
  color: #fff;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
  animation: newPulse 2s ease-in-out infinite;
}

@keyframes newPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* === Amélioration du scroll === */
.feed-container {
  scroll-behavior: smooth;
}

.feed-container::-webkit-scrollbar {
  width: 8px;
}

.feed-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
}

.feed-container::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--brand-red), var(--brand-yellow));
  border-radius: 10px;
}

.feed-container::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #d44a3a, #d4ac0d);
}

/* === Modal de modification - Interface claire === */
#editModal {
  z-index: 10000 !important;
}

#editModal .modal-content {
  position: relative;
  z-index: 10001 !important;
}

/* === Boutons de modification simples === */
.post-header .btn {
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.post-header .btn-outline-primary {
  border-color: #007bff;
  color: #007bff;
}

.post-header .btn-outline-primary:hover {
  background-color: #007bff;
  color: white;
}

.post-header .btn-outline-danger {
  border-color: #dc3545;
  color: #dc3545;
}

.post-header .btn-outline-danger:hover {
  background-color: #dc3545;
  color: white;
}

/* === Responsive pour le fil d'actualité === */
@media (max-width: 768px) {
  .feed-container {
    padding: 1rem 0.5rem;
  }
  
  .post-card {
    margin-bottom: 1rem;
  }
  
  .post-header {
    padding: 1rem;
  }
  
  .post-author-avatar {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .post-content {
    padding: 1rem;
  }
  
  .post-footer {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .create-post-card {
    padding: 1rem;
  }
  
  .navbar-cgt .nav-link {
    padding: 0.5rem 1rem;
  }
}

footer{
  border-top:1px solid rgba(0,0,0,.08); 
  background:#fafafa;
  position: relative;
  z-index: 10;
  opacity: 1 !important;
  transform: none !important;
}
.social a{color:inherit; text-decoration:none}
.social a:hover{opacity:.8}
