* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: white;
    color: black;
}

/* ===== LOGIN ===== */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}
.login-container {
    width: 300px;
    padding: 2rem;
    border: 1px solid #eee;
    border-radius: 12px;
}
.login-container h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}
.login-container input {
    width: 100%;
    padding: 10px;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* ===== LAYOUT GÉNÉRAL ===== */
.app {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}
.back, .add {
    text-decoration: none;
    font-size: 16px;
}
.back { color: black; }
.add { color: red; font-weight: 500; }

/* ===== DASHBOARD ===== */
.dashboard {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}
.header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    color: #666;
}
.menu {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.menu-item {
    text-decoration: none;
    color: red;
    font-size: 18px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

/* ===== LISTE ANNONCES ===== */
.annonces-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.annonce-card {
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 16px;
    background: white;
}
.annonce-header {
    margin-bottom: 8px;
}
.title {
    font-weight: 600;
    font-size: 16px;
    display: block;
}
.subtitle {
    font-size: 14px;
    color: #666;
}
.details {
    font-size: 14px;
    color: #444;
    margin: 8px 0;
}
.actions {
    display: flex;
    gap: 20px;
    margin-top: 12px;
}
.btn-text-red {
    background: none;
    border: none;
    color: red;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
}
.reservation-message {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #ddd;
    color: #2e7d32;
    font-size: 14px;
}

/* ===== FORMULAIRE ===== */
.annonce-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.annonce-form h3 {
    margin-top: 16px;
    margin-bottom: 4px;
    font-size: 16px;
    font-weight: 600;
}
.annonce-form input,
.annonce-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}
.annonce-form textarea {
    min-height: 80px;
    resize: vertical;
}
.file-input {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.file-input label {
    background: #f5f5f5;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
}
.file-input input[type="file"] {
    display: none;
}
.file-name {
    font-size: 14px;
    color: #666;
}
.block-check {
    margin: 16px 0;
    padding: 16px;
    background: #fafafa;
    border-radius: 8px;
}
.block-check label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}
.reservation-text {
    margin-top: 12px;
    margin-left: 24px;
}
.reservation-text input {
    width: 100%;
    margin-top: 4px;
}
.btn-red {
    background: white;
    color: red;
    border: 1px solid red;
    padding: 14px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
}
.btn-red:hover {
    background: red;
    color: white;
}
/* ===== OPTIMISATIONS MOBILE ===== */
html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: white;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.app, .dashboard {
    max-width: 100%;
    padding: 16px;
    padding: 16px env(safe-area-inset-right) 16px env(safe-area-inset-left);
}

/* Amélioration des inputs pour mobile */
input, textarea, button, .btn-text-red, .menu-item {
    font-size: 16px; /* Évite le zoom automatique sur iOS */
    border-radius: 10px;
    -webkit-appearance: none;
    appearance: none;
}

/* Boutons plus faciles à taper */
.btn-text-red, .menu-item, .back, .add {
    padding: 12px 0;
    display: inline-block;
    min-height: 44px; /* Taille minimale recommandée Apple/Google */
    line-height: 20px;
}

.annonce-card {
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.actions {
    gap: 24px;
}

/* Message d'erreur */
.error-message {
    color: red;
    margin-bottom: 16px;
    padding: 12px;
    background: #fff0f0;
    border-radius: 8px;
    font-size: 14px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 16px;
}

/* Mode lecture seule */
input[readonly], textarea[readonly] {
    background-color: #f9f9f9;
    color: #333;
    border-color: #eee;
}

/* Photo existante */
.current-photo {
    margin: 8px 0;
}