/* ==========================================================================
   MyDay — thème « veille au petit matin »
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,500&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root{
  --bg: #1E1A24;
  --surface: #2A2432;
  --surface-2: #332C3C;
  --ink: #F2ECE4;
  --muted: #9A8FA0;
  --line: rgba(242,236,228,0.09);

  --amber: #E8A649;
  --amber-dim: rgba(232,166,73,0.14);
  --sage: #8FAE87;
  --sage-dim: rgba(143,174,135,0.14);
  --berry: #D97A93;
  --berry-dim: rgba(217,122,147,0.14);
  --teal: #7FB0C4;
  --teal-dim: rgba(127,176,196,0.14);
  --gold: #D9B44A;
  --gold-dim: rgba(217,180,74,0.14);

  --display: 'Fraunces', serif;
  --body: 'Inter', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

body{
  background:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(232,166,73,0.10), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 0%, rgba(217,122,147,0.08), transparent 55%),
    var(--bg);
  min-height: 100vh;
  font-family: var(--body);
  color: var(--ink);
}

a{ color: var(--amber); text-decoration: none; }
a:hover{ color: var(--gold); }

/* ---- Auth pages ---- */
.auth-page{ display:flex; align-items:center; justify-content:center; padding: 32px 16px; }
.auth-card{
  width: 100%; max-width: 400px; background: var(--surface); border:1px solid var(--line);
  border-radius: 20px; padding: 32px 28px; box-shadow: 0 30px 70px -30px rgba(0,0,0,0.6);
}
.auth-eyebrow{
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 10px;
}
.auth-title{ font-family: var(--display); font-style: italic; font-weight: 500; font-size: 26px; margin-bottom: 4px; }
.auth-sub{ color: var(--muted); font-size: 13.5px; margin-bottom: 20px; }
.auth-foot{ margin-top: 18px; font-size: 13px; color: var(--muted); text-align:center; }

.form-label{ font-size: 12.5px; color: var(--muted); }
.form-control, .form-select{
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink);
}
.form-control:focus, .form-select:focus{
  background: var(--surface-2); border-color: var(--amber); color: var(--ink);
  box-shadow: 0 0 0 0.2rem var(--amber-dim);
}
.form-control::placeholder{ color: var(--muted); }
.form-check-input{ background-color: var(--surface-2); border-color: var(--line); }
.form-check-input:checked{ background-color: var(--amber); border-color: var(--amber); }

.btn-accent{
  background: var(--amber); border: none; color: #201A14; font-weight: 600;
}
.btn-accent:hover{ background: var(--gold); color: #201A14; }

/* ---- App shell ---- */
.app-shell{ max-width: 640px; margin: 0 auto; padding: 28px 18px 60px; }

.top-bar{ display:flex; justify-content:space-between; align-items:flex-start; margin-bottom: 22px; gap: 12px; }
.greeting-eyebrow{
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 6px; display:flex; align-items:center; gap:6px;
}
.greeting-eyebrow::before{ content:''; width:5px; height:5px; border-radius:50%; background: var(--amber); box-shadow: 0 0 8px var(--amber); }
h1.greeting{ font-family: var(--display); font-weight:500; font-style: italic; font-size: 26px; color: var(--ink); }
.greeting b{ font-style: normal; font-weight: 600; }
.date-sub{ font-size: 12.5px; color: var(--muted); margin-top: 5px; }

.day-nav{ display:flex; align-items:center; gap:6px; }
.day-nav button{
  background: var(--surface); border:1px solid var(--line); color: var(--ink);
  width: 32px; height: 32px; border-radius: 10px; display:flex; align-items:center; justify-content:center;
}
.day-nav button:hover{ border-color: var(--amber); color: var(--amber); }

.ring{ width:50px; height:50px; position:relative; flex-shrink:0; }
.ring svg{ transform: rotate(-90deg); }
.ring-track{ fill:none; stroke: var(--line); stroke-width:4; }
.ring-fill{ fill:none; stroke: var(--amber); stroke-width:4; stroke-linecap: round; transition: stroke-dashoffset .4s ease; }
.ring-txt{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-family: var(--mono); font-size:10.5px; }

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

/* ---- Overload banner ---- */
.overload{
  background: var(--amber-dim); border:1px solid rgba(232,166,73,0.35); border-radius:14px;
  padding: 13px 15px; margin-bottom: 20px; display:flex; gap:10px; align-items:flex-start;
}
.overload-text{ font-size: 13px; line-height:1.55; }
.overload-text b{ color: var(--amber); }
.overload-action{
  background: none; border: none; padding:0; margin-top:8px; display:inline-flex; align-items:center; gap:5px;
  font-family: var(--mono); font-size: 11.5px; color: var(--amber); font-weight: 500; cursor:pointer;
}
.overload-action:hover{ color: var(--gold); text-decoration: underline; }

/* ---- Sections ---- */
.section{ margin-bottom: 24px; }
.section-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom: 11px; }
.section-title{
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); display:flex; align-items:center; gap:7px;
}
.dot{ width:6px; height:6px; border-radius:50%; }
.dot.priority{ background: var(--amber); }
.dot.maison{ background: var(--sage); }
.dot.moi{ background: var(--berry); }
.dot.etudes{ background: var(--teal); }
.dot.courses{ background: var(--gold); }
.dot.general{ background: var(--muted); }
.section-count{ font-family: var(--mono); font-size: 10.5px; color: var(--muted); }

/* Priority cards */
.p-card{
  background: var(--surface); border:1px solid var(--line); border-radius: 16px; padding: 12px 14px;
  margin-bottom: 9px; display:flex; gap:12px; align-items:center; position:relative; overflow:hidden;
}
.p-card::before{ content:''; position:absolute; left:0; top:0; bottom:0; width:3px; background: var(--amber); }
.p-card.done::before{ background: var(--sage); }
.p-num{ font-family: var(--display); font-style: italic; font-size: 19px; color: var(--amber); width:20px; flex-shrink:0; text-align:center; }
.p-info{ flex:1; min-width:0; }
.p-title{ font-size: 13.5px; font-weight:500; color: var(--ink); margin-bottom:2px; }
.p-title.done{ color: var(--muted); text-decoration: line-through; }
.p-time{ font-family: var(--mono); font-size: 11px; color: var(--muted); }
.p-actions{ display:flex; gap:4px; }

/* Category boxes / rows */
.box{ background: var(--surface); border:1px solid var(--line); border-radius: 16px; padding: 4px 12px; }
.t-row{ display:flex; align-items:center; gap:11px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.t-row:last-child{ border-bottom:none; }
.check{
  width:19px; height:19px; border-radius:6px; border:1.5px solid var(--line); flex-shrink:0;
  display:flex; align-items:center; justify-content:center; cursor:pointer; background:none;
}
.check.done{ background: var(--sage); border-color: var(--sage); }
.check.done::after{ content:'✓'; font-size:11px; color:#1E1A24; font-weight:700; }
.t-label{ font-size: 13px; color: var(--ink); flex:1; cursor:pointer; }
.t-label.done{ color: var(--muted); text-decoration: line-through; }
.t-tag{ font-family: var(--mono); font-size: 10px; color: var(--muted); }
.t-actions{ display:flex; gap:2px; }
.icon-btn{
  background:none; border:none; color: var(--muted); width:24px; height:24px; border-radius:7px;
  display:flex; align-items:center; justify-content:center; font-size: 13px;
}
.icon-btn:hover{ background: var(--surface-2); color: var(--ink); }

.empty-state{
  text-align:center; padding: 34px 20px; color: var(--muted); font-size: 13px;
  background: var(--surface); border:1px dashed var(--line); border-radius: 16px;
}

/* ---- Floating add button ---- */
.fab{
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--amber); color:#201A14; border:none; border-radius: 999px;
  padding: 13px 22px; font-weight:600; font-size: 14px; box-shadow: 0 16px 40px -12px rgba(232,166,73,0.55);
  display:flex; align-items:center; gap:8px; z-index: 1000;
}
.fab:hover{ background: var(--gold); }

/* ---- Modal ---- */
.modal-content{ background: var(--surface); color: var(--ink); border:1px solid var(--line); border-radius: 18px; }
.modal-header, .modal-footer{ border-color: var(--line); }
.btn-close{ filter: invert(1) grayscale(1) brightness(1.8); }
.category-pill{
  display:inline-flex; align-items:center; gap:6px; padding: 7px 12px; border-radius: 999px;
  border:1px solid var(--line); font-size:12.5px; cursor:pointer; background: var(--surface-2);
}
.category-pill.active{ border-color: var(--amber); color: var(--amber); background: var(--amber-dim); }

.navbar-app{ background: transparent; }
.brand-mark{ font-family: var(--display); font-style: italic; font-weight:600; font-size: 18px; color: var(--ink); }
