/* Styles Mobile / PWA */
html, body {
    overscroll-behavior-y: none; /* Empêche le rebond élastique */
    user-select: none; /* Empêche la sélection de texte accidentelle */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.mobile-app-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    flex-direction: column;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

.mobile-home-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
}

.mobile-logo {
    width: 120px;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
    border-radius: 16px;
}

.mobile-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.5rem;
}

.mobile-subtitle {
    color: #6c757d;
    margin-bottom: 3rem;
    font-size: 0.9rem;
}

.mobile-buttons-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonnes */
    gap: 0.75rem;
    width: 100%;
    max-width: 450px;
}

.mobile-action-btn {
    background: white;
    border: none;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    aspect-ratio: 1; /* Carré */
}

.mobile-action-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.mobile-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: #0d6efd;
}

.mobile-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.8rem;
}

/* Modal d'installation PWA (Prompt custom) */
.install-prompt-overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0,0,0,0.1);
    animation: slideUp 0.3s ease-out;
}

.install-prompt-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Adaptation Messagerie pour Mobile PWA */
.mobile-messagerie-wrapper .messagerie-container {
    height: 100% !important;
    margin-top: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    flex-direction: column;
}

.mobile-messagerie-wrapper .messagerie-sidebar {
    width: 100% !important;
    height: 40% !important;
    border-right: none !important;
    border-bottom: 1px solid #e9ecef !important;
}

.mobile-messagerie-wrapper .messagerie-main {
    height: 60% !important;
}
