: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;
}
