/* Webmail VSP TECH : couleurs de la marque sur le thème Elastic de Roundcube */
:root { --vsp-orange: #e67e22; --vsp-orange-dark: #d35400; --vsp-navy: #1f2d3d; --vsp-navy-2: #2c3e50; --vsp-navy-3: #34495e; }

/* Boutons principaux */
.btn-primary, .btn.btn-primary, .button.mainaction, button.mainaction, input.button.mainaction,
.formbuttons .btn-primary, .floating-action-buttons a.button {
  background-color: var(--vsp-orange) !important; border-color: var(--vsp-orange-dark) !important; color: #fff !important;
}
.btn-primary:hover, .button.mainaction:hover, button.mainaction:hover { background-color: var(--vsp-orange-dark) !important; }

/* Menu latéral */
#layout-menu { background-color: var(--vsp-navy-2) !important; }
#layout-menu a, #layout-menu .special-buttons a { color: #dfe6ee !important; }
#layout-menu a.selected, #layout-menu a:hover, #layout-menu a:focus { background-color: var(--vsp-navy-3) !important; color: #fff !important; }
#layout-menu a.selected:before, #layout-menu a.compose:before { color: var(--vsp-orange) !important; }

/* Liens, sélections, champs */
a, .header-title a { color: var(--vsp-orange-dark); }
.listing li.selected, .listing li.focused, table.records-table tr.selected td, table.records-table tr.focused td {
  background-color: #fdf0e3 !important; color: var(--vsp-navy) !important;
}
.listing li.selected > a, table.records-table tr.selected td a { color: var(--vsp-navy) !important; }
.form-control:focus, input.form-control:focus, textarea.form-control:focus, select.form-control:focus {
  border-color: var(--vsp-orange) !important; box-shadow: 0 0 0 .2rem rgba(230, 126, 34, .2) !important;
}
.badge, .unreadcount, .listing li .unreadcount { background-color: var(--vsp-orange) !important; color: #fff !important; }

/* ------------------------------------------------------------------ */
/* Page de connexion : formulaire à gauche, présentation VSP TECH à droite */
/* ------------------------------------------------------------------ */
/* Page de connexion seulement : défilement normal (Elastic fige la hauteur pour l'application) */
body.task-login { height: auto !important; min-height: 100%; overflow: auto !important; }
body.task-login { background: #f4f6f9 !important; }
body.task-login #layout { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); min-height: 100vh; height: auto !important; overflow: visible !important; }
body.task-login #layout-content { order: 1; display: flex !important; flex-direction: column; justify-content: center; align-items: center; padding: 3rem 2rem !important; background: #fff !important; min-width: 0; }
body.task-login #layout-content { height: auto !important; overflow: visible !important; position: relative; isolation: isolate; }
body.task-login #layout-content > :not(.vsp-envelopes) { position: relative; z-index: 1; }
body.task-login #logo, body.task-login #login-form { position: static !important; top: auto !important; left: auto !important; transform: none !important; }
.vsp-login-head #logo { display: block; max-width: 190px; max-height: 60px; width: auto; margin: 0 0 2rem !important; }
.vsp-login-head { width: 100%; max-width: 380px; margin: 0 0 1.25rem; text-align: left; }
.vsp-login-head h2 { margin: 0 0 .4rem; font-size: 1.6rem; font-weight: 700; color: var(--vsp-navy); letter-spacing: -.01em; line-height: 1.25; overflow-wrap: anywhere; }
.vsp-login-head h2 span { background: linear-gradient(90deg, var(--vsp-orange-dark), #f0943a, var(--vsp-orange-dark)); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: vsp-shine-text 6s linear infinite; }
@keyframes vsp-shine-text { to { background-position: -200% 0; } }
.vsp-login-kicker { display: inline-flex; align-items: center; gap: .45rem; margin: 0 0 .6rem !important; padding: .3rem .7rem; border-radius: 999px;
  background: #fdf0e3; color: var(--vsp-orange-dark) !important; font-size: .74rem !important; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.vsp-login-kicker i { width: 7px; height: 7px; border-radius: 50%; background: #22a35a; box-shadow: 0 0 0 0 rgba(34, 163, 90, .6); animation: vsp-pulse 2s ease-out infinite; }
@keyframes vsp-pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 163, 90, .55); } 80%, 100% { box-shadow: 0 0 0 8px rgba(34, 163, 90, 0); } }
.vsp-login-head p { margin: 0; color: #6b7a89; font-size: .95rem; line-height: 1.5; }
body.task-login #login-form { width: 100%; max-width: 380px; margin: 0; padding: 0; background: transparent; box-shadow: none; }
body.task-login #login-form table { width: 100%; }
body.task-login #login-form td.input { width: 100%; }
body.task-login #login-form .form-control, body.task-login #login-form input.form-control {
  height: 48px; border-radius: 12px; border: 1px solid #dfe4ea; font-size: 1rem; padding: 0 .9rem; background: #fbfcfd;
}
body.task-login #login-form .input-group-text { border-radius: 12px 0 0 12px; border-color: #dfe4ea; background: #f4f6f9; color: #8a96a3; }
body.task-login #login-form .input-group .form-control { border-radius: 0 12px 12px 0; }
body.task-login #login-form .formbuttons { margin-top: 1.25rem; }
body.task-login #login-form .formbuttons .btn, body.task-login #login-form button.mainaction {
  width: 100%; height: 50px; border-radius: 12px; font-size: 1.02rem; font-weight: 700; letter-spacing: .01em; text-transform: none !important;
  background: linear-gradient(135deg, #f0943a, var(--vsp-orange-dark)) !important; border: 0 !important;
  box-shadow: 0 12px 26px -14px rgba(230, 126, 34, .95); transition: transform .15s, box-shadow .15s;
}
body.task-login #login-form .formbuttons .btn:hover { transform: translateY(-1px); box-shadow: 0 16px 30px -14px rgba(230, 126, 34, 1); }
body.task-login #login-form .formbuttons .btn { position: relative; overflow: hidden; }
body.task-login #login-form .formbuttons .btn::after { content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: vsp-btn-shine 4.5s ease-in-out 1.2s infinite; }
@keyframes vsp-btn-shine { 0% { left: -60%; } 30%, 100% { left: 130%; } }
/* Entrée progressive des blocs du formulaire */
.vsp-login-head, body.task-login #login-form, .vsp-login-info { animation: vsp-in .7s cubic-bezier(.2,.7,.2,1) both; }
body.task-login #login-form { animation-delay: .12s; }
.vsp-login-info { animation-delay: .24s; }
/* Suffixe « @domaine » dans le champ adresse */
.vsp-has-at { position: relative; display: flex !important; align-items: stretch; }
.vsp-has-at .form-control { padding-right: .9rem !important; border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.vsp-at { display: flex; align-items: center; padding: 0 .85rem; max-width: 58%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border: 1px solid #dfe4ea; border-left: 0; border-radius: 0 12px 12px 0; background: #fdf0e3; color: var(--vsp-orange-dark); font-weight: 600; font-size: .95rem; }
/* Aide sous le formulaire */
.vsp-login-info { width: 100%; max-width: 380px; margin: 1.5rem 0 0; display: grid; gap: .55rem; text-align: left; }
.vsp-login-info details { border: 1px solid #e6ebf0; border-radius: 12px; background: #fbfcfd; transition: border-color .2s, box-shadow .2s; }
.vsp-login-info details[open] { border-color: #f3c99f; box-shadow: 0 8px 22px -16px rgba(31, 45, 61, .45); background: #fff; }
.vsp-login-info summary { cursor: pointer; list-style: none; padding: .7rem .9rem; font-size: .88rem; font-weight: 600; color: var(--vsp-navy); display: flex; justify-content: space-between; gap: .5rem; }
.vsp-login-info summary::-webkit-details-marker { display: none; }
.vsp-login-info summary::after { content: '+'; color: var(--vsp-orange-dark); font-weight: 700; transition: transform .2s; }
.vsp-login-info details[open] summary::after { transform: rotate(45deg); }
.vsp-login-info details p { margin: 0; padding: 0 .9rem .8rem; font-size: .84rem; line-height: 1.55; color: #5d6b79; }
.vsp-login-info b { color: var(--vsp-navy); }
.vsp-login-info a { color: var(--vsp-orange-dark); font-weight: 600; }
.vsp-login-safe { display: flex; gap: .55rem; align-items: flex-start; margin: .35rem 0 0; font-size: .8rem; line-height: 1.45; color: #6b7a89; }
.vsp-login-safe svg { flex: none; width: 16px; height: 16px; margin-top: .1rem; fill: #22a35a; }
/* Enveloppes en fond de la colonne du formulaire */
.vsp-envelopes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.vsp-envelopes span { position: absolute; bottom: -80px; width: 44px; height: 44px; opacity: 0; animation: vsp-envelope 22s linear infinite; }
.vsp-envelopes svg { width: 100%; height: 100%; fill: var(--vsp-orange); }
.vsp-envelopes span:nth-child(odd) svg { fill: var(--vsp-navy-3); }
.vsp-envelopes span:nth-child(1)  { left: 4%;  width: 34px; height: 34px; animation-delay: 0s; }
.vsp-envelopes span:nth-child(2)  { left: 14%; width: 52px; height: 52px; animation-delay: -4s; animation-duration: 26s; }
.vsp-envelopes span:nth-child(3)  { left: 24%; width: 28px; height: 28px; animation-delay: -9s; }
.vsp-envelopes span:nth-child(4)  { left: 36%; width: 40px; height: 40px; animation-delay: -15s; animation-duration: 25s; }
.vsp-envelopes span:nth-child(5)  { left: 48%; width: 30px; height: 30px; animation-delay: -2s; animation-duration: 19s; }
.vsp-envelopes span:nth-child(6)  { left: 58%; width: 56px; height: 56px; animation-delay: -11s; animation-duration: 28s; }
.vsp-envelopes span:nth-child(7)  { left: 68%; width: 32px; height: 32px; animation-delay: -6s; }
.vsp-envelopes span:nth-child(8)  { left: 78%; width: 46px; height: 46px; animation-delay: -18s; animation-duration: 24s; }
.vsp-envelopes span:nth-child(9)  { left: 88%; width: 30px; height: 30px; animation-delay: -13s; animation-duration: 20s; }
.vsp-envelopes span:nth-child(10) { left: 94%; width: 38px; height: 38px; animation-delay: -7s; animation-duration: 27s; }
.vsp-envelopes span:nth-child(11) { left: 9%;  width: 26px; height: 26px; animation-delay: -19s; animation-duration: 18s; }
.vsp-envelopes span:nth-child(12) { left: 72%; width: 24px; height: 24px; animation-delay: -21s; animation-duration: 21s; }
@keyframes vsp-envelope {
  0% { transform: translateY(0) rotate(-12deg); opacity: 0; }
  10% { opacity: .1; }
  50% { transform: translate(18px, -55vh) rotate(8deg); }
  90% { opacity: .1; }
  100% { transform: translate(-10px, -115vh) rotate(-6deg); opacity: 0; }
}
.vsp-login-help { width: 100%; max-width: 380px; margin: 1.25rem 0 0; font-size: .86rem; color: #6b7a89; line-height: 1.5; text-align: left; }
.vsp-login-help a { color: var(--vsp-orange-dark); font-weight: 600; }
body.task-login #login-footer { width: 100%; max-width: 380px; margin-top: 2rem; color: #9aa6b2 !important; font-size: .8rem; text-align: left; }

/* Panneau VSP TECH */
#vsp-promo { order: 2; position: relative; overflow: hidden; display: flex; align-items: center; padding: 3rem clamp(1.5rem, 4vw, 4rem); color: #fff;
  background: radial-gradient(120% 90% at 100% 0%, #3b2a20 0%, transparent 55%), linear-gradient(150deg, #142030 0%, var(--vsp-navy-2) 55%, #1a2633 100%); }
#vsp-promo::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 34px 34px; mask-image: radial-gradient(80% 80% at 70% 30%, #000, transparent 75%); -webkit-mask-image: radial-gradient(80% 80% at 70% 30%, #000, transparent 75%); }
.vsp-glow { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; pointer-events: none; animation: vsp-float 14s ease-in-out infinite; }
.vsp-glow-a { width: 380px; height: 380px; background: #e67e22; top: -120px; right: -80px; }
.vsp-glow-b { width: 320px; height: 320px; background: #1e4ea1; bottom: -140px; left: -60px; animation-delay: -7s; opacity: .45; }
@keyframes vsp-float { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-30px, 25px) scale(1.08); } }
.vsp-promo-in { position: relative; z-index: 1; max-width: 560px; animation: vsp-in .8s ease both; }
@keyframes vsp-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.vsp-promo-logo { height: 46px; width: auto; margin-bottom: 1.75rem; }
.vsp-kicker { margin: 0 0 .5rem; text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: #ffb46b; }
#vsp-promo h2 { margin: 0 0 .9rem; font-size: clamp(1.6rem, 2.6vw, 2.3rem); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; color: #fff;
  background: linear-gradient(90deg, #fff 0%, #ffe2c4 60%, #ffb46b 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.vsp-lead { margin: 0 0 1.5rem; color: rgba(255,255,255,.78); font-size: 1rem; line-height: 1.6; }
.vsp-domain { display: flex; gap: .5rem; padding: .4rem; border-radius: 14px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(6px); margin: 0 0 1.5rem; }
.vsp-domain input { flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; border-radius: 10px; padding: 0 .9rem; background: transparent; color: #fff; font-size: .95rem; }
.vsp-domain input::placeholder { color: rgba(255,255,255,.55); }
.vsp-domain button { height: 44px; padding: 0 1.1rem; border: 0; border-radius: 10px; font-weight: 700; color: #fff; cursor: pointer; background: linear-gradient(135deg, #f0943a, var(--vsp-orange-dark)); }
.vsp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.vsp-services { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.vsp-services a { display: grid; grid-template-columns: 38px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: .75rem; align-items: center; padding: .7rem .8rem; border-radius: 12px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); color: #fff !important; text-decoration: none; transition: background .2s, border-color .2s, transform .2s; }
.vsp-services a:hover { background: rgba(255,255,255,.1); border-color: rgba(255,180,107,.55); transform: translateY(-2px); }
.vsp-services .ic { grid-row: 1 / 3; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, #f0943a, var(--vsp-orange-dark)); }
.vsp-services .ic svg { width: 18px; height: 18px; fill: #fff; }
.vsp-services b { font-size: .92rem; font-weight: 700; line-height: 1.2; }
.vsp-services small { font-size: .78rem; color: rgba(255,255,255,.65); line-height: 1.3; }
.vsp-promo-cta { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 1.25rem; }
.vsp-btn { display: inline-flex; align-items: center; height: 44px; padding: 0 1.2rem; border-radius: 12px; font-weight: 700; font-size: .92rem; text-decoration: none; color: var(--vsp-navy) !important; background: #fff; transition: transform .15s; }
.vsp-btn:hover { transform: translateY(-1px); }
.vsp-btn-ghost { background: transparent; color: #fff !important; border: 1px solid rgba(255,255,255,.35); }
.vsp-facts { margin: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .8rem; color: rgba(255,255,255,.7); }
.vsp-facts span::before { content: '✓'; color: #6ee7a8; font-weight: 700; margin-right: .35rem; }

@media (max-width: 960px) {
  body.task-login #layout { grid-template-columns: minmax(0, 1fr); }
  body.task-login #layout-content { padding: 2.25rem 1.25rem 1.5rem !important; min-height: auto; }
  #vsp-promo { padding: 2rem 1.25rem 2.25rem; }
  .vsp-promo-logo { display: none; }
  .vsp-services { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) { .vsp-envelopes span { animation-duration: 18s; } }
@media (prefers-reduced-motion: reduce) {
  .vsp-glow, .vsp-promo-in, .vsp-login-head, body.task-login #login-form, .vsp-login-info, .vsp-login-head h2 span, .vsp-login-kicker i { animation: none !important; }
  body.task-login #login-form .formbuttons .btn::after, .vsp-envelopes { display: none; }
}
