/* --- Variables par défaut (Thème Sombre / Dark Mode) --- */
:root {
  --sun: #ffc400;
  --bk: #000000;
  --s1: #121212;
  --s2: #1d1d1d;
  --ln: #2e2e2e;
  --tx: #f5f5f5;
  --mt: #a8a8a8;
  --r: 16px;
  --input-bg: #000000;
  --input-tx: #ffffff;
}

/* --- Adaptation automatique au Thème Clair (Light Mode) --- */
@media (prefers-color-scheme: light) {
  :root {
    --sun: #ffab00;
    --bk: #f8f9fa;
    --s1: #ffffff;
    --s2: #f1f3f4;
    --ln: #e0e0e0;
    --tx: #1f1f1f;
    --mt: #5f6368;
    --input-bg: #ffffff;
    --input-tx: #1f1f1f;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
}

body {
  background: var(--bk);
  color: var(--tx);
  font: 16px/1.5 "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 2px;
}

header :focus-visible {
  outline-color: #000000;
}

header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--sun);
  color: #000000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px clamp(12px, 4vw, 40px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
}

.search {
  flex: 1;
  max-width: 640px;
  margin-inline: auto;
}

.search input {
  width: 100%;
  background: var(--input-bg);
  color: var(--input-tx);
  border: 1px solid var(--ln);
  border-radius: 99px;
  padding: 11px 18px;
  font: inherit;
}

.search input::placeholder {
  color: var(--mt);
}

.pillbtn {
  display: inline-block;
  background: #000000;
  color: #ffc400;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 99px;
  white-space: nowrap;
}

main {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px clamp(12px, 4vw, 40px) 40px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 34px 0 22px;
}

.hero:before {
  content: "";
  position: absolute;
  right: -70px;
  top: -90px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--sun) 0 36%, rgba(255, 196, 0, 0.28) 37% 58%, transparent 59%);
}

.hero h1 {
  position: relative;
  font-size: clamp(1.9rem, 5.5vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -1px;
  max-width: 13em;
}

.hero p {
  position: relative;
  color: var(--mt);
  margin-top: 10px;
  max-width: 30em;
}

h2 {
  font-size: 1.25rem;
  margin: 26px 0 12px;
}

h3 {
  margin: 18px 0 6px;
}

.h1 {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.chips,
.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 8px;
}

.chips a {
  padding: 7px 15px;
  border: 1px solid var(--ln);
  border-radius: 99px;
  white-space: nowrap;
  background: var(--s1);
}

.chips a.on {
  background: var(--sun);
  color: #000000;
  border-color: var(--sun);
  font-weight: 600;
}

.tabs {
  border-bottom: 1px solid var(--ln);
  margin-bottom: 16px;
  padding-bottom: 0;
}

.tabs a {
  padding: 10px 14px;
  white-space: nowrap;
  color: var(--mt);
  border-bottom: 3px solid transparent;
}

.tabs a.on {
  color: var(--tx);
  border-color: var(--sun);
  font-weight: 600;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 150px;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 12px;
  background: var(--s1);
  border-radius: var(--r);
  border: 1px solid var(--ln);
  min-width: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.card:hover {
  border-color: var(--sun);
}

.card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 22%;
  margin-bottom: 8px;
  background: var(--s2);
}

.card b {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card span {
  font-size: 0.85rem;
  color: var(--tx);
  opacity: 0.8;
}

.card small,
.item small {
  color: var(--mt);
  font-size: 0.8rem;
}

.card small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empty {
  color: var(--mt);
  padding: 40px 0;
  text-align: center;
}

.lnk {
  color: var(--tx);
  text-decoration: underline;
  font-weight: 600;
}

.btn {
  display: inline-block;
  background: var(--sun);
  color: #000000;
  font: inherit;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 99px;
  border: 2px solid var(--sun);
  cursor: pointer;
  text-align: center;
}

.btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

.btn.ghost {
  background: transparent;
  color: var(--tx);
  border-color: var(--ln);
}

.btn.danger {
  background: #ff5a4d;
  border-color: #ff5a4d;
  color: #ffffff;
}

.btn.sm {
  padding: 5px 14px;
  font-size: 0.85rem;
}

.ahead {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 10px;
}

.ahead img {
  width: 120px;
  height: 120px;
  border-radius: 22%;
  object-fit: cover;
}

.ahead h1 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  line-height: 1.15;
}

.stats {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.stats div {
  display: grid;
}

.stats small {
  color: var(--mt);
}

.shots {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.shots img {
  height: min(62vh, 440px);
  border-radius: 14px;
  cursor: zoom-in;
  background: var(--s2);
}

.shots.sm img {
  height: 150px;
}

.box {
  background: var(--s1);
  border-radius: var(--r);
  border: 1px solid var(--ln);
  padding: 18px;
  margin-top: 14px;
}

.pre {
  white-space: pre-line;
}

.note {
  background: var(--s2);
  border-left: 4px solid var(--sun);
  padding: 12px 16px;
  border-radius: 8px;
  margin: 14px 0;
  color: var(--mt);
}

.narrow {
  max-width: 520px;
  margin: 0 auto;
}

.form {
  display: grid;
  gap: 12px;
  max-width: 560px;
}

label {
  display: grid;
  gap: 4px;
  font-size: 0.9rem;
  color: var(--mt);
}

input,
select,
textarea {
  background: var(--s2);
  border: 1px solid var(--ln);
  color: var(--tx);
  padding: 11px 12px;
  border-radius: 12px;
  font: inherit;
  width: 100%;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.chk {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.chk input {
  width: auto;
  margin-top: 5px;
}

.slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.slot {
  position: relative;
  aspect-ratio: 9/16;
  border: 2px dashed var(--ln);
  border-radius: 14px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 8px;
  cursor: pointer;
  overflow: hidden;
  font-size: 0.8rem;
  background: var(--s1);
}

.slot.sq {
  aspect-ratio: 1;
  max-width: 140px;
}

.slot:hover {
  border-color: var(--sun);
}

.slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slot img:not([src]) {
  display: none;
}

.slot input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.item {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.item + .item {
  margin-top: 10px;
}

.item .ic {
  width: 56px;
  height: 56px;
  border-radius: 22%;
  object-fit: cover;
}

.grow {
  flex: 1;
  min-width: 160px;
}

.pill {
  display: inline-block;
  font-size: 0.75rem;
  padding: 2px 10px;
  border-radius: 99px;
  border: 1px solid var(--sun);
  color: var(--tx);
}

.pill.ok {
  border-color: #3ddc84;
  color: #2bbd70;
}

.pill.no {
  border-color: #ff5a4d;
  color: #ff5a4d;
}

.acts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 12px;
}

.prio {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
}

.prio input {
  width: 76px;
  padding: 5px 8px;
}

.flt {
  margin-bottom: 12px;
  max-width: 420px;
}

details {
  margin-top: 10px;
}

summary {
  cursor: pointer;
  color: var(--tx);
  font-weight: 600;
}

.doc {
  max-width: 720px;
}

.doc p,
.doc li {
  color: var(--tx);
  margin: 8px 0;
}

.doc ul {
  padding-left: 20px;
}

#g {
  margin: 18px 0;
  min-height: 44px;
}

footer {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  padding: 20px clamp(12px, 4vw, 40px);
  border-top: 1px solid var(--ln);
  color: var(--mt);
  font-size: 0.9rem;
  background: var(--bk);
}

footer a:hover {
  color: var(--tx);
}

#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 40px);
  background: var(--sun);
  color: #000000;
  padding: 11px 20px;
  border-radius: 99px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
  z-index: 60;
  max-width: 92vw;
  text-align: center;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

#toast.bad {
  background: #ff5a4d;
  color: #ffffff;
}

.lb {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: grid;
  place-items: center;
  z-index: 50;
  cursor: zoom-out;
  padding: 16px;
}

.lb img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
}

@media (max-width: 640px) {
  header {
    flex-wrap: wrap;
  }
  .search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }
  #acct {
    margin-left: auto;
  }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
  .ahead img {
    width: 92px;
    height: 92px;
  }
  .btn.block {
    display: block;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

Une fois le fichier enregistré, redéployez l'application :
Bash

npx wrangler deploy

Le thème s'adapte-t-il bien selon les réglages de votre téléphone / appareil ?
