/* ==========================================================================
   JY-STYLE.CSS - Styles pour la page de contact JY.fr avec charte terreverte
   ========================================================================== */

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

body {
    font-family: Arial, sans-serif;
    background: #e4f7e4;
    color: #2e5d34;
    line-height: 1.6;
    min-height: 100vh;
    padding: 80px 20px;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* En-tête avec style terreverte */
.site-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-container {
    display: inline-block;
}

.site-logo {
    font-size: 2.4em;
    font-weight: bold;
    color: #2e5d34;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.site-logo:hover {
    color: #1a3a21;
    transform: scale(1.05);
}

.soulignement {
    width: 123px;
    height: 3px;
    background-color: #2e5d34;
    margin: 0 auto 30px auto;
}

/* Contenu principal */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Page d'erreur */
.error-page {
    display: none;
    text-align: center;
    animation: slideInFromTop 0.6s ease;
}

.error-page.visible {
    display: block;
}

.error-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 40px;
    border: 2px solid #2e5d34;
    box-shadow: 0 4px 10px rgba(46, 93, 52, 0.1);
    max-width: 500px;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #2e5d34;
    animation: bounce 2s infinite;
}

.error-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2e5d34;
    margin-bottom: 15px;
}

.error-text {
    font-size: 1rem;
    color: #2e5d34;
    margin-bottom: 20px;
    line-height: 1.5;
}

.countdown-info {
    color: #2e5d34;
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.countdown-timer {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2e5d34;
    animation: pulse 1s infinite;
}

.error-link {
    display: inline-block;
    padding: 10px 25px;
    background-color: #2e5d34;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: normal;
    transition: all 0.4s ease;
}

.error-link:hover {
    background-color: #1a3a21;
    transform: rotate(360deg);
}

/* Formulaire de contact */
.contact-form-wrapper {
    width: 100%;
    max-width: 600px;
    transition: all 0.4s ease;
}

.contact-form-wrapper.hidden {
    display: none;
}

.form-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 40px;
    border: 2px solid #2e5d34;
    box-shadow: 0 4px 10px rgba(46, 93, 52, 0.1);
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-description {
    font-size: 1.1em;
    color: #2e5d34;
    font-weight: normal;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 15px 20px;
    background: #ffffff;
    border: 2px solid #2e5d34;
    border-radius: 4px;
    color: #2e5d34;
    font-size: 1rem;
    font-family: Arial, sans-serif;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: #4a7c59;
    background: #ffffff;
    box-shadow: 0 0 5px rgba(74, 124, 89, 0.3);
}

.form-input::placeholder {
    color: #7a9980;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
    font-family: Arial, sans-serif;
}

/* Section sécurité */
.security-section {
    background: rgba(228, 247, 228, 0.5);
    border-radius: 8px;
    padding: 25px;
    border: 1px solid #2e5d34;
    margin: 10px 0;
}

.security-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    color: #2e5d34;
    margin-bottom: 20px;
}

.security-icon {
    font-size: 1.2rem;
}

.math-captcha {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.captcha-question {
    font-size: 1.3rem;
    font-weight: bold;
    color: #2e5d34;
    background: #ffffff;
    padding: 10px 20px;
    border-radius: 4px;
    border: 2px solid #2e5d34;
}

.captcha-input {
    width: 80px;
    padding: 10px 15px;
    background: #ffffff;
    border: 2px solid #2e5d34;
    border-radius: 4px;
    color: #2e5d34;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    font-family: Arial, sans-serif;
    transition: all 0.3s ease;
    outline: none;
}

.captcha-input:focus {
    border-color: #4a7c59;
    box-shadow: 0 0 5px rgba(74, 124, 89, 0.3);
}

.refresh-btn {
    padding: 10px 12px;
    background: #4a7c59;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.4s ease;
}

.refresh-btn:hover {
    background: #1a3a21;
    transform: rotate(360deg);
}

/* Captcha animaux */
.animal-captcha {
    text-align: center;
    animation: fadeInUp 0.5s ease;
}

.animal-question {
    font-size: 1rem;
    color: #2e5d34;
    margin-bottom: 15px;
    font-weight: normal;
}

.animal-display {
    font-size: 3rem;
    color: #2e5d34;
    margin: 15px 0;
    padding: 20px;
    background: #ffffff;
    border-radius: 4px;
    border: 2px solid #2e5d34;
}

.animal-choices {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.animal-choice {
    padding: 8px 16px;
    background: #ffffff;
    border: 2px solid #2e5d34;
    border-radius: 4px;
    color: #2e5d34;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.4s ease;
    font-family: Arial, sans-serif;
}

.animal-choice:hover {
    background: #2e5d34;
    color: #ffffff;
    transform: rotate(360deg);
}

.animal-choice.selected {
    background: #2e5d34;
    color: #ffffff;
}

.animal-feedback {
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: bold;
    min-height: 20px;
}

.animal-feedback.success {
    color: #2d8f3f;
}

.animal-feedback.error {
    color: #8f2d2d;
}

/* Consentement */
.consent-section {
    margin: 20px 0;
    padding: 20px;
    background: rgba(228, 247, 228, 0.3);
    border-radius: 4px;
    border: 1px solid #2e5d34;
}

.consent-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.consent-checkbox {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: #2e5d34;
    cursor: pointer;
}

.consent-text {
    font-size: 0.9rem;
    color: #2e5d34;
    line-height: 1.5;
    font-weight: normal;
}

.privacy-link {
    color: #2e5d34;
    cursor: pointer;
    font-weight: bold;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.privacy-link:hover {
    color: #1a3a21;
}

/* Bouton submit */
.submit-button {
    width: 100%;
    padding: 16px;
    background: #2e5d34;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.4s ease;
    font-family: Arial, sans-serif;
    margin-top: 10px;
}

.submit-button:hover {
    background: #1a3a21;
    transform: rotate(360deg);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Messages de statut */
.status-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    font-weight: normal;
    font-size: 1rem;
    display: none;
}

.status-message.success {
    background: #e8f5e8;
    color: #2d8f3f;
    border: 2px solid #2d8f3f;
    display: block;
}

.status-message.error {
    background: #f5e8e8;
    color: #8f2d2d;
    border: 2px solid #8f2d2d;
    display: block;
}

.status-message.loading {
    background: #e8f0f5;
    color: #2d5f8f;
    border: 2px solid #2d5f8f;
    display: block;
}

/* Page de succès */
.success-page {
    display: none;
    text-align: center;
    animation: slideInFromBottom 0.6s ease;
}

.success-page.visible {
    display: block;
}

.success-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 50px;
    border: 2px solid #2e5d34;
    box-shadow: 0 4px 10px rgba(46, 93, 52, 0.1);
    max-width: 450px;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounceIn 1s ease;
}

.success-title {
    font-size: 2rem;
    font-weight: bold;
    color: #2e5d34;
    margin-bottom: 15px;
}

.success-text {
    font-size: 1.1rem;
    color: #2e5d34;
    margin-bottom: 30px;
    line-height: 1.5;
}

.home-button {
    padding: 12px 25px;
    background: #4a7c59;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: normal;
    font-size: 1rem;
    transition: all 0.4s ease;
    font-family: Arial, sans-serif;
}

.home-button:hover {
    background: #1a3a21;
    transform: rotate(360deg);
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(46, 93, 52, 0.7);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    max-width: 550px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 20px rgba(46, 93, 52, 0.3);
    border: 2px solid #2e5d34;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #2e5d34;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #1a3a21;
}

.modal-header {
    font-size: 1.4rem;
    font-weight: bold;
    color: #2e5d34;
    margin-bottom: 20px;
    text-align: center;
}

.modal-body {
    color: #2e5d34;
    line-height: 1.6;
    font-size: 1rem;
}

/* Animations */
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 40px 15px;
    }
    
    .site-logo {
        font-size: 2rem;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .form-card,
    .error-container,
    .success-container {
        padding: 30px 25px;
        margin: 0 10px;
    }
    
    .math-captcha {
        flex-direction: column;
        gap: 10px;
    }
    
    .captcha-question {
        font-size: 1.1rem;
        padding: 8px 15px;
    }
    
    .form-input {
        padding: 12px 16px;
        font-size: 16px;
    }
    
    .form-textarea {
        min-height: 100px;
    }
    
    .modal-content {
        padding: 30px 25px;
        margin: 20px;
    }
    
    .animal-choices {
        flex-direction: column;
        align-items: center;
    }
    
    .animal-choice {
        width: 100px;
    }
}

@media (max-width: 480px) {
    .site-logo {
        font-size: 1.8rem;
    }
    
    .form-card {
        padding: 25px 20px;
    }
    
    .security-section {
        padding: 20px 15px;
    }
    
    .animal-display {
        font-size: 2.5rem;
        padding: 15px;
    }
    
    .consent-wrapper {
        gap: 10px;
    }
    
    .consent-text {
        font-size: 0.85rem;
    }
}