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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 50px;
    padding-top: 40px;
}

.logo {
    font-size: 32px;
    font-weight: 300;
    letter-spacing: 8px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.tagline {
    font-size: 18px;
    color: #5a6c7d;
    font-weight: 300;
}

.api-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background: #3498db;
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
}

.search-section {
    background: white;
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.search-title {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 400;
}

.search-subtitle {
    font-size: 16px;
    color: #7f8c8d;
    margin-bottom: 40px;
}

.search-box {
    position: relative;
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 18px 25px;
    font-size: 16px;
    border: 2px solid #e0e6ed;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-button {
    width: 100%;
    padding: 18px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.search-button:hover {
    background: #34495e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 62, 80, 0.3);
}

.search-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e0e6ed;
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.suggestion-item {
    padding: 15px 25px;
    cursor: pointer;
    border-bottom: 1px solid #f0f3f7;
    transition: background 0.2s ease;
}

.suggestion-item:hover {
    background: #f8f9fa;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-name {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 5px;
}

.suggestion-details {
    font-size: 14px;
    color: #7f8c8d;
}

/* Affichage compact sur une ligne */
.suggestion-item-compact {
    padding: 10px 25px;
    cursor: pointer;
    border-bottom: 1px solid #f0f3f7;
    transition: background 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.suggestion-item-compact:hover {
    background: #f8f9fa;
}

.suggestion-item-compact:last-child {
    border-bottom: none;
}

.suggestion-name-compact {
    font-weight: 500;
    color: #2c3e50;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-meta {
    font-size: 12px;
    color: #7f8c8d;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Style Pappers */
.suggestion-item-pappers {
    padding: 12px 25px;
    cursor: pointer;
    border-bottom: 1px solid #f0f3f7;
    transition: background 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.suggestion-item-pappers:hover {
    background: #f8f9fa;
}

.suggestion-item-pappers:last-child {
    border-bottom: none;
}

.suggestion-left {
    flex: 0 0 auto;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.suggestion-name-pappers {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.suggestion-siren-pappers {
    font-size: 13px;
    color: #7f8c8d;
}

.suggestion-right {
    flex: 1;
    text-align: right;
    font-size: 13px;
    color: #5a6c7d;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.company-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    display: none;
}

.company-card.visible {
    display: block;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.company-header {
    border-bottom: 2px solid #e0e6ed;
    padding-bottom: 25px;
    margin-bottom: 30px;
}

.company-name {
    font-size: 26px;
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 10px;
}

.company-siren {
    font-size: 14px;
    color: #7f8c8d;
    font-family: 'Courier New', monospace;
}

.info-section {
    margin-bottom: 30px;
}

.info-title {
    font-size: 16px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    font-weight: 500;
}

.address-block {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid #3498db;
    font-size: 16px;
    line-height: 1.8;
    color: #2c3e50;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.info-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

.info-label {
    font-size: 12px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.info-value {
    font-size: 16px;
    color: #2c3e50;
    font-weight: 500;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    background: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    display: none;
}

.error.visible {
    display: block;
}

.cache-info {
    text-align: center;
    margin-top: 15px;
    font-size: 12px;
    color: #95a5a6;
}

.cache-info .cache-icon {
    display: inline-block;
    margin-right: 5px;
}

.etablissements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.etablissement-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e0e6ed;
    transition: all 0.3s ease;
}

.etablissement-card:hover {
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
}

.etablissement-card.inactive {
    opacity: 0.6;
    background: #f0f0f0;
}

.etablissement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.etablissement-type {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.etablissement-status {
    font-size: 12px;
    color: #e74c3c;
    background: #fee;
    padding: 4px 8px;
    border-radius: 4px;
}

.etablissement-siret {
    font-size: 13px;
    color: #7f8c8d;
    font-family: 'Courier New', monospace;
    margin-bottom: 12px;
}

.etablissement-address {
    font-size: 14px;
    color: #2c3e50;
    line-height: 1.6;
    margin-bottom: 15px;
    min-height: 60px;
}

.etablissement-select-btn {
    width: 100%;
    padding: 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.etablissement-select-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

/* Section des résultats */
.results-section {
    margin-top: 40px;
    padding: 30px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.results-title {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.result-card {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.result-card:hover {
    background: #e9ecef;
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.result-name {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.result-status {
    font-size: 14px;
    padding: 4px 12px;
    border-radius: 20px;
    background: #d4edda;
    color: #155724;
}

.result-info {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #5a6c7d;
}

.result-location {
    flex: 1;
}

.result-effectif {
    flex: 0 0 auto;
}

.result-siren {
    font-size: 13px;
    color: #7f8c8d;
    font-family: 'Courier New', monospace;
}

/* Message d'avertissement */
.warning-message {
    padding: 15px 20px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 8px;
    color: #856404;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}
