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

html, body {
    height: 100%;
    font-family: system-ui, -apple-system, sans-serif;
}

body {
    background: #f4f1ea;
    display: flex;
    justify-content: center;
    /* Le centrage vertical est confie au margin:auto de la carte, et non a
       align-items:center : quand la carte depasse la hauteur de la fenetre,
       un item centre deborde des DEUX cotes et le haut devient inatteignable,
       meme en faisant defiler. Avec margin:auto, le debordement part vers le
       bas et reste accessible. */
    align-items: flex-start;
    min-height: 100vh;
    padding: 24px;
    position: relative;
    /* overflow: hidden coupait purement et simplement ce qui depassait. On ne
       masque plus que l'horizontale, pour les cercles decoratifs. */
    overflow-x: hidden;
    overflow-y: auto;
}

/* ── Animations cercles ── */
@keyframes fd-float-a {
    0%, 100% { transform: translateY(0)    scale(1);    }
    50%       { transform: translateY(-20px) scale(1.07); }
}
@keyframes fd-float-b {
    0%, 100% { transform: translateY(0)   scale(1);    }
    50%       { transform: translateY(16px) scale(1.05); }
}
@keyframes fd-float-c {
    0%, 100% { transform: translateY(0)    scale(1);    }
    50%       { transform: translateY(-12px) scale(1.09); }
}

/* ── Cercles décoratifs ── */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    border: 3px solid rgba(20,33,61,.2);
    pointer-events: none;
}
body::before {
    width: 260px;
    height: 260px;
    top: -80px;
    right: -80px;
    animation: fd-float-a 5s ease-in-out infinite;
}
body::after {
    width: 180px; height: 180px;
    bottom: -40px; left: -40px;
    animation: fd-float-b 8s ease-in-out infinite 1.2s;
}

/* ── Card ── */
.login-card {
    display: flex;
    width: 100%;
    max-width: 730px;
    margin: auto;               /* centre quand il y a la place, sans couper le haut */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.12);
    position: relative;
    z-index: 1;
}

/* ── Panneau gauche ── */
.login-left {
    width: 320px;
    flex-shrink: 0;
    background: linear-gradient(194deg, #14213d 34%, #0a1222 85%);
    padding: 28px 36px 9px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.login-left::after {
    content: '';
    position: absolute;
    bottom: -60px; left: -60px;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
    animation: fd-float-c 7s ease-in-out infinite 0.5s;
}
.login-left-logo {
    margin-bottom: 32px;
}
.login-left h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
    line-height: 1.25;
}
.login-left p {
    font-size: 1rem;
    color: rgba(255,255,255,.78);
    line-height: 19px;
    flex: 1;
    margin-top: 15px;
}

/* ── Offre mise en avant (page d'inscription) ──
   Trois messages, trois couleurs, pour qu'on les distingue au premier coup
   d'oeil au lieu de lire un bloc uniformement cyan :
     - l'accroche en blanc, c'est ce qui se lit en premier ;
     - le mois d'essai en vert, la couleur de ce qui est acquis et sans risque,
       la meme que les coches des pages Tarifs ;
     - le prix en blanc, comme l'accroche : c'est le chiffre qu'on vient
       chercher, il n'a pas besoin d'une couleur pour se faire voir.
   Les teintes sont calees pour rester lisibles sur le degrade bleu du panneau
   (4,7 a 8,9 selon l'element, seuils AA tenus). */
.login-offer {
    width: 100%;
    margin: 6px 0 20px;
}
.login-offer-big {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.02em;
    color: #fff;
}
.login-offer-trial {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgb(115 255 173 / 5%);
    border: 4px solid rgb(110 231 160);
    color: #8ff0b8;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.4;
}
.login-offer-price {
    display: block;
    margin-top: 16px;
    font-size: 1rem;
    color: rgba(255,255,255,.78);
}
.login-offer-price b {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #ffffff;
    margin-right: 6px;
}
/* Le blanc etait pose a 40 % : 2,78 sur le degrade du panneau, soit un texte
   qu'on devine plus qu'on ne le lit. A 68 % il passe a 5,08, et les liens a
   80 % restent plus clairs que le texte qui les entoure. */
.login-left-footer {
    margin-top: 40px;
    font-size: .78rem;
    color: rgba(255,255,255,.68);
    line-height: 1.6;
}
.login-left-footer a {
    color: rgba(255,255,255,.8);
    text-decoration: none;
    padding: 0 5px;
    transition: color .15s;
}
.login-left-footer a:hover { color: #fff; }

/* ── Panneau droit ── */
.login-right {
    flex: 1;
    background: #fff;
    padding: 50px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.login-right h1 {
    font-size: 1.7rem;
    font-weight: 800;
    color: #1a2235;
    margin-bottom: 24px;
}

/* ── Alertes ── */
.login-alert {
    background: #fff1f1;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: .88rem;
    font-weight: 600;
    margin-bottom: 20px;
}
.login-alert-info {
    background: #faf7f4;
    color: #a4460f;
    border-color: #eae0d3;
}

/* ── Formulaire ── */
.login-form-group {
    margin-bottom: 13px;
}
.login-form-group label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: #5a7080;
    justify-content: center;
    margin-bottom: 7px;
}
.login-form-group label .req { color: #e53e3e; margin-left: 2px; }
.login-form-group input {
    width: 100%;
    padding: 9px 16px;
    border: 1px solid #727272b5;
    border-radius: 14px;
    font-size: .95rem;
    font-family: inherit;
    color: #1a2235;
    background: #fcfbf9;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}
.login-form-group input:focus {
    border-color: #14213d;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(20,33,61,.1);
}

/* ── Bouton submit ── */
.login-submit {
    width: 170px;
    padding: 8px 15px 8px 10px;
    background: linear-gradient(194deg, #14213d 34%, #091020 85%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .1s;
    margin-top: 8px;
    display: flex;
    justify-self: center;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.login-submit:hover {
    background: #0c1428;
    transform: translateY(-1px);
}

/* ── Rappels sous le bouton d'inscription ── */
.login-reassure {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    font-size: .82rem;
    line-height: 1.5;
    color: #5a7080;
}
.login-reassure li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 5px;
}
.login-reassure li:last-child {
    margin-bottom: 0;
}
.login-reassure li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .5em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #14213d;
    opacity: .45;
}

/* ── Mot de passe oublié ── */
.login-forgot {
    text-align: right;
    margin-bottom: 32px;
}
.login-forgot a {
    font-size: .88rem;
    color: #5a7080;
    text-decoration: none;
}
.login-forgot a:hover {
    color: #14213d;
    text-decoration: underline;
}
.login-desc {
    color: #5a7080;
    font-size: .95rem;
    margin-bottom: 20px;
    line-height: 1.5;
}
.login-back {
    margin-top: 20px;
    font-size: .9rem;
}
.login-back a {
    color: #14213d;
    text-decoration: none;
}
.login-back a:hover {
    text-decoration: underline;
}

/* ── Mobile ── */
@media (max-width: 640px) {
    body {
        padding: 16px;
        align-items: flex-start;
        overflow-y: auto;
        overflow-x: hidden;
    }
    .login-card {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        border-radius: 16px;
        /* margin:auto aussi en hauteur : la carte se centre dans l'écran
           quand elle est plus courte que lui, et déborde vers le bas (jamais
           vers un haut inatteignable) quand elle est plus haute — la même
           mécanique que le bureau, expliquée en tête de fichier. */
        margin: auto;
    }
    /* Bandeau centré comme le montage : logo et marque côte à côte, groupés
       au centre du bandeau, et le copyright en dessous sur toute la largeur. */
    .login-left {
        width: 100%;
        padding: 20px 0 9px;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 14px 16px;
        text-align: center;
    }
    .login-left-logo { margin-bottom: 0; flex-shrink: 0; }
    .kalko-sting-marque { width: 48px; height: 48px; }
    .kalko-sting-mot { font-size: 36px; }
    .kalko-sting-fr { font-size: 15px; }
    .login-left p { display: none; }
    /* Le panneau devient un bandeau horizontal : l'offre ne tiendrait pas.
       Elle reste annoncée juste en dessous, dans le texte du formulaire. */
    .login-offer { display: none; }
    .login-left-footer { flex: 0 0 100%; margin-top: 0; text-align: center; }
    .login-left::after { display: none; }
    .login-right {padding: 26px 50px;}
}


/* Inscription : honeypot (invisible) + aide */
.login-hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.login-hint { font-weight: 400; font-size: .8rem; color: #8aa0ae; }
/* En paragraphe (et non en complément d'un label), l'aide a besoin de
   respirer : sans marge basse elle se lit comme l'intitulé du champ suivant. */
p.login-hint { margin: -6px 0 22px; line-height: 1.5; }

/* ── Choix de la formule a l'inscription ─────────────────────────────── */

.login-offres {
    border: none;
    padding: 0;
    margin: 0 0 20px;
}
.login-offres legend {
    padding: 0;
    font-size: .82rem;
    font-weight: 600;
    color: #5a7080;
    margin-bottom: 7px;
}

/* Chaque formule est une etiquette cliquable en entier, pas seulement le petit
   rond : sur un telephone, viser un bouton radio de 16 px est une corvee. */
.login-offre {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 12px 14px;
    margin-bottom: 8px;
    border: 1.5px solid #dde4ea;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.login-offre:hover { border-color: #aeb5c6; }
.login-offre input[type="radio"] {
    width: 17px;
    height: 17px;
    margin: 2px 0 0;
    accent-color: #14213d;
    flex-shrink: 0;
    cursor: pointer;
}
/* :has couvre le clavier et le retour arriere du navigateur, la classe posee
   par PHP couvre les moteurs qui ne connaissent pas encore :has. */
.login-offre:has(input:checked),
.login-offre-active {
    border-color: #14213d;
    background: #f9f7f4;
}
.login-offre:has(input:focus-visible) {
    outline: 2px solid #f26b21;
    outline-offset: 2px;
}

.login-offre-corps { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.login-offre-titre {
    font-size: .95rem;
    font-weight: 700;
    color: #1a2235;
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.login-offre-titre b { color: #14213d; font-size: 1rem; }
.login-offre-detail { font-size: .8rem; color: #5a7080; line-height: 1.45; }

.login-offres .login-hint { margin-top: 10px; }

/* Choix indépendants : communications facultatives et acceptation des CGV. */
.login-consents { display: grid; gap: 16px; margin: 24px 0; }
.login-consent {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    color: #1a2235;
    font-size: .9rem;
    line-height: 1.5;
    cursor: pointer;
}
.login-consent input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    flex-shrink: 0;
    accent-color: #14213d;
    cursor: pointer;
}
.login-consent input:focus-visible { outline: 2px solid #14213d; outline-offset: 3px; }
.login-consent > span { min-width: 0; }
.login-consent small { display: block; color: #5a7080; font-size: .8rem; }
.login-consent a { color: #14213d; text-decoration: underline; text-underline-offset: 2px; }
