/* ========================================
   GLOBAL STYLES - Humaniser Texte IA
   ======================================== */

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

:root {
    --primary: #8B0000;
    --primary-light: #A52A2A;
    --primary-dark: #660000;
    --text: #2C2C2C;
    --light: #FAFAFA;
    --border: #E0E0E0;
    --success: #27AE60;
    --error: #C0392B;
}

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
    flex: 1;
}

/* HERO SECTION */
.hero {
    text-align: center;
    color: var(--primary);
    margin-bottom: 50px;
    padding: 40px 0;
}

.badge-hero {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9em;
    font-weight: 700;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.2);
}

.hero h1 {
    font-size: 3em;
    margin-bottom: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25em;
    color: #666;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* FORM SECTION */
.form-section {
    background: white;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-top: 5px solid var(--primary);
}

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

.form-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 700;
    color: var(--text);
    font-size: 1.1em;
}

.form-group textarea, .tone-select {
    width: 100%;
    padding: 18px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1em;
    font-family: 'Segoe UI', sans-serif;
    transition: all 0.3s ease;
    color: var(--text);
}

.form-group textarea {
    min-height: 220px;
    resize: vertical;
}

.tone-select {
    background: white;
    cursor: pointer;
    padding: 12px 18px;
}

.form-group textarea:focus, .tone-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(139, 0, 0, 0.1);
}

.char-count {
    margin-top: 10px;
    font-size: 0.95em;
    color: #777;
    text-align: right;
}

.btn-submit {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.15em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(139, 0, 0, 0.25);
}

.btn-submit:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(139, 0, 0, 0.4);
}

/* ALERT */
.alert {
    padding: 18px 22px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 5px solid;
    font-weight: 500;
}

.alert-error {
    background: #FCE4E4;
    color: #C0392B;
    border-left-color: #C0392B;
}

/* RESULT SECTION */
.result-section {
    background: white;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-top: 5px solid var(--success);
    animation: slideIn 0.4s ease;
}

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

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

.result-header h2 {
    color: var(--primary);
    font-size: 1.4em;
}

.result-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-copy, .btn-new {
    padding: 11px 18px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(139, 0, 0, 0.2);
    white-space: nowrap;
}

.btn-copy:hover, .btn-new:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
}

.btn-new {
    background: var(--success);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.2);
}

.btn-new:hover {
    background: #229954;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.result-box {
    background: #FEFEFE;
    padding: 30px;
    border-radius: 8px;
    border-left: 5px solid var(--primary);
    line-height: 1.85;
    color: var(--text);
    word-wrap: break-word;
}

.result-box p {
    margin-bottom: 18px;
    text-align: justify;
}

/* SECTIONS COMMUNES */
.benefits-section, .features-section, .usage-section, 
.criteria-section, .tips-section, .faq-section {
    background: white;
    padding: 50px 40px;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.benefits-section h2, .features-section h2, .usage-section h2,
.criteria-section h2, .tips-section h2, .faq-section h2 {
    text-align: center;
    color: var(--primary);
    font-size: 2em;
    margin-bottom: 50px;
}

.benefits-grid, .features-grid, .usage-grid, .tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.benefit-card, .feature-card, .usage-card, .tip-card {
    padding: 30px;
    background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.benefit-card:hover, .feature-card:hover, 
.usage-card:hover, .tip-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(139, 0, 0, 0.1);
    border-color: var(--primary);
}

.benefit-icon, .feature-icon {
    font-size: 3em;
    margin-bottom: 20px;
}

.benefit-card h3, .feature-card h3, 
.usage-card h3, .tip-card h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.3em;
}

.benefit-card p, .feature-card p, 
.usage-card p, .tip-card p {
    color: #666;
    line-height: 1.6;
}

.usage-card, .tip-card {
    text-align: left;
}

/* FAQ */
.faq-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.faq-item {
    border: 2px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    padding: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding-left: 25px;
}

.faq-question::after {
    content: '▼';
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.faq-question.active::after {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
}

.faq-answer.show {
    padding: 20px;
    max-height: 500px;
}

.faq-answer p {
    color: #555;
    line-height: 1.8;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2em;
    }
    
    .hero p {
        font-size: 1em;
    }
    
    .form-section, .result-section, .benefits-section,
    .features-section, .usage-section, .faq-section {
        padding: 25px;
    }

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

    .result-actions {
        width: 100%;
    }

    .btn-copy, .btn-new {
        flex: 1;
        min-width: 120px;
    }

    .faq-container, .benefits-grid, .features-grid, .usage-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 15px;
    }

    .hero h1 {
        font-size: 1.5em;
    }

    .result-actions {
        flex-direction: column;
    }

    .btn-copy, .btn-new {
        width: 100%;
    }
}