:root{
  --bleu: #002f6c;
  --or: #f2a900;

  --bg1: #061023;
  --bg2: #0b1220;

  --card: rgba(255,255,255,0.95);
  --card2: rgba(255,255,255,0.90);

  --text: #101828;
  --muted: #667085;

  --border: rgba(16,24,40,0.10);
  --line: rgba(16,24,40,0.14);

  --shadow-lg: 0 18px 50px rgba(0,0,0,0.30);
  --shadow-md: 0 10px 28px rgba(0,0,0,0.14);

  --radius-xl: 18px;
  --radius-lg: 14px;

  --danger: #d32f2f;

  /* pour index si tu veux encore l'image */
  --bg-image: url("../img/background.jpg");
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
[v-cloak] {
  display: none !important;
}
body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.boot-loader{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #061023;
  z-index: 9999;
}

[v-cloak] + .boot-loader{
  display: flex;
}

#app:not([v-cloak]) + .boot-loader{
  display: none;
}


/* Image (utilisée sur index si besoin) */
body::before{
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.55;
  filter: blur(4px) saturate(1.05) contrast(1.05);
  transform: scale(1.06);
  z-index: -2;
  pointer-events: none;
}

/* Dégradé bleu */
body::after{
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 520px at 15% 10%, rgba(242,169,0,0.14), transparent 55%),
    radial-gradient(900px 520px at 85% 25%, rgba(0,47,108,0.30), transparent 55%),
    linear-gradient(180deg, rgba(6,16,35,0.92) 0%, rgba(11,18,32,0.92) 55%, rgba(6,11,23,0.94) 100%);
  z-index: -1;
  pointer-events: none;
  opacity: 0.6;
}

/* ✅ DETAILS: dégradé bleu uniquement */
body.no-bg-image::before{
  display: none;
}
body.no-bg-image::after{
  background:
    radial-gradient(900px 520px at 15% 10%, rgba(242,169,0,0.14), transparent 55%),
    radial-gradient(900px 520px at 85% 25%, rgba(0,47,108,0.30), transparent 55%),
    linear-gradient(
      180deg,
      rgba(6,16,35,0.96) 0%,
      rgba(11,18,32,0.96) 55%,
      rgba(6,11,23,0.97) 100%
    );
}

/* Page layout (index centré) */
.page{
  min-height: 100vh;
  padding: clamp(12px, 2.4vw, 24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* index centré */
  gap: 14px;
}

/* Details doit scroller */
.page.page-details{
  justify-content: flex-start;
}

.container{
  width: min(1200px, 100%);
}

/* =========================
   TOPBAR PRO (logo gauche, texte centré)
========================= */
.topbar{
  width: min(1200px, 100%);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;

  padding: 14px 16px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,0.14);
  background: #f3f3f4;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

.topbar-left{ display:flex; align-items:center; }
.topbar-logo{ width: 194px; height:auto; }

.topbar-center{
  text-align: center;
  color: #002f6c;
  min-width: 0;
}
.topbar-center .topbar-title{
  font-size: 28px;
  font-weight: 950;
  letter-spacing: 0.3px;
  line-height: 1.15;
}
.topbar-center .topbar-sub{
  margin-top: 2px;
  font-size: 18px;
  opacity: 0.86;
  font-weight: 650;
}

.topbar-right{ display:flex; justify-content:flex-end;width: 194px; }

/* Buttons */
button{
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 950;
  cursor: pointer;
  transition: transform .12s ease, background .2s ease, opacity .2s ease;
}
button:disabled{ opacity: .6; cursor: not-allowed; }

.btn-ghost{
  background: #002f6c;
  border: 1px solid rgba(255,255,255,0.18);
  color: white;
}
.btn-ghost:hover{ background: rgba(255,255,255,0.16); transform: translateY(-1px); }

/* =========================
   INDEX CARD
========================= */
.card{
  width: min(900px, 100%);
  background: var(--card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: clamp(16px, 3vw, 26px);
}

.brand{ display:flex; gap:16px; align-items:center; }
.brand-logo{ width:140px; height:auto; }

.title{
  margin:0;
  font-size: clamp(22px, 2.4vw, 30px);
  color: var(--bleu);
}

.subtitle{
  margin:6px 0 0 0;
  color: var(--muted);
  font-weight:650;
  line-height:1.35;
}

.notice{
  margin: 16px 0 18px 0;
  padding: 12px 14px;
  border-left: 4px solid var(--or);
  background: rgba(242,169,0,0.10);
  border-radius: 12px;
  color: #3a2a00;
}

.form{ display:flex; flex-direction:column; gap:10px; margin-top: 6px; }
label{ font-weight:950; color: var(--bleu); }
.input-row{ display:grid; grid-template-columns: 1fr auto; gap:10px; }

input{
  width: 100%;
  padding: 14px 14px;
  border-radius: 12px;
  border: 1px solid rgba(16,24,40,0.16);
  background: white;
  font-size: 15px;
  outline: none;
}
input:focus{
  border-color: rgba(0,47,108,0.55);
  box-shadow: 0 0 0 4px rgba(0,47,108,0.12);
}

.form button{
  min-width: 120px;
  background: var(--bleu);
  color: white;
}
.form button:hover{ background: var(--or); transform: translateY(-1px); }

.help{ margin:0; color: var(--muted); font-size:15px; font-weight:650; }

.error{
  margin-top: 10px;
  padding: 12px 14px;
  background: rgba(211,47,47,0.10);
  border: 1px solid rgba(211,47,47,0.28);
  color: var(--danger);
  border-radius: 12px;
  font-weight: 950;
}

/* =========================
   DETAILS GRID
========================= */
.grid{
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 16px;
}

.panel{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 18px;
  min-width: 0;
}

.panel-right{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.panel-header{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap:10px;
  margin-bottom: 10px;
}

.panel-header h2{
  margin:0;
  color: var(--bleu);
  font-size: 28px; /* + grand */
  font-weight: 950;
}

.badge{
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 950;
  font-size: 12px;
  border: 1px solid rgba(16,24,40,0.10);
}
.badge.info{ background: rgba(0,47,108,0.10); color: var(--bleu); }
.badge.warn{ background: rgba(242,169,0,0.16); color: #4a3000; }
.badge.ok{ background: rgba(46,125,50,0.14); color: #2e7d32; }

/* ✅ Textes plus grands */
.details{
  font-size: 16px;
  line-height: 1.6;
  color:#344054;
  word-break: break-word;
}
.details p{ margin: 12px 0; font-size: 20px; }
.details strong{ color: var(--bleu); font-weight: 950; font-size: 20px; }
.status{ font-weight: 950; color:#0f172a; font-size: 20px; }

/* Progress */
.progress-row{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap:10px;
}
.progress-row h2{
  margin:0;
  color: var(--bleu);
  font-size: 20px;
  font-weight: 950;
}
.muted{ color: var(--muted); font-weight: 850; }

.progress-bar{
  width:100%;
  height:14px;
  background: rgba(16,24,40,0.10);
  border-radius: 999px;
  overflow:hidden;
}
.progress{
  height:100%;
  background: linear-gradient(90deg, var(--or), #ffd46a);
  transition: width .6s ease;
}

/* KPI */
.kpi-grid{ display:grid; grid-template-columns: 1fr 1fr; gap:10px; }
.kpi{
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 12px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}
.kpi-wide{ grid-column: 1 / -1; }

.kpi-label{
  font-size: 16px;
  color: var(--muted);
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.kpi-value{
  margin-top: 6px;
  font-weight: 950;
  color: #1d2939;
  line-height: 1.2;
  font-size: 16px;
}
.kpi-sub{
  margin-top: 6px;
  font-size: 15px;
  color: var(--muted);
  font-weight: 750;
}

/* Timeline */
.section-title{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap:10px;
}
.section-title h3{
  margin:0;
  color: var(--bleu);
  font-size: 16px;
  font-weight: 950;
}
.section-title small{ color: var(--muted); font-weight: 850; }

.timeline{
  position: relative;
  display:flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
}
.timeline::before{
  content:"";
  position:absolute;
  left: 11px;
  top:0;
  bottom:0;
  width:2px;
  background: var(--line);
}
.step{
  display:grid;
  grid-template-columns: 26px 1fr;
  column-gap: 12px;
  align-items: start;
}
.marker{
  width:16px;
  height:16px;
  border-radius: 50%;
  background: #e4e7ec;
  border: 3px solid #d0d5dd;
  margin-top: 2px;
  z-index: 2;
}
.step.completed .marker{ background: var(--or); border-color: var(--or); }
.step.current .marker{ background: var(--bleu); border-color: var(--bleu); box-shadow: 0 0 0 6px rgba(0,47,108,0.10); }

.step-body p{
  margin:0;
  font-weight: 900;
  color:#1d2939;
  line-height: 1.25;
  word-break: break-word;
  font-size: 15.5px;
}
.step-body small{
  display:block;
  margin-top:4px;
  color: var(--muted);
  font-weight: 750;
  font-size: 15px;
}
.btn-ghost:hover {
  background: var(--or) ;
}
.page-index{
  justify-content: center;
}
/* Map */
#map{
  width:100%;
  height: 360px;
  border-radius: var(--radius-lg);
  margin-top: 10px;
  border: 1px solid var(--border);
  overflow:hidden;
}

.page-footer{
  text-align:center;
  margin-top: 18px;
  color: rgba(255,255,255,0.72);
  font-size: 15px;
  font-weight: 750;
}

/* Skeleton */
.skeleton-line{
  height: 14px;
  border-radius: 10px;
  background: linear-gradient(90deg, #eee, #f6f6f6, #eee);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
  margin: 12px 0;
}
@keyframes shimmer{
  0%{ background-position: 200% 0; }
  100%{ background-position: -200% 0; }
}

/* Responsive */
@media (max-width: 980px){
  .grid{ grid-template-columns: 1fr; }
  #map{ height: 320px; }

  .page{ justify-content: flex-start; } /* scroller sur tablette */
}

@media (max-width: 600px){
  .topbar{
    grid-template-columns: 1fr;
    row-gap: 10px;
    text-align: center;
  }
  .topbar-left, .topbar-right{ justify-self: center; justify-content: center; }
  .topbar-logo{ width: 86px; }

  .page-index{
    min-height: 100vh;
    padding: 16px;
    justify-content: center;
  }

  .page-index .card{
    width: 100%;
    max-width: 420px;      /* ✅ largeur propre sur mobile */
    margin: 0 auto;
  }

  .brand{
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .brand-logo{
    width: 120px;
  }

  .title{
    font-size: 24px;
  }

  .subtitle{
    font-size: 14px;
  }
}

@media (max-width: 560px){
  .brand{ flex-direction: column; align-items: flex-start; }
  .brand-logo{ width: 120px; }

  .input-row{ grid-template-columns: 1fr; }
  .form button{ width: 100%; }

  .panel{ padding: 16px; }

  .kpi-grid{ grid-template-columns: 1fr; }
  .kpi-wide{ grid-column: auto; }

  #map{ height: 260px; }
}
