/* ===== Bouton compte flottant ===== */

.iu-account-btn {
    position: fixed;
    top: 1em;
    right: 1em;
    z-index: 9000;
    background: #fff;
    border: 1px solid #e0e0e0;
    color: #264653;
    padding: 0.55em 1em;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    gap: 0.5em;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.iu-account-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
.iu-account-btn .iu-account-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #2a9d8f;
    color: #fff;
    font-size: 0.85em;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.iu-account-btn.is-logged-in .iu-account-avatar {
    background: #e76f51;
}

/* ===== Modal ===== */

.iu-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(38, 70, 83, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1em;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.iu-modal-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.iu-modal {
    background: #fff;
    border-radius: 1em;
    width: 100%;
    max-width: 420px;
    padding: 1.6em 1.8em;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
    transform: scale(0.95);
    transition: transform 0.2s ease;
    font-family: inherit;
}
.iu-modal-backdrop.is-open .iu-modal {
    transform: scale(1);
}

.iu-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2em;
}
.iu-modal-head h2 {
    margin: 0;
    color: #264653;
    font-size: 1.3em;
}
.iu-modal-close {
    background: none;
    border: 0;
    font-size: 1.6em;
    line-height: 1;
    cursor: pointer;
    color: #888;
    padding: 0;
}
.iu-modal-close:hover { color: #e76f51; }

.iu-tabs {
    display: flex;
    gap: 0.3em;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 1.2em;
}
.iu-tab {
    background: none;
    border: 0;
    padding: 0.6em 1em;
    cursor: pointer;
    font-weight: 600;
    color: #888;
    font-size: 0.95em;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-family: inherit;
}
.iu-tab.is-active {
    color: #e76f51;
    border-bottom-color: #e76f51;
}

.iu-form { display: none; flex-direction: column; gap: 0.8em; }
.iu-form.is-active { display: flex; }

.iu-form label {
    display: flex;
    flex-direction: column;
    gap: 0.35em;
    font-size: 0.9em;
    color: #555;
    font-weight: 600;
}
.iu-form input {
    padding: 0.7em 0.9em;
    border: 1px solid #ccc;
    border-radius: 0.5em;
    font-size: 1em;
    font-family: inherit;
}
.iu-form input:focus {
    outline: none;
    border-color: #2a9d8f;
}

.iu-submit {
    background: #e76f51;
    color: #fff;
    border: 0;
    padding: 0.8em 1em;
    border-radius: 0.5em;
    cursor: pointer;
    font-weight: 600;
    font-size: 1em;
    margin-top: 0.4em;
    font-family: inherit;
    transition: background 0.15s;
}
.iu-submit:hover { background: #c2503a; }
.iu-submit:disabled { background: #c2c2c2; cursor: not-allowed; }

.iu-error {
    color: #c2503a;
    font-size: 0.85em;
    background: #ffe5e0;
    padding: 0.6em 0.8em;
    border-radius: 0.4em;
    display: none;
}
.iu-error.is-shown { display: block; }

.iu-success {
    color: #264653;
    font-size: 0.85em;
    background: #d0f0e9;
    padding: 0.6em 0.8em;
    border-radius: 0.4em;
    display: none;
}
.iu-success.is-shown { display: block; }

.iu-hint {
    color: #888;
    font-size: 0.8em;
    margin: 0.2em 0 0;
}

/* ===== Vue connecte ===== */

.iu-logged-view { display: none; }
.iu-logged-view.is-active { display: block; }

.iu-logged-view h3 {
    margin: 0.2em 0 0.4em;
    color: #264653;
}

.iu-logged-view p {
    color: #555;
    line-height: 1.5;
    margin: 0.5em 0;
}

.iu-account-actions {
    display: flex;
    gap: 0.5em;
    margin-top: 1.2em;
    flex-wrap: wrap;
}

.iu-btn-secondary {
    background: #fff;
    color: #264653;
    border: 1px solid #ccc;
    padding: 0.7em 1em;
    border-radius: 0.5em;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    font-size: 0.9em;
}
.iu-btn-secondary:hover { background: #f5f5f5; }

/* ===== Boutons cloud dans les outils ===== */

.iu-cloud-btn {
    background: #2a9d8f;
    color: #fff;
    border: 0;
    padding: 0.7em 1em;
    border-radius: 0.5em;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    transition: background 0.15s;
}
.iu-cloud-btn:hover { background: #264653; }
.iu-cloud-btn:disabled {
    background: #c2c2c2;
    cursor: not-allowed;
}
.iu-cloud-btn::before {
    content: '☁';
    font-size: 1.15em;
    line-height: 1;
}

/* ===== Toast (si jamais l'outil n'en a pas) ===== */
.iu-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #2a9d8f;
    color: #fff;
    padding: 0.9em 1.6em;
    border-radius: 0.6em;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    z-index: 10000;
    font-weight: 600;
    font-size: 0.95em;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
}
.iu-toast.is-shown {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

@media (max-width: 600px) {
    .iu-account-btn { padding: 0.45em 0.8em; font-size: 0.85em; }
    .iu-modal { padding: 1.2em 1.3em; }
}
