/* public/css/styles.css - Styles pour toutes les pages */

:root {
    --primary: #3498db;
    --primary-dark: #2980b9;
    --secondary: #2c3e50;
    --success: #2ecc71;
    --warning: #f39c12;
    --danger: #e74c3c;
    --danger-dark: #c0392b;
    --light: #f5f5f5;
    --gray: #95a5a6;
    --dark: #34495e;
    --border: #ddd;
    --text: #333;
    --text-light: #666;
    --radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  }
  
  body {
    background-color: #f8f9fa;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  
  /* Layout */
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
  }
  
  main {
    flex: 1;
    padding: 2rem 0;
  }
  
  /* Header */
  header {
    background-color: var(--secondary);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  header h1 {
    margin-bottom: 0.5rem;
  }
  
  .header-actions {
    margin-top: 1rem;
  }
  
  /* Footer */
  footer {
    background-color: var(--secondary);
    color: white;
    padding: 1.5rem 0;
    margin-top: 2rem;
    text-align: center;
  }
  
  /* Buttons */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    text-decoration: none;
    font-size: 0.95rem;
  }
  
  .btn:hover {
    transform: translateY(-2px);
  }
  
  .btn:active {
    transform: translateY(0);
  }
  
  .btn-primary {
    background-color: var(--primary);
    color: white;
  }
  
  .btn-primary:hover {
    background-color: var(--primary-dark);
  }
  
  .btn-secondary {
    background-color: var(--light);
    color: var(--dark);
  }
  
  .btn-secondary:hover {
    background-color: #e5e5e5;
  }
  
  .btn-danger {
    background-color: var(--danger);
    color: white;
  }
  
  .btn-danger:hover {
    background-color: var(--danger-dark);
  }
  
  .btn-icon {
    padding: 0.5rem;
    font-size: 1rem;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    background-color: transparent;
    color: var(--gray);
    border: 1px solid var(--border);
  }
  
  .btn-icon:hover {
    color: var(--primary);
    border-color: var(--primary);
    background-color: rgba(52, 152, 219, 0.1);
  }
  
  /* Search and filters */
  .search-filter {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
  }
  
  .search-filter input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
  }
  
  .search-filter select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    background-color: white;
    min-width: 200px;
  }
  
  /* Projects Grid */
  .projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
  }
  
  .project-card {
    background-color: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  
  .project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
  }
  
  .project-image {
    height: 180px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--border);
  }
  
  .project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
  }
  
  .project-card:hover .project-image img {
    transform: scale(1.05);
  }
  
  .project-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
  }
  
  .project-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--dark);
  }
  
  .project-description {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    flex: 1;
  }
  
  .project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
  }
  
  .update-date {
    color: var(--text-light);
  }
  
  .ci-status {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
    color: white;
  }
  
  .status-success {
    background-color: var(--success);
  }
  
  .status-pending {
    background-color: var(--warning);
  }
  
  .status-failed {
    background-color: var(--danger);
  }
  
  .status-unknown {
    background-color: var(--gray);
  }
  
  .project-links {
    margin-top: auto;
  }
  
  .project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
  }
  
  .project-link:hover {
    color: var(--primary-dark);
  }
  
  /* Loading */
  .loading {
    text-align: center;
    padding: 2rem;
    color: var(--gray);
  }
  
  .loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  /* Admin Panel */
  .admin-panel {
    background-color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
  }
  
  .panel-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .admin-project-item {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
  }
  
  .admin-project-item:last-child {
    border-bottom: none;
  }
  
  .admin-project-item .project-info {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    padding: 0;
    flex: 1;
  }
  
  .project-thumbnail {
    width: 100px;
    height: 75px;
    border-radius: var(--radius);
    overflow: hidden;
    flex-shrink: 0;
  }
  
  .project-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .project-details {
    flex: 1;
  }
  
  .project-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
  }
  
  /* Modal */
  .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem 1rem;
  }
  
  .modal.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
  }
  
  .modal-content {
    background-color: white;
    border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 700px;
    position: relative;
    margin: auto;
  }
  
  .modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .modal-body {
    padding: 1.5rem;
  }
  
  .close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
  }
  
  .close-modal:hover {
    color: var(--danger);
  }
  
  /* Form */
  .form-group {
    margin-bottom: 1.5rem;
  }
  
  .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
  }
  
  .form-group input,
  .form-group textarea,
  .form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
  }
  
  .form-group small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-light);
  }
  
  .form-group textarea {
    resize: vertical;
    min-height: 100px;
  }
  
  .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
  }
  
  .image-upload-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  .image-upload-controls {
    display: flex;
    gap: 1rem;
  }
  
  .image-upload-controls input[type="file"] {
    display: none;
  }
  
  .image-preview {
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
    height: 200px;
  }
  
  .image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }
  
  /* Toast notifications */
  .toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  .toast {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    background-color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease forwards;
    width: 300px;
    position: relative;
  }
  
  .toast.success {
    border-left: 4px solid var(--success);
  }
  
  .toast.error {
    border-left: 4px solid var(--danger);
  }
  
  .toast.info {
    border-left: 4px solid var(--primary);
  }
  
  .toast-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray);
    font-size: 1rem;
  }
  
  @keyframes slideIn {
    from {
      transform: translateX(100%);
      opacity: 0;
    }
    to {
      transform: translateX(0);
      opacity: 1;
    }
  }
  
  @keyframes slideOut {
    from {
      transform: translateX(0);
      opacity: 1;
    }
    to {
      transform: translateX(100%);
      opacity: 0;
    }
  }
  
  .toast.closing {
    animation: slideOut 0.3s ease forwards;
  }
  
  /* Responsive */
  @media (max-width: 768px) {
    .search-filter {
      flex-direction: column;
    }
    
    .admin-project-item {
      flex-direction: column;
    }
    
    .admin-project-item .project-info {
      margin-bottom: 1rem;
    }
    
    .project-actions {
      justify-content: flex-end;
    }
  }