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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 10px;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #2563EB 0%, #1e40af 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

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

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px;
}

.section {
    background: #f8fafc;
    padding: 15px;
    border-radius: 15px;
    border: 2px solid #e2e8f0;
}

.section.seo {
    border-color: #2563EB;
}

.section.sea {
    border-color: #F97316;
}

.section.params-communs {
    grid-column: 1 / -1;
    border-color: #10b981;
}

.section h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section.seo h2 {
    color: #2563EB;
}

.section.sea h2 {
    color: #F97316;
}

.section.params-communs h2 {
    color: #065f46;
}

.params-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #334155;
    font-size: 0.95em;
}
input {
    max-width: 100%;
}
.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.section.sea input:focus {
    border-color: #F97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.info-text {
    font-size: 0.85em;
    color: #64748b;
    margin-top: 5px;
}

.btn-calculate {
    width: 100%;
    padding: 18px;
    font-size: 1.2em;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 30px;
    grid-column: 1 / -1;
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
}

.results {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    padding: 40px;
    border-radius: 15px;
    margin-top: 20px;
    display: none;
}

.results.show {
    display: block;
    animation: slideIn 0.5s ease-out;
}

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

.results h2 {
    color: #065f46;
    font-size: 2em;
    margin-bottom: 30px;
    text-align: center;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.result-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.result-card h3 {
    font-size: 1.3em;
    margin-bottom: 15px;
}

.result-card.seo h3 {
    color: #2563EB;
}

.result-card.sea h3 {
    color: #F97316;
}

.metric {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.metric:last-child {
    border-bottom: none;
}

.metric-label {
    font-weight: 600;
    color: #475569;
}

.metric-value {
    font-weight: 700;
    font-size: 1.1em;
}

.metric-value.positive {
    color: #10b981;
}

.metric-value.negative {
    color: #ef4444;
}

.recommendation {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border-left: 5px solid #10b981;
    margin-top: 20px;
}

.recommendation h3 {
    color: #065f46;
    margin-bottom: 15px;
    font-size: 1.4em;
}

.recommendation p {
    line-height: 1.8;
    color: #334155;
    margin-bottom: 10px;
}

.footer {
    text-align: center;
    padding: 30px;
    background: #f1f5f9;
    color: #64748b;
}

.footer a {
    color: #2563EB;
    text-decoration: none;
    font-weight: 600;
}

@media (max-width: 768px) {

    .header {
        padding: 20px 15px; /* Moins de vide en haut/bas */
    }

    .header h1 {
        font-size: 1.5em; /* Taille de titre plus adaptée */
    }

    .main-content {
        grid-template-columns: 1fr;
        padding: 15px; /* Padding minimal pour maximiser l'espace des champs */
    }

    .results {
        padding: 20px 10px; /* Espace réduit dans les résultats */
    }

    .comparison-grid {
        grid-template-columns: 1fr;
    }

    /* Empêche les valeurs de métriques de se chevaucher si elles sont longues */
    .metric {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .metric-value {
        font-size: 1.2em;
    }

    .params-grid {
        grid-template-columns: 1fr;
    }

    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .header h1 {
        font-size: 1.8em;
    }
}