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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1a73e8 0%, #004ba0 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

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

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    padding: 20px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.5s ease-out;
}

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

.card h2 {
    color: #1a73e8;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.card h3 {
    color: #1a73e8;
    margin-bottom: 12px;
    margin-top: 20px;
    font-size: 1.2em;
}

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

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

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #1a73e8;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.85em;
}

.form-group small a {
    color: #1a73e8;
    text-decoration: none;
}

.form-group small a:hover {
    text-decoration: underline;
}

/* Boutons */
button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
    margin-bottom: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #1a73e8 0%, #004ba0 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.6);
}

.btn-secondary {
    background: white;
    color: #1a73e8;
    border: 2px solid #1a73e8;
}

.btn-secondary:hover {
    background: #f0f7ff;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

button:active {
    transform: scale(0.98);
}

/* Recherche */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-box input {
    flex: 1;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1.1em;
}

.search-box input:focus {
    outline: none;
    border-color: #1a73e8;
}

.search-btn {
    padding: 15px 30px;
    white-space: nowrap;
    background: linear-gradient(135deg, #1a73e8 0%, #004ba0 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.4);
}

/* Résultats */
#results-container {
    margin-top: 20px;
}

.no-results {
    text-align: center;
    padding: 30px;
    color: #666;
    font-size: 1.1em;
}

.result-item {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.result-item:hover {
    border-color: #1a73e8;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.2);
}

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

.result-title {
    font-size: 1.3em;
    font-weight: bold;
    color: #1a73e8;
}

.result-field {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-label {
    font-weight: 600;
    color: #666;
    min-width: 100px;
}

.result-value {
    flex: 1;
    padding: 8px 12px;
    background: white;
    border-radius: 5px;
    font-family: monospace;
    position: relative;
}

.password-hidden {
    filter: blur(5px);
    user-select: none;
}

.copy-btn {
    padding: 8px 16px;
    font-size: 0.9em;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.copy-btn:hover {
    background: #218838;
}

.toggle-btn {
    padding: 8px 16px;
    font-size: 0.9em;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.toggle-btn:hover {
    background: #5a6268;
}

/* Messages */
.message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Instructions */
.info {
    background: #f8f9fa;
}

.info ul, .info ol {
    margin-left: 20px;
    margin-top: 10px;
}

.info li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.info a {
    color: #1a73e8;
    text-decoration: none;
}

.info a:hover {
    text-decoration: underline;
}

/* Format du sheet */
.sheet-format {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.column {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #1a73e8;
}

.column strong {
    display: block;
    font-size: 1.5em;
    color: #1a73e8;
    margin-bottom: 8px;
}

.column span {
    color: #666;
    font-size: 0.9em;
}

/* Exemple de table */
.example {
    margin: 15px 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
}

.example table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.example th {
    background: #1a73e8;
    color: white;
    padding: 10px;
    text-align: left;
    font-weight: 600;
}

.example td {
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
}

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

/* Settings */
.settings {
    text-align: center;
}

/* Help text */
.help-text {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Loading */
.loading {
    text-align: center;
    padding: 20px;
    color: #1a73e8;
}

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

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

/* Footer */
footer {
    text-align: center;
    color: white;
    margin-top: 30px;
    padding: 20px;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 2em;
    }

    .card {
        padding: 20px;
    }

    .search-box {
        flex-direction: column;
    }

    .search-btn {
        width: 100%;
    }

    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .result-field {
        flex-direction: column;
        align-items: stretch;
    }

    .result-label {
        min-width: auto;
    }

    button {
        margin-right: 0;
        width: 100%;
    }

    .sheet-format {
        grid-template-columns: 1fr 1fr;
    }

    .example {
        overflow-x: auto;
    }
}
