/* ============================================================
   TRONE PRINT - Page de connexion (copie de la maquette "Bienvenue !")
   Tout est scope sous .tp-login : les pages "mot de passe oublie"
   et "inscription" (meme gabarit) ne sont pas touchees.
   Les tailles suivent la hauteur d'ecran (--u = 1vh, borne),
   comme la maquette ou le bloc occupe toute la hauteur.
   ============================================================ */
:root {
    --tpl-ink: #13236e;
    --tpl-text: #24357a;
    --tpl-blue: #1fa0ff;
    --tpl-indigo: #3b4fd8;
    --tpl-violet: #8a3cf0;
    --tpl-magenta: #e040d8;
    --tpl-bg: #f3f5fd;
}

body.login:has(.tp-login) { background: var(--tpl-bg) !important; }

.tp-login {
    --u: clamp(5.6px, 1vh, 11px);
    --panel-w: 46vw;
    position: fixed;
    inset: 0;
    overflow: hidden;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    background: #0b1230;
    z-index: 1;
}

/* ---------- Photo (part sous le panneau, visible a travers le verre) ---------- */
.tp-login__photo {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 30vw;
    background-color: #0b1230;
    background-size: cover;
    background-position: center 35%;
    z-index: 1;
}

/* ---------- Formes brillantes (haut droite / bas droite) ---------- */
.tp-login__glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
}

.tp-login__glow--tr {
    top: -25vh;
    right: -7vw;
    width: 44vw;
    height: 37vh;
    background:
        radial-gradient(ellipse 50% 50% at 50% 44%, #2b0f6e 0 86%, transparent 87%),
        linear-gradient(90deg, #6d2fd8 0%, #b43cf0 45%, #ff52d2 80%, #ff8ae6 100%);
    box-shadow: 0 8px 40px rgba(240, 70, 220, 0.55), inset 0 -6px 18px rgba(255, 255, 255, 0.35);
}

.tp-login__glow--br {
    bottom: -24vh;
    right: -12vw;
    width: 48vw;
    height: 36vh;
    background:
        radial-gradient(ellipse 50% 50% at 50% 58%, #26158a 0 84%, transparent 85%),
        linear-gradient(90deg, #2f6bff 0%, #6a4dff 40%, #c33cf0 75%, #ff5cd6 100%);
    box-shadow: 0 -8px 40px rgba(170, 70, 255, 0.5), inset 0 6px 18px rgba(255, 255, 255, 0.3);
}

/* ---------- Panneau blanc translucide a bord ondule ---------- */
.tp-login__panel,
.tp-login__edge {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--panel-w);
    height: 100%;
}

.tp-login__panel {
    z-index: 3;
    clip-path: polygon(0 0, 80.0% 0.0%, 79.6% 1.1%, 79.1% 2.5%, 78.5% 4.2%, 77.8% 6.1%, 77.2% 8.1%, 76.6% 10.2%, 76.2% 12.2%, 76.0% 14.0%, 76.0% 15.8%, 76.2% 17.5%, 76.5% 19.2%, 76.9% 21.0%, 77.3% 22.8%, 77.9% 24.5%, 78.4% 26.2%, 79.0% 28.0%, 79.6% 29.8%, 80.3% 31.5%, 81.0% 33.2%, 81.8% 35.0%, 82.5% 36.8%, 83.4% 38.5%, 84.2% 40.2%, 85.0% 42.0%, 85.9% 43.8%, 86.8% 45.5%, 87.7% 47.2%, 88.7% 49.0%, 89.6% 50.8%, 90.5% 52.5%, 91.3% 54.2%, 92.0% 56.0%, 92.6% 57.8%, 93.1% 59.5%, 93.6% 61.2%, 94.1% 63.0%, 94.4% 64.8%, 94.7% 66.5%, 94.9% 68.2%, 95.0% 70.0%, 95.0% 71.7%, 95.0% 73.5%, 94.9% 75.2%, 94.7% 76.9%, 94.4% 78.6%, 94.0% 80.4%, 93.6% 82.2%, 93.0% 84.0%, 92.2% 86.0%, 91.2% 88.2%, 90.1% 90.6%, 88.9% 92.9%, 87.7% 95.1%, 86.6% 97.1%, 85.7% 98.8%, 85.0% 100.0%, 0 100%);
    background:
        radial-gradient(60% 45% at 40% 40%, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0) 100%),
        linear-gradient(180deg, rgba(250, 251, 255, 0.90) 0%, rgba(240, 243, 255, 0.86) 100%);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    backdrop-filter: blur(18px) saturate(1.2);
}

.tp-login__edge {
    z-index: 4;
    overflow: visible;
    pointer-events: none;
}

.tp-login__edge path { fill: none; vector-effect: non-scaling-stroke; }

.tp-login__edge-glow {
    stroke: url(#tpEdgeGrad);
    stroke-width: 16;
    opacity: .45;
    filter: blur(6px);
}

.tp-login__edge-line {
    stroke: url(#tpEdgeGrad);
    stroke-width: 6;
}

/* ---------- Vagues bas gauche + points ---------- */
.tp-login__wave {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 5;
}

.tp-login__wave--1 {
    left: -16vw;
    bottom: -22vh;
    width: 32vw;
    height: 38vh;
    background: linear-gradient(160deg, rgba(196, 170, 255, 0.75), rgba(150, 110, 250, 0.65));
}

.tp-login__wave--2 {
    left: -9vw;
    bottom: -25vh;
    width: 22vw;
    height: 33vh;
    background: linear-gradient(135deg, #5a5cff 0%, #8a3cf0 55%, #d04cf0 100%);
    box-shadow: 0 -4px 24px rgba(138, 60, 240, 0.35);
}

.tp-login__dots {
    position: absolute;
    background-image: radial-gradient(#c1c8e6 2px, transparent 2.4px);
    background-size: 18px 18px;
    pointer-events: none;
    z-index: 5;
}

.tp-login__dots--tl { top: 14px; left: 30px; width: 54px; height: 90px; }
.tp-login__dots--bc { bottom: 2vh; left: 33vw; width: 90px; height: 72px; opacity: .8; }

/* ---------- Contenu (colonne gauche) ---------- */
.tp-login__left {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 40vw;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: calc(var(--u) * 3) 2vw;
}

.tp-login__logo { margin-bottom: calc(var(--u) * 1.6); }

.tp-login__logo img {
    width: calc(var(--u) * 17.5);
    height: auto;
    display: block;
    filter: drop-shadow(0 calc(var(--u) * 1.2) calc(var(--u) * 2) rgba(31, 45, 110, 0.22));
}

.tp-login__card {
    width: 100%;
    max-width: calc(var(--u) * 56);
    text-align: center;
}

.tp-login__title {
    margin: 0;
    font-size: calc(var(--u) * 5.6);
    font-weight: 800;
    line-height: 1.1;
    color: var(--tpl-ink);
    letter-spacing: -.5px;
    text-transform: none;
}

.tp-login__title span {
    background: linear-gradient(180deg, #ff4fd0, #c43be8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tp-login__subtitle {
    margin: calc(var(--u) * 1) 0 0;
    font-size: calc(var(--u) * 2.55);
    font-weight: 500;
    color: var(--tpl-text);
    line-height: 1.3;
}

.tp-login__bar {
    display: block;
    width: calc(var(--u) * 12.5);
    height: 4px;
    margin: calc(var(--u) * 1.6) auto calc(var(--u) * 3);
    border-radius: 4px;
    background: linear-gradient(90deg, var(--tpl-blue), var(--tpl-violet), var(--tpl-magenta));
}

/* ---------- Formulaire ---------- */
.tp-login__form { text-align: left; }

.tp-login__error {
    margin-bottom: calc(var(--u) * 1.6);
    padding: 10px 14px;
    border-radius: 12px;
    background: #fdeeee;
    border: 1px solid #f6d4d4;
    color: #c43d3d;
    font-size: 13px;
    font-weight: 500;
}

.tp-login__field { position: relative; margin-bottom: calc(var(--u) * 2.1); }

.tp-login__icon {
    position: absolute;
    left: calc(var(--u) * 2.8);
    top: 50%;
    transform: translateY(-50%);
    font-size: calc(var(--u) * 2.8);
    color: #14246a;
    pointer-events: none;
    z-index: 1;
}

.tp-login .tp-login__field .form-control {
    width: 100%;
    height: calc(var(--u) * 6.5);
    padding: 0 calc(var(--u) * 7) 0 calc(var(--u) * 8.4);
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-radius: 99px !important;
    background: rgba(255, 255, 255, 0.82) !important;
    box-shadow: 0 calc(var(--u) * 0.8) calc(var(--u) * 2.4) rgba(60, 70, 160, 0.10) !important;
    font-family: 'Poppins', sans-serif;
    font-size: calc(var(--u) * 2.1);
    color: var(--tpl-ink);
    transition: border-color .15s, box-shadow .15s;
}

/* remplissage automatique du navigateur : garder le fond clair (au lieu du bleu de Chrome) */
.tp-login .tp-login__field .form-control:-webkit-autofill,
.tp-login .tp-login__field .form-control:-webkit-autofill:hover,
.tp-login .tp-login__field .form-control:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 60px #fbfbff inset, 0 6px 18px rgba(60, 70, 160, 0.10) !important;
    -webkit-text-fill-color: var(--tpl-ink) !important;
    transition: background-color 9999s ease-out 0s;
}

.tp-login .tp-login__field .form-control::placeholder { color: #5f6a94; }

.tp-login .tp-login__field .form-control:focus {
    outline: none;
    border-color: #b7c4ff !important;
    box-shadow: 0 0 0 4px rgba(59, 79, 216, 0.10), 0 6px 18px rgba(60, 70, 160, 0.10) !important;
}

.tp-login__eye {
    position: absolute;
    right: calc(var(--u) * 2);
    top: 50%;
    transform: translateY(-50%);
    width: calc(var(--u) * 4.6);
    height: calc(var(--u) * 4.6);
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #5f6a94;
    font-size: calc(var(--u) * 2.6);
    cursor: pointer;
}

.tp-login__eye:hover { color: var(--tpl-indigo); background: rgba(59, 79, 216, 0.08); }

.tp-login__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: calc(var(--u) * 0.2) calc(var(--u) * 0.3) calc(var(--u) * 3);
}

.tp-login__remember {
    display: inline-flex !important;
    align-items: center;
    gap: calc(var(--u) * 1.2);
    margin: 0 !important;
    font-size: calc(var(--u) * 1.85) !important;
    font-weight: 500 !important;
    color: var(--tpl-ink) !important;
    text-transform: none !important;
    cursor: pointer;
}

.tp-login__remember input { position: absolute; opacity: 0; pointer-events: none; }

.tp-login__check {
    width: calc(var(--u) * 2.8);
    height: calc(var(--u) * 2.8);
    border-radius: 6px;
    border: 1.5px solid #c3cae6;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: calc(var(--u) * 1.6);
    transition: all .15s;
}

.tp-login__remember input:checked + .tp-login__check {
    border-color: transparent;
    background: linear-gradient(135deg, #2f6bff, #2a3fd0);
    color: #fff;
}

.tp-login__forgot {
    font-size: calc(var(--u) * 1.85);
    font-weight: 500;
    color: #1f36b8 !important;
    text-decoration: none !important;
    white-space: nowrap;
}

.tp-login__forgot:hover { text-decoration: underline !important; }

.tp-login .g-recaptcha { margin-bottom: 14px; }

.tp-login__submit {
    width: 100%;
    height: calc(var(--u) * 6.5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: calc(var(--u) * 1.8);
    border: 0;
    border-radius: 99px;
    background: linear-gradient(90deg, #12a8ff 0%, #4a73ff 38%, #8a4dff 70%, #e04ff0 100%);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: calc(var(--u) * 2.4);
    font-weight: 500;
    box-shadow: 0 calc(var(--u) * 1.4) calc(var(--u) * 3.4) rgba(74, 115, 255, 0.32);
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}

.tp-login__submit:hover { transform: translateY(-1px); box-shadow: 0 18px 36px rgba(74, 115, 255, 0.42); }
.tp-login__submit .fa { font-size: calc(var(--u) * 2.5); }

.tp-login__or {
    display: flex;
    align-items: center;
    gap: calc(var(--u) * 2);
    margin: calc(var(--u) * 1.6) calc(var(--u) * 9);
    color: #5f6a94;
    font-size: calc(var(--u) * 2);
}

.tp-login__or::before,
.tp-login__or::after { content: ""; flex: 1; height: 1px; background: #c9cfe6; }

.tp-login__secondary {
    width: 100%;
    height: calc(var(--u) * 6.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: calc(var(--u) * 1.4);
    border: 1.5px solid transparent;
    border-radius: 99px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.92)) padding-box,
        linear-gradient(90deg, #12a8ff, var(--tpl-violet), var(--tpl-magenta)) border-box;
    color: var(--tpl-ink) !important;
    font-size: calc(var(--u) * 2.1);
    font-weight: 500;
    text-decoration: none !important;
}

.tp-login__secondary .fa { color: #14246a; }

.tp-login__tagline {
    margin: calc(var(--u) * 6) 0 0;
    font-size: calc(var(--u) * 2.7);
    font-weight: 600;
    font-style: italic;
    color: var(--tpl-ink);
    letter-spacing: -.2px;
}

.tp-login__tagline span { position: relative; color: #b03ce8; }

.tp-login__tagline span::after {
    content: "";
    position: absolute;
    left: -4px;
    right: -6px;
    bottom: calc(var(--u) * -1);
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--tpl-indigo), var(--tpl-magenta));
    transform: rotate(-3deg);
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .tp-login { --panel-w: 62vw; }
    .tp-login__left { width: 54vw; }
    .tp-login__photo { left: 44vw; }
    .tp-login__dots--bc { display: none; }
}

@media (max-width: 760px) {
    .tp-login { position: relative; min-height: 100vh; overflow: visible; background: var(--tpl-bg); --u: 7.5px; }
    .tp-login__photo,
    .tp-login__glow,
    .tp-login__edge { display: none; }
    .tp-login__panel { position: fixed; width: 100%; clip-path: none; }
    .tp-login__left { position: relative; width: 100%; min-height: 100vh; padding: 30px 16px 40px; }
    .tp-login__row { flex-wrap: wrap; }
}

/* ---------- Corrections apres rendu ---------- */
/* blueline.css donne un fond blanc au formulaire (#login) */
.tp-login form#login { background: transparent !important; }

/* fond clair sous le panneau + photo en fondu a gauche (pas de demarcation) */
.tp-login { background: #eef1fb; }
.tp-login__photo {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9vw);
    mask-image: linear-gradient(90deg, transparent 0, #000 9vw);
}
.tp-login__panel {
    background:
        radial-gradient(60% 45% at 40% 40%, #ffffff, rgba(255, 255, 255, 0) 100%),
        linear-gradient(180deg, rgba(252, 252, 255, 0.92) 0%, rgba(243, 245, 255, 0.90) 100%);
}

/* formes brillantes plus discretes */
.tp-login__glow--tr { top: -24vh; right: -4vw; width: 36vw; height: 33vh; }
.tp-login__glow--br { bottom: -25vh; right: -8vw; width: 40vw; height: 34vh; }

/* lien site web (remplace "Mot de passe oublie") */
.tp-login__forgot .fa { margin-right: 4px; }
