/* Custom CSS for Allo Containers */

:root {
    --primary-color: #2c5aa0;
    --secondary-color: #f8f9fa;
    --accent-color: #ffc107;
    --text-dark: #343a40;
    --text-light: #6c757d;
    --success-color: #28a745;
    --border-color: #e9ecef;
}

/* Base styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    padding-top: 76px; /* Account for fixed navbar */
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background-color: var(--primary-color) !important;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-color) !important;
}

/* Hero sections */
.hero-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="%23e9ecef" opacity="0.5"/></svg>') repeat;
    background-size: 50px 50px;
    opacity: 0.3;
}

.hero-section > .container {
    position: relative;
    z-index: 1;
}

.hero-section-commune {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 100px 0 80px;
}

/* Cards */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 12px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.commune-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.commune-card:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a73 100%);
    color: white;
}

.commune-card:hover .card-title,
.commune-card:hover .card-text {
    color: white;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 12px 24px;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a73 100%);
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e3a73 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 90, 160, 0.4);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Tables */
.table {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.table-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a73 100%);
    color: white;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(44, 90, 160, 0.05);
}

.table th {
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    border: none;
    padding: 15px;
    vertical-align: middle;
}

/* Icons */
.fas, .far {
    transition: transform 0.3s ease;
}

.card:hover .fas,
.card:hover .far {
    transform: scale(1.1);
}

/* Sections */
.py-5 {
    padding: 80px 0;
}

.bg-light {
    background-color: #f8f9fa !important;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
    margin-top: 80px;
}

.footer h5 {
    color: white;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer .list-unstyled li {
    margin-bottom: 8px;
}

.footer a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: white;
}

/* Forms */
.form-control {
    border-radius: 8px;
    border: 2px solid var(--border-color);
    padding: 12px 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.form-select {
    border-radius: 8px;
    border: 2px solid var(--border-color);
    padding: 12px 16px;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

/* Accordion */
.accordion-item {
    border: none;
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.accordion-button {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: none;
    padding: 20px;
    font-weight: 600;
    color: var(--text-dark);
}

.accordion-button:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

.accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a73 100%);
    color: white;
}

.accordion-body {
    padding: 20px;
    background: white;
}

/* Alerts */
.alert {
    border-radius: 12px;
    border: none;
    padding: 20px;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

/* Responsive design */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    .py-5 {
        padding: 60px 0;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.6s ease-out;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom utility classes */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a73 100%) !important;
}

.shadow-sm {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
}

.shadow-lg {
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
}

/* Main content spacing */
.main-content {
    min-height: calc(100vh - 200px);
}

/* Table responsive improvements */
@media (max-width: 768px) {
    .table-responsive {
        border-radius: 12px;
    }
    
    .table td, .table th {
        padding: 10px 8px;
        font-size: 0.9rem;
    }
}

/* Bouton d'appel flottant */
.floating-call-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  background: #0d6efd;
  color: #fff;
  border-radius: 50%;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  font-size: 2rem;
  transition: background 0.2s;
}
.floating-call-btn:hover {
  background: #084298;
  color: #fff;
  text-decoration: none;
}
