/* Styles pour le générateur d'images en cœur */

@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;700&family=Montserrat:wght@300;400;600&display=swap');

:root {
    --primary-color: #ff6b6b;
    --secondary-color: #f7c5cc;
    --accent-color: #d63031;
    --text-color: #333;
    --light-color: #fff0f5;
    --border-radius: 15px;
    --shadow: 0 4px 6px rgba(214, 48, 49, 0.1);
}

.heart-text-container {
    max-width: 800px;
    margin: 30px auto;
    padding: 25px;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
}

.heart-text-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--secondary-color);
    position: relative;
}

.heart-text-header::after {
    content: '❤';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--light-color);
    padding: 0 15px;
    color: var(--primary-color);
    font-size: 24px;
}

.heart-text-header h2 {
    font-family: 'Dancing Script', cursive;
    font-size: 36px;
    color: var(--primary-color);
    margin: 0 0 10px;
}

.heart-text-subtitle {
    font-style: italic;
    font-weight: 300;
    font-size: 16px;
    margin: 0;
}

.heart-text-form-container {
    background-color: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

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

.form-columns {
    display: flex;
    gap: 20px;
}

.form-column {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color);
}

input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: var(--secondary-color);
    border-radius: 4px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

input[type="color"] {
    width: 100%;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    resize: vertical;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    transition: border 0.3s;
}

textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.range-value {
    display: inline-block;
    margin-left: 10px;
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.checkbox-row {
    display: flex;
    align-items: center;
}

.checkbox-row input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.checkbox-row label {
    margin-bottom: 0;
}

.heart-text-button {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-decoration: none;
}

.heart-text-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(214, 48, 49, 0.3);
}

.heart-icon {
    margin: 0 8px;
    display: inline-block;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.heart-text-result {
    background-color: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.heart-text-result h3 {
    font-family: 'Dancing Script', cursive;
    color: var(--primary-color);
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 20px;
}

.image-container {
    margin-bottom: 20px;
    border: 1px dashed var(--secondary-color);
    padding: 10px;
    border-radius: 10px;
    background-color: #fffafa;
}

.image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.download-row {
    margin-top: 20px;
}

.download-button {
    max-width: 250px;
    margin: 0 auto;
}

/* Loader */
.heart-text-loader {
    text-align: center;
    padding: 30px;
}

.heart-loader {
    display: inline-block;
    position: relative;
    width: 64px;
    height: 64px;
    margin-bottom: 15px;
}

.heart-loader:before,
.heart-loader:after {
    position: absolute;
    content: "";
    left: 32px;
    top: 0;
    width: 32px;
    height: 48px;
    background: var(--primary-color);
    border-radius: 32px 32px 0 0;
    transform: rotate(-45deg);
    transform-origin: 0 100%;
    animation: heartBeat 1.2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

.heart-loader:after {
    left: 0;
    transform: rotate(45deg);
    transform-origin: 100% 100%;
}

@keyframes heartBeat {
    0% {
        transform: scale(0.95) rotate(-45deg);
    }
    50% {
        transform: scale(1.1) rotate(-45deg);
    }
    100% {
        transform: scale(0.95) rotate(-45deg);
    }
}

.heart-loader:after {
    animation: heartBeatAfter 1.2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

@keyframes heartBeatAfter {
    0% {
        transform: scale(0.95) rotate(45deg);
    }
    50% {
        transform: scale(1.1) rotate(45deg);
    }
    100% {
        transform: scale(0.95) rotate(45deg);
    }
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .form-columns {
        flex-direction: column;
        gap: 15px;
    }
    
    .heart-text-container {
        padding: 15px;
    }
    
    .heart-text-form-container,
    .heart-text-result {
        padding: 15px;
    }
    
    .heart-text-header h2 {
        font-size: 28px;
    }
}
