/**
 * Facturaty - Application de facturation pour entreprises marocaines
 * Feuille de style principale
 */

/* Variables de couleur */
:root {
  --primary: #2c3e50;
  --secondary: #3498db;
  --success: #27ae60;
  --info: #2980b9;
  --warning: #f39c12;
  --danger: #e74c3c;
  --light: #ecf0f1;
  --dark: #34495e;
}

/* Styles généraux */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f8fa;
  color: #333;
  line-height: 1.6;
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: 1px;
}

.page-header {
  border-bottom: 2px solid var(--primary);
  margin-bottom: 25px;
  padding-bottom: 10px;
}

/* Styles des cartes */
.card {
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.card-header {
  background-color: var(--primary);
  color: white;
  font-weight: 600;
  border-bottom: none;
}

.stats-card {
  text-align: center;
  padding: 20px 10px;
}

.stats-card i {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: var(--secondary);
}

.stats-number {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.stats-text {
  color: #777;
  font-size: 1rem;
}

/* Styles des formulaires */
.form-control {
  border-radius: 4px;
  padding: 10px 15px;
  border: 1px solid #ddd;
}

.form-control:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.form-group label {
  font-weight: 600;
  color: #555;
}

/* Styles des boutons */
.btn {
  border-radius: 4px;
  padding: 8px 16px;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--dark);
  border-color: var(--dark);
  box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25);
}

.btn-secondary {
  background-color: var(--secondary);
  border-color: var(--secondary);
}

.btn-secondary:hover, .btn-secondary:focus {
  background-color: var(--info);
  border-color: var(--info);
  box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* Tableaux */
.table {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.table thead th {
  background-color: var(--primary);
  color: white;
  border-bottom: none;
  font-weight: 600;
}

.table-hover tbody tr:hover {
  background-color: rgba(52, 152, 219, 0.1);
}

/* Styles pour les documents (facture, devis, etc.) */
.document-container {
  background-color: white;
  padding: 30px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.document-header {
  margin-bottom: 30px;
}

.document-title {
  text-align: center;
  font-weight: 700;
  color: var(--primary);
  font-size: 28px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 10px;
}

.company-logo {
  max-height: 100px;
  max-width: 100%;
}

.company-details, .client-details {
  margin-bottom: 20px;
}

.document-info {
  background-color: var(--light);
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.document-table {
  margin: 30px 0;
}

.document-summary {
  background-color: var(--light);
  padding: 15px;
  border-radius: 6px;
  margin-top: 20px;
}

.amount-in-words {
  font-style: italic;
  margin: 20px 0;
  padding: 10px;
  border: 1px dashed #ddd;
  background-color: #f9f9f9;
}

.signatures {
  margin-top: 50px;
  display: flex;
  justify-content: space-between;
}

.signature-block {
  border-top: 1px solid #ddd;
  padding-top: 10px;
  width: 45%;
  text-align: center;
}

/* Login page */
.login-container {
  max-width: 400px;
  margin: 100px auto;
}

.login-logo {
  text-align: center;
  margin-bottom: 30px;
}

.login-form {
  background-color: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .document-container {
    padding: 15px;
  }
  
  .signatures {
    flex-direction: column;
  }
  
  .signature-block {
    width: 100%;
    margin-bottom: 20px;
  }
}

/* Print styles */
@media print {
  body {
    background-color: white;
  }
  
  .no-print {
    display: none !important;
  }
  
  .document-container {
    box-shadow: none;
    padding: 0;
  }
  
  .container {
    width: 100%;
    max-width: 100%;
  }
}
