:root {
    --primary-color: #4285F4; /* Google blue */
    --secondary-color: #34A853; /* Google green */
    --accent-color: #EA4335; /* Google red */
    --yellow-color: #FBBC05; /* Google yellow */
    --background-color: #121212;
    --surface-color: #1E1E1E;
    --surface-color-light: #2D2D2D;
    --text-color: #FFFFFF;
    --text-secondary-color: #B0B0B0;
    --border-color: #333333;
    --card-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 8px;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

::selection {
    background-color: rgba(66, 133, 244, 0.3);
    color: var(--text-color);
}

body {
    font-family: 'Inter', 'Segoe UI', 'Roboto', Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    letter-spacing: 0.3px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    background-image: radial-gradient(circle at 50% 0%, rgba(66, 133, 244, 0.08) 0%, transparent 70%);
}

header {
    background-color: rgba(30, 30, 30, 0.95);
    padding: 0 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 100%;
}

.logo-container h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin: 0;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header img {
    max-height: 36px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: var(--transition);
}

header img:hover {
    transform: scale(1.05);
}

header nav {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

header nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    height: 100%;
    justify-content: center;
}

header nav li {
    height: 100%;
    display: flex;
    align-items: center;
}

header nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    position: relative;
    display: flex;
    align-items: center;
    height: 40px;
}

header nav a:hover {
    color: var(--primary-color);
    background-color: rgba(66, 133, 244, 0.1);
}

header nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: var(--transition);
    transform: translateX(-50%);
    opacity: 0;
}

header nav a:hover::after {
    width: 80%;
    opacity: 1;
}

main {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    flex: 1;
}

.intro {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding: 2rem 0;
}

.intro::before {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(66, 133, 244, 0.15), transparent 70%);
    top: -75px;
    left: calc(50% - 75px);
    border-radius: 50%;
    z-index: -1;
}

.intro h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.intro p {
    color: var(--text-secondary-color);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.highlight {
    position: relative;
    color: var(--primary-color);
    font-weight: 700;
    z-index: 1;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background-color: rgba(66, 133, 244, 0.2);
    z-index: -1;
    border-radius: 4px;
}

.search-container {
    margin-bottom: 2.5rem;
    background-color: var(--surface-color);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.search-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.search-container h3, .results-header h3 {
    font-size: 1.4rem;
    margin-bottom: 1.75rem;
    font-weight: 600;
    color: var(--text-color);
    letter-spacing: 0.5px;
    position: relative;
    display: inline-block;
}

.search-container h3::after, .results-header h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
}

.search-form {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.input-group, .select-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
}

.input-group {
    flex: 2 1 300px;
}

.select-group {
    flex: 1 1 200px;
}

.input-group::after, .select-group::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    opacity: 0;
    transition: var(--transition);
}

.input-group:focus-within::after, .select-group:focus-within::after {
    opacity: 1;
}

.search-form label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary-color);
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.input-group:focus-within label, .select-group:focus-within label {
    color: var(--primary-color);
}

input, select, button {
    padding: 0.85rem 1.25rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--text-color);
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

input {
    flex-grow: 1;
}

input:focus, select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.25), inset 0 1px 3px rgba(0, 0, 0, 0.1);
    background-color: rgba(0, 0, 0, 0.3);
}

select {
    min-width: 150px;
}

button {
    background-color: var(--primary-color);
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.9rem;
    align-self: flex-end;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(66, 133, 244, 0.3);
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
}

.primary-btn {
    margin-top: 1.75rem;
    min-width: 150px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

button:hover {
    background-color: #3b78e7;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(66, 133, 244, 0.4);
}

button:hover::before {
    left: 100%;
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(66, 133, 244, 0.3);
}

button:disabled {
    background-color: #666;
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
    transform: none;
}

.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.95rem;
}

#results-count {
    color: var(--text-secondary-color);
    font-weight: 500;
    padding: 0.5rem 0;
    transition: var(--transition);
}

#results-count.has-results {
    color: var(--text-color);
    font-weight: 600;
}

#export-btn {
    background-color: var(--secondary-color);
    padding: 0.6rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    border-radius: 6px;
}

#export-btn::before {
    content: '\2193'; /* Flèche vers le bas */
    font-weight: bold;
    font-size: 1rem;
}

#export-btn:hover {
    background-color: #2d9249;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 168, 83, 0.4);
}

.results-container {
    overflow-x: auto;
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    position: relative;
    transition: var(--transition);
    min-height: 200px;
    display: flex;
    flex-direction: column;
}

.results-container:empty {
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary-color);
    font-style: italic;
}

.results-container:empty::after {
    content: 'Aucun résultat à afficher';
}

.results-header {
    padding: 1.75rem 1.75rem 0.75rem 1.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.results-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    opacity: 0.8;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    font-size: 0.95rem;
}

th, td {
    padding: 1.25rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    vertical-align: middle;
}

th:last-child {
    text-align: center;
}

th {
    background-color: rgba(0, 0, 0, 0.2);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    color: var(--text-secondary-color);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 1px 0 var(--border-color);
}

tbody tr {
    transition: var(--transition);
    cursor: default;
}

tbody tr:hover {
    background-color: rgba(66, 133, 244, 0.05);
}

tbody tr:hover td {
    background-color: transparent;
}

tbody tr:last-child td {
    border-bottom: none;
}

.mreid {
    font-family: 'Fira Code', 'Consolas', monospace;
    color: var(--accent-color);
    font-size: 0.85rem;
    background-color: rgba(234, 67, 53, 0.1);
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid rgba(234, 67, 53, 0.2);
    transition: var(--transition);
    cursor: pointer;
    user-select: all;
}

.mreid:hover {
    background-color: rgba(234, 67, 53, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

td:last-child {
    text-align: center;
}

.score {
    font-weight: bold;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 28px;
    background-color: rgba(66, 133, 244, 0.1);
    border-radius: 14px;
    padding: 0 10px;
    font-size: 0.85rem;
    vertical-align: middle;
}

footer {
    text-align: center;
    padding: 3rem 2rem;
    margin-top: 4rem;
    color: var(--text-secondary-color);
    font-size: 0.875rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--surface-color);
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(66, 133, 244, 0.05) 0%, transparent 70%);
    z-index: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.footer-logo {
    margin-bottom: 0.5rem;
    opacity: 0.9;
    transition: var(--transition);
}

.footer-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

.footer-links {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    position: relative;
}

.footer-links a:hover {
    color: var(--primary-color);
    background-color: rgba(66, 133, 244, 0.1);
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.footer-links a:hover::after {
    width: 50%;
}

.copyright {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Animation de chargement */
@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.loading {
    animation: pulse 1.5s infinite;
}

/* Animations d'entrée */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Animation pour les résultats */
.results-row {
    opacity: 0;
    transform: translateY(10px);
}

.results-row.visible {
    animation: fadeIn 0.3s ease forwards;
}

/* Styles pour les tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    background-color: var(--surface-color-light);
    color: var(--text-color);
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
    white-space: nowrap;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Styles pour les notifications */
.notification {
    position: fixed;
    top: calc(var(--header-height) + 20px);
    right: 20px;
    background-color: var(--surface-color-light);
    color: var(--text-color);
    padding: 12px 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 4px solid var(--primary-color);
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left-color: var(--secondary-color);
}

.notification.error {
    border-left-color: var(--accent-color);
}

/* Styles pour les écrans de taille moyenne */
@media (max-width: 992px) {
    main {
        padding: 2rem 1.5rem;
    }
    
    .search-container, .results-container {
        padding: 1.75rem;
    }
    
    .search-form {
        gap: 1rem;
    }
    
    th, td {
        padding: 1rem;
    }
}

/* Styles pour les écrans mobiles */
@media (max-width: 768px) {
    :root {
        --header-height: auto;
    }
    
    header {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        padding: 1rem;
        max-width: 100%;
    }
    
    .logo-container {
        justify-content: center;
        margin-bottom: 0.5rem;
    }
    
    header nav ul {
        gap: 0.75rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    header nav a {
        padding: 0.4rem 0.75rem;
        font-size: 0.9rem;
        height: 36px;
    }
    
    .intro h2 {
        font-size: 1.75rem;
    }
    
    .intro p {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .search-container, .results-container {
        padding: 1.5rem;
    }
    
    .search-form {
        flex-direction: column;
        gap: 1.25rem;
    }
    
    .input-group, .select-group {
        width: 100%;
    }
    
    select {
        width: 100%;
    }
    
    .primary-btn {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .results-info {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    #export-btn {
        width: 100%;
        justify-content: center;
    }
    
    th, td {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    th:nth-child(3), td:nth-child(3) {
        display: none; /* Cacher la colonne Description sur mobile */
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    footer {
        padding: 2rem 1rem;
    }
}

/* Styles pour les très petits écrans */
@media (max-width: 480px) {
    main {
        padding: 1.5rem 1rem;
    }
    
    .intro h2 {
        font-size: 1.5rem;
    }
    
    .search-container, .results-container {
        padding: 1.25rem;
    }
    
    th, td {
        padding: 0.6rem;
        font-size: 0.8rem;
    }
    
    th:nth-child(2), td:nth-child(2),
    th:nth-child(5), td:nth-child(5) {
        display: none; /* Cacher plus de colonnes sur très petits écrans */
    }
    
    .mreid {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
}
