/* =========================================================
   Module sectors.css — Secteurs
   Source migrée depuis : assets/css/secteurs.css
   Migration CSS Phase 1 : modules/ — 2026-05-07
   Note : contenu repris sans refonte profonde pour éviter toute casse.
   ========================================================= */

/* Secteurs & chantiers — alignement sur le socle Front UI ADHA
   Style institutionnel, plat, sans dégradé ni ombre. */

.sectors-page{
  margin-inline: auto;
}

.sectors-page > .article-body{
  padding: 1.35rem 1.45rem;
  border: 1px solid var(--front-border, rgba(13,31,28,.12));
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
}

.sectors-page .article-body > :first-child{
  margin-top: 0;
}

.sectors-page .article-body h2,
.sectors-page .article-body h3{
  position: relative;
  margin: 1.5rem 0 .7rem;
  padding-bottom: .55rem;
  color: var(--front-text, #183b34);
  line-height: 1.25;
  border-bottom: 1px solid var(--front-border, rgba(13,31,28,.12));
}

.sectors-page .article-body h2::after,
.sectors-page .article-body h3::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 64px;
  height: 3px;
  background: var(--front-green, #1A7346);
}

.sectors-page .article-body p,
.sectors-page .article-body li{
  color: #425b55;
  line-height: 1.75;
}

.sectors-page .article-body strong{
  color: var(--front-text, #183b34);
}

.sectors-page .article-body table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1rem 0 1.4rem;
  overflow: hidden;
  border: 1px solid var(--front-border, rgba(13,31,28,.12));
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
}

.sectors-page .article-body th,
.sectors-page .article-body td{
  padding: .85rem .95rem;
  border-bottom: 1px solid rgba(13,31,28,.08);
  vertical-align: top;
}

.sectors-page .article-body th{
  background: #f7faf7;
  color: var(--front-text, #183b34);
  font-weight: 800;
  text-align: left;
}

.sectors-page .article-body tr:last-child td{
  border-bottom: 0;
}

.sectors-page .article-body .checklist{
  padding-left: 0;
  list-style: none;
}

.sectors-page .article-body .checklist li{
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: .55rem;
}

.sectors-page .article-body .checklist li::before{
  content: "";
  position: absolute;
  left: 0;
  top: .7em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--front-green, #1A7346);
}

.sectors-page .rubrique-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}

.sectors-page .rubrique-card{
  min-height: auto;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--front-border, rgba(13,31,28,.12));
  border-left: 4px solid var(--front-green, #1A7346);
  border-radius: 14px;
  background: #fff;
  box-shadow: none !important;
}

.sectors-page .rubrique-card:hover{
  box-shadow: none !important;
}

.sectors-page .rubrique-card h2{
  margin: 0 0 .55rem;
  font-size: 1.02rem;
  line-height: 1.35;
}

.sectors-page .rubrique-card h2 a{
  color: var(--front-text, #183b34);
  font-size: inherit;
  line-height: inherit;
}

.sectors-page .rubrique-card h2 a:hover{
  color: var(--front-green, #1A7346);
}

.sectors-page .rubrique-card p{
  color: var(--front-muted, #64746f);
  font-size: .94rem;
}

.sectors-page .rubrique-card .button,
.sectors-page .article-body .button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: .48rem .82rem;
  border: 1px solid var(--front-border-green, rgba(26,115,70,.20));
  border-radius: 999px;
  background: #fff;
  color: var(--front-green, #1A7346);
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: none;
}

.sectors-page .rubrique-card .button:hover,
.sectors-page .article-body .button:hover{
  background: var(--front-green, #1A7346);
  border-color: var(--front-green, #1A7346);
  color: #fff;
}

/* Chiffres clés : neutralisation des anciens effets dashboard trop modernes */
.sectors-keyfig-page .article-body{
  padding: 0;
  border: 0;
  background: transparent;
}

.sectors-keyfig-page .keyfig-hero,
.sectors-keyfig-page .keyfig-update-panel,
.sectors-keyfig-page .keyfig-global-card,
.sectors-keyfig-page .keyfig-sector-card,
.sectors-keyfig-page .keyfig-sector-main{
  box-shadow: none !important;
  border-radius: 14px !important;
}

.sectors-keyfig-page .keyfig-global-card{
  background: #fff !important;
  color: var(--front-text, #183b34) !important;
  border: 1px solid var(--front-border, rgba(13,31,28,.12)) !important;
  border-top: 3px solid var(--front-green, #1A7346) !important;
}

.sectors-keyfig-page .keyfig-global-secondary,
.sectors-keyfig-page .keyfig-global-sublabel{
  color: var(--front-muted, #64746f) !important;
  opacity: 1 !important;
}

.sectors-keyfig-page .keyfig-sector-main{
  background: #f7faf7 !important;
  color: var(--front-text, #183b34) !important;
  border: 1px solid var(--front-border, rgba(13,31,28,.12)) !important;
}

html[dir="rtl"] .sectors-page .article-body h2::after,
html[dir="rtl"] .sectors-page .article-body h3::after{
  left: auto;
  right: 0;
}

html[dir="rtl"] .sectors-page .article-body th{
  text-align: right;
}

html[dir="rtl"] .sectors-page .article-body .checklist li{
  padding-left: 0;
  padding-right: 1.25rem;
}

html[dir="rtl"] .sectors-page .article-body .checklist li::before{
  left: auto;
  right: 0;
}

html[dir="rtl"] .sectors-page .rubrique-card{
  border-left-width: 1px;
  border-right: 4px solid var(--front-green, #1A7346);
}

@media (max-width: 900px){
.sectors-page .rubrique-grid{
    grid-template-columns: 1fr;
  }
}


@media (max-width: 700px){
.sectors-page > .article-body{
    padding: 1rem;
  }

  .sectors-page .article-body table,
  .sectors-page .article-body thead,
  .sectors-page .article-body tbody,
  .sectors-page .article-body th,
  .sectors-page .article-body td,
  .sectors-page .article-body tr{
    display: block;
  }

  .sectors-page .article-body thead{
    display: none;
  }

  .sectors-page .article-body tr{
    border-bottom: 1px solid rgba(13,31,28,.08);
  }

  .sectors-page .article-body tr:last-child{
    border-bottom: 0;
  }

  .sectors-page .article-body td{
    border-bottom: 0;
  }

  .sectors-page .article-body td::before{
    content: attr(data-label);
    display: block;
    margin-bottom: .25rem;
    color: var(--front-green, #1A7346);
    font-weight: 800;
  }
}


/* --------------------------------------------------------------------------
   Harmonisation finale Secteurs : même rythme que le socle Publications.
   -------------------------------------------------------------------------- */
.sectors-page{
  width: min(1120px, 100%);
  margin-inline: auto;
}

.sectors-page > .article-body{
  margin-top: 0;
}

/* PATCH_PHASE2C_INLINE_CHIFFRES_CLES
   Styles sortis de secteurs/chiffres-cles.php — Phase 2C. */
:root{
  --vert-clair:#85BB64;
  --vert-fonce:#1A7346;
  --vert-tres-fonce:#0D1F1C;
  --gris-clair:#DADADA;
  --gris-fonce:#374548;
  --kf-bg:#f8faf8;
  --kf-white:#ffffff;
  --kf-soft:#f2f7f3;
  --kf-line:#d8e6d8;
  --kf-shadow:none;
  --kf-radius:22px;
}
section.content .keyfig-page,
section.content .keyfig-page *{
  box-sizing:border-box;
}
section.content .keyfig-page ul,
section.content .keyfig-page ol{
  list-style:none !important;
  margin:0 !important;
  padding:10px !important;
}
section.content .keyfig-page li{
  list-style:none !important;
  padding-left:0 !important;
}
section.content .keyfig-page li::before,
section.content .keyfig-page li::after{
  content:none !important;
  display:none !important;
}
.article-body .keyfig-page{
  width:100%;
  max-width:none;
  margin:0;
}
.keyfig-page{
  position:relative;
  z-index:1;
  color:var(--vert-tres-fonce);
}
.keyfig-shell{
  padding:8px 0 28px;
}
.keyfig-top{
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(340px,.85fr);
  gap:18px;
  margin:0 0 26px;
}
.keyfig-hero,
.keyfig-update-panel{
  background:var(--kf-white);
  border:1px solid var(--kf-line);
  border-radius:14px;
  box-shadow:none;
}
.keyfig-hero{
  padding:26px 28px;
  background:var(--kf-white);
}
.keyfig-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin:0 0 12px;
  padding:8px 12px;
  border-radius:999px;
  background:#fff;
  color:var(--vert-fonce);
  font-size:12px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.keyfig-kicker-dot{
  width:8px;height:8px;border-radius:999px;background:var(--vert-clair);display:inline-block;
}
.keyfig-title{
  margin:0 0 10px;
  font-size:clamp(26px, 3vw, 40px);
  line-height:1.05;
  color:var(--vert-tres-fonce);
}
.keyfig-intro-title{
  margin:0 0 10px;
  font-size:clamp(18px, 1.6vw, 24px);
  line-height:1.2;
  color:var(--vert-fonce);
}
.keyfig-intro-text{
  margin:0;
  max-width:980px;
  color:var(--gris-fonce);
  line-height:1.75;
  font-size:15px;
}
.keyfig-update-panel{
  padding:22px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:18px;
  background:#fff;
}
.keyfig-update-label{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.05em;
  color:var(--vert-fonce);
  font-weight:800;
}
.keyfig-update-date{
  font-size:clamp(24px, 2.3vw, 34px);
  line-height:1.05;
  color:var(--vert-tres-fonce);
  font-weight:800;
}
.keyfig-update-note{
  color:var(--gris-fonce);
  line-height:1.65;
  font-size:14px;
}
.keyfig-section{
  margin:0 0 28px;
}
.keyfig-section-title{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 0 16px;
  font-size:clamp(20px,1.7vw,28px);
  line-height:1.15;
  color:var(--vert-tres-fonce);
}
.keyfig-section-title::before{
  content:"";
  width:8px;
  height:28px;
  border-radius:999px;
  background:var(--vert-clair);
  flex:0 0 auto;
}
.keyfig-global-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:16px;
}
.keyfig-global-card{
  position:relative;
  overflow:hidden;
  background:#fff;
  border:1px solid var(--kf-line);
  border-top:3px solid var(--vert-fonce);
  border-radius:14px;
  color:var(--vert-tres-fonce);
  padding:20px 18px 18px;
  box-shadow:none;
}
.keyfig-global-card::after{
  content:"";
  position:absolute;
  right:-34px;
  top:-34px;
  width:110px;
  height:110px;
  border-radius:999px;
  background:rgba(26,115,70,.06);
}
.keyfig-global-value{
  position:relative;
  font-size:clamp(24px,2.2vw,34px);
  line-height:1;
  font-weight:800;
  letter-spacing:-.02em;
}
.keyfig-global-secondary{
  position:relative;
  margin-top:6px;
  font-size:13px;
  opacity:.92;
}
.keyfig-global-label{
  position:relative;
  margin-top:12px;
  font-size:14px;
  font-weight:700;
  line-height:1.45;
}
.keyfig-global-sublabel{
  position:relative;
  margin-top:6px;
  font-size:12px;
  opacity:.86;
  line-height:1.45;
}
.keyfig-sector-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:18px;
}
.keyfig-sector-card{
  background:var(--kf-white);
  border:1px solid var(--kf-line);
  border-radius:var(--kf-radius);
  box-shadow:none;
  overflow:hidden;
}
.keyfig-sector-top{
  padding:18px 18px 14px;
  border-bottom:1px solid rgba(133,187,100,.18);
}
.keyfig-sector-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}
.keyfig-sector-badge{
  width:44px;
  height:44px;
  border-radius:14px;
  background:#eef1ef;
  color:#334648;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  border:1px solid rgba(51,70,72,.10);
}
.keyfig-sector-badge svg{
  width:20px;
  height:20px;
  display:block;
}
.keyfig-sector-title{
  margin:0;
  font-size:22px;
  line-height:1.15;
  color:var(--vert-tres-fonce);
}
.keyfig-sector-date{
  display:inline-flex;
  align-items:center;
  white-space:nowrap;
  margin-top:12px;
  padding:6px 10px;
  border-radius:999px;
  background:#fff;
  color:var(--vert-fonce);
  font-size:12px;
  font-weight:700;
}
.keyfig-sector-summary{
  margin:12px 0 0;
  color:var(--gris-fonce);
  line-height:1.6;
  font-size:14px;
  min-height:44px;
}
.keyfig-sector-main{
  margin:16px 18px 0;
  padding:16px 18px;
  border-radius:18px;
  background:#f7faf7;
  color:var(--vert-tres-fonce);
  border:1px solid var(--kf-line);
}
.keyfig-sector-main-value{
  font-size:clamp(22px, 1.9vw, 30px);
  line-height:1.08;
  font-weight:800;
  letter-spacing:-.02em;
  max-width:100%;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.keyfig-sector-main-label{
  margin-top:6px;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.03em;
  opacity:.92;
}
.keyfig-sector-body{
  padding:16px 18px 18px;
}
.keyfig-sector-list{
  display:grid;
  gap:10px;
}
.keyfig-sector-list li{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,42%);
  gap:12px;
  align-items:flex-start;
  padding:11px 0;
  border-bottom:1px solid rgba(13,31,28,.08);
}
.keyfig-sector-list li:last-child{
  border-bottom:0;
  padding-bottom:0;
}
.keyfig-metric-label{
  min-width:0;
  padding-left:18px;
  color:var(--gris-fonce);
  font-size:14px;
  line-height:1.5;
  font-weight:600;
  position:relative;
  white-space:normal;
  overflow:visible;
  overflow-wrap:break-word;
  word-break:normal;
  min-height:calc(1.5em * 2);
}
.keyfig-metric-label::before{
  content:"";
  position:absolute;
  left:0;
  top:.55em;
  width:8px;
  height:8px;
  border-radius:999px;
  background:var(--vert-clair);
  box-shadow:none;
}
.keyfig-metric-value{
  min-width:0;
  max-width:100%;
  color:var(--vert-fonce);
  font-size:14px;
  line-height:1.5;
  font-weight:800;
  text-align:right;
  white-space:normal;
  overflow:visible;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.keyfig-global-value,
.keyfig-global-label,
.keyfig-global-secondary,
.keyfig-global-sublabel,
.keyfig-update-date,
.keyfig-update-note,
.keyfig-sector-title,
.keyfig-sector-summary,
.keyfig-sector-main-value,
.keyfig-sector-main-label,
.keyfig-metric-label{
  max-width:100%;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.keyfig-sector-head > :first-child{
  min-width:0;
}
.keyfig-sector-main-value{
  line-height:1.1;
}
.keyfig-metric-label{
  min-width:0;
}

[dir="rtl"] .keyfig-page{
  text-align:right;
}
[dir="rtl"] .keyfig-top{
  direction:rtl;
}
[dir="rtl"] .keyfig-section-title::before{
  order:2;
}
[dir="rtl"] .keyfig-sector-head{
  direction:rtl;
}
[dir="rtl"] .keyfig-sector-summary,
[dir="rtl"] .keyfig-intro-text,
[dir="rtl"] .keyfig-global-label,
[dir="rtl"] .keyfig-global-sublabel{
  text-align:right;
}

/* ===== Patch RTL uniquement ===== */
/* On garde le même principe que le FR :
   colonne 1 = label souple
   colonne 2 = valeur bornée
   mais visuellement en RTL : label à droite, valeur à gauche */
[dir="rtl"] .keyfig-sector-list li{
  grid-template-columns:minmax(0,1fr) minmax(0,42%);
  direction:rtl;
  padding-right:0 !important;
}

[dir="rtl"] .keyfig-metric-label{
  grid-column:1;
  padding-left:0;
  padding-right:18px;
  text-align:right;
  direction:rtl;
  unicode-bidi:plaintext;
  min-height:calc(1.5em * 2);
  overflow-wrap:break-word;
  word-break:normal;
}

[dir="rtl"] .keyfig-metric-label::before{
  left:auto;
  right:0;
}

[dir="rtl"] .keyfig-metric-value{
  grid-column:2;
  text-align:left;
  direction:ltr;
  unicode-bidi:embed;
  overflow-wrap:anywhere;
  word-break:break-word;
}

@media (max-width:1320px){
.keyfig-global-grid{
    grid-template-columns:repeat(2, minmax(0,1fr));
  }

  .keyfig-sector-grid{
    grid-template-columns:repeat(2, minmax(0,1fr));
  }
}

@media (max-width:900px){
.keyfig-page{
    width:auto;
    margin-left:0;
    margin-right:0;
  }
  .keyfig-top{
    grid-template-columns:1fr;
  }
  .keyfig-sector-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width:640px){
.keyfig-shell{
    padding:4px 0 12px;
  }
  .keyfig-hero,
  .keyfig-update-panel,
  .keyfig-global-card,
  .keyfig-sector-card{
    border-radius:20px;
  }
  .keyfig-hero,
  .keyfig-update-panel{
    padding:18px;
  }
  .keyfig-global-grid{
    grid-template-columns:1fr;
  }
  .keyfig-sector-title{
    font-size:20px;
  }
  .keyfig-sector-head{
    align-items:flex-start;
  }
  .keyfig-sector-main{
    margin:14px 14px 0;
    padding:14px 15px;
  }
  .keyfig-sector-top{
    padding:14px 14px 12px;
  }
  .keyfig-sector-body{
    padding:14px;
  }
  .keyfig-sector-list li{
    grid-template-columns:1fr;
    gap:4px;
  }
  .keyfig-metric-label{
    min-height:0;
  }
  [dir="rtl"] .keyfig-metric-label{
    min-height:0;
  }
  .keyfig-metric-value{
    text-align:left;
  }
  [dir="rtl"] .keyfig-metric-value{
    text-align:right;
    direction:rtl;
  }
}
