/* ===============================
   VARIABLES
================================ */
:root{
  --bg1:#0f5962;
  --bg2:#0b3f46;

  --card-bg: rgba(12,31,36,.65);
  --card-border: rgba(255,255,255,.08);

  --text:#e8f1f3;
  --muted:rgba(232,241,243,.65);

  --field-bg:#d6dadd;
  --field-text:#2a2f32;

  --accent:#4d7f86;
  --accent-dark:#3f6f76;

  --shadow: 0 20px 60px rgba(0,0,0,.35);
}

/* ===============================
   RESET / BASE
================================ */
*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  overflow:hidden; /* important pour le fond animé */
}

/* ===============================
   BACKGROUND FLOUTÉ + ANIM
   -> Nécessite static/img/bg.jpg
================================ */
body::before{
  content:"";
  position:fixed;
  inset:-60px;
  background:
    linear-gradient(rgba(15,89,98,.55), rgba(11,63,70,.65)),
    url("/static/img/bg.jpg") center / cover no-repeat;
  filter: blur(22px) saturate(112%);
  transform: scale(1.12);
  z-index:-2;
  will-change: transform, filter, background-position;
  animation: bgDrift 18s ease-in-out infinite alternate;
}

body::after{
  content:"";
  position:fixed;
  inset:0;
  background:
    radial-gradient(1200px 600px at 50% 15%, rgba(255,255,255,.08), transparent 60%),
    radial-gradient(900px 500px at 50% 85%, rgba(0,0,0,.35), transparent 60%);
  z-index:-1;
}

@keyframes bgDrift{
  0%{
    transform: scale(1.10) translate3d(-10px, -8px, 0);
    filter: blur(20px) saturate(110%);
    background-position: 45% 40%;
  }
  100%{
    transform: scale(1.16) translate3d(12px, 10px, 0);
    filter: blur(26px) saturate(116%);
    background-position: 55% 60%;
  }
}

/* ===============================
   LAYOUT GLOBAL
================================ */
.page{
  min-height:100%;
  display:grid;
  place-items:center;
  padding:40px 16px;
}

.auth{
  width:min(420px, 92vw);
  text-align:center;
}

.title{
  margin:0 0 18px 0;
  font-weight:300;
  letter-spacing:.35em;
  color:rgba(232,241,243,.8);
}

/* ===============================
   CARD / GLASS
================================ */
.card{
  background:var(--card-bg);
  border:1px solid var(--card-border);
  box-shadow:var(--shadow);
  padding:26px;
  backdrop-filter: blur(8px);
  position:relative;
}

/* ===============================
   HOME CARD
================================ */
.homeCard{
  width:min(980px, 92vw);
  background:var(--card-bg);
  border:1px solid var(--card-border);
  box-shadow:var(--shadow);
  padding:22px;
  backdrop-filter: blur(8px);
  position:relative;
}

/* ===============================
   GLOW (login + home)
================================ */
.card::before, .homeCard::before{
  content:"";
  position:absolute;
  inset:-1px;
  pointer-events:none;
  background: radial-gradient(600px 220px at 50% 0%, rgba(120,220,210,.18), transparent 60%);
  opacity:.85;
}

/* ===============================
   FORM FIELDS
================================ */
.field{
  display:flex;
  width:100%;
  height:54px;
  margin:12px 0;
  background:var(--field-bg);
  border:1px solid rgba(0,0,0,.15);
  overflow:hidden;
}

.iconBox{
  width:56px;
  display:grid;
  place-items:center;
  background:rgba(255,255,255,.35);
  border-right:1px solid rgba(0,0,0,.1);
}

.field input{
  flex:1;
  border:0;
  outline:none;
  padding:0 14px;
  font-size:15px;
  background:transparent;
  color:var(--field-text);
}

/* ===============================
   OPTIONS ROW
================================ */
.row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
}

.row label{
  display:flex;
  align-items:center;
  gap:8px;
  user-select:none;
}

.row input[type="checkbox"]{ accent-color:var(--accent); }

.row a{
  color:var(--muted);
  text-decoration:none;
}

.row a:hover{ color:var(--text); }

/* ===============================
   BUTTONS
================================ */
.btn{
  width:100%;
  height:52px;
  margin-top:18px;
  border:0;
  cursor:pointer;
  letter-spacing:.18em;
  font-weight:600;
  color:var(--text);
  background:linear-gradient(180deg, var(--accent), var(--accent-dark));
  transition:filter .15s, transform .05s;
}

.btn:hover{ filter:brightness(1.05); }
.btn:active{ transform:translateY(1px); }

.secondary{
  margin-top:14px;
  background:rgba(0,0,0,.25);
  border:1px solid rgba(255,255,255,.1);
}

/* ===============================
   FLASH MESSAGE
================================ */
.flash{
  margin-bottom:14px;
  padding:10px 12px;
  font-size:13px;
  text-align:left;
  background:rgba(0,0,0,.35);
  border:1px solid rgba(255,255,255,.12);
  color:rgba(232,241,243,.9);
}

/* ===============================
   HOME TOPBAR
================================ */
.topbar{
  width:min(980px, 92vw);
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:16px;
}

.brand{
  letter-spacing:.22em;
  font-weight:300;
  color:rgba(232,241,243,.85);
}

.nav a{
  margin-left:16px;
  color:rgba(232,241,243,.75);
  text-decoration:none;
}
.nav a:hover{ color:var(--text); }

/* ===============================
   GRID / TILES
================================ */
.grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:12px;
  margin-top:14px;
}

.tile{
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.08);
  padding:14px;
  min-height:92px;
}

.tile h3{
  margin:0 0 8px 0;
  font-size:14px;
  letter-spacing:.12em;
  font-weight:600;
}

.tile p{
  margin:0;
  font-size:13px;
  line-height:1.35;
  color:rgba(232,241,243,.72);
}

/* ===============================
   PROGRESS BAR (stylée)
================================ */
.progressWrap{
  width: 280px;
  max-width: 70vw;
}

.progressMeta{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  font-size:12px;
  color: rgba(232,241,243,.72);
  margin-top:6px;
}

.progressTrack{
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.10);
  overflow:hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.progressFill{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(77,127,134,1), rgba(120,220,210,.9));
  box-shadow: 0 10px 25px rgba(77,127,134,.25);
  transition: width .35s ease;
}

.progressBadge{
  display:inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(232,241,243,.85);
  font-size: 12px;
  letter-spacing: .06em;
}

/* ===============================
   RESPONSIVE
================================ */
@media (max-width:820px){
  .grid{ grid-template-columns:1fr; }
}
