/* 
 * Héphaïstos Prompt Lab - Styles
 * Palette de couleurs:
 * - Bleu primaire: #1E3A8A
 * - Bleu clair: #3B82F6
 * - Bleu foncé: #0F172A
 * - Blanc pur: #FFFFFF
 * - Blanc cassé: #F3F4F6
 * - Violet principal: #7C3AED
 * - Violet clair: #A78BFA
 * - Rouge vif: #EF4444
 * - Rouge foncé: #B91C1C
 * - Gris clair: #E5E7EB
 * - Gris moyen: #9CA3AF
 * - Gris foncé: #374151
 * - Noir: #111827
 */

/* Reset et base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #374151;
    background-color: #F3F4F6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Typographie */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #1E3A8A;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: #7C3AED;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #A78BFA;
}

/* Header */
.header {
    background: linear-gradient(to right, #0F172A, #1E3A8A);
    color: #FFFFFF;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    height: 50px;
    margin-right: 1rem;
}

.site-title {
    color: #FFFFFF;
    margin-bottom: 0;
    font-size: 1.8rem;
}

.btn-help {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: transparent;
    color: #FFFFFF;
    border: 1px solid #3B82F6;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-help:hover {
    background-color: #3B82F6;
}

.btn-help .icon {
    stroke: #FFFFFF;
}

/* Main content */
.main {
    flex: 1;
    padding: 2rem 0;
}

/* Intro section */
.intro {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background-color: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.intro h2 {
    color: #1E3A8A;
}

.intro p {
    max-width: 800px;
    margin: 0 auto 1.5rem;
}

.hero-image {
    margin-top: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hero-img {
    width: 100%;
    max-width: 800px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Form styles */
.prompt-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-section {
    background-color: #FFFFFF;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #E5E7EB;
}

.section-header h3 {
    margin-bottom: 0;
}

.btn-info {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3B82F6;
    transition: color 0.3s ease;
}

.btn-info:hover {
    color: #7C3AED;
}

.btn-info .icon {
    stroke: currentColor;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

input[type="text"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #E5E7EB;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    color: #374151;
    background-color: #F9FAFB;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #7C3AED;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.select-with-info {
    display: flex;
    gap: 0.5rem;
}

.select-with-info select {
    flex: 1;
}

/* Tone options */
.tone-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.tone-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tone-option input[type="checkbox"] {
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #9CA3AF;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tone-option input[type="checkbox"]:checked {
    background-color: #7C3AED;
    border-color: #7C3AED;
}

.tone-option input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.5rem;
    height: 0.5rem;
    background-color: #FFFFFF;
    border-radius: 1px;
}

.tone-option label {
    cursor: pointer;
    margin-bottom: 0;
}

/* Slider */
.slider-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.slider-label {
    font-size: 0.875rem;
    color: #6B7280;
    min-width: 50px;
}

input[type="range"] {
    flex: 1;
    height: 6px;
    background: linear-gradient(to right, #3B82F6, #7C3AED);
    border-radius: 3px;
    appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background-color: #FFFFFF;
    border: 2px solid #7C3AED;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background-color: #7C3AED;
}

.slider-value {
    font-weight: 500;
    color: #374151;
    min-width: 30px;
    text-align: center;
}

/* Collapsible sections */
.collapsible {
    cursor: pointer;
}

.btn-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3B82F6;
    transition: transform 0.3s ease;
}

.btn-toggle.active {
    transform: rotate(180deg);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.collapsible-content.active {
    max-height: 1000px;
}

/* Form actions */
.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.btn-primary {
    background-color: #7C3AED;
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    padding: 0.75rem 2rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1.125rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background-color: #6D28D9;
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: #3B82F6;
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background-color: #2563EB;
}

.btn-secondary .icon {
    stroke: #FFFFFF;
}

/* Result section */
.result-section {
    background-color: #FFFFFF;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.result-container {
    background-color: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.generated-prompt {
    white-space: pre-wrap;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    color: #374151;
    margin: 0;
    padding: 0;
    overflow-x: auto;
}

.result-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.warning-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: #FEF2F2;
    border: 1px solid #FEE2E2;
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
}

.warning-message .icon {
    stroke: #EF4444;
    flex-shrink: 0;
}

.warning-message p {
    margin: 0;
    color: #B91C1C;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: linear-gradient(to right, #0F172A, #1E3A8A);
    color: #F3F4F6;
    padding: 2rem 0;
    margin-top: 2rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-logo-img {
    height: 40px;
    margin-right: 0.75rem;
}

.footer-logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    color: #FFFFFF;
}

.copyright {
    color: #9CA3AF;
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* Modal */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(17, 24, 39, 0.5);
    z-index: 1000;
    display: none;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    z-index: 1001;
    display: none;
    max-width: 90%;
    width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content {
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #E5E7EB;
}

.modal-header h2 {
    margin-bottom: 0;
    font-size: 1.5rem;
    color: #1E3A8A;
}

.close-modal {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #9CA3AF;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #EF4444;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body p {
    margin-bottom: 1rem;
}

.modal-body h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.modal-body ol, .modal-body ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
}

.note {
    background-color: #F3F4F6;
    border-left: 3px solid #3B82F6;
    padding: 1rem;
    margin-top: 1.5rem;
}

.note p {
    margin-bottom: 0;
}

/* Model info modal */
.model-info-content {
    max-width: 500px;
}

/* Contextual help modal */
.contextual-help {
    width: 400px;
}

/* Responsive design */
@media (min-width: 768px) {
    .prompt-form {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-section:nth-child(5) {
        grid-column: span 2;
    }
    
    .form-section:nth-child(7) {
        grid-column: span 2;
    }
    
    .form-actions {
        grid-column: span 2;
    }
}

@media (max-width: 767px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .site-title {
        font-size: 1.5rem;
    }
    
    .tone-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .slider-container {
        flex-wrap: wrap;
    }
    
    .modal {
        width: 95%;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

.slide-in {
    animation: slideIn 0.3s ease forwards;
}

/* Utility classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }


/* Champs obligatoires */
.required-field::after {
    content: '*';
    color: #EF4444;
    margin-left: 0.25rem;
}

/* Style pour le bouton désactivé */
.btn-primary:disabled {
    background-color: #9CA3AF;
    cursor: not-allowed;
    transform: none;
}

/* Style pour l'image d'accueil réduite */
.hero-image {
    max-height: 400px;
    overflow: hidden;
    position: relative;
}

.hero-img {
    max-height: 400px;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.5));
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-start {
    background-color: #7C3AED;
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    padding: 0.75rem 2rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1.125rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-start:hover {
    background-color: #6D28D9;
    transform: translateY(-2px);
}

/* Aide textuelle sous les champs */
.help-text {
    font-size: 0.8rem;
    color: #6B7280;
    margin-top: 0.25rem;
    margin-bottom: 0;
}

