/* style.css - Styles personnalisés pour SCI HAMAHOULA */
/* Couleurs principales : Bordeaux (#800020) et Turquoise (#40E0D0) */

/* Importation d'Animate.css pour les animations */
@import url('https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css');

/* ---------------------- Styles généraux ---------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
}

/* ---------------------- Image de fond (active) ---------------------- */
body {
    background-image: url('uploads/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    position: relative;
}
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

/* ---------------------- Sidebar (fixe) ---------------------- */
.sidebar {
    background-color: #800020;
    color: white;
    width: 260px;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    padding: 1rem;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.sidebar .title {
    color: #40E0D0;
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

/* Menu de la sidebar */
.menu-list {
    list-style: none;
    margin-top: 1rem;
}

.menu-list li {
    margin-bottom: 0.25rem;
}

.menu-list a {
    color: white;
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0;
    transition: all 0.3s ease;
    transform: scale(1);
    text-decoration: none;
}

.menu-list a i {
    margin-right: 10px;
    color: #40E0D0;
    width: 1.5rem;
    text-align: center;
}

.menu-list a:hover {
    background-color: #40E0D0;
    color: #800020 !important;
    transform: scale(1.02);
    padding-left: 1.5rem;
}

/* Contenu principal */
.main-content {
    margin-left: 260px;
    padding: 20px;
    min-height: 100vh;
}

/* ---------------------- Conteneurs et cartes ---------------------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Pour que le contenu des cartes soit lisible sur image de fond */
.box, .card, .notification, .table, .modal-card {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(0px);
    border-radius: 8px;
}

/* Cartes avec animation au survol */
.box {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 20px;
}

.box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Animation d'apparition des formulaires */
.box {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------------------- Notifications ---------------------- */
.notification {
    border-radius: 5px;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ---------------------- Tableaux ---------------------- */
.table {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.table thead th {
    background-color: #800020;
    color: white;
    font-weight: bold;
    padding: 12px;
    border-bottom: none;
}

.table tbody td {
    padding: 10px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

.table tbody tr:hover {
    background-color: #f9f9f9;
}

/* Tags personnalisés */
.tag.is-primary {
    background-color: #800020;
    color: white;
}

.tag.is-info {
    background-color: #40E0D0;
    color: #1a1a1a;
}

.tag.is-success {
    background-color: #28a745;
    color: white;
}

.tag.is-danger {
    background-color: #dc3545;
    color: white;
}

.tag.is-warning {
    background-color: #ffc107;
    color: #1a1a1a;
}

/* ---------------------- Boutons ---------------------- */
.button {
    transition: all 0.2s ease;
    border-radius: 5px;
}

.button:hover {
    transform: scale(1.02);
}

.button.is-primary {
    background-color: #800020;
    border-color: #800020;
    color: white;
}

.button.is-primary:hover {
    background-color: #a00028;
    border-color: #a00028;
}

.button.is-info {
    background-color: #40E0D0;
    border-color: #40E0D0;
    color: #1a1a1a;
}

.button.is-info:hover {
    background-color: #2fc0b0;
    border-color: #2fc0b0;
}

/* ---------------------- Champs de formulaire ---------------------- */
.input, .textarea, .select select {
    border-radius: 5px;
    border: 1px solid #ddd;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.9);
}

.input:focus, .textarea:focus, .select select:focus {
    border-color: #40E0D0 !important;
    box-shadow: 0 0 5px rgba(64, 224, 208, 0.5) !important;
    outline: none;
}

/* Icônes dans les champs */
.icon.is-left {
    color: #800020;
}

/* Help text */
.help {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
}

/* ---------------------- Modals ---------------------- */
.modal-card {
    border-radius: 10px;
    overflow: hidden;
    background-color: white;
}

.modal-card-head {
    background-color: #800020;
    color: white;
}

.modal-card-head .modal-card-title {
    color: white;
}

.modal-card-head .delete {
    background-color: #40E0D0;
}

/* ---------------------- Responsive ---------------------- */
@media screen and (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-list a {
        padding: 0.5rem 1rem;
    }
    
    .columns {
        flex-direction: column;
    }
    
    .column {
        width: 100%;
    }
}

/* ---------------------- Utilitaires ---------------------- */
.has-text-bordeaux {
    color: #800020;
}

.has-text-turquoise {
    color: #40E0D0;
}

.has-background-bordeaux {
    background-color: #800020;
}

.has-background-turquoise {
    background-color: #40E0D0;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ---------------------- Impressions ---------------------- */
@media print {
    .sidebar, .no-print, .buttons, .navbar, .footer, .modal {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
        padding: 0;
    }
    
    .box {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    body {
        background: white;
    }
}