/* ===== VARIABLES + BASE ===== */
:root{
  --orange:#FF6B35;
  --text:#111;
  --muted:#8C8C8C;
  --line:#EFEFEF;
  --bg:#fff;
  --card:#fff;
  --soft:#FFF2E9;
  --soft2:#FDEBE6;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

:focus-visible{
  outline: 3px solid rgba(255,107,53,0.35);
  outline-offset: 2px;
  border-radius: 10px;
}

/* ===== LOGIN (même UI que l'app) ===== */
.screen{ min-height:100vh; transition:opacity 0.25s ease; }
.screen[hidden]{ display:none !important; }

.screen--login{ padding:0; }
.screen--login.fade-out{ opacity:0; }

.loginGrid{
  min-height:100vh;
  display:grid;
  grid-template-columns:1fr 1fr;
}

.loginLeft{
  color:#fff;
  background:linear-gradient(90deg,#F1B765 0%,#FFBF58 25%,#FCA749 55%,#F88536 80%,#F8742F 100%);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:clamp(20px,4vw,56px);
}

.loginLeft__content{ width:min(520px,100%); text-align:center; }

.brand{ display:inline-flex; align-items:center; gap:12px; margin-bottom:18px; }
.brand__icon{ color:#fff; }
.brand__name{ font-weight:800; font-size:clamp(22px,2.2vw,30px); }

.loginLeft__text{
  margin:0 auto;
  width:min(420px,100%);
  font-size:14px;
  line-height:1.6;
  opacity:.95;
}

.loginRight{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:clamp(20px,4vw,56px);
  background:#fff;
}

.loginRight__content{ width:min(520px,100%); }
.loginHeader{ margin-bottom:22px; }

.loginTitle{ margin:0 0 10px 0; font-size:clamp(26px,2.6vw,34px); font-weight:900; letter-spacing:-0.3px; }
.loginSubtitle{ margin:0; color:var(--muted); font-size:13px; font-weight:500; }

.form--login .field{ margin-bottom:18px; }
.form--login .label{ display:block; font-size:12px; font-weight:700; margin-bottom:8px; color:#3A3A3A; }
.form--login .input{
  width:100%;
  height:46px;
  border:1px solid var(--line);
  border-radius:12px;
  padding:0 14px;
  font-size:13px;
  outline:none;
  background:#fff;
}
.form--login .input:focus{
  border-color:rgba(255,107,53,0.55);
  box-shadow:0 0 0 3px rgba(255,107,53,0.14);
}
.field--row{ margin-bottom:16px; }
.checkbox{
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-size:12px;
  color:#6A6A6A;
  cursor:pointer;
}
.checkbox input{ width:16px; height:16px; accent-color:var(--orange); cursor:pointer; }

.loginError{
  margin-bottom:14px;
  padding:12px 14px;
  border-radius:10px;
  background:rgba(198,40,40,0.08);
  border:1px solid rgba(198,40,40,0.25);
  color:#c62828;
  font-size:13px;
  font-weight:600;
}

.help{ margin:18px 0 0 0; text-align:center; font-size:11px; color:#B2B2B2; }

@media (max-width: 720px){
  .loginGrid{ grid-template-columns:1fr; }
  .loginLeft{ min-height:240px; }
}

/* ===== FORMULAIRE (page après login) ===== */
.wrap{
  min-height: 100vh;
  padding: clamp(14px, 3vw, 28px);
  max-width: 980px;
  margin: 0 auto;
}

.wrap .header{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.header__actions{
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn--logout{
  width: auto;
  padding: 0 16px;
  height: 40px;
  font-size: 12px;
}

.h1{
  margin:0 0 6px 0;
  font-size: clamp(20px, 4.6vw, 28px);
  font-weight: 900;
  letter-spacing: -0.2px;
}

.accent{ color: var(--orange); }

.sub{
  margin:0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.chipYear{
  flex: 0 0 auto;
  height: 40px;
  min-width: 76px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display:grid;
  place-items:center;
  font-size: 12px;
  font-weight: 800;
  color: #777;
  background: #fff;
}

.card{
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  overflow: hidden;
}

.card__head{
  padding: 16px 16px 14px 16px;
  border-bottom: 1px solid var(--line);
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 12px;
}

.kicker{
  font-size: 11px;
  font-weight: 900;
  color: var(--orange);
  letter-spacing: .3px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.h2{
  margin:0;
  font-size: 18px;
  font-weight: 900;
}

.miniInfo{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  color: #777;
  font-size: 12px;
  font-weight: 700;
  user-select:none;
}

.dot{
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display:grid;
  place-items:center;
  color: var(--orange);
  background: rgba(255,107,53,0.12);
  font-weight: 900;
}

.form{ padding: 16px; }

.grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.field{ width:100%; }

.label{
  display:block;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 8px;
  color: #3A3A3A;
}

.labelRow{
  display:flex;
  align-items:center;
  gap: 8px;
}

.label--big{
  font-size: 13px;
  margin-bottom: 4px;
}

.required{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--orange);
  display:inline-block;
}

.input{
  width:100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 14px;
  outline: none;
  background: #fff;
}

.input:focus{
  border-color: rgba(255,107,53,0.55);
  box-shadow: 0 0 0 3px rgba(255,107,53,0.14);
}

.hint{
  margin: 8px 0 0 0;
  font-size: 12px;
  color: #9A9A9A;
  line-height: 1.4;
}

/* note card */
.field--note .note{
  height: 100%;
  border: 1px dashed rgba(255,107,53,0.35);
  border-radius: 12px;
  background: var(--soft);
  padding: 12px;
}

.note__title{
  font-size: 12px;
  font-weight: 900;
  color: var(--orange);
  margin-bottom: 6px;
}
.note__text{
  font-size: 12px;
  color: #8A6B5E;
  line-height: 1.45;
}

/* zones */
.section{
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.section__top{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.ghostBtn{
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-weight: 900;
  font-size: 12px;
  color: #333;
}

.ghostBtn:active{ transform: translateY(1px); }

.zones{
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.zone{
  display:flex;
  align-items:center;
  gap: 12px;
  padding: 14px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  user-select:none;
}

.zone__check{
  width: 20px;
  height: 20px;
  accent-color: var(--orange);
  flex: 0 0 auto;
}

.zone__label{
  font-size: 14px;
  font-weight: 800;
  color: #222;
}

.zone:has(.zone__check:checked){
  border-color: rgba(255,107,53,0.45);
  background: var(--soft2);
}

/* counter */
.counter{
  margin-top: 12px;
  display:flex;
  justify-content: flex-end;
}

.counter__pill{
  display:inline-flex;
  align-items:center;
  height: 34px;
  padding: 0 12px;
  gap: 3px;
  border-radius: 999px;
  background: rgba(255,107,53,0.12);
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
}

.counter__label{
  font-weight: 900;
  font-size: 12px;
}

/* actions */
.actions{
  margin-top: 18px;
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.btn{
  height: 50px;
  border: 0;
  border-radius: 12px;
  background: var(--orange);
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  cursor:pointer;
}

.btn--secondary{
  background: #fff;
  color: #333;
  border: 1px solid var(--line);
}

.btn:active{ transform: translateY(1px); }

.legal{
  margin: 14px 0 0 0;
  text-align:center;
  font-size: 11px;
  color: #B2B2B2;
}

/* ====== RESPONSIVE TABLET / DESKTOP ====== */
@media (min-width: 720px){
  .grid{
    grid-template-columns: 1fr 0.9fr;
    align-items: stretch;
  }

  .zones{
    grid-template-columns: 1fr 1fr;
  }

  .actions{
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 360px){
  .chipYear{ display:none; }
  .zone{ padding: 12px 12px; }
  .btn{ height: 48px; }
}
