/* UNITYTASK V2.1 - Styles avec animations */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

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

:root {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --secondary: #10b981;
    --accent: #8b5cf6;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-gray: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --urgent: #ef4444;
    --standard: #f59e0b;
    --premium: #8b5cf6;
    --success: #10b981;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1);
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* HEADER */
.header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
    position: relative;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-image {
    height: 48px;
    width: auto;
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.tagline {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.nav {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    transition: all 0.3s;
    background: var(--bg-light);
    border: 1px solid var(--border);
}

.nav-link:hover {
    color: var(--primary);
    background: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* MAIN */
.main-content {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

/* MISSIONS GRID */
.missions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 2rem;
}

/* MISSION CARD - Animations */
.mission-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    animation: fadeInUp 0.6s ease-out;
}

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

.mission-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.mission-header {
    padding: 2rem;
    background: linear-gradient(135deg, var(--bg-white), var(--bg-light));
    border-bottom: 1px solid var(--border-light);
}

.mission-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

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

.mission-badge.urgent {
    background: rgba(239, 68, 68, 0.1);
    color: var(--urgent);
}

.mission-badge.standard {
    background: rgba(245, 158, 11, 0.1);
    color: var(--standard);
}

.mission-badge.premium {
    background: rgba(139, 92, 246, 0.1);
    color: var(--premium);
}

.mission-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.mission-id {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
}

/* BADGES ADDITIONNELS */
.mission-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.badge-item {
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.badge-repas { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.badge-ads { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.badge-ssiap { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.badge-costume { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.badge-parking { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.badge-vehicule { background: rgba(6, 182, 212, 0.1); color: #06b6d4; }

/* SLOTS PROGRESS - Animation */
.slots-progress {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slots-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.slots-count {
    color: var(--primary);
    animation: countUp 1s ease-out;
}

@keyframes countUp {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.slots-bar {
    height: 10px;
    background: var(--border);
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
}

.slots-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 9999px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fillBar 1.5s ease-out;
    position: relative;
    overflow: hidden;
}

@keyframes fillBar {
    from { width: 0 !important; }
}

.slots-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.slots-fill.full {
    background: linear-gradient(90deg, var(--success), #059669);
}

/* TIMER */
.mission-timer {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(245, 158, 11, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.countdown {
    font-weight: 700;
    color: var(--standard);
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.mission-body {
    padding: 2rem;
}

.mission-detail {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.mission-detail .icon {
    color: var(--primary);
}

.mission-description {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    border-left: 3px solid var(--primary);
}

.mission-location {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(30, 64, 175, 0.05);
    border-radius: var(--radius-md);
}

.mission-footer {
    padding: 1.5rem 2rem;
    background: var(--bg-light);
    border-top: 1px solid var(--border-light);
}

/* BOUTONS */
.btn-respond {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}

.btn-respond:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-respond.btn-registered {
    background: linear-gradient(135deg, var(--success), #059669);
    cursor: default;
}

.btn-respond.btn-unregister {
    background: linear-gradient(135deg, #64748b, #475569);
}

.btn-respond.btn-full {
    background: linear-gradient(135deg, var(--text-muted), #64748b);
    cursor: not-allowed;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-2xl);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.4s;
}

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

/* FOOTER */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

.footer p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

/* COOKIE BANNER */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--text-primary);
    color: white;
    padding: 1.5rem;
    box-shadow: var(--shadow-xl);
    z-index: 2000;
    animation: slideUp 0.5s;
    display: none;
}

.cookie-banner.show {
    display: block;
}

.cookie-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.cookie-text {
    flex: 1;
    font-size: 0.9375rem;
}

.cookie-actions {
    display: flex;
    gap: 1rem;
}

.btn-cookie {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.btn-accept {
    background: var(--primary);
    color: white;
}

.btn-decline {
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .missions-grid {
        grid-template-columns: 1fr;
    }
    .cookie-content {
        flex-direction: column;
    }
    .nav {
        flex-direction: column;
        width: 100%;
    }
}

/* LOADING */
.loading {
    text-align: center;
    padding: 3rem;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* LOADING */
.loading {
    text-align: center;
    padding: 3rem;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* FORM STYLES */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
    background: var(--bg-white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
}

.first-time-notice {
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid var(--primary);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

/* MODAL */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
}

.modal-info {
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid var(--primary);
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.btn-submit,
.btn-cancel {
    padding: 0.75rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-cancel {
    background: var(--bg-light);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-cancel:hover {
    background: var(--bg-gray);
}

/* MISSION QUESTION */
.mission-question {
    padding: 1rem 2rem 2rem;
    text-align: center;
}

.btn-question {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-question:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(30, 64, 175, 0.05);
}

/* TOAST */
.toast {
    position: fixed;
    bottom: -100px;
    right: 2rem;
    background: var(--text-primary);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    transition: bottom 0.3s;
    z-index: 3000;
    min-width: 300px;
    font-weight: 600;
}

.toast.show {
    bottom: 2rem;
}

.toast.success {
    background: linear-gradient(135deg, var(--success), #059669);
}

.toast.error {
    background: linear-gradient(135deg, var(--urgent), #dc2626);
}
