/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Container responsive */
.container {
    max-width: 100%;
    padding: 0 15px;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Cards */
.card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: none;
    border-radius: 0.5rem 0.5rem 0 0 !important;
    padding: 1rem 1.25rem;
}

.card-header h3,
.card-header h4,
.card-header h5 {
    margin: 0;
    color: white;
}

.card-body {
    padding: 1.5rem;
}

/* Jumbotron */
.jumbotron {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 0.5rem;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.jumbotron .display-4 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .jumbotron {
        padding: 2rem 1rem;
    }
    
    .jumbotron .display-4 {
        font-size: 2rem;
    }
}

/* Tables responsive */
.table-responsive {
    border: none;
    border-radius: 0.375rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.table th {
    font-weight: 600;
    background-color: #f8f9fa;
    border-top: none;
    white-space: nowrap;
    min-width: 120px;
}

.table td {
    word-break: break-all;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .table th,
    .table td {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .table th {
        min-width: 100px;
    }
}

/* Code blocks */
code {
    background-color: #f8f9fa;
    color: #e83e8c;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.85em;
    word-break: break-all;
    display: inline-block;
    max-width: 100%;
}

/* Badges */
.badge {
    font-size: 0.75em;
    margin: 0.1rem;
    padding: 0.375rem 0.5rem;
}

/* Forms */
.form-control {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: all 0.2s ease-in-out;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

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

/* Buttons */
.btn {
    border-radius: 0.375rem;
    transition: all 0.2s ease-in-out;
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border: none;
}

.btn-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.alert-dismissible .btn-close {
    padding: 1rem 1.25rem;
}

/* Lists */
.list-group-item {
    border: 1px solid rgba(0, 0, 0, 0.125);
    margin-bottom: 0.25rem;
    border-radius: 0.375rem !important;
}

.list-unstyled li {
    margin-bottom: 0.5rem;
    word-break: break-all;
}

/* Grid responsive */
.row {
    margin: 0 -15px;
}

.col-md-6,
.col-md-4,
.col-md-8,
.col-md-12 {
    padding: 0 15px;
    margin-bottom: 1rem;
}

@media (max-width: 767px) {
    .col-md-6,
    .col-md-4,
    .col-md-8 {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .offset-md-2 {
        margin-left: 0;
    }
}

/* Serveurs de noms - Correction spécifique */
.nameservers-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nameservers-list code {
    display: block;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    word-break: break-all;
}

/* Corrections pour les données WHOIS */
.whois-data .row {
    margin-bottom: 1rem;
}

.whois-data .col-md-6 {
    margin-bottom: 1rem;
}

.whois-data strong {
    color: #495057;
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

/* DNS Records styling */
.dns-record-section {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #ffffff;
    border-radius: 0.375rem;
    border-left: 4px solid #667eea;
}

.dns-record-section h5 {
    margin-bottom: 1rem;
}

/* IP Info styling */
.ip-info-section {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    border-left: 4px solid #11998e;
}

/* Map responsive */
.map-container {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: 0.375rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Utility classes */
.text-break {
    word-break: break-word !important;
}

.mb-custom {
    margin-bottom: 1.5rem;
}

/* Scrollbar styling */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .alert {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .card-header {
        background: #000 !important;
        color: #fff !important;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }
    
    .btn {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
