/* Auth pages · DA GoDesign (alignée landing) */

:root {
  --gd-bg: #f4f4f4;
  --gd-surface: #ffffff;
  --gd-ink: #111111;
  --gd-muted: #5c5c5c;
  --gd-dark: #1a1a1a;
  --gd-line: #e6e6e6;
  --gd-radius: 28px;
  --gd-radius-sm: 22px;
  --gd-font: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gd-font-ui: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gd-font-editorial: Lancelot, Georgia, "Times New Roman", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.gd-body--auth {
  margin: 0;
  min-height: 100vh;
  background: var(--gd-bg);
  color: var(--gd-ink);
  font-family: var(--gd-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
}

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

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* --- Header (sans nav workspace) --------------------------------- */
.gd-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(244, 244, 244, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.gd-header__inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.5rem;
  box-sizing: border-box;
}

.gd-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.gd-logo__img {
  display: block;
  height: 1.45rem !important;
  width: auto !important;
  max-width: none !important;
  object-fit: contain;
  filter: none;
  user-select: none;
  -webkit-user-drag: none;
}

.gd-header__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.gd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--gd-font-ui);
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1;
  cursor: pointer;
  transition: opacity 160ms ease, background 160ms ease, color 160ms ease;
}

.gd-btn:hover {
  opacity: 0.88;
}

a.gd-btn--ghost,
a.gd-btn--ghost:visited {
  background: transparent;
  color: var(--gd-ink) !important;
  -webkit-text-fill-color: var(--gd-ink);
  padding: 0.65rem 0.85rem;
}

a.gd-btn--dark,
a.gd-btn--dark:visited {
  background: #1a1a1a;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  padding: 0.72rem 1.15rem 0.72rem 1.25rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 8px 20px rgba(0, 0, 0, 0.14);
}

a.gd-btn--dark:hover,
a.gd-btn--dark:focus-visible {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 0.92;
}

a.gd-btn--dark .gd-btn__arrow,
a.gd-btn--dark svg,
a.gd-btn--dark svg path {
  color: #ffffff !important;
  fill: #ffffff !important;
}

.gd-btn__arrow {
  width: 0.7rem;
  height: 0.7rem;
  flex-shrink: 0;
  fill: currentColor;
  color: inherit;
}

/* --- Shell auth -------------------------------------------------- */
.gd-auth {
  width: min(520px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 3.5rem) 0 clamp(2.5rem, 6vw, 4rem);
  flex: 1;
}

.gd-auth-card {
  background: var(--gd-surface);
  border: 1px solid var(--gd-line);
  border-radius: var(--gd-radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
  padding: clamp(1.75rem, 4vw, 2.35rem) clamp(1.35rem, 4vw, 2.1rem) clamp(1.6rem, 4vw, 2rem);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: clip;
}

/* --- En-tête éditorial ------------------------------------------- */
.auth-page-head {
  margin: 0 auto 1.65rem;
  max-width: 28rem;
  text-align: center;
}

.auth-page-head__rule {
  display: block;
  width: 2.5rem;
  height: 1px;
  margin: 0 auto 1rem;
  background: var(--gd-ink);
  opacity: 0.28;
}

.auth-page-head__kicker {
  margin: 0 0 0.75rem;
  font-family: var(--gd-font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gd-muted);
}

.auth-page-head__title {
  margin: 0;
  font-family: var(--gd-font-ui);
  font-weight: 700;
  font-size: clamp(1.85rem, 4.5vw, 2.55rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--gd-ink);
}

.auth-page-head__title em {
  font-family: var(--gd-font-editorial);
  font-style: italic;
  font-weight: 400;
}

.auth-page-head__lead {
  margin: 0.95rem auto 0;
  max-width: 26rem;
  font-family: var(--gd-font-editorial);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--gd-muted);
}

/* --- Carte formulaire -------------------------------------------- */
.auth-card {
  margin: 0;
  padding: 1.35rem clamp(1rem, 3vw, 1.35rem) 1.25rem;
  background: #fafafa;
  border: 1px solid var(--gd-line);
  border-radius: var(--gd-radius-sm);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.auth-card[hidden],
.auth-page-foot[hidden] {
  display: none;
}

.auth-card__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.auth-card__label {
  font-family: var(--gd-font-ui);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gd-muted);
}

.auth-card__input {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-family: var(--gd-font);
  font-size: 1rem;
  font-weight: 500;
  color: var(--gd-ink);
  background: #fff;
  border: 1px solid var(--gd-line);
  border-radius: 14px;
  padding: 0.78rem 0.95rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-card__input::placeholder {
  color: rgba(0, 0, 0, 0.32);
  font-style: italic;
}

.auth-card__input:focus {
  outline: none;
  border-color: var(--gd-ink);
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

.auth-card__input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: rgba(0, 0, 0, 0.02);
}

.auth-card__textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-family: var(--gd-font);
  font-size: 1rem;
  font-weight: 500;
  color: var(--gd-ink);
  background: #fff;
  border: 1px solid var(--gd-line);
  border-radius: 14px;
  padding: 0.78rem 0.95rem;
  min-height: 7.5rem;
  resize: vertical;
  line-height: 1.45;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-card__textarea::placeholder {
  color: rgba(0, 0, 0, 0.32);
  font-style: italic;
}

.auth-card__textarea:focus {
  outline: none;
  border-color: var(--gd-ink);
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

.auth-card__counter {
  display: block;
  margin-top: 0.2rem;
  text-align: right;
  font-family: var(--gd-font-ui);
  font-style: normal;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--gd-muted);
}

.auth-card__counter.contact-form__counter--limit {
  color: #b42318;
}

.auth-card__error {
  min-height: 1.1rem;
  margin: 0;
  font-family: var(--gd-font-ui);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.4;
  color: #b42318;
}

.auth-card__error:empty {
  display: none;
}

.auth-card__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin-top: 0.15rem;
  padding: 0.95rem 1.5rem;
  background:
    radial-gradient(120% 140% at 50% 35%, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 65%),
    var(--gd-dark);
  color: #fff;
  font-family: var(--gd-font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 8px 20px rgba(0, 0, 0, 0.12);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.auth-card__submit:hover:not(:disabled),
.auth-card__submit:focus-visible:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
}

.auth-card__submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.auth-card__forgot-row {
  display: flex;
  justify-content: flex-end;
  margin: -0.15rem 0 0;
}

button.auth-card__forgot-link,
button.auth-card__back-link {
  margin: 0;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  font-family: var(--gd-font) !important;
  font-size: 0.84rem !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--gd-ink) !important;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(17, 17, 17, 0.28);
  text-underline-offset: 3px;
  box-shadow: none !important;
}

button.auth-card__forgot-link:hover,
button.auth-card__forgot-link:focus-visible,
button.auth-card__back-link:hover,
button.auth-card__back-link:focus-visible {
  text-decoration-color: var(--gd-ink);
  outline: none;
}

.auth-card__intro {
  margin: 0 0 0.15rem;
  font-family: var(--gd-font-editorial);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--gd-muted);
  text-align: center;
}

.auth-page-foot {
  margin: 1.35rem auto 0;
  text-align: center;
  font-family: var(--gd-font-editorial);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--gd-muted);
}

.auth-page-foot a,
.auth-page-foot button.auth-page-foot__action {
  margin-left: 0.3rem;
  font-style: normal;
  font-family: var(--gd-font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gd-ink);
  text-decoration: none;
  border: 0;
  border-bottom: 1px solid rgba(17, 17, 17, 0.35);
  background: transparent;
  padding: 0 0 1px;
  cursor: pointer;
}

.auth-page-foot a:hover,
.auth-page-foot a:focus-visible,
.auth-page-foot button.auth-page-foot__action:hover,
.auth-page-foot button.auth-page-foot__action:focus-visible {
  border-bottom-color: var(--gd-ink);
}

.auth-config-banner {
  max-width: none;
  margin: 0 0 1.15rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid #f0c4c0;
  background: #fff5f4;
  color: #7a1f16;
  font-family: var(--gd-font-ui);
  font-size: 0.88rem;
  line-height: 1.45;
  text-align: center;
}

.auth-config-banner a {
  text-decoration: underline;
}

/* --- Footer minimal ---------------------------------------------- */
.gd-auth-footer {
  padding: 1.25rem 1.5rem 1.75rem;
  text-align: center;
}

.gd-auth-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem 1.25rem;
  margin-bottom: 0.65rem;
}

.gd-auth-footer__nav a {
  font-family: var(--gd-font-ui);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--gd-muted);
}

.gd-auth-footer__nav a:hover {
  color: var(--gd-ink);
}

.gd-auth-footer__meta {
  margin: 0;
  font-family: var(--gd-font);
  font-size: 0.75rem;
  color: rgba(17, 17, 17, 0.4);
}

.auth-card__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.85rem;
  min-width: 0;
  max-width: 100%;
}

@media (min-width: 480px) {
  .auth-card__row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.auth-card__hint {
  margin: -0.1rem 0 0;
  font-family: var(--gd-font-editorial);
  font-style: italic;
  font-size: 0.84rem;
  line-height: 1.35;
  color: var(--gd-muted);
}

.auth-card__success {
  margin: 0;
  padding: 0.95rem 1rem;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: #111111;
  border: 1px solid #111111;
  border-radius: 14px;
  font-family: var(--gd-font-ui);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
  color: #ffffff;
  text-align: center;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
}

.auth-card__success[hidden] {
  display: none !important;
}

.auth-card__select {
  display: block;
  /* width:0 + min-width:100% : ignore la largeur intrinsèque des <option> longues */
  width: 0;
  min-width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-family: var(--gd-font);
  font-size: 1rem;
  font-weight: 500;
  color: var(--gd-ink);
  background: #fff;
  border: 1px solid var(--gd-line);
  border-radius: 14px;
  padding: 0.78rem 0.95rem;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gd-ink) 50%),
    linear-gradient(135deg, var(--gd-ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 1.1em, calc(100% - 13px) 1.1em;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.4rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-card__select:focus {
  outline: none;
  border-color: var(--gd-ink);
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

.auth-card__consent {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.05rem 0;
  min-width: 0;
  max-width: 100%;
  cursor: pointer;
}

.auth-card__consent input[type="checkbox"] {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin-top: 0.15em;
  accent-color: var(--gd-ink);
  cursor: pointer;
}

.auth-card__consent-text {
  font-family: var(--gd-font);
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--gd-muted);
}

.auth-card__consent-text a {
  color: var(--gd-ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-card__consent-text strong {
  color: var(--gd-ink);
  font-weight: 600;
}

/* Inscription : tenir sur 1 écran */
html.gd-fit-screen,
body.gd-body--auth.gd-fit-screen {
  height: 100%;
}

body.gd-body--auth.gd-fit-screen {
  min-height: 100dvh;
  overflow: hidden;
}

body.gd-fit-screen .gd-header__inner {
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.gd-auth--fit {
  width: min(500px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 0.25rem 0 0.5rem;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.gd-auth-card--fit {
  padding: 1.15rem 1.2rem 1.05rem;
  max-height: calc(100dvh - 4.25rem);
  overflow: hidden;
}

.gd-auth-card--fit .auth-page-head {
  margin-bottom: 0.85rem;
}

.gd-auth-card--fit .auth-page-head__rule {
  margin-bottom: 0.65rem;
}

.gd-auth-card--fit .auth-page-head__kicker {
  margin-bottom: 0.4rem;
}

.gd-auth-card--fit .auth-page-head__title {
  font-size: clamp(1.4rem, 3.6vw, 1.75rem);
}

.gd-auth-card--fit .auth-page-head__lead {
  margin-top: 0.45rem;
  font-size: 0.95rem;
  line-height: 1.35;
}

.gd-auth-card--fit .auth-card {
  gap: 0.7rem;
  /* padding ≥ rayon (22px) pour que le bouton ne “sorte” pas des coins */
  padding: 1rem 1.15rem 1.1rem;
}

.gd-auth-card--fit .auth-card__input,
.gd-auth-card--fit .auth-card__select {
  padding: 0.62rem 0.85rem;
  font-size: 0.95rem;
  border-radius: 12px;
}

.gd-auth-card--fit .auth-card__label {
  font-size: 0.58rem;
}

.gd-auth-card--fit .auth-card__hint {
  font-size: 0.78rem;
}

.gd-auth-card--fit .auth-card__consent-text {
  font-size: 0.78rem;
  line-height: 1.35;
}

.gd-auth-card--fit .auth-card__submit {
  padding: 0.8rem 1.25rem;
  margin-top: 0;
}

.gd-auth-card--fit .auth-page-foot {
  margin-top: 0.85rem;
  font-size: 0.92rem;
}

.gd-auth-footer--fit {
  padding: 0.3rem 1rem 0.55rem;
  flex-shrink: 0;
}

.gd-auth-footer--fit .gd-auth-footer__nav {
  display: none;
}

.gd-auth-footer--fit .gd-auth-footer__meta {
  font-size: 0.68rem;
}

@media (max-height: 700px) {
  .gd-auth-card--fit {
    padding: 0.95rem 1rem 0.9rem;
  }

  .gd-auth-card--fit .auth-card {
    gap: 0.55rem;
    padding: 0.9rem 1.05rem 1rem;
  }

  .gd-auth-card--fit .auth-page-head {
    margin-bottom: 0.65rem;
  }

  .gd-auth-card--fit .auth-page-head__lead {
    display: none;
  }
}

@media (max-width: 560px) {
  .gd-header__inner {
    padding: 0.95rem 1rem;
  }

  .gd-auth {
    width: min(100% - 1.25rem, 520px);
  }

  .gd-auth--fit {
    width: min(100% - 1rem, 500px);
  }
}
