/* ============================================================================
   STYLES SPÉCIFIQUES - PAGE CONTACT
   
   Page dédiée au formulaire de contact.
   Gère l'affichage et les états du formulaire (validation, erreurs, succès).
   
   Sections :
   - Layout de la page contact
   - Styles du formulaire
   - États de validation (succès/erreur)
   - Responsive design
   ============================================================================ */
/* =========
   CONTACT SECTION
======================================== */
.contact {
    position: relative;
    min-height: 100vh;
    padding: 150px 5vw var(--spacing-xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact__grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.contact__title-wrapper {
    text-align: center;
    width: 100%;
}

.contact__title-wrapper .tech-label {
    justify-content: center;
}

.contact__title {
    font-size: 110px;
    line-height: 0.95;
    margin-bottom: 0;
}

/* ========================================
   FORM STYLES
======================================== */
.form {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    max-width: 1200px;
}

.form__group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.form__label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form__label::before {
    content: '';
    width: 12px;
    height: 1px;
    background: var(--color-gold);
}

.form__label--required::after {
    content: '*';
    color: var(--color-accent);
    margin-left: 4px;
}

.form__input,
.form__select,
.form__textarea {
    background: transparent;
    border: 1px solid var(--overlay-light);
    color: var(--color-text);
    padding: 15px 20px;
    font-family: var(--font-body);
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.form__input:focus,
.form__select:focus,
.form__textarea:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 20px rgba(0, 153, 255, 0.2);
}

.form__input:hover,
.form__select:hover,
.form__textarea:hover {
    border-color: var(--color-gold);
}

.form__input.valid,
.form__select.valid,
.form__textarea.valid {
    border-color: var(--color-success);
}

.form__input.invalid,
.form__select.invalid,
.form__textarea.invalid {
    border-color: var(--color-error);
}

.form__textarea {
    resize: vertical;
    min-height: 150px;
    line-height: 1.6;
}

.form__select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23D4AF37' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    padding-right: 50px;
    background-color: rgba(13, 31, 45, 0.5);
}

.form__select option {
    background-color: var(--color-secondary);
    color: var(--color-text);
    padding: 10px;
}

.form__error {
    font-size: 12px;
    color: var(--color-error);
    font-family: var(--font-mono);
    margin-top: 5px;
    display: none;
}

.form__error.show {
    display: block;
}

.form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Conditional fields */
.form__conditional {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    max-height: 0;
    overflow: hidden;
}

.form__conditional.active {
    display: flex;
    flex-direction: column;
    gap: 30px;
    opacity: 1;
    transform: translateY(0);
    max-height: 5000px;
    transition: opacity 0.6s ease 0.1s, transform 0.6s ease 0.1s, max-height 0.8s ease;
}

.form__conditional.active > * {
    animation: slideInUp 0.5s ease forwards;
    opacity: 0;
}

.form__conditional.active > *:nth-child(1) { animation-delay: 0.1s; }
.form__conditional.active > *:nth-child(2) { animation-delay: 0.2s; }
.form__conditional.active > *:nth-child(3) { animation-delay: 0.3s; }
.form__conditional.active > *:nth-child(4) { animation-delay: 0.4s; }
.form__conditional.active > *:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideInUp {
    from { 
        opacity: 0; 
        transform: translateY(20px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Calendar container */
.calendar-container {
    position: relative;
    border: 3px solid var(--color-accent);
    padding: 30px;
    background: rgba(0, 153, 255, 0.03);
    margin-top: var(--spacing-sm);
    box-shadow: 
        0 0 30px rgba(0, 153, 255, 0.3),
        inset 0 0 50px rgba(0, 153, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.calendar-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--color-gold), 
        var(--color-accent), 
        var(--color-gold), 
        transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.calendar-container::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        var(--color-accent) 0%, 
        var(--color-gold) 50%, 
        var(--color-accent) 100%);
    z-index: -1;
    opacity: 0.1;
    filter: blur(20px);
}

.calendar-title {
    font-family: var(--font-display);
    font-size: 24px;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: var(--spacing-sm);
    text-align: center;
    text-shadow: 0 0 20px rgba(0, 153, 255, 0.5);
}

.calendar-description {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--overlay-medium);
    margin-bottom: var(--spacing-sm);
    padding: var(--spacing-xs);
    background: rgba(212, 175, 55, 0.05);
    border-left: 3px solid var(--color-gold);
}

.calendar-container iframe {
    width: 100%;
    min-height: 600px;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* File upload */
.form__file {
    display: none;
}

.form__file-label {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 15px 30px;
    border: 2px dashed var(--overlay-light);
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: none;
}

.form__file-label:hover {
    border-color: var(--color-gold);
    background: rgba(212, 175, 55, 0.05);
}

.form__file-list {
    font-size: 12px;
    color: var(--overlay-medium);
    margin-top: var(--spacing-xs);
}

/* Submit button */
.form__submit {
    background: var(--color-gold);
    color: var(--color-secondary);
    border: none;
    padding: 20px 50px;
    font-family: var(--font-display);
    font-size: 20px;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    cursor: none;
    margin-top: var(--spacing-sm);
}

.form__submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--color-accent);
    transition: left 0.4s ease;
    z-index: -1;
}

.form__submit:hover::before {
    left: 0;
}

.form__submit:hover {
    color: var(--color-text);
}

.form__submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Success message */
.form__success {
    display: none;
    padding: 30px;
    background: linear-gradient(135deg, rgba(0, 200, 150, 0.1), rgba(0, 200, 150, 0.05));
    border: 3px solid var(--color-success);
    color: var(--color-success);
    font-family: var(--font-mono);
    text-align: center;
    font-size: 16px;
    line-height: 1.6;
    animation: successPulse 0.6s ease;
    box-shadow: 
        0 0 30px rgba(0, 200, 150, 0.3),
        inset 0 0 30px rgba(0, 200, 150, 0.1);
    position: relative;
    overflow: hidden;
}

.form__success::before {
    content: '✓';
    font-size: 50px;
    display: block;
    margin-bottom: 10px;
    animation: checkmarkPop 0.5s ease 0.2s backwards;
}

.form__success.show {
    display: block;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes checkmarkPop {
    0% { transform: scale(0) rotate(-45deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 1024px) {
    .contact__title {
        font-size: 80px;
    }
    
    .site-nav {
        display: none;
    }
}

@media (max-width: 768px) {
    .contact__title {
        font-size: 60px;
    }
    
    .form__row {
        grid-template-columns: 1fr;
    }
    
    .calendar-container iframe {
        min-height: 800px;
    }
}