/* =========================================================
   RAPPORT PLUS  — PREMIUM BRAND OVERRIDE
   (charge après /assets/css/main.css)
========================================================= */

:root{
  /* === Brand (logo-based) === */
  --tda-500:#0F70B7;    /* bleu principal */
  --tda-300:#68C7E2;    /* cyan clair */
  --tda-700:#0B4B78;    /* bleu profond */
  --tda-900:#06243A;    /* navy/ink */

  /* === Neutrals premium === */
  --ink:#0b1220;
  --muted:#5b6575;
  --paper:#ffffff;
  --wash:#f6f8fb;
  --line:rgba(15, 23, 42, .10);

  /* === Radius / Shadow / Motion === */
  --r-sm:10px;
  --r-md:14px;
  --r-lg:18px;

  --sh-1:0 8px 24px rgba(2, 8, 20, .06);
  --sh-2:0 16px 40px rgba(2, 8, 20, .10);

  --ease:cubic-bezier(.2,.8,.2,1);
  --t-fast:160ms;
  --t-med:240ms;

  /* === Type === */
  --font-body: "Roboto", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  --font-head: "Poppins", system-ui, -apple-system, Segoe UI, Arial, sans-serif;

  /* === Bootstrap runtime vars (quand dispo) === */
  --bs-primary: var(--tda-500);
  --bs-link-color: var(--tda-500);
  --bs-link-hover-color: var(--tda-700);
}

/* Base */
html{ scroll-behavior:smooth; }
body{
  font-family:var(--font-body);
  color:var(--ink);
  background:var(--wash);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* Headings premium */
h1,h2,h3,h4,h5,h6,
.h1,.h2,.h3,.h4,.h5,.h6{
  font-family:var(--font-head);
  letter-spacing:-0.02em;
}
p{ color:var(--ink); }
.small, small, .text-muted{ color:var(--muted)!important; }

/* Links */
a{
  text-decoration:none;
  transition:color var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}
a:hover{ opacity:.95; }

/* Containers / Sections */
.section{ padding:28px 0; }
@media (min-width: 992px){
  .section{ padding:40px 0; }
}

/* =========================================================
   HEADER / NAV — look grand média
========================================================= */
.header{
  background:
    linear-gradient(90deg, var(--tda-700), var(--tda-500)) !important;
  border-bottom:1px solid rgba(255,255,255,.14);
  box-shadow:0 10px 30px rgba(2, 8, 20, .12);
}
.header .logo img{
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.20));
}
.navmenu a{
  color:rgba(255,255,255,.92) !important;
  font-weight:600;
}
.navmenu a:hover,
.navmenu .active{
  color:#fff !important;
}
.mobile-nav-toggle{ color:#fff !important; }

/* =========================================================
   CARDS — premium + cohérence
========================================================= */
.card,
.widget-item,
.news-card,
.same-category .post-card{
  border:1px solid var(--line) !important;
  border-radius:var(--r-md) !important;
  background:var(--paper) !important;
  box-shadow:var(--sh-1);
  overflow:hidden;
}
.card:hover,
.news-card:hover,
.same-category .post-card:hover{
  transform:translateY(-2px);
  box-shadow:var(--sh-2);
}
.card, .news-card, .same-category .post-card{
  transition:transform var(--t-fast) var(--ease), box-shadow var(--t-med) var(--ease);
}

/* =========================================================
   BUTTONS — style média
========================================================= */
.btn{
  border-radius:12px !important;
  font-weight:700;
  letter-spacing:.2px;
  transition:transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.btn:active{ transform:translateY(1px); }

.btn-primary,
.btn.btn-primary{
  background:var(--tda-500) !important;
  border-color:var(--tda-500) !important;
  box-shadow:0 10px 22px rgba(15, 112, 183, .22);
}
.btn-primary:hover{
  background:var(--tda-700) !important;
  border-color:var(--tda-700) !important;
}

.btn-light{
  background:rgba(255,255,255,.92) !important;
  border-color:rgba(255,255,255,.70) !important;
}

.btn-outline-secondary{
  border-color:var(--line) !important;
}
.btn-outline-secondary:hover{
  background:rgba(15,112,183,.08) !important;
  border-color:rgba(15,112,183,.25) !important;
}

/* =========================================================
   INPUTS / SEARCH
========================================================= */
input[type="text"], input[type="email"], input[type="search"],
textarea, select{
  border-radius:12px !important;
  border:1px solid var(--line) !important;
  background:#fff !important;
}
input:focus, textarea:focus, select:focus{
  border-color:rgba(15,112,183,.45) !important;
  box-shadow:0 0 0 .22rem rgba(15,112,183,.18) !important;
}

/* Widget titles */
.widget-title{
  font-family:var(--font-head);
  font-weight:800;
  font-size:1rem;
  margin-bottom:10px;
  position:relative;
  padding-bottom:10px;
}
.widget-title::after{
  content:"";
  position:absolute;
  left:0; bottom:0;
  width:48px; height:3px;
  border-radius:999px;
  background:linear-gradient(90deg, var(--tda-500), var(--tda-300));
  opacity:.95;
}

/* =========================================================
   TICKER — plus premium
========================================================= */
.breaking-ticker{
  background:rgba(255,255,255,.80) !important;
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line) !important;
}
.breaking-ticker .badge.bg-danger{
  background:linear-gradient(90deg, #d90429, #ef233c) !important;
  border-radius:999px !important;
  box-shadow:0 10px 22px rgba(217,4,41,.18);
}

/* =========================================================
   HERO — rendu plus cinéma
========================================================= */
.hero-une .swiper{
  border-radius:var(--r-lg) !important;
  box-shadow:var(--sh-2);
}
.hero-grad{
  background:linear-gradient(180deg,
    rgba(0,0,0,.05) 0%,
    rgba(0,0,0,.40) 55%,
    rgba(0,0,0,.88) 100%) !important;
}
.hero-title{
  text-shadow:0 10px 30px rgba(0,0,0,.45);
}
.hero-meta .badge{
  border-radius:999px !important;
  background:rgba(15,112,183,.70) !important;
}

/* Thumbs */
.thumb-slide{
  border-radius:12px !important;
  box-shadow:0 10px 22px rgba(0,0,0,.10);
}
.swiper-slide-thumb-active .thumb-caption{
  background:rgba(15,112,183,.82) !important;
}

/* =========================================================
   BLOG LIST — typographie “grands médias”
========================================================= */
.blog-posts article{
  background:transparent;
}
.blog-posts .title a{
  color:var(--ink) !important;
  font-weight:900;
  letter-spacing:-.02em;
}
.blog-posts .title a:hover{
  color:var(--tda-700) !important;
}
.blog-posts .meta-top i{
  color:rgba(15,112,183,.9);
}

/* Pagination */
.pagination .page-link{
  border-radius:12px !important;
  border:1px solid var(--line) !important;
}
.pagination .page-link:hover{
  background:rgba(15,112,183,.08) !important;
}
.pagination .page-item.disabled .page-link{
  background:transparent !important;
}

/* =========================================================
   BLOG DETAILS — lecture premium
========================================================= */
.blog-details-page .article{
  width: 100%;
  max-width: 100%;
  margin: 0 !important;
  padding-left: 10px;
  padding-right: 10px;
}

/* Desktop : un peu plus respirant */
@media (min-width: 992px){
  .blog-details-page .article{
    padding-left: 15px;
    padding-right: 15px;
  }
}

.blog-details-page .article .content{
  font-size:1.06rem;
  line-height:1.75;
  color:var(--ink);
}
.blog-details-page .article .content p{
  margin:0 0 1rem;
}
.blog-details-page .article .content a{
  color:var(--tda-500);
  font-weight:700;
  text-decoration:underline;
  text-underline-offset:3px;
  text-decoration-thickness:2px;
  text-decoration-color:rgba(15,112,183,.28);
}
.blog-details-page .article .content a:hover{
  color:var(--tda-700);
  text-decoration-color:rgba(11,75,120,.40);
}

/* Share bar */
.share-bar{
  border-top:1px solid var(--line) !important;
  border-bottom:1px solid var(--line) !important;
}
.share-bar .share-icons a{
  border:1px solid var(--line) !important;
  border-radius:999px !important;
}
.share-bar .share-icons a:hover{
  background:rgba(15,112,183,.08) !important;
  border-color:rgba(15,112,183,.20) !important;
}

/* =========================================================
   FOOTER — cohérent avec la marque
========================================================= */
.footer.dark-background{
  background:
    radial-gradient(1200px 500px at 20% 0%,
      rgba(104,199,226,.18), transparent 60%),
    linear-gradient(180deg, #071a2a, #061422) !important;
  border-top:1px solid rgba(255,255,255,.08);
}
.footer, .footer p, .footer a{
  color:rgba(255,255,255,.86) !important;
}
.footer a:hover{ color:#fff !important; }

/* Scroll top */
#scroll-top{
  border-radius:999px !important;
  background:var(--tda-500) !important;
  box-shadow:0 12px 30px rgba(15,112,183,.25);
}

/* =========================================================
   BLOG LIST – enlever l'effet “bloc” autour du grid
   et agrandir les articles
========================================================= */

/* 1) La section blog-posts ne doit pas ressembler à une carte */
#blog-posts.blog-posts.section{
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;

  /* réduire le gros padding vertical de .section (60px) */
  padding-top: 18px !important;
  padding-bottom: 18px !important;
}

/* 2) Le container et la row doivent être neutres */
#blog-posts .container{
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

#blog-posts .row.gy-4{
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;

  /* enlever l'espace "sensation de marge" autour */
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* 3) Agrandir la “carte article” (moins de padding, plus large) */
#blog-posts article{
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;

  /* l'article parait plus grand car on enlève le padding interne */
  padding: 0 !important;
}

/* 4) Le bloc interne de Presento qui donnait l'effet card (si présent) */
#blog-posts .post-img{
  margin: 0 0 14px 0 !important;
}

/* 5) Optionnel: augmenter un peu la taille du titre + extrait */
#blog-posts .title{
  font-size: 30px !important;
  margin: 18px 0 10px !important;
}

#blog-posts .content p{
  font-size: 16px !important;
  line-height: 1.7 !important;
}

/* =========================================================
   BLOG CARDS — mise en valeur par col-12
========================================================= */

/* La colonne devient la carte */
#posts-grid > .col-12{
  background: var(--paper);
  border: 1px solid var(--line);

  /* Ombre surtout vers le bas */
  box-shadow:
    0 12px 22px rgba(0,0,0,.08),
    0 4px 8px rgba(0,0,0,.05);

  padding: 22px;
  margin-bottom: 26px;

  transition:
    transform var(--t-fast) var(--ease),
    box-shadow var(--t-med) var(--ease);
}

/* Effet hover “élévation” */
#posts-grid > .col-12:hover{
  transform: translateY(-3px);

  box-shadow:
    0 20px 40px rgba(0,0,0,.12),
    0 6px 14px rgba(0,0,0,.08);
}

/* L’article interne devient neutre */
#posts-grid > .col-12 article{
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  border: 0 !important;
}


/* =========================================================
   FLASH — clignotement média discret
========================================================= */

.breaking-ticker .badge{
  animation: flashPulse 1.4s ease-in-out infinite;
}

@keyframes flashPulse{
  0%   { box-shadow:0 0 0 rgba(255,0,0,0); }
  50%  { box-shadow:0 0 12px rgba(255,0,0,.45); }
  100% { box-shadow:0 0 0 rgba(255,0,0,0); }
}


/* =========================================================
   HEADER — gradient TV premium
========================================================= */

.header{
  background:
    linear-gradient(135deg,
      #06243A 0%,
      #0B4B78 35%,
      #0F70B7 65%,
      #68C7E2 100%) !important;

  position: relative;
  overflow: hidden;
}

/* Effet lumière */
.header::after{
  content:"";
  position:absolute;
  inset:0;

  background:
    radial-gradient(
      circle at 20% 0%,
      rgba(255,255,255,.18),
      transparent 60%
    );

  pointer-events:none;
}

/* =========================================================
   BOUTON "LIRE PLUS" — charte RAPPORT PLUS (premium)
========================================================= */

#posts-grid .read-more a{
  /* reset template */
  background: none !important;
  border: 0 !important;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;

  padding: 10px 18px !important;
  border-radius: 2px !important;

  color: #fff !important;
  font-weight: 800;
  letter-spacing: .2px;

  background: linear-gradient(135deg, var(--tda-700), var(--tda-500)) !important;
  box-shadow: 0 10px 22px rgba(15,112,183,.22);

  transition:
    transform var(--t-fast) var(--ease),
    box-shadow var(--t-med) var(--ease),
    filter var(--t-fast) var(--ease);
}

#posts-grid .read-more a:hover{
  transform: translateY(-2px);
  filter: brightness(1.03);
  box-shadow: 0 16px 34px rgba(2,8,20,.16), 0 10px 22px rgba(15,112,183,.22);
}

#posts-grid .read-more a:active{
  transform: translateY(0px);
  filter: brightness(.98);
  box-shadow: 0 8px 18px rgba(15,112,183,.18);
}

#posts-grid .read-more a:focus-visible{
  outline: none;
  box-shadow: 0 0 0 .22rem rgba(104,199,226,.35), 0 12px 26px rgba(15,112,183,.22);
}


/* =========================================================
   ESPACE ENTRE LES CARDS — réduire marge trop grande
========================================================= */

/* 1) Réduit le gap vertical Bootstrap (gy-4) */
#posts-grid{
  --bs-gutter-y: 14px; /* était ~24px via gy-4 */
}

/* 2) Réduit la marge que tu avais ajoutée */
#posts-grid > .col-12{
  margin-bottom: 12px !important; /* était 26px */
}


/* =========================================================
   FIX BLOG IMAGE — full bleed (sans marges) + padding texte
========================================================= */

/* 1) La carte */
#posts-grid > .col-12{
  border-radius: 9px !important;
  overflow: hidden !important;
  padding: 0 !important;
}

/* 2) IMPORTANT : aucun padding sur l'article (sinon l'image aura des marges) */
#posts-grid > .col-12 article{
  padding: 0 !important;
}

/* 3) Image plein bord */
#posts-grid > .col-12 .post-img{
  margin: 0 !important;
  padding: 0 !important;
}

#posts-grid > .col-12 .post-img img{
  display: block !important;
  width: 100% !important;
  height: auto !important;
  object-fit: cover !important;
  border-radius: 0 !important; /* pas d'arrondis internes */
}

/* 4) Padding uniquement pour le contenu texte */
#posts-grid > .col-12 h2.title,
#posts-grid > .col-12 .meta-top,
#posts-grid > .col-12 .content{
  padding-left: 22px !important;
  padding-right: 22px !important;
}

/* Option : petit espace au-dessus du titre */
#posts-grid > .col-12 h2.title{
  padding-top: 18px !important;
}

/* Option : espace bas de la carte */
#posts-grid > .col-12 .content{
  padding-bottom: 22px !important;
}

/* =========================================================
   COUVERTURE + NAV “logo apparaît au scroll”
========================================================= */

/* Couverture : AUCUN padding/marge, l'image = la section */
.tda-cover{
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;          /* annule le padding global des <section> */
  line-height: 0;                 /* supprime tout petit espace “baseline” */
  background: #06243A;
  border: 0;                      /* si tu veux 100% collé */
  display: block;
}

/* Image : 100% responsive, AUCUN recadrage, ratio conservé */
.tda-cover img{
  display: block;
  width: 100%;
  height: auto;                   /* garde toutes les dimensions */
  max-width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: contain;            /* sécurité (mais ne recadre pas) */
}

/* Sentinel : doit être neutre (aucun espace) */
#tda-cover-sentinel{
  height: 1px;
  margin: 0 !important;
  padding: 0 !important;
}

/* Header : par défaut (tout en haut) => logo caché */


#header .logo img{
  max-height: 34px;
}

/* Quand on a scrollé après la couverture => logo visible */
#header.is-stuck .logo{
  opacity: 1;
  visibility: visible;
  width: auto;
  pointer-events: auto;
  transform: translateY(0);
}

/* Ajuste le padding du header si tu veux */
#header.header{
  padding: 14px 0;
}

/* =========================================================
   HEADER — Logo invisible sans casser le layout
========================================================= */

/* Container du header toujours en flex */
#header .container-fluid{
  display: flex !important;
  align-items: center;
}

/* Zone logo : garde sa place même cachée */
#header .logo{
  display: flex;
  align-items: center;

  min-width: 150px;   /* réserve l’espace du logo */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: opacity .2s ease, visibility .2s ease;
}

/* Image logo */
#header .logo img{
  max-height: 45px;
}

/* Nav toujours à droite */
#header .navmenu{
  margin-left: auto !important; /* force à droite */
}

/* Quand on scroll → logo visible */
#header.is-stuck .logo{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Mobile : bouton hamburger à droite */
#header .mobile-nav-toggle{
  margin-left: auto !important;
}

/* Sécurité : ne jamais centrer */
#header .container-xl,
#header .container-fluid{
  justify-content: flex-start !important;
}


/* =========================================================
   STICKY HEADER (reste figé en haut)
========================================================= */

/* Le header reste au top quand on scroll */
#header.header{
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important; /* au-dessus du contenu */
}

/* IMPORTANT : comme le header devient sticky, il doit être opaque */
#header.header{
  backdrop-filter: none !important;
}

/* (Optionnel) évite les petits sauts sur mobile */
#header.header{
  will-change: transform;
}

/* =========================================================
   MITALA NEWS — SECTION HEAD (barre ombrée + languette)
   -> Adapté couleurs RAPPORT PLUS (navy/bleu/cyan)
========================================================= */

.mn-section-head{
  position: relative;
  margin: 16px 0 14px;
  padding: 0; /* pas de padding = pas de décalage */
  margin-bottom: 30px !important;
}

/* La barre ombrée */
.mn-section-head::before{
  content:"";
  display:block;
  height: 10px;
  border-radius: 999px;

  /* Charte TDA: navy -> bleu profond -> bleu -> cyan */
  background: linear-gradient(90deg,
    rgba(6,36,58,.70),    /* --tda-900 */
    rgba(11,75,120,.65),  /* --tda-700 */
    rgba(15,112,183,.75), /* --tda-500 */
    rgba(104,199,226,.65) /* --tda-300 */
  );

  box-shadow:
    0 10px 18px rgba(2, 8, 20, .16),
    inset 0 1px 0 rgba(255,255,255,.14);
}

/* La languette (titre) */
.mn-section-head .mn-tab{
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);

  display: inline-flex;
  align-items: center;
  gap: .5rem;

  padding: .55rem .9rem;
  border-radius: 999px;

  /* fond languette: navy TDA */
  background: rgba(6,36,58,.86);
  color: #fff;

  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: .78rem;

  /* bordure cyan TDA */
  border: 1px solid rgba(104,199,226,.30);
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
  backdrop-filter: blur(6px);
}

/* Petite pastille (cyan) */
.mn-section-head .mn-tab::before{
  content:"";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(104,199,226,1);
  box-shadow: 0 0 0 3px rgba(104,199,226,.18);
}

/* Variante sur fond sombre (si parent .dark-background) */
.dark-background .mn-section-head .mn-tab{
  background: rgba(6,36,58,.72);
  border-color: rgba(104,199,226,.40);
}

/* Responsive */
@media (max-width: 575.98px){
  .mn-section-head{ margin: 12px 0 12px; }
  .mn-section-head::before{ height: 9px; }
  .mn-section-head .mn-tab{
    left: 10px;
    padding: .5rem .75rem;
    font-size: .72rem;
  }
}

/*==================================================
ADMIN LAYOUT
==================================================*/

#admin-app{

display:flex;

min-height:100vh;

background:var(--wash);

}

/*==================================================*/

.admin-sidebar{

position:sticky;

top:0;

width:320px;

min-width:320px;

height:100vh;

background:linear-gradient(180deg,var(--tda-900),#081523);

display:flex;

flex-direction:column;

overflow:hidden;

box-shadow:16px 0 35px rgba(0,0,0,.10);

z-index:1000;

}

/*==================================================*/

.admin-main{

flex:1;

min-width:0;

display:flex;

flex-direction:column;

width:calc(100% - 320px);

}

.admin-header{

position:sticky;

top:0;

z-index:100;

height:78px;

background:#fff;

display:flex;

align-items:center;

justify-content:space-between;

padding:0 30px;

border-bottom:1px solid var(--line);

box-shadow:0 6px 20px rgba(0,0,0,.05);

}

.admin-content{

flex:1;

padding:30px;

overflow:auto;

}

.sidebar-header{

height:78px;

padding:0 24px;

display:flex;

align-items:center;

border-bottom:1px solid rgba(255,255,255,.08);

}

.sidebar-header img{

height:44px;

}

.sidebar-nav{

flex:1;

overflow:auto;

padding:20px 18px;

}

.sidebar-nav a{

display:flex;

align-items:center;

gap:14px;

padding:15px 18px;

margin-bottom:8px;

border-radius:14px;

color:rgba(255,255,255,.82);

font-weight:600;

transition:.25s;

}

.sidebar-nav a:hover{

background:rgba(255,255,255,.08);

color:#fff;

}

.sidebar-nav a.active{

background:rgba(255,255,255,.10);

box-shadow:inset 4px 0 var(--tda-300);

color:#fff;

}

.sidebar-footer{

padding:22px;

border-top:1px solid rgba(255,255,255,.08);

}

@media(max-width:991px){

.admin-sidebar{

position:fixed;

left:-320px;

top:0;

width:320px;

transition:left .30s;

}

.admin-sidebar.open{

left:0;

}

.admin-main{

width:100%;

}

.sidebar-toggle{

display:block;

}

}

.sidebar-toggle{

display:none;

}

@media(max-width:991px){

.sidebar-toggle{

display:block;

}

}

.editor-user .admin-main{

width:100%;

}

.editor-user .admin-header{

padding-left:30px;

}

.editor-user .sidebar-toggle{

display:none !important;

}


  .password-toggle {
    min-width: 3rem;
  }

  .password-toggle .bi {
    pointer-events: none;
  }


    /* Overlay totalement opaque, uniquement pendant la connexion */
  body.login-overlay-active .modal-backdrop,
  body.login-overlay-active .modal-backdrop.show {
    --bs-backdrop-bg: #0b1020;
    --bs-backdrop-opacity: 1;

    background-color: #0b1020 !important;
    opacity: 1 !important;
  }

  /* Aucun toast ne doit passer au-dessus de la connexion. */
  body.login-overlay-active #toast {
    display: none !important;
  }


  /* =========================================================
   MODALE — GESTION DES COMPTES ÉDITEURS
========================================================= */

.editors-manager-dialog{
  max-width:930px;
}

.editors-manager-modal{
  --editor-purple:#6929e9;
  --editor-purple-light:#8a47ff;
  --editor-ink:#172033;
  --editor-muted:#7f8ba0;
  --editor-line:#e8edf5;

  overflow:hidden;
  border:0;
  border-radius:18px;
  background:#fff;
  box-shadow:0 28px 70px rgba(15,23,42,.24);
}

.editors-manager-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:24px 26px;
  border-bottom:1px solid var(--editor-line);
}

.editors-manager-heading{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}

.editors-manager-icon{
  display:grid;
  width:46px;
  height:46px;
  flex:0 0 46px;
  place-items:center;
  border-radius:12px;
  color:#fff;
  font-size:23px;
  background:linear-gradient(135deg,#9d72ff,#5721e4);
  box-shadow:0 9px 18px rgba(105,41,233,.25);
}

.editors-manager-heading .modal-title{
  margin:0 0 4px;
  color:var(--editor-ink);
  font-size:20px;
  font-weight:750;
}

.editors-manager-heading p{
  margin:0;
  color:var(--editor-muted);
  font-size:13px;
}

.editors-manager-header-actions{
  display:flex;
  align-items:center;
  gap:14px;
}

.editors-manager-new{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:40px;
  padding:0 16px;
  border:0;
  border-radius:8px;
  color:#fff;
  font-size:13px;
  font-weight:700;
  background:linear-gradient(135deg,var(--editor-purple-light),var(--editor-purple));
  box-shadow:0 8px 18px rgba(105,41,233,.22);
}

.editors-manager-new:hover,
.editors-manager-new:focus{
  color:#fff;
  transform:translateY(-1px);
  background:linear-gradient(135deg,#7d37fb,#511ccf);
}

.editors-manager-close{
  display:grid;
  width:40px;
  height:40px;
  padding:0;
  place-items:center;
  border:1px solid #e3e8f1;
  border-radius:9px;
  color:#344155;
  background:#fff;
}

.editors-manager-close:hover{
  color:#dc3545;
  border-color:#ffc9d0;
  background:#fff7f8;
}

.editors-manager-body{
  min-height:500px;
  padding:18px 26px 14px;
  background:linear-gradient(180deg,#fff 0%,#fcfdff 100%);
}

.editors-manager-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
}

.editors-search,
.editors-status-filter{
  display:flex;
  align-items:center;
  height:37px;
  border:1px solid #dfe6f0;
  border-radius:7px;
  color:#a0aec0;
  background:#fff;
}

.editors-search{
  width:252px;
  gap:9px;
  padding:0 12px;
}

.editors-search input{
  width:100%;
  min-width:0;
  border:0;
  outline:0;
  color:var(--editor-ink);
  font-size:13px;
  background:transparent;
}

.editors-search input::placeholder{
  color:#9ca8ba;
}

.editors-status-filter{
  position:relative;
  min-width:174px;
  gap:9px;
  padding-left:12px;
}

.editors-status-filter select{
  width:100%;
  height:100%;
  padding:0 30px 0 0;
  border:0;
  outline:0;
  appearance:none;
  color:#596579;
  font-size:13px;
  background:transparent;
  cursor:pointer;
}

.filter-chevron{
  position:absolute;
  right:12px;
  pointer-events:none;
  font-size:11px;
}

.editors-table{
  border-collapse:separate;
  border-spacing:0 9px;
}

.editors-table thead th{
  padding:12px 10px;
  border:0;
  color:#475569;
  font-size:10px;
  font-weight:800;
  white-space:nowrap;
  background:#f7f9fc;
}

.editors-table thead th:first-child{
  border-radius:8px 0 0 8px;
}

.editors-table thead th:last-child{
  border-radius:0 8px 8px 0;
}

.editors-table thead i{
  margin-left:3px;
  color:#9aa7b8;
  font-size:9px;
}

.editors-table tbody tr{
  filter:drop-shadow(0 3px 5px rgba(15,23,42,.025));
}

.editors-table tbody td{
  padding:14px 10px;
  border-top:1px solid #edf1f6;
  border-bottom:1px solid #edf1f6;
  color:#202a3c;
  font-size:12px;
  vertical-align:middle;
  background:#fff;
}

.editors-table tbody td:first-child{
  border-left:1px solid #edf1f6;
  border-radius:9px 0 0 9px;
}

.editors-table tbody td:last-child{
  border-right:1px solid #edf1f6;
  border-radius:0 9px 9px 0;
}

.editor-identity{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:150px;
  font-weight:700;
}

.editor-avatar{
  display:grid;
  width:34px;
  height:34px;
  flex:0 0 34px;
  place-items:center;
  border-radius:8px;
  font-size:12px;
  font-weight:800;
}

.editor-avatar--violet{ color:#6637d8; background:#e6dcff; }
.editor-avatar--pink{ color:#e2468f; background:#ffe0ef; }
.editor-avatar--purple{ color:#7549d8; background:#eee6ff; }
.editor-avatar--amber{ color:#d88813; background:#fff0d6; }
.editor-avatar--cyan{ color:#159aa7; background:#d9f4f5; }

.editor-username{
  color:#e645a1;
  font-size:12px;
  font-weight:700;
}

.editor-email{
  color:#283448;
  font-size:12px;
}

.editor-date{
  color:#5c687c;
  font-size:12px;
  white-space:nowrap;
}

.editor-status-pill{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:5px 9px;
  border-radius:999px;
  font-size:11px;
  font-weight:750;
}

.editor-status-pill::before{
  width:6px;
  height:6px;
  border-radius:50%;
  content:"";
}

.editor-status-pill.is-active{
  color:#12975d;
  background:#e7f8ef;
}

.editor-status-pill.is-active::before{
  background:#10b981;
}

.editor-status-pill.is-suspended{
  color:#a36010;
  background:#fff3df;
}

.editor-status-pill.is-suspended::before{
  background:#f59e0b;
}

.editor-actions{
  display:flex;
  justify-content:flex-end;
  gap:7px;
}

.editor-action{
  display:grid;
  width:31px;
  height:31px;
  padding:0;
  place-items:center;
  border-radius:7px;
  background:#fff;
}

.editor-action--toggle{
  border:1px solid #ffd37a;
  color:#ed9d00;
}

.editor-action--toggle:hover{
  color:#8f5d00;
  background:#fff8e9;
}

.editor-action--delete{
  border:1px solid #ffc4cf;
  color:#f04464;
}

.editor-action--delete:hover{
  color:#c51d3d;
  background:#fff4f6;
}

.editor-action--more{
  border:0;
  color:#64748b;
}

.editor-action--more:hover{
  color:#5b21d1;
  background:#f2edff;
}

.editors-mobile-list{
  display:none;
}

.editors-loading,
.editors-empty{
  display:grid;
  min-height:240px;
  place-items:center;
  align-content:center;
  gap:10px;
  color:#718096;
  text-align:center;
}

.editors-empty i{
  color:#9a70ff;
  font-size:34px;
}

.editors-empty strong{
  color:#334155;
}

.editors-empty span{
  font-size:13px;
}

.editors-manager-footer{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  min-height:70px;
  padding:14px 26px;
  border-top:1px solid var(--editor-line);
  background:#fff;
}

.editors-summary{
  display:flex;
  align-items:center;
  gap:8px;
  justify-self:start;
  color:#718096;
  font-size:12px;
}

.editors-summary i{
  color:#56657d;
  font-size:16px;
}

.editors-pagination{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}

.editors-pagination button,
.editors-pagination span{
  display:grid;
  width:28px;
  height:28px;
  place-items:center;
  border-radius:50%;
  font-size:12px;
}

.editors-pagination button{
  border:1px solid #e4eaf3;
  color:#8090a5;
  background:#fff;
}

.editors-pagination button:hover:not(:disabled){
  color:#6024e0;
  border-color:#cfc0ff;
  background:#f5f1ff;
}

.editors-pagination button:disabled{
  opacity:.45;
  cursor:not-allowed;
}

.editors-pagination span{
  color:#fff;
  font-weight:800;
  background:linear-gradient(135deg,#8a47ff,#5c20df);
  box-shadow:0 5px 10px rgba(105,41,233,.25);
}

.editors-manager-footer-close{
  justify-self:end;
  min-width:67px;
  border:1px solid #ccd6e3;
  border-radius:7px;
  color:#536175;
  font-size:12px;
  background:#fff;
}

.editors-manager-footer-close:hover{
  color:#283548;
  border-color:#aebccc;
  background:#f8fafc;
}

@media (max-width:767.98px){
  .editors-manager-dialog{
    max-width:none;
    height:calc(100% - 16px);
    margin:8px;
  }

  .editors-manager-modal{
    min-height:100%;
    border-radius:14px;
  }

  .editors-manager-header{
    display:grid;
    grid-template-columns:1fr auto;
    gap:14px;
    padding:20px;
  }

  .editors-manager-heading{
    grid-column:1;
  }

  .editors-manager-heading .modal-title{
    font-size:16px;
    line-height:1.35;
  }

  .editors-manager-heading p{
    display:none;
  }

  .editors-manager-icon{
    width:39px;
    height:39px;
    flex-basis:39px;
    border-radius:9px;
    font-size:19px;
  }

  .editors-manager-header-actions{
    display:contents;
  }

  .editors-manager-close{
    grid-column:2;
    grid-row:1;
  }

  .editors-manager-new{
    grid-column:1 / -1;
    grid-row:2;
    width:100%;
    min-height:38px;
  }

  .editors-manager-body{
    min-height:0;
    padding:16px 20px 12px;
  }

  .editors-manager-toolbar{
    display:grid;
    gap:9px;
  }

  .editors-search,
  .editors-status-filter{
    width:100%;
  }

  .editors-table-wrap{
    display:none;
  }

  .editors-mobile-list{
    display:grid;
    gap:10px;
    margin-top:14px;
  }

  .editor-mobile-card{
    padding:14px;
    border:1px solid #edf1f6;
    border-radius:9px;
    background:#fff;
    box-shadow:0 3px 9px rgba(15,23,42,.035);
  }

  .editor-mobile-card-top{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:10px;
  }

  .editor-mobile-identity{
    display:flex;
    gap:10px;
    min-width:0;
  }

  .editor-mobile-name{
    overflow:hidden;
    color:#1f2937;
    font-size:13px;
    font-weight:750;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .editor-mobile-email{
    overflow:hidden;
    margin-top:2px;
    color:#718096;
    font-size:10px;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .editor-mobile-card-bottom{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-top:12px;
    padding-left:44px;
  }

  .editor-mobile-card .editor-actions{
    gap:6px;
  }

  .editor-mobile-card .editor-action--more{
    display:none;
  }

  .editors-manager-footer{
    display:flex;
    flex-wrap:wrap;
    gap:14px;
    padding:12px 20px;
  }

  .editors-pagination{
    order:-1;
    width:100%;
    padding-bottom:12px;
    border-bottom:1px solid #edf1f6;
  }

  .editors-summary{
    flex:1;
  }

  .editors-manager-footer-close{
    margin-left:auto;
  }
}

/* =========================================================
   COMPATIBILITÉ — editor.php et sidebar historique
========================================================= */

/* editor.php possède déjà son propre système sidebar + body padding. */
@media (min-width:992px){
  body.editor-page{
    padding-left:var(--sidebar-w, 280px) !important;
    overflow-x:hidden;
  }

  body.editor-page .admin-sidebar{
    position:fixed !important;
    top:0 !important;
    left:0 !important;
    width:var(--sidebar-w, 280px) !important;
    min-width:0 !important;
    height:100vh !important;
    transform:none !important;
  }
}

@media (max-width:991.98px){
  body.editor-page{
    padding-left:0 !important;
  }

  body.editor-page .admin-sidebar{
    position:fixed !important;
    top:0 !important;
    left:0 !important;
    width:var(--sidebar-w, 280px) !important;
    min-width:0 !important;
    height:100vh !important;
    transform:translateX(-100%) !important;
    transition:transform .25s ease !important;
  }

  body.editor-page.sidebar-open .admin-sidebar{
    transform:translateX(0) !important;
  }
}


/* =========================================================
   MODALE ÉDITEURS — header/footer fixes, contenu scrollable
========================================================= */

#editorsManagerModal .editors-manager-dialog{
  height:calc(100% - 2rem);
  margin:1rem auto;
}

#editorsManagerModal .editors-manager-modal{
  display:flex !important;
  flex-direction:column;
  height:100%;
  max-height:100%;
  min-height:0;
  overflow:hidden;
}

#editorsManagerModal .editors-manager-header,
#editorsManagerModal .editors-manager-footer{
  flex:0 0 auto;
}

#editorsManagerModal .editors-manager-body{
  flex:1 1 auto;
  min-height:0 !important;
  overflow-y:auto !important;
}

/* Le footer reste toujours visible sur grand écran. */
@media (min-width:768px){
  #editorsManagerModal .editors-manager-dialog{
    height:calc(100% - 3rem);
    margin:1.5rem auto;
  }
}

.quill-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:10px 12px;
  border-top:1px solid #e5eaf2;
  background:#fbfcff;
}

.quill-footer-hint{
  display:flex;
  align-items:center;
  gap:7px;
  color:#718096;
  font-size:12px;
}

.quill-footer-hint i{
  color:#6d28e9;
  font-size:15px;
}

.quill-footer .ai-proofread-btn{
  display:inline-flex;
  flex:0 0 auto;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:34px;
  padding:0 13px;
  border:0;
  border-radius:7px;
  color:#fff;
  font-size:12px;
  font-weight:700;
  background:linear-gradient(135deg,#8a47ff,#5c20df);
  box-shadow:0 6px 14px rgba(105,41,233,.22);
}

.quill-footer .ai-proofread-btn:hover{
  background:linear-gradient(135deg,#7836f4,#4d18c5);
  transform:translateY(-1px);
}

.quill-footer .ai-proofread-btn:disabled{
  opacity:.7;
  cursor:wait;
  transform:none;
}

@media (max-width:575.98px){
  .quill-footer{
    align-items:stretch;
    flex-direction:column;
  }

  .quill-footer .ai-proofread-btn{
    width:100%;
  }
}

/* =========================================================
   PUBLICITÉS ADMIN
   ========================================================= */

.advertisements-manager-modal{
  border:0;
  border-radius:1rem;
  overflow:hidden;
}

.advertisements-manager-modal .modal-header{
  background:#f8f9fc;
  border-bottom:1px solid #e9edf3;
}

.advertisement-admin-card{
  border:1px solid #e5e9ef;
  border-radius:14px;
  overflow:hidden;
  background:#fff;
  transition:
    transform .2s ease,
    box-shadow .2s ease;
}

.advertisement-admin-card:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 25px rgba(0,0,0,.08);
}

.advertisement-admin-image{
  position:relative;
  width:100%;
  aspect-ratio:3 / 4;
  background:#eef1f5;
  overflow:hidden;
}

.advertisement-admin-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.advertisement-admin-status{
  position:absolute;
  top:10px;
  right:10px;
}

.advertisement-admin-body{
  padding:.9rem;
}

.advertisement-admin-title{
  font-weight:700;
  color:#202832;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.advertisement-admin-meta{
  color:#8a949e;
  font-size:.72rem;
  margin-top:3px;
}

.advertisement-admin-actions{
  display:flex;
  gap:6px;
  margin-top:.75rem;
}

.advertisement-admin-actions .btn{
  flex:1;
}

.advertisement-preview-box{
  width:min(100%,360px);
  aspect-ratio:3 / 4;
  margin:auto;
  border-radius:12px;
  overflow:hidden;
  background:#eef1f5;
  border:1px solid #dee2e6;
}

.advertisement-preview-box img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}

.advertisement-file-error{
  color:#dc3545;
  font-size:.8rem;
  margin-top:.4rem;
}

/* =========================================================
   VERROUILLAGE FORMAT PUBLICITÉS — PORTRAIT 3:4
   ========================================================= */

/* Slider publicitaire : jamais de déformation */
.ads-slider,
.commercial-pane-ads .ads-slider{
  aspect-ratio: 3 / 4 !important;
}

/* Chaque slide = même ratio, image remplit sans déformer */
.ad-slide{
  aspect-ratio: 3 / 4;
}
.ad-slide img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Mobile : on garde strictement le même ratio portrait */
@media (max-width: 767.98px){
  .ads-slider{
    aspect-ratio: 3 / 4 !important;
  }
}

/* Si jamais le conteneur est vide, on force quand même la hauteur */
#commercial-ads{
  min-height: 320px;
}

