/* ══ UTILITAIRE CRITIQUE ══ */
.hide { display: none !important; }

/* =================================================================
   css-login.css — Day Experience B2B v2
   Chargé UNIQUEMENT sur login.cfm
   NB : variables, reset → dans css-global.css si disponible
   ================================================================= */

/* ══ VARIABLES ══ */
:root {
  --red:      #D01F3C;
  --red-dark: #b01830;
  --red-soft: #fff0f2;
  --ink:      #18181f;
  --muted:    #72728a;
  --border:   #e8e8f0;
  --white:    #ffffff;
  --off:      #f8f8fb;
  --green:    #0b8a4e;
  --green-bg: #edfaf4;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--white);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
}

/* ══ LAYOUT 50/50 ══ */
.split {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ══ GAUCHE — PHOTO ══ */
.side-photo { position: relative; overflow: hidden; }
.side-photo-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(18,18,28,.45) 0%, rgba(18,18,28,.08) 45%, rgba(18,18,28,.62) 100%),
    url('/img/login/side-photo.jpg')
    center / cover no-repeat;
}
.side-photo-content {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 40px 44px;
  animation: fadeIn .7s ease both;
}

/* Logo gauche */
.photo-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.photo-logo-mark {
  width: 36px; height: 36px; background: var(--red);
  border-radius: 50% 50% 50% 0;
  display: grid; place-items: center; color: #fff; font-size: 16px;
}
.photo-logo-name { font-family: 'DM Serif Display', serif; font-size: 21px; color: #fff; line-height: 1; }
.photo-logo-name em { color: #ffc5cf; font-style: italic; }
.photo-logo-sub { font-size: 9px; color: rgba(255,255,255,.45); letter-spacing: 1.8px; text-transform: uppercase; margin-top: 2px; }

/* Texte central */
.photo-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
  color: rgba(255,255,255,.82); font-size: 11px; font-weight: 500;
  letter-spacing: 1.8px; text-transform: uppercase;
  padding: 6px 16px; border-radius: 100px; margin-bottom: 20px;
  backdrop-filter: blur(6px);
}
.photo-title {
  font-family: 'DM Serif Display', serif;
  font-size: 50px; font-weight: 400; color: #fff;
  line-height: 1.05; letter-spacing: -.5px; margin-bottom: 16px;
}
.photo-title em { font-style: italic; color: #ffc5cf; }
.photo-subtitle {
  font-size: 14.5px; color: rgba(255,255,255,.65);
  font-weight: 300; line-height: 1.7; max-width: 380px; margin-bottom: 28px;
}

/* Mosaïque activités */
.act-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 110px 100px;
  gap: 8px;
}
.act-tile {
  border-radius: 12px; overflow: hidden; position: relative;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
  transition: transform .3s, box-shadow .3s;
}
.act-tile:first-child { grid-row: span 2; border-radius: 14px; }
.act-tile:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,.45); }
.act-tile-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(.78); transition: transform .5s;
}
.act-tile:hover .act-tile-bg { transform: scale(1.06); }
.act-tile-grad { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.72) 0%, transparent 55%); }
.act-tile-badge {
  position: absolute; top: 8px; right: 8px;
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(6px); border-radius: 20px;
  padding: 3px 9px; font-size: 10px; font-weight: 600; color: #fff;
}
.act-tile-label {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 10px 12px;
  font-size: 11.5px; font-weight: 600; color: #fff; line-height: 1.3;
}
.act-tile-label small { display: block; font-size: 10px; color: rgba(255,255,255,.6); font-weight: 400; margin-top: 1px; }

/* Stats bas */
.photo-stats { display: flex; gap: 32px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); }
.photo-stat-num { font-family: 'DM Serif Display', serif; font-size: 28px; color: #fff; line-height: 1; }
.photo-stat-lbl { font-size: 11px; color: rgba(255,255,255,.45); margin-top: 3px; letter-spacing: .3px; }

/* ══ DROITE — FORMULAIRE ══ */
.side-form {
  display: flex; flex-direction: column;
  justify-content: space-between;
  background: var(--white); position: relative;
  height: 100vh;
  overflow-y: auto;
}
.form-top-link {
  position: absolute; top: 30px; right: 36px;
  font-size: 13px; color: var(--muted); z-index: 10;
}
.form-top-link a {
  color: var(--red); font-weight: 600; text-decoration: none; margin-left: 4px;
  transition: color .18s;
}
.form-top-link a:hover { color: var(--red-dark); }

.form-center {
  flex: 1; display: flex; align-items: flex-start; justify-content: center;
  padding: 20px 60px 32px;
}
.form-inner { width: 100%; max-width: 400px; }

/* Header formulaire */
.form-header { margin-bottom: 32px; }
.form-kicker {
  font-size: 11px; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; color: var(--red);
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
  animation: fadeUp .45s ease .05s both;
}
.form-kicker::before { content: ''; width: 20px; height: 1.5px; background: var(--red); }
.form-title {
  font-family: 'DM Serif Display', serif;
  font-size: 36px; font-weight: 400; color: var(--ink);
  line-height: 1.1; letter-spacing: -.3px; margin-bottom: 8px;
  animation: fadeUp .45s ease .12s both;
}
.form-subtitle {
  font-size: 14px; color: var(--muted); font-weight: 300; line-height: 1.6;
  animation: fadeUp .45s ease .18s both;
}

/* Champs */
.form-group { margin-bottom: 16px; animation: fadeUp .45s ease .22s both; }
.form-group label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--muted); letter-spacing: .5px; text-transform: uppercase; margin-bottom: 8px;
}
.form-input {
  width: 100%; padding: 13px 16px;
  border: 1.5px solid var(--border); border-radius: 12px;
  font-size: 14.5px; font-family: 'Inter', sans-serif;
  color: var(--ink); background: var(--white);
  outline: none; transition: border-color .18s, box-shadow .18s;
}
.form-input:focus { border-color: var(--red); box-shadow: 0 0 0 4px rgba(208,31,60,.08); }
.form-input::placeholder { color: #b0b0c0; }

/* Mot de passe + œil */
.input-wrap { position: relative; }
.input-wrap .form-input { padding-right: 46px; }
.input-eye {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 15px; transition: color .18s;
}
.input-eye:hover { color: var(--ink); }

/* Lien mot de passe oublié */
.forgot-link { display: flex; justify-content: flex-end; margin-top: 8px; }
.forgot-link a {
  font-size: 12.5px; color: var(--muted); text-decoration: none;
  font-weight: 500; transition: color .18s; cursor: pointer;
}
.forgot-link a:hover { color: var(--red); }

/* Erreur connexion */
.login-error {
  background: var(--red-soft); border: 1px solid rgba(208,31,60,.2);
  border-radius: 10px; padding: 12px 16px;
  font-size: 13px; color: var(--red); font-weight: 500;
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.login-error::before { content: '⚠'; font-size: 14px; }

/* Boutons */
.form-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; animation: fadeUp .45s ease .28s both; }
.btn-connect {
  width: 100%; padding: 15px; background: var(--red); color: #fff; border: none;
  border-radius: 12px; font-size: 15px; font-family: 'Inter', sans-serif;
  font-weight: 700; cursor: pointer; transition: background .18s, transform .15s; letter-spacing: .3px;
}
.btn-connect:hover { background: var(--red-dark); transform: scale(1.01); }
.or-sep {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; color: var(--muted); margin: 2px 0;
}
.or-sep::before, .or-sep::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.btn-create {
  width: 100%; padding: 14px; background: var(--white); color: var(--ink);
  border: 1.5px solid var(--border); border-radius: 12px; font-size: 14px;
  font-family: 'Inter', sans-serif; font-weight: 500; cursor: pointer;
  transition: all .18s; text-decoration: none; display: block; text-align: center;
}
.btn-create:hover { border-color: var(--ink); color: var(--ink); }

/* Ressources */
.resources-inline {
  margin-top: 20px; padding: 18px 20px;
  background: var(--off); border: 1px solid var(--border); border-radius: 14px;
  animation: fadeUp .45s ease .34s both;
}
.resources-inline-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .8px; color: var(--muted); margin-bottom: 12px;
}
.resources-inline-links { display: flex; flex-direction: column; gap: 6px; }
.ri-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 13px; background: var(--white);
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 13px; font-weight: 500; color: var(--ink);
  text-decoration: none; transition: all .18s;
}
.ri-link:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); transform: translateX(3px); }
.ri-icon {
  width: 28px; height: 28px; flex-shrink: 0;
  background: var(--off); border: 1px solid var(--border);
  border-radius: 8px; display: grid; place-items: center;
  font-size: 12px; transition: all .18s;
}
.ri-link:hover .ri-icon { background: rgba(208,31,60,.08); border-color: var(--red); }

/* Footer légal */
.form-footer {
  margin-top: 20px; padding-top: 18px;
  border-top: 1px solid var(--border); text-align: center;
  animation: fadeUp .45s ease .40s both;
}
.form-footer p { font-size: 12px; color: var(--muted); font-weight: 300; line-height: 1.75; }
.form-footer a { color: var(--red); text-decoration: none; font-weight: 500; }
.form-footer a:hover { text-decoration: underline; }

/* ══ ANIMATIONS ══ */
@keyframes fadeUp { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

/* ══ MOBILE LOGO ══ */
.mobile-logo { display: none; align-items: center; gap: 9px; text-decoration: none; padding: 22px 24px 0; }
.mobile-logo-mark {
  width: 32px; height: 32px; background: var(--red);
  border-radius: 50% 50% 50% 0;
  display: grid; place-items: center; color: #fff; font-size: 14px;
}
.mobile-logo-name { font-family: 'DM Serif Display', serif; font-size: 18px; color: var(--ink); line-height: 1; }
.mobile-logo-name em { color: var(--red); font-style: italic; }
.mobile-logo-sub { font-size: 9px; color: var(--muted); letter-spacing: 1.6px; text-transform: uppercase; margin-top: 2px; }


/* =================================================================
   POPUP — IDENTIFIANTS OUBLIÉS (nouvelle maquette responsive)
   Remplace l'ancien #env-form + Magnific Popup
   ================================================================= */

/* ── Overlay ── */
#modal-identifiants-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(18,18,28,.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
  z-index: 9999; padding: 24px;
}
#modal-identifiants-overlay.open {
  display: flex;
  animation: fadeOverlay .3s ease both;
}
@keyframes fadeOverlay { from { opacity:0; } to { opacity:1; } }

/* ── Modal ── */
.mid-modal {
  background: var(--white);
  border-radius: 18px;
  width: 100%; max-width: 420px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,.28);
  animation: midSlideUp .35s cubic-bezier(.34,1.28,.64,1) both;
}
@keyframes midSlideUp {
  from { opacity:0; transform:translateY(20px) scale(.97); }
  to   { opacity:1; transform:translateY(0)   scale(1);   }
}

/* ── En-tête rouge ── */
.mid-header {
  background: var(--red);
  padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.mid-header-title {
  font-family: 'Inter', sans-serif;
  font-size: 17px; font-weight: 700; color: #fff; letter-spacing: .2px;
}
.mid-close {
  width: 30px; height: 30px;
  background: rgba(255,255,255,.2); border: 1.5px solid rgba(255,255,255,.35);
  border-radius: 50%; display: grid; place-items: center;
  cursor: pointer; color: #fff; font-size: 14px; font-weight: 700;
  transition: background .18s; flex-shrink: 0;
  font-family: 'Inter', sans-serif; line-height: 1;
}
.mid-close:hover { background: rgba(255,255,255,.35); }

/* ── Corps ── */
.mid-body { padding: 28px 32px 32px; }

/* ── ÉTAT 1 : Formulaire ── */
#mid-state-form { display: block; }
#mid-state-success { display: none; }

.mid-desc {
  font-size: 13.5px; color: var(--muted); font-weight: 300;
  line-height: 1.65; margin-bottom: 22px;
}
.mid-desc strong { color: var(--ink); font-weight: 600; }

/* Champ e-mail */
.mid-form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.mid-form-group label {
  font-size: 11px; font-weight: 600; color: var(--muted);
  letter-spacing: .5px; text-transform: uppercase;
}
.mid-input {
  width: 100%; padding: 13px 16px;
  border: 1.5px solid var(--border); border-radius: 12px;
  font-size: 14.5px; font-family: 'Inter', sans-serif;
  color: var(--ink); background: var(--white); outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.mid-input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(208,31,60,.08); }
.mid-input.error { border-color: var(--red); box-shadow: 0 0 0 3px rgba(208,31,60,.12); }
.mid-input::placeholder { color: #c0c0d0; }

/* reCAPTCHA */
.mid-recaptcha-wrap {
  display: flex; justify-content: center;
  margin: 4px 0 22px;
}

/* Message retour serveur */
#mid-msg-container {
  display: none;
  text-align: center; font-size: 13px; font-weight: 600;
  padding: 10px 14px; border-radius: 10px;
  margin-bottom: 16px;
}
#mid-msg-container.msg-success { background: var(--green-bg); color: var(--green); }
#mid-msg-container.msg-error   { background: var(--red-soft);  color: var(--red);   }

/* Bouton envoyer */
.mid-btn-send {
  width: 100%; padding: 14px;
  background: var(--red); color: #fff; border: none;
  border-radius: 12px; font-size: 14.5px; font-family: 'Inter', sans-serif;
  font-weight: 700; cursor: pointer; letter-spacing: .4px; text-transform: uppercase;
  transition: background .18s, transform .15s, box-shadow .15s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.mid-btn-send:hover:not(:disabled) {
  background: var(--red-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(208,31,60,.22);
}
.mid-btn-send:disabled { opacity: .65; cursor: default; transform: none; box-shadow: none; }

/* Spinner inline dans le bouton */
.mid-spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: midSpin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes midSpin { to { transform: rotate(360deg); } }

/* Lien retour */
.mid-back-link { display: flex; justify-content: center; margin-top: 14px; }
.mid-back-link a {
  font-size: 13px; color: var(--muted); text-decoration: none;
  font-weight: 500; transition: color .18s; cursor: pointer;
  display: flex; align-items: center; gap: 5px;
}
.mid-back-link a:hover { color: var(--red); }

/* ── ÉTAT 2 : Succès ── */
.mid-success-icon {
  width: 64px; height: 64px; background: var(--green-bg);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
  animation: midPopIn .5s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes midPopIn { from { transform:scale(0); opacity:0; } to { transform:scale(1); opacity:1; } }

.mid-success-title {
  font-family: 'DM Serif Display', serif;
  font-size: 24px; color: var(--ink);
  text-align: center; margin-bottom: 10px; line-height: 1.2;
}
.mid-success-title em { font-style: italic; color: var(--green); }

.mid-success-text {
  font-size: 13.5px; color: var(--muted); line-height: 1.7;
  font-weight: 300; text-align: center; margin-bottom: 22px;
}
.mid-success-text strong { color: var(--ink); font-weight: 600; }

.mid-btn-close-success {
  width: 100%; padding: 14px;
  background: var(--red); color: #fff; border: none;
  border-radius: 12px; font-size: 14px; font-family: 'Inter', sans-serif;
  font-weight: 700; cursor: pointer;
  transition: background .18s;
}
.mid-btn-close-success:hover { background: var(--red-dark); }


/* ══ RESPONSIVE TABLETTE ≤ 1100px ══ */
@media (max-width: 1100px) {
  .side-photo-content { padding: 36px 32px; }
  .photo-title { font-size: 40px; }
  .act-mosaic { grid-template-rows: 100px 90px; }
  .form-center { padding: 72px 44px 28px; }
  .form-top-link { right: 28px; }
}

/* ══ RESPONSIVE MOBILE ≤ 768px ══ */
@media (max-width: 768px) {
  .split { grid-template-columns: 1fr; min-height: 100vh; }
  .side-photo { display: none; }
  .side-form { min-height: 100vh; }
  .mobile-logo { display: flex !important; }
  .form-top-link { top: 26px; right: 20px; font-size: 12px; }
  .form-center { padding: 28px 24px 24px; align-items: flex-start; }
  .form-inner { max-width: 100%; }

  /* Popup ancré en bas sur mobile */
  #modal-identifiants-overlay { padding: 16px; align-items: flex-end; }
  .mid-modal { border-radius: 18px 18px 0 0; max-width: 100%; }
  .mid-body   { padding: 22px 20px 28px; }
}

/* ══ RESPONSIVE PETIT MOBILE ≤ 480px ══ */
@media (max-width: 480px) {
  .form-title { font-size: 28px; }
  .form-center { padding: 24px 18px 20px; }
  .form-top-link { font-size: 11.5px; right: 14px; top: 22px; }
  .ri-link { font-size: 12px; }
  .mid-header-title { font-size: 15px; }
}