:root {
  --phit-bg: #f5f5f7;
  --phit-bg-dark: #101219;
  --phit-primary: #f08a24;   /* accent orange “peinture” */
  --phit-primary-soft: #ffe4c2;
  --phit-text: #22242c;
  --phit-muted: #6b7280;
  --phit-border: #e5e7eb;
  --phit-radius: 14px;
  --phit-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
  --phit-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* --------------------------------------------------
   Tables & status dots (dashboard/address)
--------------------------------------------------- */

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

th, td {
  border: 1px solid #ddd;
  padding: 0.5rem;
  text-align: left;
}

th {
  background: #f5f5f5;
}

.dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-right: 0.3rem;
  border: 1px solid #999;
  vertical-align: -2px;
}

/* État du système */
.sys-ok    { background: #3cb371; }
.sys-error { background: #e74c3c; }
.sys-off   { background: #bdc3c7; }

/* Risque */
.risk-low     { background: #3cb371; }
.risk-medium  { background: #f1c40f; }
.risk-high    { background: #e74c3c; }
.risk-unknown { background: #bdc3c7; }

/* Adresse: suggestions */
.address-form-wrapper {
  position: relative;
  max-width: 520px;
}

.suggestions {
  border: 1px solid #ccc;
  max-height: 200px;
  overflow-y: auto;
  background: #fff;
  position: absolute;
  z-index: 10;
  width: 100%;
}

.suggestion-item {
  padding: 0.3rem 0.5rem;
  cursor: pointer;
}

.suggestion-item:hover {
  background: #f0f0f0;
}

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

body {
  margin: 0;
  font-family: var(--phit-font);
  background: var(--phit-bg);
  color: var(--phit-text);
}

/* Page container (utilisé par les vues dashboard) */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.2rem;
}

.phit-card {
  background: #fff;
  border: 1px solid rgba(148,163,184,0.22);
  border-radius: var(--phit-radius);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
  padding: 1rem 1.1rem;
}

/* Header */

.phit-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(245,245,247,0.9);
  border-bottom: 1px solid rgba(148,163,184,0.18);
}

.phit-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.6rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.phit-logo {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  text-decoration: none;
  color: inherit;
}

.phit-logo-mark {
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  text-transform: uppercase;
}

.phit-logo-sub {
  font-size: 0.75rem;
  color: var(--phit-muted);
}

.phit-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.phit-nav a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--phit-muted);
  padding: 0.4rem 0.6rem;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s, transform 0.1s;
}

.phit-nav a:hover {
  color: var(--phit-text);
  background: rgba(148,163,184,0.12);
  transform: translateY(-1px);
}

.phit-nav a.phit-nav-active {
  color: var(--phit-text);
  background: rgba(240, 138, 36, 0.12);
  font-weight: 600;
}

/* Lien de menu mis en avant (Devis rapide) */
.phit-nav a.phit-nav-cta {
  background: var(--phit-primary);
  color: #fff;
  font-weight: 600;
  box-shadow: var(--phit-shadow);
}

.phit-nav a.phit-nav-cta:hover {
  background: #d67312;
  color: #fff;
  transform: translateY(-1px);
}


.phit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
}

.phit-btn-outline {
  border: 1px solid var(--phit-primary);
  color: var(--phit-primary);
  background: #fff;
}

.phit-btn-outline:hover {
  background: var(--phit-primary-soft);
}

.phit-btn-video {
  gap: 0.35rem;
  white-space: nowrap;
}


/* Burger mobile */

.phit-burger {
  display: none;
  border: none;
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
}

.phit-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.phit-admin-btn {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--phit-text);
  border: 1px solid rgba(148,163,184,0.4);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(148,163,184,0.08);
}

.phit-admin-btn:hover {
  background: rgba(148,163,184,0.16);
}

/* Responsive */

@media (max-width: 768px) {
  .phit-nav {
    position: fixed;
    inset: 60px 1.2rem auto 1.2rem;
    flex-direction: column;
    background: #fff;
    padding: 0.8rem;
    border-radius: var(--phit-radius);
    box-shadow: var(--phit-shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s;
  }
  .phit-nav.phit-nav-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .phit-burger {
    display: block;
  }
}

@media (max-width: 768px) {
  .phit-nav a.phit-nav-cta {
    width: 100%;
    justify-content: center;
  }
}


/* formulaire */

.phit-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;            /* espace vertical entre les lignes */
  align-items: stretch;
}

.phit-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.15rem;
}

.phit-form input,
.phit-form select,
.phit-form textarea {
  display: block;         /* chaque champ sur sa propre ligne */
  width: 100%;
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--phit-border);
  padding: 0.45rem 0.6rem;
  font: inherit;
  box-sizing: border-box;
}

.phit-form button[type="submit"] {
  align-self: flex-start; /* le bouton reste à gauche */
  margin-top: 0.4rem;
}


/* banner */

.banner {
  width: 100%;
  overflow: hidden;
}

.banner-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;

  /* ⬇️ Force le recadrage vers le bas */
/*  object-position: center bottom; */
object-position: center 90%;

}

/* Sur écrans laptop/desktop */
@media (min-width: 992px) {
  .banner {
    max-height: 220px; /* adapte selon ton goût */
  }
}



/* galerie de nos realisations */

/* Section globale */
.realisations {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.realisations h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.realisations-intro {
  margin-bottom: 1.5rem;
  color: #555;
}

/* Grille responsive */
.realisations-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* Carte image + légende */
.realisation-item {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  padding: 0.75rem;
}

.realisation-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.realisation-caption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #555;
}

/* Desktop : 2 ou 3 colonnes */
@media (min-width: 768px) {
  .realisations-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .realisations-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* correction */

.phit-btn-primary {
  background: var(--phit-primary);
  color: #fff;
  border: 1px solid var(--phit-primary);
  box-shadow: var(--phit-shadow);
}

.phit-btn-primary:hover {
  background: #d67312;
  color: #fff;
}


/* --- MENU ADMIN --- */

.admin-menu {
  margin: 20px 0;
  padding: 10px 0;
  border-bottom: 1px solid #ddd;
}

.admin-menu ul {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 25px;
}

.admin-menu a {
  text-decoration: none;
  font-size: 1.1rem;
  color: #444;
  padding: 4px 8px;
  border-radius: 4px;
  transition: 0.2s;
}

.admin-menu a:hover {
  background: #f0f0f0;
  color: #000;
}

.admin-menu a.active {
  font-weight: 600;
  text-decoration: underline;
}

.admin-login-form {
  max-width: 300px;
  margin: 40px auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.admin-login-form input {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
}
.admin-login-form button {
  padding: 10px;
  background: #ff8b00;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.admin-login-form button:hover {
  background: #e67a00;
}

/* (RPCB) styles admin bouton: défini près du header */

.aides-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.aide-card {
  display: block;
  padding: 16px;
  border: 2px solid #f39c12;
  border-radius: 10px;
  background: #fff;
  color: #333;
  text-decoration: none;
  transition: 0.2s ease;
}

.aide-card:hover {
  border-color: #000;
  background: #fef5e6;
}

.phit-title {
  border-left: 8px solid #f39c12;
  padding-left: 12px;
}


/* --------------------------------------------------
   UI Refresh (v4.3) — composants réutilisables
   Objectif: meilleure cohérence typographique + boutons/badges/kpis
--------------------------------------------------- */

html, body { height: 100%; }
body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { letter-spacing: -0.02em; }
h1 { font-size: 1.7rem; line-height: 1.15; margin: 0 0 0.35rem; }
h2 { font-size: 1.25rem; margin: 0 0 0.5rem; }
h3 { font-size: 1.05rem; margin: 0 0 0.35rem; }

.phit-page { min-height: 100%; }

.phit-section { display: grid; gap: 0.9rem; }
.phit-stack { display: grid; gap: 0.65rem; }
.phit-row { display:flex; align-items:center; justify-content:space-between; gap: 1rem; flex-wrap: wrap; }

.phit-muted { color: var(--phit-muted); }
.phit-small { font-size: 0.92rem; }
.phit-m0 { margin: 0 !important; }

.phit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.62rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(16,18,25,.14);
  background: #fff;
  color: var(--phit-text);
  text-decoration: none;
  font-weight: 650;
  transition: transform .08s, box-shadow .16s, background .16s, border-color .16s;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}
.phit-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12); }
.phit-btn:active { transform: translateY(0px); box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08); }

.phit-btn-primary { background: var(--phit-bg-dark); border-color: rgba(16,18,25,.22); color: #fff; }
.phit-btn-primary:hover { background: #0b0d12; }
.phit-btn-ghost { background: rgba(255,255,255,0.6); }

.phit-btn-group { display:flex; flex-wrap:wrap; gap: 0.55rem; align-items: center; }

.phit-kpi-grid { display:grid; grid-template-columns: 1fr; gap: 0.75rem; }
@media (min-width: 860px) { .phit-kpi-grid { grid-template-columns: 1fr 1fr; } }
.phit-kpi {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 1rem;
  padding: 0.95rem 1rem;
}
.phit-kpi .phit-kpi-title { font-weight: 750; }
.phit-kpi .phit-kpi-sub { color: var(--phit-muted); font-size: 0.92rem; margin-top: 0.15rem; }

.phit-badge {
  display:inline-flex;
  align-items:center;
  gap: 0.45rem;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  font-weight: 750;
  font-size: 0.9rem;
  border: 1px solid rgba(148,163,184,0.40);
  background: rgba(148,163,184,0.10);
  color: var(--phit-text);
}
.phit-badge-low { background: rgba(34,197,94,0.10); border-color: rgba(34,197,94,0.22); }
.phit-badge-medium { background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.26); }
.phit-badge-high { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.26); }
.phit-badge-critical { background: rgba(168,85,247,0.12); border-color: rgba(168,85,247,0.26); }
.phit-badge-unknown { background: rgba(148,163,184,0.10); border-color: rgba(148,163,184,0.30); color: var(--phit-muted); }

.phit-input, .phit-select, .phit-textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.35);
  background: rgba(255,255,255,0.85);
  outline: none;
}
.phit-input:focus, .phit-select:focus, .phit-textarea:focus {
  border-color: rgba(240,138,36,0.65);
  box-shadow: 0 0 0 4px rgba(240,138,36,0.18);
}

.phit-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 50;
  border: 1px solid rgba(148,163,184,0.35);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  max-height: 280px;
}
.phit-suggestions button {
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.75rem;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.phit-suggestions button:hover {
  background: rgba(148,163,184,0.12);
}


.muted{ color: var(--phit-muted); }

/* --- V1.0.2 polish + pilot status --- */
.phit-card-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
}
.phit-link{ text-decoration:none; }
.phit-link:hover{ text-decoration:underline; }

.phit-status{ margin-top: 8px; }
.phit-status-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.phit-kpi{
  background: rgba(255,255,255,.6);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px;
  padding: 12px 14px;
}
.phit-kpi-label{ font-size: .85rem; opacity: .7; margin-bottom: 6px; }
.phit-kpi-value{ font-size: 1.05rem; font-weight: 700; word-break: break-word; }
.phit-kpi-sub{ font-size: .9rem; opacity: .8; margin-top: 6px; }
.phit-kpi-pill{
  display:inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.04);
}
.phit-kpi-pill.ok{ background: rgba(0, 150, 70, .10); border-color: rgba(0, 150, 70, .25); }
.phit-kpi-pill.neutral{ background: rgba(0,0,0,.03); }

.phit-footnote{ margin-top: 12px; }

@media (min-width: 900px){
  .phit-container{ max-width: 980px; }
}


/* --- Pilot status mini cards (EU showcase) --- */
.phit-card-head h2{ margin: 0 0 6px 0; font-size: 1.1rem; }
.phit-small{ font-size: .92rem; }
.phit-actions{ display:flex; gap: 10px; align-items:center; flex-wrap: wrap; margin-top: 14px; }

.phit-btn-ghost{
  background: transparent;
  border: 1px solid rgba(0,0,0,.14);
}

.phit-grid{ display: grid; gap: 12px; }
.phit-grid-4{ grid-template-columns: 1fr; }
@media (min-width: 900px){
  .phit-grid-4{ grid-template-columns: repeat(4, 1fr); }
}

.phit-mini{
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.65);
  border-radius: 14px;
  padding: 12px 12px;
}
.phit-mini-k{ color: rgba(15,23,42,.70); font-weight: 700; font-size: .9rem; }
.phit-mini-v{ margin-top: 6px; font-weight: 800; font-size: 1.05rem; display:flex; align-items:center; gap: 10px; }

.phit-dot{
  width: 10px; height: 10px; border-radius: 999px; display:inline-block;
  border: 1px solid rgba(0,0,0,.18);
}
.phit-dot-ok{ background: rgba(0,150,70,.85); }
.phit-dot-warn{ background: rgba(234,179,8,.85); } /* amber */
.phit-dot-fail{ background: rgba(220,38,38,.85); } /* red */
