/**
 * Rule Import Page Styles
 * Specific styles for the rule archive page
 */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    background: transparent;
    min-height: 100vh;
    color: #333;
    /* Permettre le scroll mais avec une barre stylée */
    overflow: auto;
}

/* Scrollbar styling for WebKit browsers */
body::-webkit-scrollbar {
    width: 8px;
    background: rgba(0, 0, 0, 0.05);
}

body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
}

body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
}

/* Scrollbar styling for Firefox */
body {
    scrollbar-width: thin;
    scrollbar-color: #667eea rgba(0, 0, 0, 0.05);
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 80vh;
    padding: 20px;
    background: transparent;
    max-width: 1200px;
    margin: 0 auto;
}

.info-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 35px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    width: 100%;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.info-card h1 {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 2.2em;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.info-card .subtitle {
    color: #666;
    font-size: 1.2em;
    margin: 0 0 30px 0;
    font-weight: 400;
    text-align: center;
}

.boat-form {
    margin-bottom: 30px;
    background: rgba(248, 249, 250, 0.8);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 1.1em;
}

.file-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.8);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-size: 1em;
    color: #333;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-sizing: border-box;
    min-height: 45px;
}

.file-input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.file-input::placeholder {
    color: #999;
}

.actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.rule-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
    text-align: center;
    border: none;
    cursor: pointer;
    font-size: 1em;
}

.rule-btn:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.4);
}

.rule-btn:active {
    transform: translateY(0);
}

.boat-list-container h3 {
    color: #333;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.4em;
    font-weight: 600;
    text-align: center;
}

.boat-list {
    /* Permettre le scroll mais avec une barre stylée */
    overflow: auto;
    max-height: 500px;
    padding: 15px;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Scrollbar styling for WebKit browsers */
.boat-list::-webkit-scrollbar {
    width: 8px;
    background: rgba(0, 0, 0, 0.05);
}

.boat-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
}

.boat-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
}

/* Scrollbar styling for Firefox */
.boat-list {
    scrollbar-width: thin;
    scrollbar-color: #667eea rgba(0, 0, 0, 0.05);
}

.boat-item {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    padding: 15px;
}

.boat-item:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(5px);
}

.boat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.boat-name {
    font-weight: 600;
    color: #333;
    font-size: 1.2em;
}

.boat-actions {
    display: flex;
    gap: 8px;
}

.boat-action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9em;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.boat-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.add-doc-btn {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
}

.add-doc-btn:hover {
    background: rgba(40, 167, 69, 0.3);
}

.delete-btn {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.delete-btn:hover {
    background: rgba(220, 53, 69, 0.3);
}

.delete-doc-btn {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    padding: 3px 8px;
    font-size: 0.8em;
}

.delete-doc-btn:hover {
    background: rgba(255, 193, 7, 0.3);
}

.documents-list h4 {
    color: #555;
    margin: 15px 0 10px 0;
    font-size: 1em;
    font-weight: 600;
}

.document-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    margin-bottom: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.document-name {
    font-size: 0.9em;
    color: #444;
    flex: 1;
}

.document-actions {
    display: flex;
    gap: 5px;
}

.no-boats, .no-documents {
    text-align: center;
    color: #999;
    font-style: italic;
    margin: 20px 0;
    padding: 15px;
}

.no-documents p {
    margin: 0;
    font-size: 0.9em;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .info-card {
        padding: 25px;
        margin-bottom: 20px;
    }
    
    .info-card h1 {
        font-size: 1.9em;
    }
    
    .info-card .subtitle {
        font-size: 1em;
    }
    
    .boat-form {
        padding: 20px;
    }
    
    .boat-list {
        max-height: 400px;
    }
    
    .boat-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .boat-actions {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 10px;
    }
    
    .info-card {
        padding: 20px;
        margin-bottom: 15px;
    }
    
    .info-card h1 {
        font-size: 1.6em;
    }
    
    .info-card .subtitle {
        font-size: 0.9em;
    }
    
    .boat-form {
        padding: 15px;
    }
    
    .file-input {
        padding: 10px 12px;
        font-size: 0.9em;
    }
    
    .rule-btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }
    
    .boat-list {
        max-height: 300px;
        padding: 10px;
    }
    
    .boat-name {
        font-size: 1.1em;
    }
    
    .document-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .document-actions {
        align-self: flex-end;
    }
}