/* ═══════════════════════════════════════════════════════════════════════════
   Calypsceau Web Signature V1 — CSS Global
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Variables de couleur ────────────────────────────────────────────────── */
:root {
    --caly-bleu:       #1a3a5c;
    --caly-bleu-clair: #2563a8;
    --caly-accent:     #e8a020;
    --caly-rouge:      #c0392b;
    --caly-vert:       #27ae60;
    --caly-gris:       #f5f7fa;
    --caly-gris-bord:  #dde3ea;
    --caly-texte:      #2c3e50;
    --caly-texte-doux: #5d6d7e;
    --rayon:           12px;
    --ombre:           0 4px 24px rgba(26,58,92,.12);
    --ombre-hover:     0 8px 32px rgba(26,58,92,.22);
    --transition:      .2s ease;
}

/* ── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    color: var(--caly-texte);
    background: var(--caly-gris);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--caly-bleu-clair); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Waiter animé (spinner) ──────────────────────────────────────────────── */
.caly-waiter {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px 20px;
}
.caly-spinner {
    width: 48px; height: 48px;
    border: 4px solid var(--caly-gris-bord);
    border-top-color: var(--caly-bleu-clair);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
.caly-spinner-sm {
    width: 24px; height: 24px;
    border-width: 3px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Bouton accéder document — dégradé animé ───────────────────────── */
@keyframes btnGradientShift {
    0%   { background-position:   0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position:   0% 50%; }
}

/* ── Animation bandeau logos mobile ──────────────────────────────────────
   Les logos partent grands et centrés, puis glissent vers leurs coins.
   Le sous-titre apparaît en fondu après 0.6 s.
   ─────────────────────────────────────────────────────────────────────── */

/* Logo CLIENT : part du centre (translateX +50%) puis va à gauche (0) */
@keyframes bdl-entree-client {
    from {
        transform: translateX(calc(50vw - 90px)) scale(2.2);
        opacity: 0.6;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

/* Logo CALYPSCEAU : part du centre (translateX -50%) puis va à droite (0) */
@keyframes bdl-entree-caly {
    from {
        transform: translateX(calc(-50vw + 90px)) scale(2.2);
        opacity: 0.6;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

/* Sous-titre : simple fondu décalé */
@keyframes bdl-entree-titre {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0);   }
}

.bdl-anim-client {
    animation: bdl-entree-client 1s cubic-bezier(.22,.68,0,1.2) both;
}
.bdl-anim-caly {
    animation: bdl-entree-caly  1s cubic-bezier(.22,.68,0,1.2) both;
}
.bdl-anim-titre {
    animation: bdl-entree-titre .5s ease both;
    animation-delay: .65s;
}

.caly-waiter-texte {
    font-size: .95rem;
    color: var(--caly-texte-doux);
    font-weight: 500;
}

/* ── Boutons ─────────────────────────────────────────────────────────────── */
.btn-caly {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--rayon);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
    text-decoration: none;
}
.btn-caly:active { transform: scale(.97); }

.btn-primaire {
    background: var(--caly-bleu-clair);
    color: #fff;
    box-shadow: 0 4px 16px rgba(37,99,168,.35);
}
.btn-primaire:hover:not(:disabled) {
    background: var(--caly-bleu);
    box-shadow: var(--ombre-hover);
    color: #fff;
    text-decoration: none;
}

.btn-accent {
    background: var(--caly-accent);
    color: #fff;
    box-shadow: 0 4px 16px rgba(232,160,32,.35);
    font-size: 1.15rem;
    padding: 18px 36px;
}
.btn-accent:hover:not(:disabled) {
    background: #d4921c;
    box-shadow: var(--ombre-hover);
    color: #fff;
    text-decoration: none;
}

.btn-secondaire {
    background: transparent;
    color: var(--caly-bleu-clair);
    border: 2px solid var(--caly-bleu-clair);
}
.btn-secondaire:hover:not(:disabled) {
    background: rgba(37,99,168,.08);
    text-decoration: none;
}

.btn-danger {
    background: var(--caly-rouge);
    color: #fff;
    box-shadow: 0 4px 16px rgba(192,57,43,.3);
}

.btn-succes {
    background: var(--caly-vert);
    color: #fff;
    box-shadow: 0 4px 16px rgba(39,174,96,.3);
    font-size: 1.1rem;
    padding: 16px 32px;
}

.btn-caly:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-caly-sm {
    padding: 8px 16px;
    font-size: .85rem;
    border-radius: 8px;
}

/* ── Logos ───────────────────────────────────────────────────────────────── */
.logo-calypsceau {
    height: 48px;
    width: auto;
    object-fit: contain;
}
.logo-societe {
    height: 40px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
}
.logo-calypsceau-sm { height: 32px; }
.logo-societe-sm    { height: 28px; max-width: 90px; }

/* ── Carte générique ─────────────────────────────────────────────────────── */
.carte {
    background: #fff;
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
    padding: 24px;
}

/* ── Badge état ──────────────────────────────────────────────────────────── */
.badge-etat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: .8rem;
    font-weight: 600;
}
.badge-ok   { background: #e8f8ef; color: var(--caly-vert); }
.badge-warn { background: #fef6e4; color: #c97b00; }
.badge-err  { background: #fdecea; color: var(--caly-rouge); }

/* ── Input code de signature ─────────────────────────────────────────────── */
.input-code {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: .5rem;
    text-align: center;
    width: 160px;
    padding: 12px 16px;
    border: 3px solid var(--caly-gris-bord);
    border-radius: var(--rayon);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
    font-family: 'Inter', monospace;
}
.input-code:focus {
    border-color: var(--caly-bleu-clair);
    box-shadow: 0 0 0 3px rgba(37,99,168,.2);
}
.input-code.valide {
    border-color: var(--caly-vert);
    box-shadow: 0 0 0 3px rgba(39,174,96,.2);
}

/* ── Erreurs Blazor ──────────────────────────────────────────────────────── */
.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}
#blazor-error-ui {
    display: none;
    background: lightyellow;
    bottom: 0; left: 0; right: 0;
    padding: .6rem 1.25rem;
    border-top: 1px solid #ede78a;
    z-index: 1000;
    position: fixed;
}
#blazor-error-ui .dismiss {
    cursor: pointer; position: absolute; right: .75rem; top: .5rem;
}

/* ── Scrollbar discrète ──────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--caly-gris-bord); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #b0bec5; }

}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}