/*
 * Page de connexion UWEZO : feuille unique, sans dépendance (ni Bootstrap ni police d'icônes).
 * Thème clair par défaut, thème sombre si html[data-theme="odoo_enterprise"].
 */
:root {
    --cx-marque-1: #071b3b;
    --cx-marque-2: #0d47a1;
    --cx-marque-3: #1565c0;
    --cx-accent: #1557c0;
    --cx-accent-fort: #0d47a1;
    --cx-accent-doux: #e8f0fc;
    --cx-fond: #f4f7fb;
    --cx-surface: #ffffff;
    --cx-texte: #0f172a;
    --cx-texte-2: #475569;
    --cx-texte-3: #64748b;
    --cx-ligne: #d5dde8;
    --cx-ligne-forte: #b6c3d4;
    --cx-champ: #ffffff;
    --cx-danger: #b42318;
    --cx-danger-fond: #fef3f2;
    --cx-danger-ligne: #fecdca;
    --cx-succes: #067647;
    --cx-succes-fond: #ecfdf3;
    --cx-succes-ligne: #abefc6;
    --cx-alerte: #93370d;
    --cx-alerte-fond: #fffaeb;
    --cx-focus: 0 0 0 4px rgba(21, 87, 192, .18);
    --cx-rayon: 12px;
    --cx-police: var(--uz-police);
    color-scheme: light;
}

html[data-theme="odoo_enterprise"] {
    --cx-accent: #4f8ff7;
    --cx-accent-fort: #79a9fa;
    --cx-accent-doux: rgba(79, 143, 247, .14);
    --cx-fond: #0b1220;
    --cx-surface: #111a2c;
    --cx-texte: #e8edf5;
    --cx-texte-2: #b4c0d3;
    --cx-texte-3: #8a98ae;
    --cx-ligne: #26334a;
    --cx-ligne-forte: #3a4a66;
    --cx-champ: #0d1626;
    --cx-danger: #fda29b;
    --cx-danger-fond: rgba(240, 68, 56, .12);
    --cx-danger-ligne: rgba(240, 68, 56, .35);
    --cx-succes: #75e0a7;
    --cx-succes-fond: rgba(23, 178, 106, .12);
    --cx-succes-ligne: rgba(23, 178, 106, .35);
    --cx-alerte: #fec84b;
    --cx-alerte-fond: rgba(247, 144, 9, .12);
    --cx-focus: 0 0 0 4px rgba(79, 143, 247, .28);
    color-scheme: dark;
}

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

html, body { height: 100%; }

body.cx {
    margin: 0;
    font-family: var(--cx-police);
    font-size: var(--uz-fs-base);
    line-height: 1.5;
    color: var(--cx-texte);
    background: var(--cx-fond);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.cx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.cx-icone { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Barre de progression : visible pendant l'ouverture de l'application. */
.cx-progression {
    position: fixed; inset: 0 0 auto 0; z-index: 50; height: 3px; overflow: hidden;
    opacity: 0; transition: opacity .2s ease; pointer-events: none;
}
.cx-progression::before {
    content: ""; position: absolute; inset: 0; width: 40%;
    background: linear-gradient(90deg, transparent, var(--cx-accent), transparent);
    animation: cx-glisse 1.1s ease-in-out infinite;
}
.cx-envoi .cx-progression { opacity: 1; }
@keyframes cx-glisse { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* Disposition : panneau de marque à gauche, formulaire à droite. */
.cx-page { min-height: 100%; display: grid; grid-template-columns: minmax(380px, 44%) 1fr; }

.cx-marque {
    position: relative; overflow: hidden; color: #fff;
    display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
    padding: 48px clamp(32px, 4.5vw, 72px);
    background:
        radial-gradient(900px 500px at 110% -10%, rgba(255, 255, 255, .16), transparent 60%),
        radial-gradient(700px 420px at -20% 120%, rgba(21, 101, 192, .55), transparent 65%),
        linear-gradient(160deg, var(--cx-marque-1) 0%, var(--cx-marque-2) 62%, var(--cx-marque-3) 100%);
}
.cx-marque::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
    background-image: radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(200deg, #000 0%, transparent 55%);
    mask-image: linear-gradient(200deg, #000 0%, transparent 55%);
}
.cx-marque > * { position: relative; z-index: 1; }

.cx-logo { display: inline-flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; }
.cx-logo img {
    width: 52px; height: 52px; border-radius: 14px; background: #fff; padding: 4px;
    box-shadow: 0 8px 24px rgba(3, 12, 30, .35);
}
.cx-logo strong { font-size: var(--uz-fs-xl); font-weight: 800; letter-spacing: .08em; }

.cx-accroche h2 { margin: 0 0 14px; font-size: clamp(1.75rem, 2.6vw, 2.375rem); line-height: 1.18; font-weight: 800; letter-spacing: -.01em; }
.cx-accroche p { margin: 0 0 32px; max-width: 30rem; font-size: var(--uz-fs-md); color: rgba(255, 255, 255, .78); }
.cx-atouts { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.cx-atouts li { display: flex; align-items: flex-start; gap: 12px; font-size: var(--uz-fs-md); color: rgba(255, 255, 255, .92); }
.cx-atouts .cx-icone {
    width: 28px; height: 28px; padding: 5px; border-radius: 8px;
    background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); stroke-width: 2.2;
}
.cx-atouts span { padding-top: 3px; }

.cx-marque-pied { font-size: var(--uz-fs-sm); color: rgba(255, 255, 255, .6); }

/* Zone du formulaire */
.cx-zone { display: flex; flex-direction: column; min-width: 0; }

.cx-outils { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 20px 24px 0; }
.cx-outils form { margin: 0; }
.cx-outil {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 38px; min-width: 38px; padding: 0 12px; border-radius: 10px;
    font: 600 var(--uz-fs-sm)/1 var(--cx-police); color: var(--cx-texte-2);
    background: var(--cx-surface); border: 1px solid var(--cx-ligne); cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}
.cx-outil:hover { color: var(--cx-texte); border-color: var(--cx-ligne-forte); }
.cx-outil:focus-visible { outline: none; box-shadow: var(--cx-focus); border-color: var(--cx-accent); }
.cx-outil .cx-icone { width: 18px; height: 18px; }
select.cx-outil {
    appearance: none; -webkit-appearance: none; padding-right: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 8px center; background-size: 16px;
}
.cx-segments { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--cx-surface); border: 1px solid var(--cx-ligne); }
.cx-segment {
    width: 32px; height: 30px; border: 0; border-radius: 7px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--cx-texte-3); background: transparent; transition: color .15s, background .15s;
}
.cx-segment .cx-icone { width: 17px; height: 17px; }
.cx-segment:hover { color: var(--cx-texte); }
.cx-segment[aria-pressed="true"] { color: var(--cx-accent); background: var(--cx-accent-doux); }
.cx-segment:focus-visible { outline: none; box-shadow: var(--cx-focus); }

.cx-centre { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; }
.cx-formulaire { width: 100%; max-width: 408px; }

.cx-logo-mobile { display: none; }

.cx-titre { margin: 0 0 6px; font-size: var(--uz-fs-xl); line-height: 1.2; font-weight: 800; letter-spacing: -.01em; }
.cx-sous-titre { margin: 0 0 28px; color: var(--cx-texte-2); }

/* Messages */
.cx-message {
    display: flex; gap: 10px; align-items: flex-start;
    margin: 0 0 20px; padding: 12px 14px; border-radius: 10px; border: 1px solid;
    font-size: var(--uz-fs-base); line-height: 1.45;
}
.cx-message .cx-icone { width: 18px; height: 18px; margin-top: 1px; }
.cx-message--erreur { color: var(--cx-danger); background: var(--cx-danger-fond); border-color: var(--cx-danger-ligne); }
.cx-message--info { color: var(--cx-succes); background: var(--cx-succes-fond); border-color: var(--cx-succes-ligne); }

/* Champs */
.cx-champ { margin-bottom: 18px; }
.cx-champ label { display: block; margin-bottom: 7px; font-size: var(--uz-fs-base); font-weight: 600; color: var(--cx-texte); }
.cx-saisie { position: relative; display: flex; align-items: center; }
.cx-saisie > .cx-icone { position: absolute; left: 14px; color: var(--cx-texte-3); pointer-events: none; transition: color .15s; }
.cx-saisie input {
    width: 100%; height: 50px; padding: 0 14px 0 44px;
    font: 500 var(--uz-fs-base) var(--cx-police); color: var(--cx-texte);
    background: var(--cx-champ); border: 1.5px solid var(--cx-ligne); border-radius: var(--cx-rayon);
    transition: border-color .15s, box-shadow .15s;
}
.cx-saisie input::placeholder { color: var(--cx-texte-3); font-weight: 400; opacity: .85; }
.cx-saisie input:hover { border-color: var(--cx-ligne-forte); }
.cx-saisie input:focus { outline: none; border-color: var(--cx-accent); box-shadow: var(--cx-focus); }
.cx-saisie:focus-within > .cx-icone { color: var(--cx-accent); }
.cx-saisie input[aria-invalid="true"] { border-color: var(--cx-danger); }
.cx-saisie input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px var(--cx-danger-fond); }
.cx-saisie input:-webkit-autofill { -webkit-text-fill-color: var(--cx-texte); -webkit-box-shadow: 0 0 0 40px var(--cx-champ) inset; caret-color: var(--cx-texte); }
.cx-saisie--mdp input { padding-right: 52px; }

.cx-oeil {
    position: absolute; right: 6px; width: 40px; height: 40px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--cx-texte-3); background: transparent; border: 0; cursor: pointer;
}
.cx-oeil:hover { color: var(--cx-texte); background: var(--cx-accent-doux); }
.cx-oeil:focus-visible { outline: none; box-shadow: var(--cx-focus); }
.cx-oeil .cx-oeil-ferme { display: none; }
.cx-oeil[aria-pressed="true"] .cx-oeil-ouvert { display: none; }
.cx-oeil[aria-pressed="true"] .cx-oeil-ferme { display: block; }

.cx-aide { display: flex; align-items: center; gap: 6px; margin-top: 7px; font-size: var(--uz-fs-sm); }
.cx-aide .cx-icone { width: 15px; height: 15px; }
.cx-aide--erreur { color: var(--cx-danger); }
.cx-aide--alerte { color: var(--cx-alerte); }
.cx-aide[hidden] { display: none; }

.cx-ligne-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 24px; }

.cx-case { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: var(--uz-fs-base); color: var(--cx-texte-2); user-select: none; }
.cx-case input {
    appearance: none; -webkit-appearance: none; margin: 0; flex: none;
    width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--cx-ligne-forte); background: var(--cx-champ);
    display: grid; place-content: center; cursor: pointer; transition: background .15s, border-color .15s;
}
.cx-case input::after {
    content: ""; width: 10px; height: 6px; margin-top: -2px;
    border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg) scale(0); transition: transform .12s;
}
.cx-case input:checked { background: var(--cx-accent); border-color: var(--cx-accent); }
.cx-case input:checked::after { transform: rotate(-45deg) scale(1); }
.cx-case input:focus-visible { outline: none; box-shadow: var(--cx-focus); }

.cx-lien { color: var(--cx-accent); font-weight: 600; font-size: var(--uz-fs-base); text-decoration: none; border-radius: 4px; }
.cx-lien:hover { color: var(--cx-accent-fort); text-decoration: underline; text-underline-offset: 3px; }
.cx-lien:focus-visible { outline: none; box-shadow: var(--cx-focus); }

/* Boutons */
.cx-bouton {
    position: relative; width: 100%; height: 50px; padding: 0 20px;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    font: 700 var(--uz-fs-base)/1 var(--cx-police); text-decoration: none; cursor: pointer;
    border-radius: var(--cx-rayon); border: 1.5px solid transparent;
    transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
}
.cx-bouton:active { transform: translateY(1px); }
.cx-bouton:focus-visible { outline: none; box-shadow: var(--cx-focus); }
.cx-bouton--principal {
    color: #fff;
    background: linear-gradient(180deg, color-mix(in srgb, var(--cx-accent) 88%, #fff) 0%, var(--cx-accent) 100%);
    box-shadow: 0 1px 2px color-mix(in srgb, var(--cx-accent) 25%, transparent), 0 8px 20px -8px color-mix(in srgb, var(--cx-accent) 55%, transparent);
}
.cx-bouton--principal:hover { background: linear-gradient(180deg, var(--cx-accent) 0%, var(--cx-accent-fort) 100%); }
.cx-bouton--secondaire { color: var(--cx-texte); background: var(--cx-surface); border-color: var(--cx-ligne); }
.cx-bouton--secondaire:hover { border-color: var(--cx-accent); color: var(--cx-accent); }

.cx-bouton .cx-rouage { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: cx-tourne .7s linear infinite; }
.cx-bouton[aria-busy="true"] { cursor: progress; background: var(--cx-accent); }
.cx-bouton[aria-busy="true"] .cx-rouage { display: inline-block; }
@keyframes cx-tourne { to { transform: rotate(360deg); } }

.cx-separateur { display: flex; align-items: center; gap: 14px; margin: 28px 0 16px; font-size: var(--uz-fs-sm); color: var(--cx-texte-3); }
.cx-separateur::before, .cx-separateur::after { content: ""; flex: 1; height: 1px; background: var(--cx-ligne); }

.cx-pied { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; padding: 16px 24px 24px; font-size: var(--uz-fs-sm); color: var(--cx-texte-3); }
.cx-pied a { color: inherit; text-decoration: none; }
.cx-pied a:hover { color: var(--cx-texte); text-decoration: underline; text-underline-offset: 3px; }

/* Ecran moyen : panneau de marque réduit à l'essentiel */
@media (max-width: 1100px) {
    .cx-page { grid-template-columns: minmax(340px, 40%) 1fr; }
    .cx-atouts { display: none; }
}

/* Téléphone et tablette : formulaire seul, logo au-dessus */
@media (max-width: 860px) {
    .cx-page { grid-template-columns: 1fr; }
    .cx-marque { display: none; }
    .cx-outils { padding: 14px 16px 0; }
    .cx-centre { align-items: flex-start; padding: 12px 16px 16px; }
    .cx-logo-mobile { display: inline-flex; color: var(--cx-texte); margin: 8px 0 28px; }
    .cx-logo-mobile img { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 4px 14px rgba(13, 71, 161, .18); }
    .cx-logo-mobile strong { font-size: var(--uz-fs-lg); }
    .cx-titre { font-size: var(--uz-fs-xl); }
    .cx-sous-titre { margin-bottom: 24px; }
}

@media (min-width: 861px) and (min-height: 760px) {
    .cx-centre { padding-bottom: 6vh; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* Ecran d'ouverture (racine du site) */
.cx-ouverture { display: flex; flex-direction: column; min-height: 100%; }
.cx-ouverture-centre { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 24px; text-align: center; }
.cx-ouverture-logo {
    width: 96px; height: 96px; border-radius: 24px; background: #fff; padding: 8px; margin-bottom: 14px;
    box-shadow: 0 18px 40px -16px rgba(13, 71, 161, .45), 0 0 0 1px var(--cx-ligne);
    animation: cx-apparait .5s ease-out both, cx-respire 2.4s ease-in-out .5s infinite;
}
.cx-ouverture-nom { font-size: var(--uz-fs-xl); font-weight: 800; letter-spacing: .1em; animation: cx-apparait .5s ease-out .08s both; }
.cx-ouverture-texte { margin: 0 0 18px; color: var(--cx-texte-2); animation: cx-apparait .5s ease-out .16s both; }
.cx-ouverture-barre { position: relative; width: 200px; height: 4px; border-radius: 4px; overflow: hidden; background: var(--cx-accent-doux); }
.cx-ouverture-barre span { position: absolute; inset: 0; width: 40%; border-radius: 4px; background: var(--cx-accent); animation: cx-glisse 1.1s ease-in-out infinite; }
.cx-ouverture-secours { margin-top: 22px; opacity: 0; pointer-events: none; transition: opacity .3s; }
.cx-ouverture-secours.est-visible { opacity: 1; pointer-events: auto; }
@keyframes cx-apparait { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes cx-respire { 50% { transform: scale(1.04); } }

/* Pages de lecture (conditions, confidentialité) */
.cx-vitrine { display: flex; flex-direction: column; min-height: 100%; }
.cx-entete { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 880px; width: 100%; margin: 0 auto; padding: 20px 24px 0; }
.cx-entete .cx-logo { color: var(--cx-texte); }
.cx-entete .cx-logo img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 4px 14px rgba(13, 71, 161, .18); }
.cx-entete .cx-logo strong { font-size: var(--uz-fs-md); }
.cx-entete .cx-outils { padding: 0; }
.cx-doc { flex: 1; width: 100%; max-width: 880px; margin: 0 auto; padding: 28px 24px 16px; }
.cx-doc-retour { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.cx-doc-retour .cx-icone { width: 18px; height: 18px; }
.cx-doc-carte { background: var(--cx-surface); border: 1px solid var(--cx-ligne); border-radius: 16px; padding: clamp(22px, 4vw, 44px); box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -18px rgba(15, 23, 42, .18); }
.cx-doc-tete { display: flex; align-items: flex-start; gap: 16px; padding-bottom: 22px; margin-bottom: 8px; border-bottom: 1px solid var(--cx-ligne); }
.cx-doc-tete .cx-sous-titre { margin: 0; }
.cx-doc-pastille { flex: none; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; color: var(--cx-accent); background: var(--cx-accent-doux); }
.cx-doc-pastille .cx-icone { width: 24px; height: 24px; }
.cx-doc-section { padding-top: 22px; }
.cx-doc-section > :last-child { margin-bottom: 0; }
.cx-doc-section h2 { margin: 0 0 8px; font-size: var(--uz-fs-md); font-weight: 700; }
.cx-doc-section p, .cx-doc-section li { color: var(--cx-texte-2); line-height: 1.65; max-width: 68ch; }
.cx-doc-section p { margin: 0 0 10px; }
.cx-doc-section ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.cx-doc-section li::marker { color: var(--cx-accent); }
.cx-doc-section .cx-doc-cle { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; font-weight: 600; color: var(--cx-succes); background: var(--cx-succes-fond); }
.cx-doc-section .cx-doc-cle .cx-icone { width: 18px; height: 18px; }
.cx-pied a[aria-current="page"] { color: var(--cx-texte); font-weight: 600; }

@media (max-width: 600px) {
    .cx-entete { padding: 14px 16px 0; }
    .cx-entete .cx-logo strong { display: none; }
    .cx-doc { padding: 20px 16px 12px; }
    .cx-doc-tete { flex-direction: column; gap: 12px; }
    .cx-titre { font-size: var(--uz-fs-xl); }
}

/*
 * Connexion : style sobre et très lisible, aligné sur l'application de référence Cargo.
 * Panneau de marque clair, textes foncés en gras, carte de connexion au titre centré.
 */
.cx-connexion {
    --cx-texte: #111827;
    --cx-texte-2: #374151;
    --cx-texte-3: #6b7280;
    --cx-ligne: color-mix(in srgb, var(--cx-accent) 14%, #dfe5ec);
    --cx-champ-repos: #f8fafc;
}
html[data-theme="odoo_enterprise"] .cx-connexion {
    --cx-texte: #e8edf5;
    --cx-texte-2: #c3cddc;
    --cx-texte-3: #93a1b6;
    --cx-ligne: #26334a;
    --cx-champ-repos: #0d1626;
}
.cx-connexion .cx-page { grid-template-columns: minmax(380px, 1.05fr) minmax(420px, .95fr); }

/* Panneau de marque clair */
.cx-connexion .cx-marque {
    justify-content: center; color: var(--cx-texte);
    background: linear-gradient(165deg, var(--cx-surface) 0%, color-mix(in srgb, var(--cx-accent) 4%, var(--cx-surface)) 55%, color-mix(in srgb, var(--cx-accent) 9%, var(--cx-surface)) 100%);
    border-right: 1px solid var(--cx-ligne);
}
.cx-connexion .cx-marque::after {
    opacity: 1; background-image: none; -webkit-mask-image: none; mask-image: none;
    background:
        radial-gradient(420px 420px at 100% 0%, color-mix(in srgb, var(--cx-accent) 10%, transparent), transparent 68%),
        radial-gradient(300px 300px at 0% 100%, color-mix(in srgb, var(--cx-accent) 7%, transparent), transparent 70%);
}
html[data-theme="odoo_enterprise"] .cx-connexion .cx-marque { background: linear-gradient(165deg, #111a2c 0%, #0d1526 100%); }
.cx-marque-contenu { max-width: 30rem; }
.cx-connexion .cx-marque .cx-logo { margin-bottom: 28px; }
.cx-connexion .cx-marque .cx-logo img { width: 56px; height: 56px; border: 1px solid var(--cx-ligne); box-shadow: 0 4px 16px rgba(15, 23, 42, .08); }
.cx-logo-texte { display: grid; gap: 2px; }
.cx-logo-texte strong { font-size: var(--uz-fs-xl); font-weight: 800; letter-spacing: .06em; line-height: 1.1; }
.cx-logo-texte small { font-size: var(--uz-fs-base); font-weight: 800; color: var(--cx-texte); }
.cx-marque-accroche { margin: 0 0 26px; font-size: var(--uz-fs-lg); line-height: 1.55; font-weight: 700; color: var(--cx-texte); }
.cx-connexion .cx-atouts { gap: 14px; }
.cx-connexion .cx-atouts li { align-items: center; gap: 14px; font-size: var(--uz-fs-md); font-weight: 700; color: var(--cx-texte); }
.cx-atout-icone {
    flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px;
    color: var(--cx-accent); background: var(--cx-accent-doux);
}
.cx-connexion .cx-atouts .cx-atout-icone .cx-icone { width: 18px; height: 18px; padding: 0; border: 0; background: none; border-radius: 0; stroke-width: 2.1; }
.cx-connexion .cx-atouts span:last-child { padding-top: 0; }
.cx-connexion .cx-marque-pied {
    position: absolute; left: clamp(32px, 4.5vw, 72px); bottom: 32px;
    font-weight: 700; color: var(--cx-texte-3);
}

/* Zone du formulaire et carte */
.cx-connexion .cx-zone { background: var(--cx-fond); box-shadow: -12px 0 40px rgba(0, 0, 0, .06); position: relative; }
html[data-theme="odoo_enterprise"] .cx-connexion .cx-zone { background: var(--cx-fond); box-shadow: none; }
.cx-formulaire--carte {
    max-width: 440px; padding: 34px 34px 30px;
    border: 1px solid var(--cx-ligne); border-radius: 16px; background: var(--cx-surface);
    box-shadow: 0 20px 25px -5px rgba(15, 23, 42, .12), 0 8px 10px -6px rgba(15, 23, 42, .06);
}
html[data-theme="odoo_enterprise"] .cx-formulaire--carte { box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .6); }
.cx-carte-tete { text-align: center; margin-bottom: 26px; }
.cx-connexion .cx-titre { margin-bottom: 6px; font-size: var(--uz-fs-xl); font-weight: 800; letter-spacing: -.02em; }
.cx-connexion .cx-sous-titre { margin: 0; font-size: var(--uz-fs-base); font-weight: 500; color: var(--cx-texte-3); }

/* Champs : libellés en capitales, saisie grisée au repos et blanche au focus */
.cx-connexion .cx-champ label { font-size: var(--uz-fs-xs); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--cx-texte-2); }
.cx-connexion .cx-saisie input { height: 48px; font-weight: 600; background: var(--cx-champ-repos); border-width: 1px; border-radius: 10px; }
.cx-connexion .cx-saisie input:focus { background: var(--cx-champ); }
.cx-connexion .cx-saisie input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px var(--cx-champ-repos) inset; }
.cx-connexion .cx-case { font-weight: 600; color: var(--cx-texte-2); }
.cx-connexion .cx-lien { font-weight: 700; }

/* Boutons */
.cx-connexion .cx-bouton { height: 48px; border-radius: 10px; font-weight: 800; letter-spacing: .01em; }
.cx-connexion .cx-bouton--principal {
    background: linear-gradient(135deg, var(--cx-accent), color-mix(in srgb, var(--cx-accent) 72%, #fff));
    box-shadow: 0 4px 14px color-mix(in srgb, var(--cx-accent) 35%, transparent);
    transition: transform .15s ease, box-shadow .15s ease;
}
.cx-connexion .cx-bouton--principal:hover { background: linear-gradient(135deg, var(--cx-accent-fort), var(--cx-accent)); transform: translateY(-1px); box-shadow: 0 6px 18px color-mix(in srgb, var(--cx-accent) 42%, transparent); }
.cx-connexion .cx-bouton--secondaire { border-width: 1px; }
.cx-connexion .cx-separateur { margin: 24px 0 14px; font-weight: 600; }
.cx-connexion .cx-pied { font-weight: 600; }

@media (max-width: 1100px) {
    .cx-connexion .cx-page { grid-template-columns: minmax(340px, 44%) 1fr; }
    .cx-connexion .cx-atouts { display: grid; }
}

@media (max-width: 860px) {
    .cx-connexion .cx-page { grid-template-columns: 1fr; }
    .cx-connexion .cx-zone { box-shadow: none; }
    .cx-connexion .cx-centre { align-items: flex-start; padding: 8px 16px 16px; }
    .cx-connexion .cx-logo-mobile { display: flex; justify-content: center; margin: 4px 0 18px; }
    .cx-formulaire--carte { padding: 24px 16px 20px; border-radius: 14px; }
}

/* Contraste élevé : noir sur blanc, bordures nettes, focus jaune */
html[data-theme="high_contrast"],
html[data-theme="high_contrast"] .cx-connexion {
    --cx-accent: #000; --cx-accent-fort: #000; --cx-accent-doux: #e8e8e8;
    --cx-marque-1: #000; --cx-marque-2: #000; --cx-marque-3: #1a1a1a;
    --cx-fond: #fff; --cx-surface: #fff; --cx-champ: #fff; --cx-champ-repos: #fff;
    --cx-texte: #000; --cx-texte-2: #000; --cx-texte-3: #262626;
    --cx-ligne: #000; --cx-ligne-forte: #000;
    --cx-danger: #b00000; --cx-focus: 0 0 0 3px #ffbf00;
}
html[data-theme="high_contrast"] .cx-saisie input,
html[data-theme="high_contrast"] .cx-bouton--secondaire { border-width: 2px; }
html[data-theme="high_contrast"] .cx-connexion .cx-zone { box-shadow: none; border-left: 2px solid #000; }

/* Menu des thèmes */
.cx-themes { position: relative; }
.cx-themes > summary { list-style: none; user-select: none; }
.cx-themes > summary::-webkit-details-marker { display: none; }
.cx-themes-chevron { width: 15px !important; height: 15px !important; transition: transform .15s; }
.cx-themes[open] .cx-themes-chevron { transform: rotate(180deg); }
.cx-themes[open] > summary { border-color: var(--cx-accent); color: var(--cx-texte); }
.cx-themes-panneau {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 40;
    width: min(372px, calc(100vw - 32px)); max-height: min(70vh, 540px); overflow-y: auto;
    padding: 8px 12px 12px; border: 1px solid var(--cx-ligne); border-radius: 14px;
    background: var(--cx-surface); box-shadow: 0 20px 40px -12px rgba(15, 23, 42, .28);
}
.cx-themes-groupe { margin: 10px 4px 6px; font-size: var(--uz-fs-xs); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--cx-texte-3); }
.cx-themes-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.cx-theme {
    display: flex; align-items: center; gap: 9px; min-width: 0; padding: 7px 8px; border-radius: 9px;
    border: 1px solid transparent; background: transparent; cursor: pointer; text-align: left;
    font: 600 var(--uz-fs-sm)/1.2 var(--cx-police); color: var(--cx-texte);
}
.cx-theme:hover { background: var(--cx-accent-doux); }
.cx-theme:focus-visible { outline: none; box-shadow: var(--cx-focus); }
.cx-theme[aria-pressed="true"] { border-color: var(--cx-accent); background: var(--cx-accent-doux); }
.cx-theme-pastille {
    flex: none; width: 22px; height: 22px; border-radius: 50%;
    background: linear-gradient(135deg, var(--cx-p1) 50%, var(--cx-p2) 50%);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .18);
}
.cx-theme-nom { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cx-theme-coche { width: 15px !important; height: 15px !important; color: var(--cx-accent); stroke-width: 2.6; visibility: hidden; }
.cx-theme[aria-pressed="true"] .cx-theme-coche { visibility: visible; }

@media (max-width: 600px) {
    .cx-themes-nom { display: none; }
    .cx-themes-panneau { position: fixed; left: 16px; right: 16px; top: 64px; width: auto; max-height: calc(100vh - 88px); }
}

/* Téléphone : champs à 16 px, sinon le navigateur de l'iPhone zoome sur le champ actif. */
@media (max-width: 600px) {
    .cx-saisie input, .cx-saisie select, .cx-saisie textarea { font-size: var(--uz-fs-md); }
}
