


/* ======================================================
   PROCESS PAGES – DESIGN SYSTEM
   ------------------------------------------------------
   Ce fichier définit l’apparence des pages
   de résultats / performances par processus.
   Toute la coloration est pilotée par :
     --process-color
   ====================================================== */


/* ======================================================
   1. VARIABLES GÉNÉRIQUES PROCESSUS
   ====================================================== */

/* ======================================================
   BASE PROCESSUS (héritée par toutes les pages)
   ====================================================== */

.process-page {
  /* Couleur de référence (injectée en inline) */
  /* --process-color: #FFCF99; */

  /* Déclinaisons douces */
  --process-accent: var(--process-color);
  --process-accent-soft: color-mix(in srgb, var(--process-color) 12%, white);
  --process-accent-header: color-mix(in srgb, var(--process-color) 22%, white);
  --process-border: color-mix(in srgb, var(--process-color) 35%, #d1d5db);

  /* Texte (jamais noir pur) */
  --process-text-main: #374151;
  --process-text-soft: #6b7280;

  color: var(--process-text-main);
  background: #f8fafc;
  background: #FFFFFF;
}

/* ======================================================
   ENTÊTE DE PAGE
   ====================================================== */

.process-page-header {
  background: white;
  border-radius: 18px;
  border: 1px solid var(--process-border);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}


.process-page-title {
  font-size: 22px;
  font-weight: 600;
}

/* ======================================================
   3. FILTRES (MOIS / ANNÉE)
   ====================================================== */

.process-filters select {
  border-radius: 10px;
  border: 1px solid var(--process-border);
  padding: 4px 8px;
  background: white;
  color: var(--process-text-main);
}


//* ======================================================
   4. TABLEAUX STATISTIQUES
   ====================================================== */

.process-table {
  background: white;
  border-radius: 22px;
  border: 1px solid var(--process-border);
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.process-table thead {
  background: var(--process-accent-header);
}

.process-table thead th {
  font-weight: 600;
  font-size: 14px;
  color: var(--process-text-main);
  border-bottom: 1px solid var(--process-border);
}

.process-table tbody tr:nth-child(even) {
  background: var(--process-accent-soft);
}
/* ======================================================
   5. TITRES INTERNES
   ====================================================== */

.process-table thead tr:first-child th {
  font-size: 16px;
  letter-spacing: 0.02em;
}

/* ======================================================
   ZONES DE CONTENU
   ====================================================== */

.process-content {
  height: calc(100% - 130px);
}

html, body {
    height: 100%;
   /* overflow: hidden;*/
}

.process-content-hp {
    height: calc(100vh - 260px); /* ⚠️ ajuste selon menu + header */
    overflow-y: auto;
    padding: -10px;
    padding-top: 0rem;
    box-sizing: border-box;
    border-radius: 18px;
}



.process-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* ================================
   THEME GLOBAL PROCESSUS - LIGHT
   ================================ */

:root {
  --page-bg: #f7f9fc90;
  --card-bg: #ffffff;
  --text-main: #1f2d3d;
  
  --text-sub: #5b6975;
  --shadow-soft: 0 4px 10px rgba(0,0,0,0.06);
  --shadow-hover: 0 6px 16px rgba(0,0,0,0.08);
}

/* La couleur propre à chaque processus sera injectée depuis PHP */
.process-page-hp {
  --process-color: #A7E1C4; /* Valeur par défaut (vert menthe) */
  background: var(--page-bg);
  padding-left: 1rem;
  padding-top: 0.5rem;
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  margin: 5px;
  height: calc(100% - 130px) !important; /* header (≈80px) + nav (≈50px) */
  overflow-y: auto;
  padding-right: 10px;
  box-sizing: border-box;

}



/* ================================
   HEADER PROCESSUS
   ================================ */
.process-header-hp {
  background: linear-gradient(135deg, var(--process-color) 0%, #ffffff 100%);
  padding: 2rem;
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 1rem;
  margin-right: 0.5rem;
  padding-top: 0.3rem;  /* au lieu d’environ 1rem */
  padding-bottom: 0.3rem;
  margin-top: 0; /* si un margin-top existe */

    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.process-header-hp h1 {
  color: var(--text-main);
  margin: 0;
  font-size: 2rem;
      margin-top: 0; /* On supprime le gros espace natif */

}

.process-header-hp p {
  color: var(--text-sub);
  font-size: 1.1rem;
  margin-top: 0 rem;
}

h2,
.titre-section,
.section-title-hp {
    margin-bottom: 0.0rem; /* ou 0 */
}

.process-header-buttons-hp {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
}

.process-btn-hp {
  background: var(--process-color);
  padding: .7rem 1.2rem;
  border-radius: 8px;
  color: #1f2d3d;
  font-weight: 600;
  text-decoration: none;
  opacity: .9;
  transition: opacity .2s;
}

.process-btn-hp:hover {
  opacity: 1;
}

/* ================================
   CARTES
   ================================ */

.process-section-hp {
  margin-bottom: 2rem;
  color: gray;
  gap: 4px;
      display: flex;
    flex-direction: column;
    gap: 1.2rem;   /* ⬅️ ESPACE ENTRE LES CARTES */
    margin-bottom: 1.5rem; /* ⬅️ ESPACE ENTRE LES SECTIONS */
}

.section-title-hp {
  color: var(--text-main);
  font-weight: 700;
  margin-bottom: 1rem;
 margin-top: -1rem;
}


    h2,
.titre-section,
.section-title-hp {
    margin-top: 0.2rem; /* ou 0 */
    margin-bottom: 0.0rem; /* ou 0 */
}


.process-card-grid-hp {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}

.process-card-hp {
  background: var(--card-bg);
  box-shadow: var(--shadow-soft);
  border-radius: 12px;
  padding: 1.5rem;
  transition: transform .15s ease, box-shadow .15s ease;
    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-hp:hover {
/*  transform: translateY(-3px);
  box-shadow: var(--shadow-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-hp h3 {
  margin-top: 0;adv-compact-header
  color: var(--text-main);
}

.process-card-hp p {
  color: var(--text-sub);
  margin-bottom: 1rem;
}

.process-link-hp {
  text-decoration: none;
  font-weight: 600;
  color: var(--process-color);
    display: inline-block;
  padding: .3rem .8rem;
  border-radius: 8px;
    background: #1f2d3d80;;


}

/* ================================
   TAG PROCESSUS
   ================================ */
.process-tag-hp {
  display: inline-block;
  padding: .3rem .8rem;
  border-radius: 8px;
  background: var(--process-color);
  font-weight: 600;
  color: #1f2d3d;
  margin-bottom: .5rem;
}


/* ================================
   HEADER PROCESSUS
   ================================ */
.process-header-hp {
  background: linear-gradient(135deg, var(--process-color) 0%, #ffffff 100%);
  padding: 2rem;
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 1rem;
  padding-top: 0.3rem;  /* au lieu d’environ 1rem */
  padding-bottom: 0.3rem;
  margin-top: 0px; /* si un margin-top existe */
  margin-bottom: 25px; /* si un margin-top existe */
  border: none;
}

.process-header-hp h1 {
  color: var(--text-main);
  margin: 0;
  font-size: 2rem;
      margin-top: 0; /* On supprime le gros espace natif */

}

.process-header-hp h3 {
  color: red;
  margin: 0;
  font-size: 2rem;
      margin-top: 0; /* On supprime le gros espace natif */

}

.process-header-hp p {
  color: var(--text-sub);
  font-size: 1.1rem;
  margin-top: 0 rem;
}

.process-header-buttons-hp {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
}

.process-btn-hp {
  background: var(--process-color);
  padding: .7rem 1.2rem;
  border-radius: 8px;
  color: #1f2d3d;
  font-weight: 600;
  text-decoration: none;
  opacity: .9;
  transition: opacity .2s;
}

.process-btn-hp:hover {
  opacity: 1;
}


.mo-image-wrapper {
    position: relative;
    display: inline-block;

}

.mo-hotspot {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-main);
    /*background: rgba(200,200,200,1);  /*POUR REGLAGE*/
    background: transparent;
    border-radius: 6px;
    font-size: 0.85rem;
    pointer-events: auto;
    /*border: 1.5px solid var(--process-color);*/
}

.mo-popup {
    position: fixed;     /* 🔥 clé */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: #fff;
    padding: 16px;
    border-radius: 8px;
}

.mo-hotspot:hover {
    background: color-mix(in srgb, var(--process-color) 10%, transparent);
    color: #000;
}
.mo-image-wrapper {
    position: relative;
}
.mo-hotspot-AEL:hover {
    background: color-mix(in srgb, var(--process-color) 10%, transparent);
    color: #000;
}

.mo-scroll-zone {
    overflow-y: auto;
    height: 544px;
    display: flex;
    justify-content: center; /* 👈 centrage horizontal */
}



/* 🔑 LE POINT CRITIQUE */
.mo-image-wrapper {
    position: relative;   /* ← référence ABSOLUE */
    display: inline-block;
}


/*===================================================*/
/* Ligne titre Modes Opératoires */


/* Colonnes */
.mo-col {
    padding: 8px 12px;
}

.mo-col.acteurs {
    background: color-mix(in srgb, var(--process-color) 20%, white);
}

.mo-col.actions {
    background: color-mix(in srgb, var(--process-color) 10%, white);
}

.mo-col.donnees {
    background: color-mix(in srgb, var(--process-color) 5%, white);
}


/* Conteneur centré commun */
.mo-centered-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center; /* 🔑 centre la largeur sur l’image */
  width: max-content;     /* 🔑 = largeur de l’image  plus stable que fit-content*/
  margin: 0 auto;         /* 🔑 centre comme l’image */
}


/* La ligne titre = même largeur que le conteneur (= image) */
.mo-title-row{
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  background: #fff;
  border-bottom: 2px solid var(--process-color);
  font-weight: 600;
  text-align: center;
  height: 48px;
  align-items: center;
  position: sticky;
  top: 60px;   /* ajuste si besoin */
  color: var(--text-main);
  z-index: 9;
}

/* La zone scroll doit suivre la largeur du wrapper */
.mo-scroll-zone{
  width: 100%;
  overflow-y: auto;
  height: 544px;
  display: block;         /* 🔑 évite les effets du flex + centrage */
}

/* Image en bloc pour éviter des “décalages” */
.mo-image-wrapper img{
  display: block;
}

.mo-scroll-zone {
    overflow-y: auto;
    height: 544px;
    display: flex;
    justify-content: center; /* 👈 centrage horizontal */
}



/* 🔑 LE POINT CRITIQUE */

.process-header-hp {
    position: sticky;
    top: 0;
    z-index: 10;
    
}

.process-header-hp {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}


.mo-hotspot {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-main);
    /*background: rgba(200,200,200,1);  /*POUR REGLAGE*/
    background: transparent;
    border-radius: 6px;
    font-size: 0.85rem;
    pointer-events: auto;
    /*border: 1.5px solid var(--process-color);*/
}

.mo-hotspot:hover {
    background: color-mix(in srgb, var(--process-color) 25%, transparent);
    color: #000;
}

.mo-scroll-zone {
    overflow-y: auto;
    height: 544px;
    display: flex;
    justify-content: center; /* 👈 centrage horizontal */
}



/* 🔑 LE POINT CRITIQUE */
.mo-image-wrapper {
    position: relative;   /* ← référence ABSOLUE */
    display: inline-block;
}

/*===================================================*/
/* Ligne titre MO */


/*==*/
.bms-timeline-link {
    flex: 1;
    text-decoration: none;
    color: inherit;
    display: block;
}

/* ✅ Activation du dot UNIQUEMENT si le lien existe */
.bms-timeline-step:has(.bms-timeline-link[href]:hover) .bms-timeline-dot,
.bms-timeline-step:has(.bms-timeline-link[href]:focus-visible) .bms-timeline-dot {
    background: var(--process-color);
    color: #fff;
    border-color: var(--process-color);
    transform: scale(1.1);
}

.bms-timeline-dot {
    transition: 
        background 0.25s ease,
        transform 0.25s ease,
        color 0.25s ease;
}

.bms-timeline-link:hover .bms-timeline-content {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

.bms-timeline-link:focus-visible .bms-timeline-content {
    outline: 2px solid var(--process-color);
    outline-offset: 3px;
}



.bms-timeline-link {
    flex: 1;                     /* 🔑 garde la même largeur */
    display: block;              /* 🔑 le lien remplit l’espace */
    text-decoration: none;       /* ❌ soulignement */
    color: inherit;              /* ❌ bleu/violet */
}

.bms-timeline {
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: relative;
    margin-left: 20px;
}

.bms-timeline::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--process-color);
    opacity: 0.25;
}

.bms-timeline-step {
    display: flex;
    gap: 20px;
    position: relative;
}

.bms-timeline-dot {
    min-width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--process-color);
    color: var(--process-color);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.bms-timeline-step.active .bms-timeline-dot {
    background: var(--process-color);
    color: #fff;
}

.bms-timeline-content {
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    flex: 1;
}

.bms-timeline-content h3 {
    margin: 0 0 6px 0;
    font-size: 1.05rem;
    color :var(--text-main);
}

.bms-timeline-content p {
    margin: 0;
    color: #555;
    line-height: 1.4;
}
