@charset "utf-8";
/* CSS Document */
/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* En-tête */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
	
}

header h2 {
    text-align: left;
	font-size: 1.5rem;
    margin-bottom: 0.5rem;
	color: white;	
}

nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.3rem 0;
    transition: color 0.3s;
}

nav a:hover {
    color: #ecf0f1;
}

nav .logout {
    margin-left: auto;
    color: #e74c3c;
}

/* Pied de page */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

/* Alertes */
.alert {
    padding: 0.8rem;
    margin: 1rem 0;
    border-radius: 4px;
}

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

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

.alert.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Boutons */
.btn {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-delete {
    background-color: #e74c3c;
}

.btn-delete:hover {
    background-color: #c0392b;
}

/*.active {
    background-color: #2c3e50;
} */

.active {
    background-color: #2c3e50 !important;
    color: white !important;
    border: 1px solid #1a252f;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

/* Tableaux */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #2c3e50;
    color: white;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

tr:hover {
    background-color: #e9e9e9;
}

.high-variance {
    background-color: #ffdddd !important;
}

/* Cartes */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.dashboard-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.dashboard-card h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.dashboard-card p {
    margin-bottom: 1rem;
    color: #666;
}

/* Filtres */
.filters {
    margin: 1.5rem 0;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

/* Grille d'échantillons */
.echantillons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.echantillon-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.echantillon-card:hover {
    transform: translateY(-5px);
}

.echantillon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.echantillon-header h3 {
    color: #2c3e50;
}

.couleur-indicator {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid #ddd;
}

.couleur-indicator.rosé {
    background-color: #f6c3c8;  /* Rose pâle */
    /* Ou pour un rosé plus franc : */
    /* background-color: #e75480; */
}
.couleur-indicator.rouge {
    background-color: #a71e32;
}

.couleur-indicator.blanc {
    background-color: white;
	border: 1px solid #ddd;  /* Bordure plus visible */
}		
		
/* Formulaire de dégustation */
.degustation-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .degustation-container {
        grid-template-columns: 1fr;
    }
}

.echantillon-info {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    align-self: start;
}

.echantillon-info h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.echantillon-info p {
    margin-bottom: 0.5rem;
}

.degustation-form {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.degustation-form .form-group {
    margin-bottom: 1rem;
}

.degustation-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.degustation-form input[type="number"],
.degustation-form input[type="text"],
.degustation-form textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.degustation-form textarea {
    min-height: 150px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Analyse des résultats */
.results-container {
    overflow-x: auto;
    margin: 2rem 0;
}

.results-table {
    min-width: 800px;
}

.high-variance-indicator {
    display: inline-block;
    width: 15px;
    height: 15px;
    background-color: #ffdddd;
    border: 1px solid #ff9999;
    margin-right: 5px;
    vertical-align: middle;
}

.analysis-notes {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #6c757d;
}

/* Styles pour les formulaires d'authentification */
.auth-container {
    max-width: 500px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.auth-container h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: #2c3e50;
}

.auth-container form {
    margin-top: 1.5rem;
}

.auth-container .form-group {
    margin-bottom: 1rem;
}

.auth-container label {
    display: block;
    margin-bottom: 0.5rem;
}

.auth-container input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.auth-container button[type="submit"] {
    width: 100%;
    padding: 0.75rem;
    margin-top: 1rem;
}

.auth-container p {
    text-align: center;
    margin-top: 1.5rem;
}

/* Styles responsives */
@media (max-width: 768px) {
    .table-container {
        overflow-x: auto;
    }
    
    table {
        min-width: 600px;
    }
    
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .echantillons-grid {
        grid-template-columns: 1fr;
    }
}		

/* Bouton pour échantillon déjà dégusté */
.btn-deguste {
    background-color: #e74c3c !important;
    border-color: #c0392b !important;
}

.btn-deguste:hover {
    background-color: #c0392b !important;
}

/* Animation pour le bouton */
.btn {
    transition: all 0.3s ease;
}

.import-container {
    background: #f8f9fa;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.import-container h3 {
    margin-bottom: 1rem;
}

.import-container form {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.import-container .form-group {
    flex-grow: 1;
}

.import-container input[type="file"] {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
}

.import-container small {
    display: block;
    margin-top: 0.5rem;
    color: #666;
}

/* Styles spécifiques pour la page des écarts */
.problematic {
    border-left: 4px solid #e74c3c;
    position: relative;
    overflow: hidden;
}

.problematic::after {
    content: 'Écart ≥ 3';
    position: absolute;
    top: 10px;
    right: -30px;
    background: #e74c3c;
    color: white;
    padding: 3px 30px;
    transform: rotate(45deg);
    font-size: 12px;
    font-weight: bold;
}

.stats {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #eee;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

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

.stat-value {
    font-weight: bold;
}

.highlight {
    color: #e74c3c;
    font-size: 1.1em;
}

.btn-warning {
    background-color: #f39c12;
}

.btn-warning:hover {
    background-color: #d35400;
}

.subtitle {
    color: #666;
    margin-bottom: 20px;
    font-style: italic;
}

/* Styles pour la page de détails */
.wine-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.degustations-table {
    width: 100%;
    margin-bottom: 20px;
}

.degustations-table th {
    background: #2c3e50;
    color: white;
}

.degustations-table td, .degustations-table th {
    padding: 10px;
    border: 1px solid #ddd;
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.8em;
}

.back-link {
    margin-top: 20px;
    text-align: center;
}

/* Styles pour la page de modification */
/*.container {
     width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;

} */

.wine-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.wine-info h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

/*.degustation-form {
    background: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.degustation-form .form-group {
    margin-bottom: 15px;
}

.degustation-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.degustation-form input[type="number"],
.degustation-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.degustation-form textarea {
    min-height: 150px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
} */

/* Styles pour les boutons d'action */
.action-buttons {
    margin-top: 20px;
    text-align: center;
}

.btn-warning {
    background-color: #f39c12;
    border-color: #e67e22;
    color: white;
}

.btn-warning:hover {
    background-color: #e67e22;
}

/* Amélioration de la section d'analyse */
.analysis-notes {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-top: 20px;
    text-align: center;
}

.high-variance-indicator {
    display: inline-block;
    width: 15px;
    height: 15px;
    background-color: #e74c3c;
    border: 1px solid #c0392b;
    margin-right: 5px;
    vertical-align: middle;
}

/* Styles pour les boutons d'export */
.export-buttons {
    margin-bottom: 20px;
    text-align: right;
}

.btn-group {
    display: inline-flex;
    gap: 10px;
}

.btn-export {
    background-color: #2c3e50;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-export:hover {
    background-color: #1a252f;
}

.btn-export i {
    font-size: 1.2em;
}

/* Dans votre fichier CSS */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.table-responsive {
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.users-table th, .users-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.users-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.users-table tr:hover {
    background-color: #f5f5f5;
}

.actions {
    white-space: nowrap;
}

.btn-edit {
    background-color: #4CAF50;
    color: white;
}

.btn-delete {
    background-color: #f44336;
    color: white;
}

.btn-edit:hover {
    background-color: #45a049;
}

.btn-delete:hover {
    background-color: #d32f2f;
}

.form-actions {
    margin-top: 20px;
}

/* Styles pour la gestion d'activation */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table th, .admin-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.admin-table th {
    background-color: #f2f2f2;
}

.badge {
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 14px;
    color: white;
}

.badge.active {
    background-color: #28a745;
}

.badge.inactive {
    background-color: #dc3545;
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

/* Styles pour les actions globales */
.global-actions {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.global-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
}

/* Styles existants à conserver */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table th, .admin-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.admin-table th {
    background-color: #f2f2f2;
}

.badge {
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 14px;
    color: black;
}

.badge.inactive {
    background-color: #dc3545;
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

/* Style pour le bouton désactivé */
.btn-disabled {
    background-color: #cccccc !important;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn[disabled] {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Style existant à conserver */
.btn {
    background-color: #3498db;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.alert.success {
    padding: 1rem;
    background-color: #e0ffe0;
    border: 1px solid #90ee90;
    color: #2d6a2d;
    border-radius: 8px;
    text-align: center;
    margin-top: 1rem;
}

/* Style pour la carte "Aucun résultat" */
.echantillon-card.problematic.no-results {
    background-color: #f8f9fa;
    border-left: 4px solid #e74c3c;
    text-align: center;
    grid-column: 1 / -1; /* Prend toute la largeur de la grille */
    max-width: 600px; /* Largeur maximale */
    margin: 0 auto; /* Centrage */
}

.echantillon-card.problematic.no-results .echantillon-header {
    background-color: #f1f1f1;
    justify-content: center;
}

.echantillon-card.problematic.no-results .echantillon-details {
    padding: 20px;
}

/* Supprimez le pseudo-élément after pour la carte "no-results" */
.echantillon-card.problematic.no-results::after {
    content: none;
}

/* Style existant pour les cartes problématiques - conservez-le */
.echantillon-card.problematic {
    border-left: 4px solid #e74c3c;
    position: relative;
    overflow: hidden;
}

.echantillon-card.problematic::after {
    content: 'Écart ≥ 3';
    position: absolute;
    top: 10px;
    right: -30px;
    background: #e74c3c;
    color: white;
    padding: 3px 30px;
    transform: rotate(45deg);
    font-size: 12px;
    font-weight: bold;
}

/* Styles spécifiques pour les écarts problématiques */
.echantillon-card.problematic {
    border-left: 4px solid #e74c3c;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.2);
}

.echantillon-card.problematic::after {
    content: 'Écart ≥ 3';
    position: absolute;
    top: 10px;
    right: -30px;
    background: #e74c3c;
    color: white;
    padding: 3px 30px;
    transform: rotate(45deg);
    font-size: 12px;
    font-weight: bold;
    z-index: 1;
}

.degustation-stats {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #eee;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.stat-item.highlight {
    color: #e74c3c;
    font-weight: bold;
}

.echantillon-card.problematic .btn-warning {
    background-color: #e74c3c;
    border-color: #c0392b;
}

.echantillon-card.problematic .btn-warning:hover {
    background-color: #c0392b;
}

/* Carte pour aucun résultat */
.echantillon-card.no-results {
    grid-column: 1 / -1;
    text-align: center;
    background-color: #f8f9fa;
}

.echantillon-card.no-results .echantillon-header {
    justify-content: center;
    background-color: #e9ecef;
}

.echantillon-card.no-results .echantillon-details {
    padding: 20px;
}

/* Styles pour les badges de dégustation */
.badge.deguste {
    background-color: #28a745;
    color: white;
}

.badge.non-deguste {
    background-color: #6c757d;
    color: white;
}

/* Amélioration de l'espacement des actions */
.actions {
    display: flex;
    gap: 5px;
}

.actions a {
    padding: 5px 10px;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}