/**
 * AuditSeo.Org - Tools CSS
 */

/* Hero Tools */
.hero--tools {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-800) 100%);
    padding: var(--space-16) 0;
    text-align: center;
}

.hero--tools .hero__title {
    color: white;
    font-size: var(--text-4xl);
    margin-bottom: var(--space-4);
}

.hero--tools .hero__subtitle {
    color: rgba(255,255,255,0.9);
    font-size: var(--text-lg);
    max-width: 600px;
    margin: 0 auto var(--space-8);
}

/* Search */
.tools-search {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.tools-search__input {
    width: 100%;
    padding: var(--space-4) var(--space-12) var(--space-4) var(--space-4);
    font-size: var(--text-lg);
    border: 2px solid transparent;
    border-radius: var(--radius-xl);
    background: white;
    box-shadow: var(--shadow-lg);
}

.tools-search__input:focus {
    outline: none;
    border-color: var(--primary-300);
}

.tools-search__icon {
    position: absolute;
    right: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    color: var(--gray-400);
    pointer-events: none;
}

/* Filter */
.tools-filter {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    justify-content: center;
    padding: var(--space-8) 0;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: var(--space-8);
}

.tools-filter__btn {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--gray-600);
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s;
}

.tools-filter__btn:hover {
    background: var(--gray-200);
}

.tools-filter__btn.is-active {
    background: var(--primary-600);
    color: white;
}

/* Sections */
.tools-section {
    margin-bottom: var(--space-12);
}

.tools-section__title {
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: var(--space-6);
    color: var(--gray-800);
}

/* Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-6);
}

/* Tool Card */
.tool-card {
    display: flex;
    flex-direction: column;
    padding: var(--space-6);
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    text-decoration: none;
    transition: all 0.2s;
}

.tool-card:hover {
    border-color: var(--primary-300);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.tool-card__icon {
    font-size: 2rem;
    margin-bottom: var(--space-3);
}

.tool-card__title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-2);
}

.tool-card__desc {
    font-size: var(--text-sm);
    color: var(--gray-600);
    line-height: 1.5;
}

/* Notice */
.tools-notice {
    text-align: center;
    padding: var(--space-6);
    background: var(--primary-50);
    border-radius: var(--radius-lg);
    color: var(--gray-700);
    font-size: var(--text-sm);
}

/* Tool Page */
.tool-page {
    padding: var(--space-8) 0;
}

.tool-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.tool-header__title {
    font-size: var(--text-3xl);
    font-weight: 700;
    margin-bottom: var(--space-2);
}

.tool-header__desc {
    color: var(--gray-600);
    font-size: var(--text-lg);
}

.tool-main {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.tool-input {
    margin-bottom: var(--space-6);
}

.tool-input label {
    display: block;
    font-weight: 500;
    margin-bottom: var(--space-2);
    color: var(--gray-700);
}

.tool-input input,
.tool-input textarea,
.tool-input select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    background: white;
}

.tool-input textarea {
    min-height: 150px;
    resize: vertical;
    font-family: inherit;
}

.tool-input input:focus,
.tool-input textarea:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-100);
}

.tool-actions {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-6);
}

.tool-result {
    padding: var(--space-6);
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
}

.tool-result__title {
    font-weight: 600;
    margin-bottom: var(--space-4);
    color: var(--gray-800);
}

.tool-result pre,
.tool-result code {
    background: var(--gray-800);
    color: var(--gray-100);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    overflow-x: auto;
    font-size: var(--text-sm);
}

.tool-result__output {
    font-family: monospace;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--space-4);
}

.stat-card {
    text-align: center;
    padding: var(--space-4);
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
}

.stat-card__value {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--primary-600);
}

.stat-card__label {
    font-size: var(--text-sm);
    color: var(--gray-600);
}

/* SERP Preview */
.serp-preview {
    font-family: Arial, sans-serif;
    max-width: 600px;
    padding: var(--space-4);
    background: white;
    border-radius: var(--radius-lg);
}

.serp-preview__url {
    font-size: 14px;
    color: #202124;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.serp-preview__url-icon {
    width: 26px;
    height: 26px;
    background: #f1f3f4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.serp-preview__url-text {
    color: #4d5156;
    font-size: 12px;
}

.serp-preview__title {
    font-size: 20px;
    color: #1a0dab;
    line-height: 1.3;
    margin-bottom: 4px;
    cursor: pointer;
}

.serp-preview__title:hover {
    text-decoration: underline;
}

.serp-preview__desc {
    font-size: 14px;
    color: #4d5156;
    line-height: 1.58;
}

.serp-preview__date {
    color: #70757a;
}

/* Character count */
.char-count {
    font-size: var(--text-sm);
    color: var(--gray-500);
    margin-top: var(--space-1);
}

.char-count.is-warning {
    color: var(--warning-600);
}

.char-count.is-error {
    color: var(--error-600);
}

/* Copy button */
.btn--copy {
    position: relative;
}

.btn--copy.is-copied::after {
    content: 'Copié!';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-800);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* Limitations notice */
.tool-limitations {
    margin-top: var(--space-6);
    padding: var(--space-4);
    background: var(--warning-50);
    border: 1px solid var(--warning-200);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    color: var(--warning-800);
}

.tool-limitations strong {
    display: block;
    margin-bottom: var(--space-2);
}

/* YouTube Preview */
.youtube-preview {
    background: #0f0f0f;
    color: white;
    padding: var(--space-4);
    border-radius: var(--radius-lg);
}

.youtube-preview__thumb {
    aspect-ratio: 16/9;
    background: #333;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
}

.youtube-preview__title {
    font-weight: 500;
    margin-bottom: var(--space-1);
}

.youtube-preview__meta {
    font-size: var(--text-sm);
    color: #aaa;
}

/* QR Code */
.qr-output {
    text-align: center;
    padding: var(--space-6);
}

.qr-output canvas,
.qr-output img {
    max-width: 256px;
    border: 8px solid white;
    box-shadow: var(--shadow-md);
}

/* Mobile */
@media (max-width: 640px) {
    .hero--tools {
        padding: var(--space-12) 0;
    }
    
    .hero--tools .hero__title {
        font-size: var(--text-2xl);
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .tool-main {
        padding: var(--space-4);
        margin: 0 var(--space-4);
    }
    
    .tool-actions {
        flex-direction: column;
    }
    
    .tool-actions .btn {
        width: 100%;
    }
}
