/* =========================================================================
   STYLE.CSS — Feuille de style de Divided
   =========================================================================
   CSS simple : sélecteurs basiques, propriétés vues en cours de base.
   Pas de variables CSS, pas de dégradés, pas d'animations complexes.
========================================================================= */

/* ─── Réinitialisation simple ─── */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f4f4f7;
    color: #222;
    line-height: 1.5;
    min-height: 100vh;
}

/* ─── Conteneur central ─── */
.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 24px 20px;
}

/* ─── Barre du haut ─── */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #ddd;
    margin-bottom: 24px;
}

.navbar h1 {
    font-size: 22px;
    color: #4f46e5;
}

/* ─── Landing page (page d'accueil non connecté) ─── */
.hero {
    text-align: center;
    padding: 50px 20px 30px 20px;
}

.hero h1 {
    font-size: 42px;
    color: #4f46e5;
    margin-bottom: 12px;
}

.hero p {
    font-size: 18px;
    color: #555;
    margin-bottom: 28px;
}

.features {
    display: flex;
    gap: 16px;
    margin-top: 30px;
}

.feature {
    flex: 1;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.feature .emoji {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.feature h3 {
    font-size: 16px;
    margin-bottom: 6px;
    color: #4f46e5;
}

.feature p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* ─── Cartes (formulaires, contenu) ─── */
.card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.card h2 {
    font-size: 18px;
    margin-bottom: 16px;
    color: #222;
}

/* ─── Formulaires ─── */
.field {
    margin-bottom: 12px;
}

.field label {
    display: block;
    font-size: 13px;
    font-weight: bold;
    color: #444;
    margin-bottom: 4px;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    background-color: white;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #4f46e5;
}

/* ─── Boutons ─── */
.btn {
    display: inline-block;
    padding: 8px 18px;
    background-color: #4f46e5;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
}

.btn:hover {
    background-color: #3730a3;
}

.btn-big {
    padding: 12px 30px;
    font-size: 16px;
}

.btn-secondary {
    background-color: white;
    color: #4f46e5;
    border: 1px solid #4f46e5;
}

.btn-secondary:hover {
    background-color: #eef0fb;
}

.btn-danger {
    background-color: #ef4444;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

.btn-success {
    background-color: #10b981;
}

.btn-success:hover {
    background-color: #047857;
}

.btn-small {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-link {
    background: transparent;
    color: #4f46e5;
    padding: 4px 0;
}

.btn-link:hover {
    background: transparent;
    text-decoration: underline;
}

/* ─── Onglets login/register ─── */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.tab {
    background: transparent;
    color: #666;
    padding: 8px 16px;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
}

.tab.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
    font-weight: bold;
}

/* ─── Message d'info / d'erreur ─── */
.alert {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    padding: 10px 14px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
}

/* ─── Liste de groupes / membres / dépenses ─── */
.list-item {
    background-color: white;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.list-item-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ─── Soldes ─── */
.balance-positive { color: #10b981; font-weight: bold; }
.balance-negative { color: #ef4444; font-weight: bold; }
.balance-zero     { color: #888; }

/* ─── Aide ─── */
.muted     { color: #888; font-size: 13px; }
.small     { font-size: 13px; }
.spacer    { margin-top: 16px; }
.text-center { text-align: center; }

/* ─── Disposition en colonnes (form 2 colonnes) ─── */
.row {
    display: flex;
    gap: 12px;
}

.row > * {
    flex: 1;
}

/* ─── Checkboxes (pour les participants d'une dépense) ─── */
.check-line {
    margin-bottom: 4px;
}

.check-line input[type="checkbox"] {
    width: auto;
    margin-right: 6px;
}

.check-line label {
    display: inline;
    font-weight: normal;
    font-size: 14px;
}

/* ─── Formulaire d'upload de ticket ─── */
.upload-form {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
    font-size: 13px;
    flex-wrap: wrap;
}

.upload-form input[type="file"] {
    flex: 1;
    min-width: 180px;
    width: auto;
    padding: 4px;
    font-size: 12px;
}

/* ─── Mobile ─── */
@media (max-width: 600px) {
    .features { flex-direction: column; }
    .row      { flex-direction: column; }
    .hero h1  { font-size: 32px; }
}
