/* Design system app : lean, clair, beaucoup de blanc · inspiré Linear/Stripe/Apple
   dans la construction (bordures fines, ombres douces, espace généreux), mais avec
   les couleurs DRYOS (navy/teal) comme seul accent, pas de dark mode ni de néon. */
:root {
  --navy: #00434A;
  --emerald: #0F6670;
  --nature: #1C8F99;
  --bg-light: #FAFAFA;
  --cream: #FBF7EE;
  --white: #FFFFFF;
  --ink-soft: #64748B;
  --border: rgba(15, 23, 42, 0.08);
  --border-soft: rgba(15, 23, 42, 0.05);
  --danger: #B3554A;
  --success: #1C8F99;
  --warning: #B98900;

  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 2px 4px rgba(15, 23, 42, 0.05), 0 8px 24px rgba(15, 23, 42, 0.09);
  --transition: all 0.18s ease;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Montserrat", "Segoe UI", Arial, sans-serif;
  color: var(--navy);
  background: var(--bg-light);
  line-height: 1.6;
}

.app-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.app-header .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--navy); text-decoration: none; }
.app-header .brand img { width: 32px; height: 32px; }

.logout-link {
  color: var(--ink-soft);
  font-size: 0.85rem;
  text-decoration: none;
  font-weight: 600;
}
.logout-link:hover { color: var(--danger); }

/* Nav principale : barre d'onglets fixée en bas sur mobile (comme une vraie app),
   barre horizontale dans le header sur desktop. Priorité au mobile : c'est l'usage principal. */
.app-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  z-index: 20;
}
.app-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 2px;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.68rem;
  transition: var(--transition);
}
.app-nav a svg { width: 21px; height: 21px; }
.app-nav a.active, .app-nav a:hover { color: var(--nature); }

.app-main {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 20px 96px; /* marge basse pour ne pas passer sous la barre d'onglets mobile */
}

@media (min-width: 768px) {
  .app-nav {
    position: sticky;
    top: 61px; /* juste sous le header */
    bottom: auto;
    left: auto;
    right: auto;
    border-top: none;
    border-bottom: 1px solid var(--border);
    padding: 8px max(20px, calc((100% - 880px) / 2 + 20px));
    gap: 4px;
    justify-content: flex-start;
  }
  .app-nav a {
    flex-direction: row;
    flex: none;
    padding: 8px 14px;
    font-size: 0.92rem;
  }
  .app-nav a svg { width: 16px; height: 16px; }
  .app-nav a.active, .app-nav a:hover { background: var(--bg-light); }
  .app-main { padding-bottom: 40px; }
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.card h2 { margin-top: 0; font-size: 1.1rem; }
.card .eyebrow { display: block; width: fit-content; }

/* Variante douce pour les cartes qui méritent un peu de couleur de marque (ex : bloc
   d'installation) sans passer par le gros bandeau dégradé réservé au marketing. */
.card.accent-soft {
  background: linear-gradient(180deg, rgba(28, 143, 153, 0.06), rgba(28, 143, 153, 0) 60%);
  border-color: rgba(28, 143, 153, 0.18);
}

/* Cartes cliquables (ex : liste des biens sur l'accueil) : léger effet de surélévation
   au survol pour signaler que c'est interactif, sans jamais être criard. */
a.card:hover, a.card:focus-visible {
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
  border-color: rgba(15, 23, 42, 0.12);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--nature);
  color: var(--white);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}
.btn:hover { background: var(--emerald); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.secondary { background: var(--bg-light); color: var(--navy); border: 1px solid var(--border); }
.btn.ghost { background: transparent; color: var(--nature); padding: 6px 10px; font-size: 0.82rem; }
.btn.ghost:hover { background: var(--bg-light); transform: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: 0.85rem; margin-bottom: 6px; }
.field input, .field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--nature);
  box-shadow: 0 0 0 3px rgba(28, 143, 153, 0.12);
}

.alert-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 10px;
}
.alert-item.urgent { background: #FBF1EF; border-color: #ECD3CE; }
.alert-item.ok { background: #EAF4F5; border-color: #C6E1E3; }
.alert-item .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.alert-item.urgent .dot { background: var(--danger); }
.alert-item.ok .dot { background: var(--nature); }

.install-tip {
  background: var(--bg-light);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.stub-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 12px;
}

.doc-list { list-style: none; padding: 0; margin: 0; }
.doc-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.doc-list li:last-child { border-bottom: none; }
.doc-list a { text-decoration: none; font-weight: 600; }
.doc-list a:hover { color: var(--nature); }

/* Rappels de gestion : même logique visuelle que .alert-item, avec un bouton "Fait"
   pour valider en un clic (l'app ne demande jamais plus que ça). */
.rappel-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 10px;
  background: var(--white);
}
.rappel-item.urgent { background: #FBF1EF; border-color: rgba(179, 85, 74, 0.18); }
.rappel-item .rappel-texte { flex: 1; }
.rappel-item .rappel-titre { font-weight: 700; font-size: 0.92rem; }
.rappel-item .rappel-pourquoi { color: var(--ink-soft); font-size: 0.8rem; margin-top: 2px; }

/* État vide : centré, discret, jamais un simple texte perdu dans le vide. */
.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--ink-soft);
}
.empty-state svg { width: 32px; height: 32px; margin-bottom: 10px; opacity: 0.5; }
.empty-state p { margin: 0; font-size: 0.9rem; }

/* Chargement : placeholders qui pulsent doucement plutôt qu'un écran vide qui bloque. */
@keyframes skeleton-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.skeleton {
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}

/* ==========================================================================
   Landing page (index.html) : identité DRYOS complète (couleurs, ton, preuve),
   pas une simple suite de cards blanches. Réservé à cette page : le dashboard
   (app.html et les pages internes) garde son fond neutre pour un usage quotidien.
   ========================================================================== */
body.landing { background: var(--cream); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--emerald);
  background: rgba(15, 102, 112, 0.08);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--nature); flex-shrink: 0; }
.eyebrow.on-dark { color: var(--cream); background: rgba(255, 255, 255, 0.14); }
.eyebrow.on-dark::before { background: var(--cream); }

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--emerald) 62%, var(--nature) 100%);
  border-radius: var(--radius-lg);
  padding: 44px 28px;
  margin-bottom: 20px;
  color: var(--white);
  box-shadow: var(--shadow);
  text-align: center;
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 70%);
}
.hero::before { width: 320px; height: 320px; top: -140px; right: -100px; }
.hero::after { width: 220px; height: 220px; bottom: -120px; left: -60px; }
.hero > * { position: relative; z-index: 1; }
.hero h1 { margin: 0 0 14px; font-size: clamp(1.5rem, 4vw + 0.5rem, 2.3rem); max-width: 620px; margin-left: auto; margin-right: auto; }
.hero p.lead { color: rgba(255, 255, 255, 0.88); font-size: 1rem; max-width: 480px; margin: 0 auto 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero-trust { margin: 20px 0 0; font-size: 0.82rem; color: rgba(255, 255, 255, 0.75); }
.btn.on-dark { background: var(--white); color: var(--navy); }
.btn.on-dark:hover { background: var(--cream); }
.btn.ghost-on-dark { background: rgba(255, 255, 255, 0.1); color: var(--white); border: 1px solid rgba(255, 255, 255, 0.35); }
.btn.ghost-on-dark:hover { background: rgba(255, 255, 255, 0.18); }

.section-head { text-align: center; max-width: 560px; margin: 0 auto 28px; }
.section-head h2 { margin-bottom: 10px; }
.section-head p { margin: 0; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: var(--transition);
}
.feature-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(28, 143, 153, 0.12);
  color: var(--nature);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  flex-shrink: 0;
}
.feature-icon svg { width: 21px; height: 21px; }
.feature-card h3 { margin: 0 0 6px; font-size: 1rem; }
.feature-card p { margin: 0; color: var(--ink-soft); font-size: 0.88rem; }

.trust-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  text-align: center;
}
.trust-strip .trust-item { padding: 4px 8px; }
.trust-strip .trust-item strong { display: block; font-size: 0.92rem; margin-bottom: 4px; }
.trust-strip .trust-item span { font-size: 0.82rem; color: var(--ink-soft); }

.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 24px 0 8px;
}
.price-tier {
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 10px;
  background: var(--bg-light);
}
.price-tier.featured {
  border-color: var(--nature);
  background: rgba(28, 143, 153, 0.07);
  box-shadow: 0 0 0 1px var(--nature) inset;
}
.price-tier .price-label { font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); }
.price-tier .price-amount { font-size: 1.4rem; font-weight: 800; margin: 6px 0 2px; color: var(--navy); }
.price-tier .price-amount small { font-size: 0.68rem; font-weight: 600; color: var(--ink-soft); }
.price-tier .price-badge {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--nature);
  background: rgba(28, 143, 153, 0.12);
  padding: 3px 8px;
  border-radius: 999px;
}

.cta-banner {
  background: linear-gradient(135deg, var(--navy), var(--emerald));
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  color: var(--white);
}
.cta-banner h2 { color: var(--white); margin-bottom: 8px; }
.cta-banner p { color: rgba(255, 255, 255, 0.85); margin: 0 0 22px; }

.landing-footer {
  text-align: center;
  padding: 28px 16px 8px;
  color: var(--ink-soft);
  font-size: 0.82rem;
}
.landing-footer a { color: var(--nature); font-weight: 700; text-decoration: none; }
.landing-footer a:hover { text-decoration: underline; }

@media (min-width: 640px) {
  .hero { padding: 60px 48px; text-align: left; }
  .hero h1, .hero p.lead { margin-left: 0; margin-right: 0; }
  .hero-cta { justify-content: flex-start; }
}
