:root{
  --blue:#244f6b;
  --blue-dark:#1d3e55;
  --bg:#f5f7fa;
  --card:#ffffff;
  --text:#1f2937;
  --accent:#1d3e55;
  --radius:12px;
  --shadow-small:0 3px 10px rgba(0,0,0,.08);
  --shadow-medium:0 6px 20px rgba(0,0,0,.12);
}
/* Pour tout le monde sauf les Super Users */
body:not(.is-superuser) .astroid-content {
    margin-top: 20px;
}
body {
  margin:0;
  color:var(--text);
  height:100vh;
  overflow:hidden;
  /* Fond élégant */
  background:
    radial-gradient(
      1200px 500px at top left,
      rgba(36,79,107,0.10),
      transparent 60%
    ),
    radial-gradient(
      1000px 400px at bottom right,
      rgba(29,62,85,0.08),
      transparent 60%
    ),
    linear-gradient(
      180deg,
      #eef2f6 0%,
	  #e5ebf2 100%
    );
}
#astroid-header > .d-flex {
  height: 100%;
  align-items: center;
}
.astroid-header-section,
.astroid-header-section .container,
.astroid-header-section .astroid-row,
.astroid-header-section .astroid-column,
#astroid-header {
  height: 64px;
}
.astroid-section.astroid-header-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;

  background: 
    repeating-linear-gradient(
      45deg,
      rgba(255,255,255,0.05),
      rgba(255,255,255,0.05) 1px,
      transparent 1px,
      transparent 10px
    ),
    linear-gradient(135deg, #1d3e55, #244f6b);

  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* Icônes centrales */
.top-icons{
  display:flex;
  gap:24px;
  margin-left:16px;
}
.top-icons a{
  display:flex;
  align-items:center;
  justify-content:center;
  width:48px !important;
  height:48px;
  background:#f9fafb;
  border-radius:14px;
  box-shadow:var(--shadow-small);
  transition:.25s;
}
.top-icons a:hover{
  background:linear-gradient(145deg,#e0f0ff,#cce6ff);
  transform:translateY(-2px);
  box-shadow:var(--shadow-medium);
}
.top-icons img{
  width:38px !important;
  height:38px;
}
.top-icons a {
  position: relative; /* nécessaire pour le tooltip */
}

.top-icons a::after {
  content: attr(title); /* récupère le texte de l'attribut title */
  position: absolute;
  top: 110%; /* au-dessus de l'icône */
  left: 50%;
  transform: translateX(-50%);
  background: rgba(36, 62, 85, 0.9);
  color: #fff;
  font-size: 12px !important;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 100;
}

/* Flèche sous le tooltip */
.top-icons a::before {
  content: '';
  position: absolute;
  top: 100%; /* juste en dessous du tooltip */
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: rgba(36, 62, 85, 0.9) transparent transparent transparent;
  opacity: 0;
  transition: opacity 0.25s ease;
}

/* Affichage au hover */
.top-icons a:hover::after,
.top-icons a:hover::before {
  opacity: 1;
}
/* Menu droite – style hover doux */
.astroid-nav {
  display: flex;
  gap: 16px;
}

.astroid-nav > .nav-item > .nav-link {
  text-decoration: none;
  color: #f1f5f9; /* blanc doux */
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 10px;
  transition: background-color .25s ease, color .25s ease;
}

.astroid-nav > .nav-item > .nav-link:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}
/* ================= MAIN ================= */
.main{
  padding:20px;
  display:grid;
  grid-template-columns:2.5fr 1fr;
  gap:20px;
  height:calc(100vh - 64px - 48px);
  margin-bottom:20px;
  overflow:hidden;
}

/* ================= CARDS ================= */
.card{
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #edf2f7 100%
  );
  border-radius:var(--radius);
  padding:16px;
  height:100%;
  display:flex;
  flex-direction:column;

  /* Effet carte premium */
  box-shadow:
    0 8px 24px rgba(0,0,0,.06),
    0 2px 6px rgba(0,0,0,.04),
    inset 0 1px 0 rgba(255,255,255,.75);

  border:1px solid rgba(36,79,107,.12);
}
.card.actus,
.card.new-arrivals,
.card.services{
  border-top:4px solid var(--blue);
}
/* Titre des cartes */
.card h3 {
  margin-top: 0;        /* Remonte le titre en haut de la carte */
  margin-bottom: 12px;  /* Garde l'espacement en dessous */
  font-weight:600;
  color:var(--accent);
  font-size:16px !important;
}
/* ================= SERVICES ================= */
.services h3{
  margin-bottom:12px;
  font-weight:600;
  color:var(--accent);
}


/* ================= COLONNE DROITE ================= */
.side{
  display:grid;
  grid-template-rows:1fr 1fr;
  gap:20px;
  height:100%;
}
/* ===== COLONNE GAUCHE (Actus + Services) ===== */
.left-column{
  display:grid;
  grid-template-rows:17% 80%;
  gap:12px;
  height:100%;
}

/* Carte Actus */
.actus{
  overflow:hidden;
}

.actus ul{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.actus li{
  font-size:13px !important;
  padding:8px 10px;
  background:linear-gradient(180deg,#ffffff,#f3f6fa);
  border-radius:10px;
  border:1px solid #d1d9e6;
}
/* ================= LISTES ================= */
.infos-municipales h3{
  margin-bottom:12px;
  font-size:16px !important;
  font-weight:600;
  color:var(--accent);
}
.infos-list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.infos-list li a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 10px;
  font-size:13px !important;
  font-weight:500;
  line-height:1.3;
  border-radius:12px;
  background:linear-gradient(180deg,#f8fafc,#e9eff5);
  border:1px solid #d1d9e6;
  text-decoration:none;
  color:var(--text);
  box-shadow:0 2px 6px rgba(0,0,0,.04);
}
.infos-list li a::after{
  content:'›';
  margin-left:auto;
  color:#94a3b8;
  font-size:14px !important;
}
.infos-list li a:hover{
  background:linear-gradient(180deg,#f0f6fb,#e4eff8);
  box-shadow:var(--shadow-small);
}
.infos-list li a span{
  font-size:16px !important;
  width:20px;
  text-align:center;
  flex-shrink:0;
}
.infos-list img, .infos-list svg{
  width:18px;
  height:18px;
  flex-shrink:0;
  display:block;
}

/* ================= ONGLET CNAS / COS ================= */
.infos-tabs{
  height:100%;
  display:flex;
  flex-direction:column;
  background: linear-gradient(180deg, #f8fafc, #e6edf4);
}
.info-item{
  background: linear-gradient(180deg, rgba(255,255,255,0.8), rgba(236,243,250,0.8));
  border:1px solid #d1d9e6;
  border-radius:10px;
  padding:10px 12px;
  box-shadow:0 2px 6px rgba(0,0,0,.04);
}

.info-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  margin-bottom:4px;
}

.info-title{
  font-weight:600;
  font-size:13.5px !important;
  color:var(--blue-dark);
}

.info-dates{
  font-size:11.5px !important;
  opacity:.7;
  white-space:nowrap;
}

.info-content{
  margin:0;
  font-size:12.5px !important;
  line-height:1.4;
  color:#374151;
}
.tabs-header{
  display:flex;
  margin-bottom:12px;
  background:#eef2f6;
  border-radius:12px;
  padding:4px;
  gap:4px;
}
.tab-btn{
  flex:1;
  padding:8px 0;
  border:none;
  background:transparent;
  border-radius:10px;
  font-weight:600;
  font-size:13px !important;
  color:#475569;
  cursor:pointer;
  transition:.25s;
}
.tab-btn.active{
  background:#fff;
  color:var(--blue);
  box-shadow:var(--shadow-small);
}
.tab-btn:hover{
  background:rgba(36,79,107,.08);
}
.tab-content{
  display:none;
  padding:0;
    overflow-y: auto;  /* scroll vertical si contenu trop long */
  padding-right: 8px; /* espace pour la scrollbar */
}
.tab-content.active{
  display:block;
}
/* Scrollbar moderne et discrète */
.tab-content::-webkit-scrollbar {
  width: 6px;
}

.tab-content::-webkit-scrollbar-thumb {
  background-color: rgba(36,79,107,0.3);
  border-radius: 3px;
}

.tab-content::-webkit-scrollbar-thumb:hover {
  background-color: rgba(36,79,107,0.6);
}

.tab-content::-webkit-scrollbar-track {
  background: transparent;
}

/* ================= ACTUS MODERNES & PRO ================= */
.actus-slider {
  list-style:none;
  padding:0;
  margin:0;
  height:48px;
  overflow:hidden;
  position:relative;
}

.actus-slider li {
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 12px;
  background:#ffffff;
  border-radius:12px;
  box-shadow:0 4px 12px rgba(0,0,0,0.08);
  font-size:14px !important;
  color:var(--blue-dark);
  position:absolute;
  top:0;
  left:0;
  right:0;
  opacity:0;
  transform:translateY(20px);
  transition:all 0.6s ease;
}

.actus-slider li.active {
  opacity:1;
  transform:translateY(0);
}

/* Badge couleur pour icône */
.badge-icon {
  display:flex;
  align-items:center;
  justify-content:center;
  width:28px !important;
  height:28px;
  border-radius:50%;
  color:#fff;
  font-size:14px !important;
  flex-shrink:0;
  box-shadow:0 2px 6px rgba(0,0,0,0.15);
}

/* Texte principal */
.actus-text {
  flex:1;
  font-weight:500;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Date */
.actus-date {
  font-size:12px !important;
  font-weight:600;
  color:#475569;
}
/* Conteneur pour les deux cartes */
.actus-container {
  display: flex;
  gap: 20px;
  height: 130px; /* ajuste selon la hauteur souhaitée */
}

/* Chaque carte prend 50% */
.actus-container .card {
  flex: 1;
}

/* Nouveau style pour la tuile Nouveau Arrivant / Départ */
.new-arrivals h3 {
  margin: 0;
  font-size: 16px !important;
  color: var(--accent);
}
.new-arrivals {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start; /* texte à gauche */
  gap: 4px;
  padding: 10px;
  height: 100%;
  overflow: hidden;
}

.new-arrivals ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;              /* autorise retour ligne si trop d’éléments */
  gap: 8px;
  width: 100% !important;
}

.new-arrivals li {
  flex: 1 1 auto;               /* se réduit automatiquement */
  min-width: 140px !important;             /* largeur mini lisible */
  max-width: 100% !important;
  white-space: nowrap;          /* reste sur une ligne */
  overflow: hidden;
  text-overflow: ellipsis;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 3px 10px;
  font-size: 13px !important;
  border-radius: 12px;         /* style badge propre */
  border: 1px solid #d1d9e6;
}
/* Nom */
.new-arrivals .na-name {
  font-weight:600;
  font-size:13px !important;
  color: #1d3e55; /* texte plus harmonieux avec l’accent principal */
}

/* Service + date */
.new-arrivals .na-meta {
  font-size:11.5px !important;
  opacity:0.75;
  color: #475569; /* gris doux pour le texte secondaire */
}

/* Arrivée : vert pastel dégradé */
.new-arrivals li.arrival { 
  background: linear-gradient(135deg, #daf5e7 0%, #b8e6d3 100%); /* dégradé du vert très clair au vert légèrement plus soutenu */
  color: #0f5132;           /* vert foncé lisible */
  border-left: 4px solid #38b2ac; /* accent subtil */
}

/* Départ : rouge pastel dégradé */
.new-arrivals li.depart { 
  background: linear-gradient(135deg, #fde2e2 0%, #fbb6b6 100%); /* dégradé du rouge très clair au rouge un peu plus chaud */
  color: #7f1d1d;           /* rouge foncé lisible */
  border-left: 4px solid #f87171; /* accent subtil */
}

/* Hover plus doux et élégant */
.new-arrivals li:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
  background: #f0f4f8; /* léger glow neutre au hover */
}
.services{
  display:flex;
  flex-direction:column;
  min-height:0;
}

.services-categories{
  flex:1;
  display:flex;
  flex-direction:column;
  min-height:0;
}

/* Chaque catégorie = 1/4 exact de la tuile */
.service-category{
  flex:1 1 0;
  display:flex;
  flex-direction:column;
  min-height:0;
}

/* Titre catégorie compact */
.service-category h4{
  margin:0 0 6px;
  font-size:clamp(12px,1.2vh,14px) !important;
  font-weight:600;
  color:var(--blue-dark);
  flex-shrink:0;
}

/* Ligne d’outils */
.service-row{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-start;
  gap:8px;
}

/* ===== ICÔNES CARRÉES PREMIUM ===== */
.service.square{
  aspect-ratio: 1 / 1;
  flex:1 1 110px !important; /* largeur minimale 110px */
  max-width:140px !important; /* limite de croissance */
  max-height:100px !important;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;

  background:linear-gradient(145deg,#eef2f7,#dfe7ef);
  border-radius:14px;
  border:1px solid rgba(36,79,107,.15);

  font-size: clamp(14px, 1.5vh, 16px) !important;
  font-weight:600 !important;
  color:var(--accent) !important;
  text-align:center !important;

  box-shadow:0 4px 10px rgba(0,0,0,.08);
  cursor:pointer;
}

.service.square img{
  height: clamp(30px, 40%, 50px);
  width: auto !important;
}

.service.square span{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.service.square span:hover {
  color: #1d3e55;
}
/* Hover propre */
.service.square:hover{
  transform:translateY(-3px);
  box-shadow:0 8px 18px rgba(36,79,107,.22);
  background:linear-gradient(145deg,#dbeeff,#c7def3);
}
.settings-btn {
  cursor: pointer;
  font-size: 18px;
  margin-left: 10px;
  color: #555;
  transition: color 0.2s;
}
.service.square .btn{
  font-size:inherit;
}
/* ================= RESPONSIVE ================= */
@media (max-width:1200px){
  main{grid-template-columns:1fr; gap:12px;}
  .service-grid{grid-template-columns:repeat(2,1fr);}
}
/*@media (max-height:950px){ .infos-list li a{padding:7px 10px;font-size:12.5px !important;} }
@media (max-height:850px){ .infos-list li a{padding:6px 9px;font-size:12px !important;} }
@media (max-height:760px){ .infos-list li a{padding:5px 8px;font-size:11.5px !important;} }*/
.card,
.left-column,
.side,
.services,
.services-categories,
.service-category{
  min-height:0;
}
@media (max-height:950px){
  .left-column {
    grid-template-rows: auto 1fr;
  }
  /* INFOS */
  .infos-list li a{
    padding:6px 10px;
    font-size:12.5px !important;
    line-height:1.25;
  }

  /* ACTUS */
  .actus-slider{
    height:44px;
  }
  .actus-slider li{
    padding:6px 10px;
    font-size:13px !important;
  }

  /* NOUVEAUX / DÉPARTS */
  .new-arrivals li{
    padding:3px 8px;
    font-size:12.5px !important;
  }

  /* SERVICES */
  .service.square{
    max-height:92px;
  }
  .service.square img{
    height:48px;
  }
}

@media (max-height:850px){
  .main{
    margin-top:10px;
    padding-top:10px;
    margin-bottom:10px;
    padding-bottom:10px;
  }

  .left-column{
    grid-template-rows: auto 1fr;
    gap:12px;
  }
  /* INFOS */
  .infos-list li a{
    padding:5px 8px;
    font-size:12px !important;
    line-height:1.2;
  }

  /* ACTUS */
  .actus-slider{
    height:40px;
  }
  .actus-slider li{
    padding:5px 8px;
    font-size:12.5px !important;
  }

  /* NOUVEAUX / DÉPARTS */
  .new-arrivals li{
    padding:2px 6px;
    font-size:12px !important;
  }

  /* SERVICES */
  .service.square{
    max-height:82px;
    font-size:13px !important;
  }
  .service.square img{
    height:40px;
  }
}

@media (max-height:760px){
  .main{
    margin-top:10px;
    padding-top:5px;
    margin-bottom:10px;
    padding-bottom:5px;
  }

  .left-column{
    gap:10px;
  }
  /* INFOS */
  .infos-list li a{
    padding:4px 6px;
    font-size:11px !important;
    line-height:1.15;
  }

  /* ACTUS */
  .actus-slider{
    height:36px;
  }
  .actus-slider li{
    padding:4px 6px;
    font-size:12px !important;
  }

  /* NOUVEAUX / DÉPARTS */
  .new-arrivals li{
    padding:2px 5px;
    font-size:11.5px !important;
  }

  /* SERVICES */
  .service.square{
    max-height:70px;
    font-size:12px !important;
  }
  .service.square img{
    height:32px;
  }
}
/* ================= FOOTER ================= */

.footer {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;

  background:
    repeating-linear-gradient(
      45deg,
      rgba(255,255,255,0.05),
      rgba(255,255,255,0.05) 1px,
      transparent 1px,
      transparent 10px
    ),
    linear-gradient(135deg, #1d3e55, #244f6b) !important;

  color: #e0e7f1 !important;
  font-size: 12px !important;
  height: 48px !important;
  padding: 0 24px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;

  box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.2) !important;
  z-index: 99999 !important;
  width: 100% !important;
}

/* Conteneur gauche */
.footer-left {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
}

/* Item */
.footer-item {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  position: relative !important;
  padding: 0 8px !important;
}

/* Séparateur */
.footer-item:not(:last-child)::after {
  content: "" !important;
  position: absolute !important;
  right: 0 !important;
  top: 25% !important;
  height: 50% !important;
  width: 1px !important;
  background-color: rgba(255,255,255,0.3) !important;
}

/* Texte */
.footer-item span {
  font-size: 12px !important;
  color: #e0e7f1 !important;
  white-space: nowrap !important;
}

/* Lien */
.footer-item a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  max-width: 24px !important;
}

/* Image (blocage TOTAL contre Bootstrap/Astroid) */
.footer-item a img {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  max-width: 24px !important;
  min-height: 24px !important;
  max-height: 24px !important;
  object-fit: contain !important;
  filter: brightness(0.9) !important;
  transition: all 0.25s ease !important;
  display: block !important;
}

/* Hover */
.footer-item a:hover img {
  filter: brightness(1.3) !important;
  transform: scale(1.1) !important;
}

/* Partie droite */
.footer-right {
  font-size: 12px !important;
  color: #e0e7f1 !important;
  white-space: nowrap !important;
}



.card.editable {
  outline: 2px dashed #c7d2fe;
  outline-offset: -6px;
  position: relative;
}

/* Badge mode édition */
.edit-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 600;
}
/* Badge mode édition */
.edit-mode {
  position: absolute;
  top: 10px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Hover très visible */
.edit-mode:hover {
  background: #1d4ed8;
  box-shadow: 0 0 0 4px rgba(37,99,235,0.25);
  transform: scale(1.05);
}

/* Bonus : hover carte */
.card.editable:hover {
  box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}
/* =========================
   MODAL PRINCIPALE
========================= */
.modal {
  display: none; /* cachée par défaut */
  position: fixed;
  top: 0; left: 0;
  width: 100% !important; height: 100% !important;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.show {
  display: flex;
}
.modal form {
    background: linear-gradient(180deg, #ffffff, #f3f6fa);
    border-radius: var(--radius);
    padding: 30px;
    max-width: 1000px !important;
    width: 90% !important;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15), 0 4px 8px rgba(0,0,0,0.08);
    border: 1px solid rgba(36,79,107,0.12);
}

/* ===== ANIMATION D'OUVERTURE ===== */
@keyframes modalShow {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== TITRE ===== */
.modal h3 {
    margin-bottom: 25px;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--blue-dark);
    text-align: center;
}

/* =========================
   ITEMS DYNAMIQUES (EX : ACTUS)
========================= */
.actus-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px 15px;
    background: linear-gradient(180deg, #f8fafc, #e6edf4);
    border: 1px solid rgba(36, 79, 107, 0.12);
    border-radius: 10px;
    box-shadow: var(--shadow-small);
    transition: transform 0.2s, box-shadow 0.2s;
    min-height: 50px;
}

.actus-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.actus-item input[type="text"],
.actus-item input[type="date"],
.actus-item input[type="color"],
.actus-item textarea {
    flex: 1 1 auto;      /* prendre toute la largeur disponible */
    min-height: 40px;    /* hauteur lisible */
    padding: 8px 12px;
    font-size: 1rem;
    border: 1px solid rgba(36, 79, 107, 0.2);
    border-radius: var(--radius);
    background: #fff;
    box-sizing: border-box; /* important pour padding */
    transition: border 0.2s, box-shadow 0.2s;
}

.actus-item input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(56, 178, 172, 0.2);
    outline: none;
}

.actus-item button.remove-actu {
    background: #f87171;
    border: none;
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.actus-item button.remove-actu:hover {
    background: #dc2626;
    transform: scale(1.05);
}

/* =========================
   BOUTON AJOUTER ITEM
========================= */
#add-actu {
    display: inline-block;
    background: #38b2ac;
    border: none;
    color: #fff;
    padding: 8px 18px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    margin-top: 10px;
}

#add-actu:hover {
    background: #319795;
    transform: translateY(-2px);
}

/* =========================
   BOUTONS SUBMIT / CANCEL
========================= */
.modal button[type="submit"] {
    background: linear-gradient(145deg, #1d3e55, #244f6b);
    border: none;
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.25s ease;
}

.modal button[type="submit"]:hover {
    background: linear-gradient(145deg, #244f6b, #1d3e55);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.modal button[type="button"]:not(#add-actu) {
    background: #94a3b8;
    border: none;
    color: #fff;
    padding: 10px 20px;
    border-radius: var(--radius);
    cursor: pointer;
    margin-top: 15px;
    margin-left: 10px;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.modal button[type="button"]:not(#add-actu):hover {
    background: #64748b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* =========================
   SCROLLBAR PERSONNALISÉE
========================= */
.modal form::-webkit-scrollbar {
    width: 8px;
}

.modal form::-webkit-scrollbar-thumb {
    background-color: rgba(36, 79, 107, 0.3);
    border-radius: 4px;
}

.modal form::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.modal input[type="text"],
.modal input[type="date"],
.modal input[type="color"],
.modal textarea {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius);
    border: 1px solid rgba(36,79,107,0.15);
    background: #f8fafc;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.modal input:focus,
.modal textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(36,79,107,0.15);
    outline: none;
}
/* =========================
   STRUCTURE FORMULAIRE
========================= */

.modal .form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.modal label {
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--blue-dark);
    font-size: 0.95rem;
}

.modal textarea {
    resize: vertical;
    min-height: 100px;
}

/* Deux colonnes sur desktop */
.modal .form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.modal .form-row .form-group {
    flex: 1;
    min-width: 250px !important;
}

/* Boutons alignés */
.modal .modal-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 25px;
}

html, body {
  height: 100%;
  margin: 0;
}
/* ====== Container global ====== */
.container-fluid {
  height: 100dvh; /* ⚠️ indispensable */
  display: flex;

  width: 100% !important;

  flex-direction: column;  /* ⚠️ indispensable pour que flex:1 vertical fonctionne */
  justify-content: flex-start;
}

/* ====== Carte principale ====== */
.card.dashboard-fit {
  width: 100% !important;
  flex: 1; /* ⚠️ indispensable */
  margin-bottom: 130px;
  background: linear-gradient(180deg, #ffffff 0%, #edf2f7 100%);
  border-radius: 16px;
  border: 1px solid rgba(36,79,107,.12);
  box-shadow: 
    0 8px 24px rgba(0,0,0,.06),
    0 2px 6px rgba(0,0,0,.04),
    inset 0 1px 0 rgba(255,255,255,.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.2vw 2vw; 
  overflow-y: hidden;
}

/* ====== Titre principal ====== */
.card h3 {
  font-size: clamp(1.2rem, 3vw, 2rem);
  text-align: center;
  margin-bottom: 1vh;
  color: #0b3d91;
}

/* ====== Badge édition ====== */
.edit-badge {
  font-size: clamp(0.7rem, 1.5vw, 1rem);
  color: #1a73e8;
  margin-left: 1vw;
  cursor: pointer;
}

/* ====== Organigramme wrapper ====== */
.council-wrapper {
  flex: 1;                 /* ⚠️ indispensable */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2vh;                    /* réduit l’espace vertical entre sections */
  width: 100% !important;
}

/* ====== Sections (maire, adjoints, conseillers) ====== */
.council-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5vh;                  /* réduit l’espace vertical */
  position: relative;
}

/* ====== Ligne verticale connectant les niveaux ====== */
.council-section:not(:first-child)::before {
  content: '';
  position: absolute;
  top: -1.5vh;                 /* réduit la ligne verticale */
  left: 50%;
  width: 2px;
  height: 1.5vh;
  background: #1a73e8;
  z-index: -1;
}

/* ====== Titres de section ====== */
.council-section h4 {
  font-size: clamp(0.95rem, 1.8vw, 1.2rem);
  margin-bottom: 0.5vh;
  color: #0b3d91;
}

/* ====== Grilles pour adjoints et conseillers ====== */
.council-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6vw;                  /* réduit l’espace horizontal */
  position: relative;
}

/* ====== Lignes horizontales ====== */
.council-grid::before {
  content: '';
  position: absolute;
  top: -1.5vh;
  left: 0;
  width: 100%;
  height: 2px;
  background: #1a73e8;
  z-index: -1;
}

/* ====== Style des membres ====== */
.council-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: clamp(90px, 11vw, 130px);    /* réduit largeur */
  height: clamp(65px, 7.5vw, 85px);   /* réduit hauteur */
  background: linear-gradient(135deg, #ffffff, #e0f0ff);
  border-radius: 12px;
  border: 2px solid #1a73e8;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  text-align: center;
  font-size: clamp(0.6rem, 0.9vw, 0.9rem);
  transition: transform 0.3s ease, box-shadow 0.3s ease;

  /* 🔹 Gestion du texte qui dépasse */
  overflow: hidden;           /* ne pas dépasser le carré */
  word-wrap: break-word;      /* couper les mots longs */
  white-space: normal;        /* autoriser le retour à la ligne */
}

.council-member:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 12px rgba(0,0,0,0.12);
}

/* ====== Nom et rôle ====== */
.member-name {
  font-weight: 700;
  margin-bottom: 0.1em;
  color: #0b3d91;
}

.member-role {
  font-size: 0.75em;
  color: #555;
}
.member-name, .member-role {
  display: block;
  line-height: 1.1em;
  word-break: break-word;     /* casse les mots trop longs */
  overflow: hidden;
  text-overflow: ellipsis;    /* ajouter "..." si trop long */
  max-width: 90% !important;             /* ne dépasse pas le carré */
  text-align: center;
}
/* ====== Maire au sommet ====== */
.council-section.mayor .council-member {
  width: clamp(140px, 20vw, 180px);
  height: clamp(60px, 7vw, 80px);
  font-size: clamp(0.7rem, 1.1vw, 1rem);
  background: linear-gradient(135deg, #fffae6, #ffe680);
  border-color: #ffb700;
  color: #1a3d00;
  box-shadow: 0 5px 14px rgba(0,0,0,0.12);
}

/* ====== Responsive ====== */
@media(max-width:768px){
  .council-grid {
    gap: 3vw;
  }

  .council-member {
    width: clamp(60px, 20vw, 100px);
    height: clamp(60px, 20vw, 100px);
  }

  .council-section.mayor .council-member {
    width: clamp(80px, 25vw, 120px);
    height: clamp(80px, 25vw, 120px);
  }
}
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    height: calc(100vh - 120px);
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}
.tile-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-gutter: stable;
    padding-right: 10px; /* pour le texte */
}