/* ===========================
   Thème moderne – Accueil (option C)
   Fichier : home-modern.css
   =========================== */

:root {
  --color-bg: #191b22;              /* anthracite */
  --color-surface: #23262f;
  --color-surface-soft: #2b2f3a;
  --color-border-subtle: #3a3f4d;
  --color-accent: #fc1e4b;          /* rouge charte */
  --color-accent-soft: rgba(252, 30, 75, 0.16);
  --color-text: #f5f5f5;
  --color-text-muted: #a1a5b5;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 18px 35px rgba(0, 0, 0, 0.45);
}

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

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #2b2f3a 0, #191b22 40%, #111319 100%);
  color: var(--color-text);
}

/* Container global centré et responsive */
.home-shell {
  min-height: 98vh;
 padding: 0;
  /*display: flex;*/
  flex-direction: column;
  align-items: stretch;
}

/* le menu */
.home-shell > header,
.home-shell > nav {
    flex-shrink: 0;
}


.home-shell > .topbar {
    flex-shrink: 0;
}


.home-content{
  flex: 1;                 /* prend tout le reste */
  overflow: auto;          /* scroll si besoin */
  margin: 0;
}


.icon-rapide{
    width:20px;
    height:20px;
    vertical-align:middle;
    margin-right:6px;
    object-fit:contain;
}

/* ================= HEADER ================= */

.app-header {
  width: 100%;
  /*max-width: 1500px;*/
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 5px;
  margin-top: 0px;
  margin-left: 5px;
  margin-right: 5px;
  align-items: center;
  flex-wrap: nowrap;

}


.app-header-left {
  display: flex;
  align-items: center;
  padding-left: 10px;
  gap: 16px;
  width: 50%; /* ou à supprimer complètement */
  flex: 1;     /* si tu veux un équilibrage */

}

/* Utilisateur (connecté / non connecté) */
.app-header-right {
  display: flex;
  align-items: center;
  text-align: center;
  padding-right: 10px;
  gap: 8px;
    flex: 0;     /* si tu veux un équilibrage */

}


.app-logo {
  height: 100px;
  width: auto;
  border-radius: 12px;
  background: #fff;
  background: linear-gradient(to bottom right,#3A3A3A, rgba(25, 27, 34, 0.98));
  background: transparent !important;
  padding: 6px 10px;
}

.app-title {
  margin-left: 100px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.app-logo-block {
  display: flex;
  align-items: center;
  gap: 4px;
}

.app-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}


.app-title-main {
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.app-title-sub {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}





.user-pill,
.user-login-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--color-border-subtle);
  background: rgba(35, 38, 47, 0.95);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  font-size: 0.85rem;
}

.user-greeting {
  color: var(--color-text-muted);
}

.user-name {
  font-weight: 600;
}

.user-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: none;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: 0.8rem;
  text-decoration: none;
}

.user-logout:hover {
  background: var(--color-accent);
  color: #fff;
}

.user-login-pill {
  cursor: pointer;
  color: var(--color-text);
  text-decoration: none;
}

.user-login-pill:hover {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent-soft);
}

/* ================= LAYOUT PRINCIPAL ================= */

.home-main {
  width: 100%;
  max-width: 1200px;
  margin-top: 10px;
  display: grid;
  grid-template-columns: minmax(0, 2.5fr) minmax(280px, 1fr);
  gap: 24px;
  align-items: flex-start;
  flex: 1; /* ⭐ FIX CRITIQUE */
    margin-top: 0;       /* important */
    padding: 24px 24px 32px ;      /* important */
}


/* Section processus */



.process-section {
    padding: 30px;
    border-radius: 14px;
    background: #3A3A3A; /* plus clair qu’avant */
 background: linear-gradient(to bottom right,#3A3A3A, rgba(25, 27, 34, 0.98));
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 3px 10px rgba(0,0,0,0.4);
    max-width: none;
    width: 100%;
}

.section-header h1 {
  font-size: 1.35rem;
  margin: 0 0 4px;
}


.section-header p {
  margin: 0 0 18px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* Grille des cartes */

.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

/* Carte processus */

/*.process-card {
  --process-color: #d32f2f; /* fallback 

 background: radial-gradient(circle at top left,
              rgba(252, 30, 75, 0.12),
              rgba(35, 38, 47, 1));
  border-radius: var(--radius-md);
  border: 1px solid rgba(250, 250, 250, 0.02);
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.18s ease-out,
    box-shadow 0.18s ease-out,
    border-color 0.18s ease-out,
    background 0.18s ease-out;
}*/
.process-card {
  --process-color: lightblue; /* fallback */

 background: #555555;
  border-radius: var(--radius-md);
  border: 1px solid rgba(250, 250, 250, 0.02);
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.18s ease-out,
    box-shadow 0.18s ease-out,
    border-color 0.18s ease-out,
    background 0.18s ease-out;
}

.process-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right,
              rgba(252, 30, 75, 0.22),
              transparent 56%);
  opacity: 0;
  transition: opacity 0.18s ease-out;
  pointer-events: none;
}

.process-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.55);
  border-color: rgba(252, 30, 75, 0.45);
}

.process-card:hover::after {
  opacity: 1;
}

.process-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

/*.process-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}*/

.process-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--process-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/*.process-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  color: var(--process-color);
  display: block;
}*/
.process-icon {
  width: 30px;
  height: 30px;
  /*filter: brightness(0) invert(1);*/
}

.process-card:hover .process-icon-wrapper {
  transform: scale(1.05);
}

.process-icon-wrapper {
  transition: transform 0.2s ease;
}


.process-tag {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(252, 30, 75, 0.45);
  color: var(--color-accent);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
    background: color-mix(in srgb, var(--process-color__) 15%, white);
  color: var(--process-color);
  border: 1px none var(--process-color);

}

.process-title {
  font-size: 1rem;
  margin: 2px 0;
}

.process-desc {
  margin: 0 0 8px;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* Lien de carte */

.process-link,
.process-link--disabled {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: none;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
    color: var(--process-color);
  border: 1px none var(--process-color);

}

.process-link {
  background: var(--process-color__);
  color: #fff;
  cursor: pointer;
}

.process-link:hover {
  background: var(--process-color);
}

.process-link:hover {
  background: color-mix(in srgb, var(--process-color) 85%, black);
  color: white;
}

.process-link--disabled {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-muted);
  cursor: default;
}

/* Carte désactivée quand non connecté */

.process-card--disabled {
  opacity: 0.7;
  filter: grayscale(0.15);
}


/* Message sous la grille */

.process-hint {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(161, 165, 181, 0.7);
  background: rgba(35, 38, 47, 0.9);
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

/* ================= WIDGET FIL D’ACTUS ================= */

.news-widget {
  background: rgba(16, 18, 24, 0.96);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-soft);
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
      width: 100%;
      max-height: 600px;
  border: 2px solid #fc1e4b;
  right: 200px;
  color: var(--color-text-muted) !important;
  
}
.news-widget  {
  color: var(--color-text-muted) !important;
}

.news-widget a ,
.news-widget a:visited,
.news-widget a:hover,
.news-widget a:active {
  text-decoration: none ;
  color: var(--color-accent);   /* rouge charte */
}

.news-widget a:hover {
  opacity: 0.8;
}

.news-widget-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  color: black !important;
  background-color: gray;
  border-radius: 5px;
}

.news-widget-title {
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  vertical-align: middle !important;
  color: white;
  max-height: 20px;
}

.news-widget-pill {

  padding: 3px 9px;
  border-radius: 999px;
  color: var(--color-accent);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
    font-weight: 600;

}

.news-widget-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  font-size: 0.8rem;
}

/* ================= FOOTER ================= */

.home-footer {
  width: 100%;
  max-width: 1200px;
  margin-top: 18px;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

/* ================= RESPONSIVE ================= */

@media (max-width: 960px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-main {
    grid-template-columns: 1fr 1fr;
  }

  .news-widget {
    max-height: none;
    order: -1; /* Widget au-dessus de la grille sur mobile */
  }
}

@media (max-width: 600px) {
  .home-shell {
    padding: 16px 12px 20px;
  }

  .process-grid {
    grid-template-columns: 1fr;
  }

  .app-logo {
    height: 48px;
  }

  .app-title-main {
    font-size: 1.1rem;
  }
}


/* =============== TOPBAR MODERNE ================= */

.topbar {
  width: 90%;
  background: rgba(25,27,34,0.92);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  /*position: sticky;*/
  top: 0;
  z-index: 1000;
  position: relative;
  
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-logo {
  height: 80px;
  width: auto;
  border-radius: 10px;
}

.topbar-title-main {
  font-size: 1.1rem;
  font-weight: 600;
}

.topbar-title-sub {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ================= NAVIGATION ================= */

.topnav {
  flex: 1;
 width: 90%;
 
}

.topnav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 22px;
  align-items: center;
}

.topnav-item--right {
    margin-left: auto;  /* Pousse l’élément le plus à droite */
}


.topnav-link {
  color: var(--color-text);
  text-decoration: none;
  padding: 8px 4px;
  font-size: 0.9rem;
  position: relative;
}

.topnav-link:hover {
  color: var(--color-accent);
}

/* Dropdown */
.has-sub:hover .submenu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(6px);
}

.submenu {
  position: absolute;
  background: #23262f;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: 0.2s ease;
  box-shadow: 0 18px 35px rgba(0,0,0,0.45);
  min-width: 220px;
}

.submenu-large {
  flex-direction: row;
  gap: 28px;
}

.submenu-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.submenu-title {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 4px;
}

.submenu a {
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.submenu a:hover {
  color: var(--color-accent);
}

/* === USER ZONE === */

.topbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-btn,
.logout-btn {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(252, 30, 75, 0.16);
  color: var(--color-accent);
  text-decoration: none;
}

.logout-btn:hover,
.login-btn:hover {
  background: var(--color-accent);
  color: #fff;
}


.app-header,
.home-main,
.topbar,
.topnav,
.process-section {
  width: 100%;
 /* max-width: 1500px;*/
  margin-left: auto;
  margin-right: auto;
}

.app-header,
.home-main,
.topbar,
.topnav,
.process-section {
    max-width: none !important;
    margin-left: auto;
    margin-right: auto;
}

.topbar {
    position: relative;
    z-index: 1000; /* Passe devant tout */
    overflow: visible;
}

.topnav .submenu {
    position: absolute;
    z-index: 2000; /* Encore plus haut */
}

.process-section,
.home-main {
    position: relative;
    z-index: 1;
}

/****************************************************
 * PAGES AET
 ****************************************************/

.norme-picto {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid #000;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 13px;
  background: #fff;
}

.norme-picto img {
  width: 28px;
  height: auto;
}

.norme-code {
  font-weight: bold;
  white-space: nowrap;
}


.aet-alert {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 13px;
  white-space: nowrap;
}

.aet-ok {
  background: #e6f4ea;
  color: #1e7e34;
}

.aet-m15 {
  background: #fff7e6;
  color: #8a6d00;
}

.aet-m12 {
  background: #ffe8cc;
  color: #b45309;
}

.aet-m6 {
  background: #fde2e2;
  color: #b91c1c;
}

.aet-expired {
  background: #7f1d1d;
  color: #fff;
}

.aet-unknown {
  background: #e5e7eb;
  color: #374151;
}

.aet-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: bold;
  margin-left: 6px;
}

.aet-archivee {
  background: #e5e7eb;
  color: #374151;
}

/**********************************************
********TABLE SATISFACTION + GAUGE NPS*********
***********************************************/

.nps-card {
  max-width: 280px;
  padding: 16px;
  text-align: center;
}

.nps-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #888;
}

.nps-title {
  font-weight: 600;
  color: #444;
}

.nps-main {
  margin: 10px 0;
}

.nps-score {
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
}

.nps-status {
  font-size: 14px;
  font-weight: 600;
  color: #666;
}

.nps-gauge-mini {
  max-width: 180px;
  margin: 8px auto 0;
}


.adv-table {
    width: 100%;
    border-collapse: collapse;
}
.adv-table th,
.adv-table td {
    padding: 8px;
    border-bottom: 1px solid #ddd;
}

.col-question {
  width: auto;
}

.col-moyenne {
  width: 120px;
  text-align: right;
}

.col-nb {
  width: 120px;
  text-align: right;
  }


.bille-table {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #fff;
}

/* Zones */
.bille-table.det  { background: #e74c3c; } /* critique */
.bille-table.pas  { background: #f39c12; } /* moyen */
.bille-table.pro  { background: #2ecc71; } /* bon */
.bille-table.prox { background: #207F84; } /* excellent */


.secteur-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 6px;
  margin: 25px 0 15px;
  border-bottom: 1px solid #ddd;
}

  .header-with-nps {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  flex: 1;
}




.header-right {
  flex-shrink: 0;
  margin-left: auto;   /* 🔑 force le bloc NPS à droite */
  display: flex;
  align-items: center;
}




