/* Styles personnalisés pour le suivi médical */

body {
    padding-bottom: 80px; /* Espace pour le footer fixe */
    background-color: #f8f9fa;
}

.container-fluid {
    max-width: 600px;
    margin: 0 auto;
}

/* Header */
header h1 {
    color: #0d6efd;
    font-weight: 600;
    margin-bottom: 0;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 12px;
}

.card-body {
    padding: 1.5rem;
}

/* Boutons */
.btn {
    border-radius: 8px;
    font-weight: 500;
}

.btn-lg {
    padding: 12px 20px;
    font-size: 1.1rem;
}

/* Footer */
footer, .custom-footer {
    padding: 20px 0;
    background-color: #f9f9f9 !important;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

footer .btn {
    border-radius: 8px;
    border: none;
    font-weight: 500;
    background-color: #4283c3 !important;
    color: white !important;
    padding: 12px 20px;
    font-size: 1rem;
}

footer .btn:hover {
    background-color: #3a73b3 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(66, 131, 195, 0.3);
}

/* Réduire l'espacement entre les boutons Retour et Accueil */
footer .row .col-6:first-child {
    padding-right: 5px;
}

footer .row .col-6:last-child {
    padding-left: 5px;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-lg {
        padding: 10px 15px;
        font-size: 1rem;
    }
}

/* Prévisualisation des fichiers */
.preview-image {
    max-width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.preview-video {
    width: 100%;
    max-height: 200px;
    border-radius: 8px;
}

/* Boutons de dates */
.date-button {
    margin: 5px;
    border-radius: 8px;
}

/* Bouton de date du jour et boutons de dates */
.btn-info, .btn.btn-info {
    background-color: #4383c3 !important;
    border-color: #4383c3 !important;
    color: white !important;
}

.btn-info:hover, .btn.btn-info:hover {
    background-color: #3a73b3 !important;
    border-color: #3a73b3 !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(67, 131, 195, 0.3);
}

.btn-info:focus, .btn.btn-info:focus {
    background-color: #4383c3 !important;
    border-color: #4383c3 !important;
    color: white !important;
    box-shadow: 0 0 0 0.2rem rgba(67, 131, 195, 0.25);
}

/* Animation de chargement */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-radius: 50%;
    border-top-color: #007bff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Galerie de fichiers */
.file-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.file-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.file-item img,
.file-item video {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.file-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 5px;
    font-size: 0.8rem;
    text-align: center;
}

/* Messages de statut */
.status-message {
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
    text-align: center;
}

.status-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Boutons carrés de la modale de sélection */
.btn-square {
    width: 100%;
    height: 120px;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: white;
}

.btn-square i {
    font-size: 2rem;
    margin-bottom: 8px;
}

.btn-camera {
    background: linear-gradient(135deg, #4383c3, #3a73b3);
    box-shadow: 0 4px 15px rgba(67, 131, 195, 0.3);
}

.btn-camera:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 131, 195, 0.4);
    background: linear-gradient(135deg, #3a73b3, #326ba3);
}

.btn-gallery {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-gallery:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
    background: linear-gradient(135deg, #5a6268, #495057);
}

.btn-pwa-camera {
    background: linear-gradient(135deg, #28a745, #20c997);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-pwa-camera:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    background: linear-gradient(135deg, #20c997, #1e7e34);
}

/* Bouton fallback PWA */
#pwaFallbackOption .btn {
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

#pwaFallbackOption .btn:hover {
    background-color: #0d6efd !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

/* Centrage de la modale */
.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
}

/* Styles pour la caméra PWA en plein écran */
#pwaCameraModal .modal-content {
    height: 100vh;
    border-radius: 0;
}

#pwaCameraModal video {
    background-color: #000;
}

/* Boutons de contrôle de la caméra */
.camera-controls {
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
}

.camera-controls .btn {
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.3);
}

.camera-controls .btn:hover {
    border-color: rgba(255,255,255,0.6);
    transform: scale(1.05);
}

/* Styles pour les modales de PIN et PWA */
#pinModal .modal-content,
#pinModalPWA .modal-content,
#pwaConfirmModal .modal-content {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

#pinModal .modal-header,
#pinModalPWA .modal-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-radius: 15px 15px 0 0;
    border-bottom: none;
}

#pinModal .modal-header .btn-close,
#pinModalPWA .modal-header .btn-close {
    filter: invert(1);
}

#pinInput,
#pinInputPWA {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

#pinInput:focus,
#pinInputPWA:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    background-color: white;
}

.pin-title {
    color: #007bff;
    font-weight: 600;
}

/* Animation pour la modale PIN */
#pinModal.show .modal-dialog,
#pinModalPWA.show .modal-dialog,
#pwaConfirmModal.show .modal-dialog {
    animation: pinModalSlide 0.3s ease-out;
}

@keyframes pinModalSlide {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Styles spécifiques pour la modale PWA de confirmation */
#pwaConfirmModal .modal-header {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-radius: 15px 15px 0 0;
    border-bottom: none;
}

#pwaConfirmModal .modal-header .btn-close {
    filter: invert(1);
}

#pwaImportDate {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

#pwaImportDate:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
    background-color: white;
}

/* Prévisualisation dans la modale PWA */
#pwaPreviewContainer .preview-image,
#pwaPreviewContainer .preview-video {
    max-width: 100%;
    max-height: 150px;
    border-radius: 8px;
    margin-top: 10px;
} 