/* ============================================================
   TEV HUB — styles partagés (connexion + accueil)
   Charte atelier : noir profond + lime #a8c63c
   ============================================================ */
:root{
  --fond:#0c0d0b;
  --carte:#161714;
  --carte-2:#1d1f1a;
  --encre:#f2f3ee;
  --encre-soft:rgba(242,243,238,.62);
  --encre-faible:rgba(242,243,238,.32);
  --lime:#a8c63c;
  --lime-fonce:#7e9827;
  --coral:#e94f35;
  --ocean:#0f6e8c;
  --ocean-clair:#a0daee;
  --ocean-fonce:#0a3f52;
  --liseret:rgba(242,243,238,.09);
  --rouge:#e0604a;
  --rayon:22px;
}

*{box-sizing:border-box;}
html,body{height:100%;}
body{
  margin:0;
  min-height:100vh;
  background:
    radial-gradient(circle at 85% -5%, rgba(168,198,60,.13) 0%, transparent 42%),
    radial-gradient(circle at 0% 100%, rgba(15,110,140,.12) 0%, transparent 45%),
    var(--fond);
  font-family:'Inter',-apple-system,BlinkMacSystemFont,sans-serif;
  color:var(--encre);
  display:flex;
  flex-direction:column;
}

.page{
  width:100%;
  max-width:760px;
  margin:0 auto;
  flex:1;
  display:flex;
  flex-direction:column;
  padding:22px 22px 44px;
}

/* ---------- barre du haut ---------- */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:30px;
  min-height:36px;
}
.topbar img{height:30px;width:auto;opacity:.95;}
.topbar .actions{display:flex;gap:10px;}
.topbar button, .topbar a.btn{
  font-family:inherit;
  font-size:12.5px;
  font-weight:600;
  letter-spacing:.03em;
  padding:8px 14px;
  border-radius:10px;
  border:1px solid var(--liseret);
  background:var(--carte);
  color:var(--encre);
  cursor:pointer;
  text-decoration:none;
  transition:border-color .15s ease;
}
.topbar button:hover, .topbar a.btn:hover{border-color:var(--encre-faible);}

/* ---------- salutation ---------- */
.salut{
  display:flex;
  align-items:center;
  gap:16px;
  margin-bottom:22px;
}
.avatar{
  border-radius:50%;
  object-fit:cover;
  flex:none;
  box-shadow:0 0 0 2px var(--fond), 0 0 0 4px var(--lime);
}
.avatar-ini{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(150deg, var(--lime), var(--lime-fonce));
  color:#141509;
  font-family:'Space Grotesk',sans-serif;
  font-weight:700;
}
.salut .textes h1{
  margin:0;
  font-family:'Space Grotesk',sans-serif;
  font-size:27px;
  font-weight:600;
  letter-spacing:-.01em;
  line-height:1.15;
}
.salut .textes .date{
  margin-top:4px;
  font-size:13.5px;
  color:var(--encre-soft);
}

/* ---------- cartes ---------- */
.cartes{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(150px, 1fr));
  gap:12px;
  margin-bottom:34px;
}
.carte{
  background:var(--carte);
  border:1px solid var(--liseret);
  border-radius:var(--rayon);
  padding:16px 17px;
  display:flex;
  flex-direction:column;
  gap:5px;
  min-height:104px;
}
.carte .titre{
  display:flex;
  align-items:center;
  gap:7px;
  font-size:12px;
  font-weight:600;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:var(--encre-soft);
}
.carte .valeur{
  font-family:'Space Grotesk',sans-serif;
  font-size:27px;
  font-weight:700;
  letter-spacing:-.01em;
  line-height:1.1;
}
.carte .valeur small{
  font-size:15px;
  font-weight:600;
  color:var(--encre-soft);
}
.carte .detail{
  font-size:12.5px;
  color:var(--encre-soft);
  line-height:1.45;
}
.carte .detail b{color:var(--lime);font-weight:600;}
.carte.meteo .valeur{color:var(--lime);}
.carte.a-venir{
  border-style:dashed;
  border-color:rgba(242,243,238,.14);
  background:transparent;
}
.carte.a-venir .valeur{color:var(--encre-faible);}
.carte.a-venir .badge-bientot{
  align-self:flex-start;
  margin-top:auto;
  font-size:10.5px;
  font-weight:600;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--encre-faible);
  border:1px solid rgba(242,243,238,.14);
  border-radius:99px;
  padding:3px 9px;
}

/* ---------- sections d'apps ---------- */
.section{margin-bottom:36px;}
.section-label{
  display:flex;
  align-items:center;
  gap:11px;
  margin:0 2px 20px;
}
.section-label .dot{width:8px;height:8px;border-radius:50%;flex:none;}
.section-label.client .dot{background:var(--ocean-clair);}
.section-label.interne .dot{background:var(--lime);}
.section-label .txt{
  font-family:'Space Grotesk',sans-serif;
  font-size:12.5px;
  font-weight:600;
  letter-spacing:.09em;
  text-transform:uppercase;
  color:var(--encre-soft);
}
.section-label .line{flex:1;height:1px;background:var(--liseret);}

.app-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(92px, 1fr));
  gap:26px 16px;
}
.app-icon{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:11px;
  text-decoration:none;
  -webkit-tap-highlight-color:transparent;
}
.app-icon .tile{
  width:84px;height:84px;border-radius:21px;
  display:flex;align-items:center;justify-content:center;
  transition:transform .18s cubic-bezier(.2,.7,.3,1), box-shadow .18s ease;
  box-shadow:0 14px 24px -14px rgba(0,0,0,.8), 0 0 0 1px rgba(242,243,238,.07) inset;
}
.app-icon:hover .tile{transform:translateY(-4px);}
.app-icon:active .tile{transform:translateY(-1px) scale(.96);}
.app-icon .label{
  font-size:12.5px;font-weight:500;color:var(--encre-soft);
  text-align:center;line-height:1.3;max-width:96px;
}
.tile-interne{
  background:linear-gradient(150deg, var(--lime), var(--lime-fonce) 70%);
}
.tile-client{
  background:linear-gradient(155deg, var(--ocean-clair), var(--ocean) 58%, var(--ocean-fonce));
}
.tile svg{width:40px;height:40px;}

.vide{
  text-align:center;
  color:var(--encre-faible);
  font-size:14px;
  padding:34px 0 8px;
  line-height:1.6;
}

footer{
  margin-top:auto;
  padding-top:34px;
  text-align:center;
  font-size:11.5px;
  color:var(--encre-faible);
  letter-spacing:.03em;
}

/* ---------- page de connexion ---------- */
.ecran-connexion{
  align-items:center;
  justify-content:center;
  padding:24px;
}
.panneau{
  width:100%;
  max-width:380px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:26px;
}
.panneau > img{height:56px;width:auto;}
.panneau h1{
  margin:0;
  font-family:'Space Grotesk',sans-serif;
  font-size:21px;
  font-weight:600;
  letter-spacing:-.01em;
}
.panneau form{
  width:100%;
  background:var(--carte);
  border:1px solid var(--liseret);
  border-radius:var(--rayon);
  padding:26px 24px;
  display:flex;
  flex-direction:column;
  gap:16px;
}
.panneau label{
  font-size:12px;
  font-weight:600;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:var(--encre-soft);
  display:flex;
  flex-direction:column;
  gap:7px;
}
.panneau input{
  font-family:inherit;
  font-size:16px;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid var(--liseret);
  background:var(--fond);
  color:var(--encre);
  outline:none;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.panneau input:focus{
  border-color:var(--lime);
  box-shadow:0 0 0 3px rgba(168,198,60,.18);
}
.panneau button{
  font-family:'Space Grotesk',sans-serif;
  font-size:15px;
  font-weight:700;
  letter-spacing:.02em;
  padding:13px;
  border:none;
  border-radius:12px;
  background:var(--lime);
  color:#141509;
  cursor:pointer;
  transition:transform .12s ease, opacity .15s ease;
}
.panneau button:hover{transform:translateY(-1px);}
.panneau button:disabled{opacity:.55;cursor:default;transform:none;}
.panneau .erreur{
  display:none;
  font-size:13.5px;
  line-height:1.45;
  color:var(--rouge);
  background:rgba(224,96,74,.1);
  border:1px solid rgba(224,96,74,.3);
  border-radius:10px;
  padding:10px 12px;
}
.panneau .note{
  font-size:12.5px;
  color:var(--encre-faible);
  text-align:center;
  line-height:1.5;
}

@media (max-width:440px){
  .page{padding:16px 16px 34px;}
  .salut .textes h1{font-size:23px;}
  .app-grid{grid-template-columns:repeat(auto-fill, minmax(82px, 1fr));gap:22px 12px;}
  .app-icon .tile{width:74px;height:74px;border-radius:18px;}
  .tile svg{width:34px;height:34px;}
}

/* ---------- écran d'administration ---------- */
.admin-titre{
  font-family:'Space Grotesk',sans-serif;
  font-size:25px;
  font-weight:600;
  letter-spacing:-.01em;
  margin:0 0 6px;
}
.admin-sous{
  font-size:13.5px;
  color:var(--encre-soft);
  line-height:1.55;
  margin:0 0 26px;
}
.admin-sous b{color:var(--lime);font-weight:600;}

.bloc{
  background:var(--carte);
  border:1px solid var(--liseret);
  border-radius:var(--rayon);
  padding:18px;
  margin-bottom:16px;
}
.bloc .entete{
  display:flex;
  align-items:center;
  gap:13px;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.bloc .entete .infos{flex:1;min-width:0;}
.bloc .entete .nom{
  font-family:'Space Grotesk',sans-serif;
  font-size:16.5px;
  font-weight:600;
  display:flex;
  align-items:center;
  gap:9px;
  flex-wrap:wrap;
}
.bloc .entete .mail{
  font-size:12.5px;
  color:var(--encre-soft);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.badge{
  font-size:10.5px;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  border-radius:99px;
  padding:3px 9px;
}
.badge.admin{background:rgba(168,198,60,.16);color:var(--lime);}
.badge.inactif{background:rgba(224,96,74,.14);color:var(--rouge);}
.bloc .chevron{
  color:var(--encre-faible);
  transition:transform .18s ease;
  flex:none;
}
.bloc.ouvert .chevron{transform:rotate(180deg);}

.bloc .corps{display:none;margin-top:18px;}
.bloc.ouvert .corps{display:block;}

.champs{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
  gap:12px;
  margin-bottom:16px;
}
.champ{display:flex;flex-direction:column;gap:6px;}
.champ label{
  font-size:11px;
  font-weight:600;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:var(--encre-soft);
}
.champ input, .champ select{
  font-family:inherit;
  font-size:14.5px;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid var(--liseret);
  background:var(--fond);
  color:var(--encre);
  outline:none;
  width:100%;
}
.champ input:focus, .champ select:focus{
  border-color:var(--lime);
  box-shadow:0 0 0 3px rgba(168,198,60,.15);
}

.acces-titre{
  font-size:11px;
  font-weight:600;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:var(--encre-soft);
  margin:0 0 10px;
}
.coches{display:flex;flex-wrap:wrap;gap:9px;margin-bottom:16px;}
.coche{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:13.5px;
  padding:9px 13px;
  border-radius:11px;
  border:1px solid var(--liseret);
  background:var(--fond);
  cursor:pointer;
  user-select:none;
  transition:border-color .15s ease, background .15s ease;
}
.coche input{accent-color:var(--lime);width:16px;height:16px;margin:0;cursor:pointer;}
.coche.on{border-color:rgba(168,198,60,.5);background:rgba(168,198,60,.08);}
.coche.off-tout{opacity:.55;}
.acces-note{
  font-size:12.5px;
  color:var(--encre-soft);
  margin-bottom:16px;
}

.actions-ligne{display:flex;gap:10px;align-items:center;flex-wrap:wrap;}
.btn-lime{
  font-family:'Space Grotesk',sans-serif;
  font-size:13.5px;
  font-weight:700;
  padding:10px 18px;
  border:none;
  border-radius:11px;
  background:var(--lime);
  color:#141509;
  cursor:pointer;
  transition:transform .12s ease, opacity .15s ease;
}
.btn-lime:hover{transform:translateY(-1px);}
.btn-lime:disabled{opacity:.5;cursor:default;transform:none;}
.btn-ghost{
  font-family:inherit;
  font-size:13px;
  font-weight:600;
  padding:10px 15px;
  border-radius:11px;
  border:1px solid var(--liseret);
  background:transparent;
  color:var(--encre);
  cursor:pointer;
}
.btn-ghost:hover{border-color:var(--encre-faible);}
.retour-etat{
  font-size:13px;
  color:var(--lime);
}
.retour-etat.err{color:var(--rouge);}

.section-admin{margin:34px 0 0;}
.section-admin h2{
  font-family:'Space Grotesk',sans-serif;
  font-size:13px;
  font-weight:600;
  letter-spacing:.09em;
  text-transform:uppercase;
  color:var(--encre-soft);
  display:flex;
  align-items:center;
  gap:11px;
  margin:0 2px 18px;
}
.section-admin h2::after{content:"";flex:1;height:1px;background:var(--liseret);}
