@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.contact-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 120px 20px 40px;
    gap: 4rem;
}

.contact-container h1 {
    font-size: 8rem;
    font-weight: 700;
    position: relative;
    text-shadow: 0.05em 0 0 var(--primary), -0.025em -0.05em 0 var(--secondary);
    animation: glitch 1s infinite;
    opacity: 1;
}

.contact-content {
    display: flex;
    gap: 4rem;
    width: 100%;
    max-width: 1200px;
    padding: 0 1rem;
}

.contact-info {
    flex: 1;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    animation: fadeInLeft 0.6s ease forwards;
    opacity: 0;
    animation-delay: 0.2s;
}

.contact-info h2 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    animation: fadeInLeft 0.6s ease forwards;
    opacity: 0;
}

.info-item:nth-child(1) { animation-delay: 0.3s; }
.info-item:nth-child(2) { animation-delay: 0.4s; }
.info-item:nth-child(3) { animation-delay: 0.5s; }

.info-item i {
    color: var(--primary);
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.info-item:hover i {
    transform: scale(1.2);
}

.info-item a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
    display: inline-block;
}

.info-item a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

.info-item a:hover::after {
    width: 100%;
}

.info-item a:hover {
    color: var(--primary);
}

.contact-form {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    animation: fadeInRight 0.6s ease forwards;
    opacity: 0;
    animation-delay: 0.2s;
}

.form-group {
    position: relative;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.form-group:nth-child(1) { animation-delay: 0.3s; }
.form-group:nth-child(2) { animation-delay: 0.4s; }
.form-group:nth-child(3) { animation-delay: 0.5s; }
.form-group:nth-child(4) { animation-delay: 0.6s; }

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 0;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1rem;
    outline: none;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group label {
    position: absolute;
    left: 0;
    top: 1rem;
    color: rgba(255, 255, 255, 0.5);
    transition: 0.3s ease;
    pointer-events: none;
}

.form-group input:focus ~ label,
.form-group input:valid ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:valid ~ label {
    top: -1rem;
    font-size: 0.8rem;
    color: var(--primary);
}

.line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.form-group input:focus ~ .line,
.form-group textarea:focus ~ .line {
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.submit-btn {
    align-self: flex-start;
    padding: 1rem 2rem;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    animation-delay: 0.7s;
}

.submit-btn span {
    position: relative;
    z-index: 1;
}

.btn-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: 0.3s ease;
}

.submit-btn:hover .btn-line {
    height: 100%;
}

@media screen and (max-width: 968px) {
    .contact-content {
        flex-direction: column;
    }

    .contact-info {
        order: 2;
    }

    .contact-form {
        order: 1;
    }
}

@media screen and (max-width: 480px) {
    .contact-container {
        padding: 100px 10px 20px;
    }

    .contact-content {
        gap: 2rem;
    }

    .submit-btn {
        width: 100%;
    }
}

/* Ajouter à la fin du fichier */
.form-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
}

.form-status.success {
    display: block;
    background: rgba(46, 213, 115, 0.1);
    color: #2ed573;
}

.form-status.error {
    display: block;
    background: rgba(255, 71, 87, 0.1);
    color: #ff4757;
}

.submit-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.submit-btn.loading span {
    visibility: hidden;
}

.submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid var(--text);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.contact-info, .contact-form {
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.contact-info:hover, .contact-form:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

/* Modifier la partie du titre pour ajouter l'effet de suivi */
.contact-container h1 {
    font-size: 8rem;
    font-weight: 700;
    position: relative;
    text-shadow: 0.05em 0 0 var(--primary), -0.025em -0.05em 0 var(--secondary);
    animation: glitch 1s infinite;
    opacity: 1; /* Changer de 0 à 1 car l'animation glitch gère déjà l'opacité */
}

/* Ajouter les media queries pour la responsivité du titre */
@media screen and (max-width: 1024px) {
    .contact-container h1 {
        font-size: 6rem;
    }
}

@media screen and (max-width: 768px) {
    .contact-container h1 {
        font-size: 4rem;
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    .contact-container h1 {
        font-size: 3rem;
    }
}
