/* Pages de compte (connexion, inscription, validation, mot de passe) — ejs/website/account/.
   Deux colonnes : le formulaire, calme, à gauche ; la mosaïque des captures de la galerie à
   droite, seul élément animé. Sur mobile, la mosaïque devient une bande au-dessus. */

:root {
  --auth-ink: #1f2a2e;
  --auth-muted: #5d6b70;
  --auth-line: #d8e2e4;
  --auth-mist: #eef5f6;
  --auth-error: #b83a2e;
  --auth-focus: 0 0 0 3px rgba(42, 181, 211, 0.35);
}

.c-auth {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  min-height: calc(100vh - 65px);
  background: #fff;
  color: var(--auth-ink);
}

/* --- Colonne du formulaire ----------------------------------------------- */

.c-auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 32px;
}
.c-auth-form { width: 100%; max-width: 400px; }

.c-auth-title {
  font-size: 32px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.c-auth-lead {
  font-size: 15px;
  line-height: 1.6;
  color: var(--auth-muted);
  margin-bottom: 32px;
}
.c-auth-lead strong { color: var(--auth-ink); font-weight: 600; overflow-wrap: anywhere; }

.c-auth-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  margin-bottom: 20px;
  font-size: 26px;
  color: #fff;
  background: linear-gradient(-45deg, var(--wdi-green), var(--wdi-blue));
}
.c-auth-icon-muted { background: var(--auth-mist); color: var(--auth-muted); }

/* Champs : libellé au-dessus, aide et erreur au-dessous. */
.c-field { margin-bottom: 20px; }
.c-field-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.c-field-control { position: relative; }
.c-input {
  display: block;
  width: 100%;
  height: 48px;
  padding: 0 14px;
  font: inherit;
  font-size: 15px;
  color: var(--auth-ink);
  background: #fff;
  border: 1px solid var(--auth-line);
  border-radius: 10px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.c-field-control .c-input { padding-right: 48px; }
.c-input:hover { border-color: #b9c8cb; }
.c-input:focus { outline: none; border-color: var(--wdi-blue); box-shadow: var(--auth-focus); }
select.c-input { appearance: auto; }

.c-reveal {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--auth-muted);
  font-size: 18px;
}
.c-reveal:hover { color: var(--auth-ink); background: var(--auth-mist); }
.c-reveal:focus-visible { outline: none; box-shadow: var(--auth-focus); }

.c-field-hint,
.c-field-error { font-size: 13px; line-height: 1.45; margin: 6px 0 0; }
.c-field-hint { color: var(--auth-muted); }
.c-field-error { color: var(--auth-error); }
.c-field-note { color: var(--auth-ink); }
.has-error .c-input { border-color: var(--auth-error); }
.has-error .c-input:focus { box-shadow: 0 0 0 3px rgba(184, 58, 46, 0.25); }

.c-suggestion {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--wdi-blue);
  text-decoration: underline;
}

/* Code de validation : un seul champ, chiffres larges et espacés. */
.c-code {
  height: 64px;
  font-size: 30px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5em;
  text-align: center;
  padding-left: 0.5em;
}

.c-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.c-check input { width: 18px; height: 18px; accent-color: var(--wdi-blue); }
.c-check-block { display: flex; margin: 4px 0 24px; }

.c-auth-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: -4px 0 24px;
  font-size: 14px;
}

.c-auth a { color: var(--wdi-blue); text-decoration: none; font-weight: 500; }
.c-auth a:hover { text-decoration: underline; }

/* Bouton principal : le dégradé de WDI, une seule fois par page. */
.c-button {
  display: block;
  width: 100%;
  padding: 14px 20px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  color: #fff !important;
  text-decoration: none !important;
  background: linear-gradient(-45deg, var(--wdi-green), var(--wdi-blue));
  box-shadow: 0 6px 16px -8px rgba(42, 181, 211, 0.8);
  transition: filter 150ms ease, transform 150ms ease;
}
.c-button:hover { filter: brightness(1.05); }
.c-button:active { transform: translateY(1px); }
.c-button:focus-visible { outline: none; box-shadow: var(--auth-focus); }

.c-link-button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 500;
  color: var(--wdi-blue);
}
.c-link-button:hover { text-decoration: underline; }

/* Connexion : la création de compte doit se voir autant que le formulaire. */
.c-auth-signup {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--auth-line);
  text-align: center;
}
.c-auth-signup p { margin-bottom: 12px; font-size: 15px; font-weight: 600; color: var(--auth-ink); }
.c-button-secondary {
  display: block;
  padding: 12px 20px;
  border: 2px solid var(--wdi-blue);
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--wdi-blue);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.c-button-secondary:hover { background: var(--wdi-blue); color: #fff; }
.c-button-secondary:focus-visible { outline: none; box-shadow: var(--auth-focus); }

.c-auth-switch { margin-top: 28px; font-size: 14px; color: var(--auth-muted); }
.c-auth-fineprint { margin-top: 14px; font-size: 12px; color: var(--auth-muted); }

.c-form-alert {
  margin-bottom: 20px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--auth-error);
  background: #fbefed;
}

/* --- Mosaïque des captures ------------------------------------------------- */

.c-auth-mosaic {
  position: relative;
  overflow: hidden;
  background: var(--auth-ink);
}
/* Voile aux couleurs de WDI, pour que la mosaïque reste un fond et non un contenu. */
.c-auth-mosaic::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(-45deg, rgba(87, 207, 176, 0.55), rgba(42, 181, 211, 0.6));
  mix-blend-mode: multiply;
  pointer-events: none;
}
/* Colonnes et défilement : communs avec le haut des galeries, dans wdi.css. */

/* Assombrit le bas de la mosaïque pour que la légende reste lisible sur n'importe quelle capture. */
.c-auth-mosaic::before {
  content: '';
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  height: 45%;
  background: linear-gradient(to top, rgba(17, 32, 36, 0.85), rgba(17, 32, 36, 0));
  pointer-events: none;
}

.c-mosaic-caption {
  position: absolute;
  z-index: 2;
  z-index: 1;
  left: 40px;
  right: 40px;
  bottom: 36px;
  max-width: 360px;
  margin: 0;
  font-size: 18px;
  line-height: 1.45;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

/* --- Mobile : la mosaïque passe en bande au-dessus du formulaire ------------ */
@media (max-width: 860px) {
  .c-auth { grid-template-columns: 1fr; min-height: 0; }
  .c-auth-mosaic { order: -1; height: 150px; }
  .c-mosaic-track { transform: rotate(-6deg) scale(1.4); }
  .c-mosaic-caption, .c-auth-mosaic::before { display: none; }
  .c-auth-panel { padding: 32px 16px 48px; align-items: flex-start; }
  .c-auth-title { font-size: 26px; }
}
.c-code::placeholder { color: #c3d0d3; }
.c-form-notice {
  margin-bottom: 24px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  color: #1d6b58;
  background: #e5f6f1;
}

/* --- Listes (ejs/website/account/lists.ejs, list-form.ejs) --------------- */
.c-lists { padding: 48px 16px 64px; color: var(--auth-ink); }
.c-lists-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 32px; }
.c-lists-head .c-auth-lead { margin-bottom: 0; max-width: 560px; }
.c-button-inline { display: inline-block; width: auto; }
.c-lists-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 32px; }
.c-list-card { display: block; color: var(--auth-ink); text-decoration: none; }
.c-list-card:hover h2 { color: var(--wdi-blue); }
.c-list-cover {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: var(--auth-mist);
  color: var(--auth-muted);
  font-size: 32px;
  box-shadow: 0 15px 10px -15px rgba(0, 0, 0, 0.3);
}
.c-list-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.c-list-meta h2 { font-size: 17px; font-weight: 600; margin: 14px 0 4px; }
.c-list-meta p { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--auth-muted); margin: 0; }
.c-badge { padding: 2px 8px; border-radius: 100px; font-size: 12px; background: var(--auth-mist); }
.c-badge-15 { background: #e5f6f1; color: #1d6b58; }
.c-badge-10 { background: #fff4e0; color: #8a5a00; }

.c-list-form-page { display: flex; justify-content: center; padding: 48px 16px 64px; color: var(--auth-ink); }
.c-textarea { height: auto; padding: 12px 14px; line-height: 1.5; }
.c-radio { margin: 0 0 8px; }
.c-field fieldset, fieldset.c-field { border: 0; padding: 0; }
.c-danger { color: var(--auth-error) !important; }

/* « Mon compte » : sections séparées par un filet */
.c-settings section { padding-top: 28px; margin-top: 28px; border-top: 1px solid var(--auth-line); }
.c-settings section:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.c-settings h2 { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.c-settings-danger .c-field-hint { margin-bottom: 12px; }

/* « Mes soumissions » (specs/013-validation-soumission/) : une ligne par site proposé. */
.c-submissions { list-style: none; margin: 0; padding: 0; max-width: 820px; }
.c-submission { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 0; border-bottom: 1px solid var(--auth-mist); }
.c-submission-meta { flex: 1 1 260px; min-width: 0; }
.c-submission-meta h2 { font-size: 17px; font-weight: 600; margin: 0 0 4px; overflow-wrap: anywhere; }
.c-submission-meta p { font-size: 13px; color: var(--auth-muted); margin: 0; overflow-wrap: anywhere; }
.c-badge-pending { background: #fff4e0; color: #8a5a00; }
.c-badge-published { background: #e5f6f1; color: #1d6b58; }
.c-badge-declined { color: var(--auth-muted); }
.c-submission-link { font-size: 14px; font-weight: 600; color: var(--wdi-blue); }
