/**
 * Styles pour le plugin Génome d'Avantage Concurrentiel
 */

/* Styles généraux */
.genac-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.genac-container h2 {
    margin-top: 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

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

.genac-form-group {
    margin-bottom: 20px;
}

.genac-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.genac-form-group textarea,
.genac-form-group select,
.genac-form-group input[type="text"],
.genac-form-group input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.genac-form-group textarea:focus,
.genac-form-group select:focus,
.genac-form-group input[type="text"]:focus,
.genac-form-group input[type="email"]:focus {
    border-color: #4CAF50;
    outline: none;
}

.genac-checkbox-group {
    display: flex;
    align-items: center;
}

.genac-checkbox-group input[type="checkbox"] {
    margin-right: 8px;
}

.genac-tooltip {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: #f1f1f1;
    color: #666;
    border-radius: 50%;
    text-align: center;
    line-height: 16px;
    font-size: 12px;
    margin-left: 8px;
    cursor: help;
    position: relative;
}

.genac-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 8px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    z-index: 1;
}

.genac-button {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.genac-button-primary {
    background-color: #4CAF50;
    color: #fff;
}

.genac-button-primary:hover {
    background-color: #45a049;
}

.genac-button-secondary {
    background-color: #f1f1f1;
    color: #333;
}

.genac-button-secondary:hover {
    background-color: #e1e1e1;
}

.genac-button .dashicons {
    margin-right: 8px;
    font-size: 16px;
    line-height: 1;
}

.genac-loading {
    text-align: center;
    padding: 20px;
}

.genac-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #4CAF50;
    animation: genac-spin 1s ease-in-out infinite;
}

@keyframes genac-spin {
    to { transform: rotate(360deg); }
}

/* Styles pour l'analyseur de red flags */
.genac-redflags-analyzer {
    max-width: 800px;
    margin: 0 auto;
}

.genac-results {
    margin-top: 30px;
}

.genac-results h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.genac-score-container {
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.genac-score-value {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 10px;
}

.genac-score-label {
    font-size: 18px;
    font-weight: 500;
    text-transform: uppercase;
}

.genac-score-faible {
    background-color: #d4edda;
    color: #155724;
}

.genac-score-modéré {
    background-color: #fff3cd;
    color: #856404;
}

.genac-score-élevé {
    background-color: #f8d7da;
    color: #721c24;
}

.genac-score-très-élevé {
    background-color: #f8d7da;
    color: #721c24;
    border: 2px solid #721c24;
}

.genac-flags h4,
.genac-recommendations h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.genac-flags-list {
    margin-bottom: 30px;
}

.genac-flag {
    background-color: #f9f9f9;
    border-left: 4px solid #e74c3c;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 0 4px 4px 0;
}

.genac-flag-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.genac-flag-category {
    font-weight: 600;
    color: #333;
}

.genac-flag-severity {
    font-style: italic;
    color: #666;
}

.genac-flag-description {
    color: #333;
}

.genac-severity-faible {
    border-left-color: #ffc107;
}

.genac-severity-moyenne {
    border-left-color: #fd7e14;
}

.genac-severity-élevée {
    border-left-color: #dc3545;
}

.genac-no-flags {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
}

.genac-recommendations-list {
    background-color: #e8f4fd;
    padding: 15px;
    border-radius: 4px;
    margin-top: 0;
    margin-bottom: 30px;
}

.genac-recommendations-list li {
    margin-bottom: 8px;
}

.genac-recommendations-list li:last-child {
    margin-bottom: 0;
}

.genac-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.genac-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.genac-modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.genac-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

/* Styles pour la carte des lieux sécurisés */
.genac-safe-locations-map {
    max-width: 1200px;
    margin: 0 auto;
}

.genac-map-description {
    margin-bottom: 20px;
}

.genac-map-search {
    margin-bottom: 20px;
}

.genac-search-form {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.genac-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    grid-column: 1 / -1;
}

.genac-map-container {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.genac-locations-list {
    margin-top: 20px;
}

.genac-locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.genac-location-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.genac-location-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.genac-location-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.genac-location-header h4 {
    margin: 0;
    font-size: 16px;
    flex: 1;
}

.genac-location-type {
    font-size: 12px;
    background-color: #e1e1e1;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
}

.genac-location-body {
    margin-bottom: 15px;
}

.genac-location-address {
    margin: 0 0 5px;
    font-size: 14px;
    color: #555;
}

.genac-location-distance {
    margin: 0 0 5px;
    font-size: 14px;
    font-weight: 600;
}

.genac-location-safety {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.genac-safety-high {
    background-color: rgba(76, 175, 80, 0.2);
    color: #2e7d32;
}

.genac-safety-medium {
    background-color: rgba(255, 193, 7, 0.2);
    color: #ff8f00;
}

.genac-safety-low {
    background-color: rgba(244, 67, 54, 0.2);
    color: #c62828;
}

.genac-location-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.genac-location-actions .genac-button {
    flex: 1;
    justify-content: center;
    font-size: 12px;
    padding: 6px 12px;
}

.genac-verification-badge {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 5px;
    font-weight: 600;
}

.genac-verification-badge.verified {
    background-color: rgba(76, 175, 80, 0.2);
    color: #2e7d32;
}

.genac-verification-badge.featured {
    background-color: rgba(33, 150, 243, 0.2);
    color: #1565c0;
}

.genac-verification-badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    margin-right: 3px;
}

.genac-map-error {
    background-color: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    display: flex;
    align-items: center;
}

.genac-map-error .dashicons {
    margin-right: 5px;
}

.genac-location-details {
    padding: 10px;
}

.genac-details-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.genac-details-header h3 {
    margin: 5px 0;
}

.genac-details-thumbnail {
    margin-bottom: 15px;
}

.genac-details-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.genac-details-body {
    margin-bottom: 20px;
}

.genac-details-safety-features {
    margin-top: 15px;
}

.genac-details-safety-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 5px;
}

.genac-details-safety-features li {
    padding: 5px 0;
}

.genac-details-opening-hours {
    margin-top: 15px;
}

.genac-details-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.genac-no-locations {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Styles pour l'administration */
.genac-admin-container {
    max-width: 1200px;
    margin: 20px 0;
}

.genac-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.genac-admin-header h1 {
    margin: 0;
}

.genac-admin-tabs {
    margin-bottom: 20px;
    border-bottom: 1px solid #ccc;
}

.genac-admin-tabs .nav-tab {
    margin-bottom: -1px;
}

.genac-admin-content {
    background-color: #fff;
    padding: 20px;
    border: 1px solid #ccc;
    border-top: none;
}

.genac-admin-section {
    margin-bottom: 30px;
}

.genac-admin-section h2 {
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.genac-admin-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

.genac-admin-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.genac-admin-table {
    width: 100%;
    border-collapse: collapse;
}

.genac-admin-table th,
.genac-admin-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.genac-admin-table th {
    background-color: #f9f9f9;
    font-weight: 600;
}

.genac-admin-table tr:hover {
    background-color: #f9f9f9;
}

.genac-admin-form {
    max-width: 600px;
}

.genac-admin-form .form-table th {
    width: 200px;
}

/* Responsive styles */
@media (max-width: 768px) {
    .genac-container {
        padding: 15px;
    }
    
    .genac-search-form {
        grid-template-columns: 1fr;
    }
    
    .genac-locations-grid {
        grid-template-columns: 1fr;
    }
    
    .genac-score-value {
        font-size: 36px;
    }
    
    .genac-actions {
        flex-direction: column;
    }
    
    .genac-modal-content {
        margin: 20% auto;
        width: 90%;
    }
    
    .genac-admin-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .genac-admin-header .button {
        margin-top: 10px;
    }
}

