/* ==========================================================================
   VirtuelCOM Identité : thème Bootstrap 5
   Vert du logo #7ED957, texte noir.
   ========================================================================== */

:root {
    --vc-green: #7ed957;
    --vc-green-hover: #6ccb45;
    --vc-green-active: #5cb838;
    --vc-green-soft: #eefbe8;
    --vc-green-ring: rgba(126, 217, 87, 0.45);
    --vc-ink: #111111;
    --vc-muted: #5f6368;
    --vc-line: #e3e6e8;
    --vc-bg: #f4f6f5;

    --bs-body-color: var(--vc-ink);
    --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --bs-link-color: #2f7d16;
    --bs-link-hover-color: #1f5a0d;
    --bs-link-color-rgb: 47, 125, 22;
    --bs-link-hover-color-rgb: 31, 90, 13;
}

.vc-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--vc-bg);
    background-image: radial-gradient(circle at 15% 0%, var(--vc-green-soft) 0, transparent 45%);
}

/* Barre du haut : sélecteur de langue ------------------------------------ */
.vc-topbar {
    min-height: 2rem;
}

.vc-lang-switch {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    margin: -0.75rem -0.75rem 0.25rem 0;
    color: var(--vc-muted);
}

.vc-lang-switch .btn {
    border-color: var(--vc-line);
    border-radius: 999px;
    padding: 0.2rem 0.75rem;
    font-size: 0.8rem;
}

.vc-lang-switch .form-select {
    width: auto;
    border-color: var(--vc-line);
}

@media (max-width: 575.98px) {
    .vc-lang-switch {
        margin: -0.5rem -0.25rem 0.25rem 0;
    }
}

/* Carte centrale --------------------------------------------------------- */
.vc-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 1rem 1.5rem;
}

.vc-card {
    width: 100%;
    max-width: 440px;
    border: 1px solid var(--vc-line);
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.05);
}

.vc-card .card-body {
    padding: 2rem;
}

@media (max-width: 480px) {
    .vc-card .card-body {
        padding: 1.5rem 1.25rem;
    }
}

/* En-tête de marque ------------------------------------------------------ */
.vc-brand {
    text-align: center;
    margin-bottom: 1.5rem;
}

.vc-brand-logo {
    width: 100%;
    max-width: 236px;
    height: auto;
}

.vc-company {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.375rem 0.875rem;
    border: 1px solid var(--vc-line);
    border-radius: 999px;
    background: #fff;
    max-width: 100%;
}

.vc-company-logo {
    max-height: 24px;
    max-width: 96px;
    object-fit: contain;
}

.vc-company-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--vc-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vc-title {
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.25rem;
}

/* Formulaires ------------------------------------------------------------ */
.vc-form .form-label {
    font-weight: 500;
    font-size: 0.9375rem;
}

.vc-form .input-group-text {
    background: #fff;
    color: var(--vc-muted);
    min-width: 2.75rem;
    justify-content: center;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.btn:focus-visible {
    border-color: var(--vc-green);
    box-shadow: 0 0 0 0.25rem var(--vc-green-ring);
}

.form-check-input:checked {
    background-color: var(--vc-green);
    border-color: var(--vc-green);
}

.form-check-input:checked:not([type="radio"]) {
    /* Coche noire, lisible sur le vert */
    --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23111' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

.invalid-feedback:empty {
    display: none !important;
}

.is-invalid + .invalid-feedback,
.input-group:has(.is-invalid) + .invalid-feedback {
    display: block;
}

/* Bouton principal : vert du logo, texte noir ---------------------------- */
.btn-vc {
    --bs-btn-color: var(--vc-ink);
    --bs-btn-bg: var(--vc-green);
    --bs-btn-border-color: var(--vc-green);
    --bs-btn-hover-color: var(--vc-ink);
    --bs-btn-hover-bg: var(--vc-green-hover);
    --bs-btn-hover-border-color: var(--vc-green-hover);
    --bs-btn-active-color: var(--vc-ink);
    --bs-btn-active-bg: var(--vc-green-active);
    --bs-btn-active-border-color: var(--vc-green-active);
    --bs-btn-disabled-color: var(--vc-ink);
    --bs-btn-disabled-bg: var(--vc-green);
    --bs-btn-disabled-border-color: var(--vc-green);
    --bs-btn-focus-shadow-rgb: 126, 217, 87;
    font-weight: 600;
    padding: 0.625rem 1rem;
}

.vc-link {
    text-decoration: none;
}

.vc-link:hover {
    text-decoration: underline;
}

/* Page d'erreur ---------------------------------------------------------- */
.vc-error-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--vc-green-soft);
    color: #2f7d16;
}

/* Pied de page ----------------------------------------------------------- */
.vc-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.25rem;
    margin-top: 1.25rem;
    font-size: 0.8125rem;
    color: var(--vc-muted);
    max-width: 440px;
    text-align: center;
}

.vc-footer a,
.vc-footer .vc-footer-link {
    color: var(--vc-muted);
    font-size: inherit;
    text-decoration: none;
}

.vc-footer a:hover,
.vc-footer .vc-footer-link:hover {
    color: var(--vc-ink);
    text-decoration: underline;
}

/* Règles du mot de passe -------------------------------------------------- */
.vc-rules li {
    color: var(--vc-muted);
    margin-bottom: 0.125rem;
}

.vc-rules li.is-valid {
    color: #2f7d16;
}

.vc-rules li i {
    width: 1rem;
}

/* Code OTP à 6 cases ------------------------------------------------------- */
.vc-otp {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.vc-otp input {
    width: 3rem;
    height: 3.5rem;
    padding: 0;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (max-width: 400px) {
    .vc-otp {
        gap: 0.3rem;
    }

    .vc-otp input {
        width: 2.5rem;
        height: 3rem;
        font-size: 1.25rem;
    }
}

/* Mon compte ------------------------------------------------------------ */
.vc-card-wide {
    max-width: 620px;
}

.vc-profile-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.vc-avatar {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    background: #eef1f4;
    color: #9aa3ad;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border: 2px solid var(--vc-line);
}

.vc-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vc-section {
    border-top: 1px solid var(--vc-line);
    padding: 1.25rem 0;
}

.vc-section h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.vc-section h2 i {
    width: 1.5rem;
    color: #2f7d16;
}

.vc-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--vc-line);
}

.vc-list li:last-child {
    border-bottom: 0;
}

.vc-list-main {
    min-width: 0;
    overflow-wrap: anywhere;
}

.vc-list-main .badge {
    margin-left: 0.25rem;
    font-weight: 500;
}

.vc-list-actions {
    display: flex;
    flex-shrink: 0;
    gap: 0.75rem;
}

.vc-list-actions form {
    margin: 0;
}

.vc-cropper {
    max-height: 360px;
    background: #f4f5f7;
    border-radius: 0.5rem;
    overflow: hidden;
}

.vc-cropper img {
    display: block;
    max-width: 100%;
}

.vc-section details summary {
    cursor: pointer;
    display: inline-block;
}

.vc-danger-icon {
    color: #c62828;
}
