:root {
  /* Couleurs du Fonds d'Entretien Routier (FER Mali) : rouge principal, marine secondaire */
  --fond: #f3f5f9;
  --panneau: #ffffff;
  --texte: #122b4c;        /* bleu marine du logo (textes) */
  --doux: #5f6f86;
  --ligne: #dfe4ec;
  --accent: #e3161e;       /* rouge du logo */
  --accent-fonce: #b3121a; /* rouge lisible sur fond clair */
  --accent-clair: #fde8e9;
  --entete: #e3161e;       /* rouge du logo : couleur principale */
  --secondaire: #122b4c;   /* bleu marine du logo : couleur secondaire */
  /* Bande tricolore (vert, jaune, rouge) reprise du logo */
  --vert: #14b53a;
  --jaune: #fcd116;
  --rouge: #ce1126;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--texte);
  background: var(--fond);
}

/* En-tête */
.entete {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background:
    linear-gradient(to right,
      var(--vert) 0 33.34%, var(--jaune) 33.34% 66.67%, var(--rouge) 66.67% 100%)
      left bottom / 100% 3px no-repeat,
    linear-gradient(#fff, #fff) left bottom 3px / 100% 1px no-repeat,
    var(--entete);
  color: #fff;
}
.marque { display: flex; align-items: center; gap: 10px; }
.marque small { display: block; color: #fff; font-size: 12px; }
.logo {
  display: block;
  height: 40px; width: auto;
  padding: 3px 6px;
  border-radius: 6px;
  background: #fff;
}
.btn-menu {
  display: none;
  background: none; border: 0; color: #fff;
  font-size: 22px; cursor: pointer;
}

/* Disposition */
.corps {
  display: flex;
  height: calc(100% - 56px);
}

.panneau {
  width: 260px;
  flex-shrink: 0;
  background: var(--panneau);
  border-right: 1px solid var(--ligne);
  display: flex;
  flex-direction: column;
  padding: 14px;
  gap: 12px;
  overflow-y: auto;
}

#recherche {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--ligne);
  border-radius: 8px;
  font-size: 14px;
}
#recherche:focus { outline: 2px solid var(--accent); border-color: transparent; }

.site h3 {
  margin: 10px 0 6px;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-fonce);
}

.equipement {
  width: 100%;
  text-align: left;
  padding: 9px 11px;
  margin-bottom: 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 14px;
  color: var(--texte);
  cursor: pointer;
}
.equipement:hover { background: var(--accent-clair); color: var(--accent-fonce); }
.equipement.actif,
.equipement.actif:hover {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.info, .erreur { font-size: 13px; color: var(--doux); }
.erreur { color: #b42318; }

/* Zone principale */
.zone {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.barre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--panneau);
  border-bottom: 2px solid var(--accent);
}
.barre h1 { margin: 0; font-size: 16px; font-weight: 600; color: var(--secondaire); }
.actions { display: flex; gap: 8px; }
.actions button {
  padding: 7px 12px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: #fff;
  color: var(--accent-fonce);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.actions button:disabled { opacity: .45; cursor: default; }
.actions button:not(:disabled):hover { background: var(--accent); color: #fff; }

.cadre { position: relative; flex: 1; }
.cadre iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
  background: #fff;
}
.vide, .chargement {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--doux);
  font-size: 14px;
  text-align: center;
  padding: 20px;
}
.chargement { background: rgba(243, 245, 249, .85); z-index: 1; }

[hidden] { display: none !important; }

/* Mobile */
@media (max-width: 760px) {
  .btn-menu { display: block; }
  .panneau {
    position: fixed;
    top: 56px; bottom: 0; left: 0;
    z-index: 10;
    transform: translateX(-100%);
    transition: transform .2s ease;
    box-shadow: 4px 0 18px rgba(0, 0, 0, .12);
  }
  .panneau.ouvert { transform: none; }
  .actions button { padding: 7px 9px; }
  .barre h1 { font-size: 14px; }
}
