/* ==========================================================================
   OI-STYLE.CSS - Styles pour OI.fr avec charte oriontech.space
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

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

body {
    font-family: "Segoe UI", sans-serif;
    background-color: #0d1b2a;
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Fond de particules animées */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(ellipse at center, #0f2b44 0%, #0d1b2a 100%);
}

.particle {
    position: absolute;
    background: #1e6091;
    border-radius: 50%;
    pointer-events: none;
    animation: float 8s infinite ease-in-out;
    opacity: 0.6;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-100px) rotate(120deg); }
    66% { transform: translateY(-50px) rotate(240deg); }
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* En-tête avec logo flottant */
.site-header {
    text-align: center;
    padding: 40px 20px;
    position: relative;
}

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

.site-logo {
    font-size: 2.4em;
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    text-shadow: 0 0 20px rgba(30, 96, 145, 0.8);
}

.site-logo:hover {
    color: #1e6091;
    transform: scale(1.05);
    text-shadow: 0 0 30px rgba(30, 96, 145, 1);
}

.logo-effect {
    font-size: 1.5em;
    margin-top: 8px;
    opacity: 0.8;
    animation: pulse 2s infinite;
}

.logo-effect::after {
    content: "∞∞";
    display: block;
    color: #1e6091;
}

.site-tagline {
    font-size: 1em;
    margin-top: 20px;
    opacity: 0.8;
    color: #ffffff;
    font-weight: 300;
}

/* 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: rgba(30, 96, 145, 0.1);
    border-radius: 10px;
    padding: 40px;
    border: 1px solid #1e6091;
    box-shadow: 0 0 30px rgba(30, 96, 145, 0.3);
    max-width: 500px;
    backdrop-filter: blur(10px);
}

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

.error-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 15px;
    font-family: 'Orbitron', monospace;
}

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

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

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

.error-link {
    display: inline-block;
    padding: 12px 24px;
    background: #1e6091;
    color: #ffffff;
    text-decoration: none;
    border-radius: 0;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.error-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.error-link:hover {
    background: #144f75;
    box-shadow: 0 0 20px rgba(30, 96, 145, 0.5);
}

.error-link:hover::before {
    left: 100%;
}

/* Formulaire sans cadre - Design spatial */
.contact-form-wrapper {
    width: 100%;
    max-width: 800px;
    transition: all 0.4s ease;
}

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

.form-section {
    background: transparent;
    padding: 0;
    position: relative;
}

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

.form-title {
    font-size: 2rem;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 15px;
    text-shadow: 0 0 15px rgba(30, 96, 145, 0.6);
}

.form-description {
    font-size: 1.1em;
    color: #ffffff;
    opacity: 0.8;
    font-weight: 300;
}

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

/* Inputs flottants futuristes */
.input-group {
    position: relative;
}

.input-wrapper.floating {
    position: relative;
    background: rgba(30, 96, 145, 0.05);
    border-radius: 0;
    border: 1px solid rgba(30, 96, 145, 0.3);
    overflow: hidden;
    transition: all 0.3s ease;
}

.input-wrapper.floating:hover {
    border-color: rgba(30, 96, 145, 0.6);
    box-shadow: 0 0 15px rgba(30, 96, 145, 0.2);
}

.form-input {
    width: 100%;
    padding: 20px 15px 15px 15px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1rem;
    font-family: "Segoe UI", sans-serif;
    transition: all 0.3s ease;
    outline: none;
    position: relative;
    z-index: 2;
}

.form-input:focus {
    background: rgba(30, 96, 145, 0.1);
}

.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
    transform: translateY(-25px) scale(0.8);
    color: #1e6091;
    font-weight: bold;
}

.form-label {
    position: absolute;
    left: 15px;
    top: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
    font-family: "Segoe UI", sans-serif;
    padding-top: 25px;
}

.input-border {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #1e6091, #144f75);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.form-input:focus ~ .input-border {
    width: 100%;
}

/* Section sécurité futuriste */
.security-section {
    background: rgba(30, 96, 145, 0.08);
    border: 1px solid rgba(30, 96, 145, 0.3);
    border-radius: 0;
    padding: 30px;
    margin: 20px 0;
    position: relative;
}

.security-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #1e6091, transparent);
}

.security-header {
    text-align: center;
    margin-bottom: 25px;
}

.security-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffffff;
    font-family: 'Orbitron', monospace;
}

.security-icon {
    font-size: 1.3rem;
    color: #1e6091;
}

.captcha-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.math-captcha,
.animal-captcha {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    background: rgba(30, 96, 145, 0.05);
    padding: 20px;
    border-radius: 0;
    border: 1px solid rgba(30, 96, 145, 0.2);
}

.captcha-label {
    font-size: 0.9rem;
    color: #1e6091;
    font-weight: bold;
    min-width: 60px;
}

.captcha-question {
    font-size: 1.3rem;
    font-weight: bold;
    color: #ffffff;
    background: rgba(30, 96, 145, 0.2);
    padding: 10px 20px;
    border-radius: 0;
    border: 1px solid #1e6091;
    font-family: 'Orbitron', monospace;
}

.captcha-input {
    width: 80px;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(30, 96, 145, 0.5);
    border-radius: 0;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    font-family: 'Orbitron', monospace;
    transition: all 0.3s ease;
    outline: none;
}

.captcha-input:focus {
    border-color: #1e6091;
    box-shadow: 0 0 10px rgba(30, 96, 145, 0.3);
    background: rgba(30, 96, 145, 0.1);
}

.refresh-btn {
    padding: 10px 12px;
    background: rgba(30, 96, 145, 0.3);
    color: #ffffff;
    border: 1px solid #1e6091;
    border-radius: 0;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

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

/* Captcha animaux spatial */
.animal-captcha {
    text-align: center;
    animation: fadeInUp 0.5s ease;
    flex-direction: column;
    gap: 15px;
}

.animal-display {
    font-size: 3rem;
    margin: 10px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0;
    border: 1px solid #1e6091;
    display: inline-block;
    box-shadow: 0 0 20px rgba(30, 96, 145, 0.2);
}

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

.animal-choice {
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(30, 96, 145, 0.5);
    border-radius: 0;
    color: #ffffff;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-family: "Segoe UI", sans-serif;
    position: relative;
    overflow: hidden;
}

.animal-choice::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(30, 96, 145, 0.3), transparent);
    transition: left 0.5s;
}

.animal-choice:hover {
    background: rgba(30, 96, 145, 0.2);
    border-color: #1e6091;
    box-shadow: 0 0 10px rgba(30, 96, 145, 0.3);
}

.animal-choice:hover::before {
    left: 100%;
}

.animal-choice.selected {
    background: #1e6091;
    border-color: #1e6091;
    box-shadow: 0 0 15px rgba(30, 96, 145, 0.5);
}

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

.animal-feedback.success {
    color: #4ade80;
}

.animal-feedback.error {
    color: #f87171;
}

/* Consentement */
.consent-section {
    margin: 30px 0;
    padding: 20px;
    background: rgba(30, 96, 145, 0.05);
    border: 1px solid rgba(30, 96, 145, 0.2);
    border-radius: 0;
}

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

.consent-checkbox {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #1e6091;
    cursor: pointer;
}

.consent-text {
    font-size: 0.9rem;
    color: #ffffff;
    line-height: 1.5;
    opacity: 0.9;
}

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

.privacy-link:hover {
    color: #144f75;
}

/* Bouton submit futuriste */
.submit-button {
    width: 100%;
    padding: 18px;
    background: linear-gradient(45deg, #1e6091, #144f75);
    color: #ffffff;
    border: none;
    border-radius: 0;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Orbitron', monospace;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-text {
    position: relative;
    z-index: 2;
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.8s;
}

.submit-button:hover {
    background: linear-gradient(45deg, #144f75, #1e6091);
    box-shadow: 0 0 30px rgba(30, 96, 145, 0.6);
    transform: translateY(-2px);
}

.submit-button:hover .btn-glow {
    left: 100%;
}

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

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

.status-message.success {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
    border-color: #4ade80;
    display: block;
}

.status-message.error {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
    border-color: #f87171;
    display: block;
}

.status-message.loading {
    background: rgba(30, 96, 145, 0.1);
    color: #1e6091;
    border-color: #1e6091;
    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: rgba(30, 96, 145, 0.1);
    border-radius: 0;
    padding: 50px;
    border: 1px solid #1e6091;
    box-shadow: 0 0 40px rgba(30, 96, 145, 0.3);
    max-width: 500px;
    backdrop-filter: blur(10px);
}

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

.success-title {
    font-size: 2rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 15px;
    font-family: 'Orbitron', monospace;
}

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

.home-button {
    padding: 12px 25px;
    background: rgba(30, 96, 145, 0.8);
    color: #ffffff;
    border: 1px solid #1e6091;
    border-radius: 0;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Orbitron', monospace;
}

.home-button:hover {
    background: #1e6091;
    box-shadow: 0 0 20px rgba(30, 96, 145, 0.5);
    transform: translateY(-2px);
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 27, 42, 0.9);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #0d1b2a, #1e6091);
    padding: 40px;
    border-radius: 0;
    max-width: 550px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 0 50px rgba(30, 96, 145, 0.5);
    border: 1px solid #1e6091;
}

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

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

.modal-header {
    font-size: 1.4rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 20px;
    text-align: center;
    font-family: 'Orbitron', monospace;
}

.modal-body {
    color: #ffffff;
    line-height: 1.6;
    font-size: 1rem;
    opacity: 0.9;
}

/* 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) {
    .site-header {
        padding: 30px 15px;
    }
    
    .site-logo {
        font-size: 2rem;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .form-section,
    .error-container,
    .success-container {
        padding: 30px 20px;
        margin: 0 10px;
    }
    
    .captcha-grid {
        grid-template-columns: 1fr;
    }
    
    .math-captcha,
    .animal-captcha {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-input {
        padding: 18px 15px 12px 15px;
        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: 120px;
    }
}

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