/*
 * login.css — Styles de la page de connexion In'Side (index.php)
 *
 * OBJECTIF DU LAYOUT
 * ------------------
 * Le formulaire est l'élément important : il occupe ~64 % de la carte.
 * La colonne de gauche (marque) est réduite à : logo, une phrase, un visuel.
 * Tout est préfixé par .auth-body / .auth-* pour ne pas toucher aux autres
 * pages qui chargent /assets/style.css.
 */

:root {
  --inside-green: #8acb14;
  --inside-pink: #ee176d;
  --inside-ink: #18263d;
  --inside-muted: #7e8ba0;
}

body.auth-body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(130deg, #f6f8fc 0%, #fbf7fa 100%);
  color: var(--inside-ink);
  font-family: Arial, Helvetica, sans-serif;
  display: block;
}
.auth-body *, .auth-body *::before, .auth-body *::after { box-sizing: border-box; }

.auth-body .auth-wrapper { width: min(1280px, calc(100% - 72px)); margin: 38px auto 0; }

/* Carte : 45 % marque / 55 % formulaire (à l'origine 61 % / 39 % ; 36 % / 64 % était trop juste) */
.auth-body .auth-card {
  display: grid;
  grid-template-columns: 45% 55%;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid #e8ebf2;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 24px 65px rgba(25, 39, 68, .09);
  padding: 0;
}

/* ---------- Colonne gauche (marque) ---------- */
.auth-body .auth-brand {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 56px 40px 40px 48px;
  background: linear-gradient(147deg, #fff 20%, #fff8fb 100%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.brand-logo, .brand-subtitle, .brand-line, .brand-message, .brand-features { position: relative; z-index: 2; }
.auth-brand .logo-inside { display: block; width: min(330px, 100%); height: auto; max-height: 120px; object-fit: contain; object-position: left;
  /* Le PNG du logo n'est pas détouré (fond blanc) : « multiply » rend ce fond transparent
     là où il passe devant les ronds décoratifs. Inutile si le PNG est un jour détouré. */
  mix-blend-mode: multiply; }
.auth-brand .brand-subtitle { margin: 12px 0 24px; font-size: 15px; color: var(--inside-muted); }
.brand-line { width: 60px; height: 4px; border-radius: 4px; background: var(--inside-pink); margin: 0 0 24px; }
/* Phrase d'accroche : largeur plafonnée pour rester lisible */
.brand-message { margin: 0; max-width: 420px; font-size: 21px; font-weight: 700; line-height: 1.3; letter-spacing: -.4px; }

/* Décor : la photo a été retirée (essais de cadrage peu concluants) au profit des deux
   « ronds » d'origine : un cercle vert en haut à droite, une ellipse rose en bas à droite.
   Ils sont purement décoratifs et passent sous le texte (z-index des contenus = 2). */
.auth-brand::before { content: ""; position: absolute; width: 230px; height: 230px; border-radius: 50%; top: 190px; right: -65px; background: #eaf6d9; } /* top 125 → 190 px : on le descend sous le logo */
.auth-brand::after  { content: ""; position: absolute; width: 380px; height: 270px; border-radius: 50%; bottom: -165px; right: -80px; background: #fce1ec; }

/* Les 3 pastilles en bas de la colonne (margin-top:auto les colle en bas) */
.brand-features { display: flex; gap: 24px; width: 100%; margin-top: auto; padding-top: 24px; }
.brand-feature { flex: 1; min-width: 0; text-align: center; font-size: 13px; line-height: 1.4; color: var(--inside-ink); }
.brand-feature-icon { display: grid; place-items: center; width: 55px; height: 55px; margin: 0 auto 12px; border-radius: 50%; background: #fae3ed; color: var(--inside-pink); }
.brand-feature:nth-child(2) .brand-feature-icon { background: #eaf6dd; color: #5c9b12; }
.brand-feature svg { width: 26px; height: 26px; stroke: currentColor; stroke-width: 1.9; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Colonne droite (formulaire) ---------- */
.auth-body .auth-form {
  display: flex;
  align-items: center;      /* formulaire centré verticalement */
  justify-content: center;  /* et horizontalement dans la colonne */
  min-width: 0;
  padding: 48px 40px;
  background: #fff;
  border-left: 1px solid #f0f1f5;
}
/* Largeur utile des champs : plus large qu'avant, mais plafonnée pour rester lisible */
.auth-form-inner { width: 100%; max-width: 560px; }

.auth-form h1 { margin: 0 0 12px; font-size: 37px; letter-spacing: -1px; color: var(--inside-ink); }
.auth-form .auth-intro { font-size: 16px; line-height: 1.5; color: var(--inside-muted); margin: 0 0 36px; }
.auth-form .form-group { margin: 0 0 19px; }

.auth-form .field-shell {
  display: flex; align-items: center; gap: 14px;
  min-height: 76px; padding: 12px 16px 12px 13px;
  border: 1px solid #dce1ea; border-radius: 15px; background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.auth-form .field-shell:focus-within { border-color: var(--inside-green); box-shadow: 0 0 0 4px rgba(138, 203, 20, .14); }
.auth-form .field-icon { display: grid; place-items: center; width: 43px; height: 43px; flex: 0 0 43px; border-radius: 12px; background: #f2f4f8; color: #737f93; }
.auth-form .field-icon svg, .auth-form .password-toggle svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.auth-form .field-content { flex: 1; min-width: 0; }
.auth-form .field-content label { display: block; margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--inside-ink); }

/* Le champ de saisie lui-même : sans cadre propre (le cadre est .field-shell).
   Les sélecteurs [type=...] et !important neutralisent les styles d'input
   globaux de style.css qui ajoutaient une 2e bordure à l'intérieur. */
.auth-form .field-content input[type="email"],
.auth-form .field-content input[type="password"],
.auth-form .field-content input[type="text"] {
  width: 100%; min-width: 0; display: block; height: auto;
  border: 0 !important; outline: 0; box-shadow: none !important;
  background: transparent !important; padding: 2px 0 !important;
  font: inherit; font-size: 16px; color: var(--inside-ink);
}
.auth-form .field-content input::placeholder { color: #9da9bb; font-style: italic; }

.auth-form .password-toggle { border: 0; background: none; color: #78859b; cursor: pointer; padding: 8px; display: grid; place-items: center; }
.auth-form .password-toggle:focus-visible { outline: 2px solid var(--inside-green); outline-offset: 2px; border-radius: 6px; }

.auth-form .forgot-wrap { text-align: right; margin: 4px 0 26px; }
.auth-form .forgot-wrap a { font-size: 14px; color: var(--inside-pink); text-decoration: none; }
.auth-form .forgot-wrap a:hover { text-decoration: underline; }

.auth-form .login-submit {
  display: flex; align-items: center; justify-content: center; gap: 13px;
  width: 100%; min-height: 62px; padding: 12px 20px; border: 0; border-radius: 13px;
  background: linear-gradient(180deg, var(--inside-green), #78bf09);
  box-shadow: 0 8px 15px rgba(109, 177, 9, .16);
  color: #fff; font-size: 17px; font-weight: 700; cursor: pointer;
  transition: filter .2s, transform .2s;
}
.auth-form .login-submit:hover { filter: brightness(.96); transform: translateY(-1px); }
.login-submit svg { width: 23px; height: 23px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

.secure-note { display: flex; align-items: flex-start; gap: 15px; margin-top: 34px; padding: 18px; border-radius: 14px; background: linear-gradient(110deg, #fff8fb, #fcebf2); }
.secure-note .secure-icon { flex: 0 0 42px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: #fbe1eb; color: var(--inside-pink); }
.secure-note svg { width: 23px; height: 23px; stroke: currentColor; stroke-width: 1.9; fill: none; }
.secure-note strong { font-size: 14px; }
.secure-note p { margin: 6px 0 0; color: #7b8290; font-size: 13px; line-height: 1.55; }

.auth-form .alert-error { margin-bottom: 20px; padding: 12px 15px; background: #fff0f2; color: #a81a3f; border: 1px solid #ffd3dc; border-radius: 10px; font-size: 14px; }

.auth-body .auth-footer { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 22px 10px 28px; color: #9aa5b8; font-size: 13px; text-align: center; }

/* ---------- Tablette ---------- */
@media (max-width: 1000px) {
  .auth-body .auth-card { grid-template-columns: 42% 58%; }
  .auth-body .auth-brand { padding: 44px 26px 32px; }
  .brand-message { font-size: 17px; }
  .brand-features { gap: 12px; }
  .auth-body .auth-form { padding: 40px 28px; }
}

/* ---------- Mobile : la marque passe en bandeau compact au-dessus ---------- */
@media (max-width: 760px) {
  .auth-body .auth-wrapper { width: calc(100% - 28px); margin: 14px auto 0; }
  .auth-body .auth-card { display: block; min-height: 0; border-radius: 22px; }
  .auth-body .auth-brand { padding: 26px 26px 22px; }
  .auth-brand .logo-inside { width: 200px; max-height: 72px; }
  .auth-brand .brand-subtitle { margin: 8px 0 0; font-size: 14px; }
  .brand-line, .brand-message { display: none; }
  .brand-features { gap: 10px; padding-top: 22px; }
  .brand-feature { font-size: 11px; }
  .brand-feature-icon { width: 44px; height: 44px; margin-bottom: 7px; }
  .auth-body .auth-form { display: block; border-left: 0; border-top: 1px solid #f1f2f5; padding: 28px 22px 32px; }
  .auth-form h1 { font-size: 29px; }
  .auth-form .auth-intro { margin-bottom: 24px; font-size: 14px; }
  .secure-note { margin-top: 24px; }
  .auth-body .auth-footer { font-size: 11px; }
}
