/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: radial-gradient(ellipse at top, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    color: #e2e8f0;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    justify-content: center;
    position: relative;
    padding: 20px 0;
}

/* Centrage vertical pour la page de connexion uniquement */
body:has(.login-form) {
    align-items: center;
    padding: 20px 0;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: aurora 20s ease-in-out infinite;
}

@keyframes aurora {
    0%, 100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    33% {
        opacity: 0.8;
        transform: scale(1.1) rotate(1deg);
    }
    66% {
        opacity: 0.9;
        transform: scale(0.9) rotate(-1deg);
    }
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    pointer-events: none;
    z-index: 0;
}

.container {
    width: 100%;
    max-width: 1600px;
    padding: 20px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Page de connexion */
.login-form {
    background: rgba(15, 15, 35, 0.8);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 24px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    max-width: 500px;
    margin: 0 auto;
}

.login-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.login-form h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(96, 165, 250, 0.5);
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        filter: brightness(1) saturate(1);
    }
    50% {
        filter: brightness(1.2) saturate(1.3);
    }
}

/* Page des idées */
.ideas-container {
    background: rgba(15, 15, 35, 0.8);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 24px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ideas-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    position: relative;
    gap: 20px;
}

.header-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.header h1 {
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(96, 165, 250, 0.3);
    animation: glow 3s ease-in-out infinite;
    margin-bottom: 8px;
    transform: translateX(10px);
}

/* Conteneur du sélecteur de semaine dans le header */
.week-selector-container {
    margin-top: 8px;
}

/* Styles pour la page de test */
.test-info {
    margin-top: 8px;
}

.test-description {
    display: inline-block;
    font-size: 14px;
    color: #94a3b8;
    font-weight: 400;
    background: rgba(148, 163, 184, 0.1);
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.test-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    flex: 1;
}

/* Layout principal en deux colonnes */
.test-main-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: stretch;
    flex: 1;
}

.test-input-column, .test-api-column {
    display: flex;
    width: 100%;
}

.test-input-column .test-card,
.test-api-column .test-card {
    display: grid;
    grid-template-rows: auto 1fr auto;
    width: 100%;
    flex: 1;
}

.test-card {
    background: rgba(15, 15, 35, 0.6);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.test-card .card-title {
    margin-bottom: 16px;
}

.test-card .title-text {
    font-size: 18px;
    font-weight: 600;
    color: #e2e8f0;
}

.test-card textarea {
    width: 100%;
    flex: 1;
    min-height: 280px;
    padding: 16px;
    background: rgba(30, 41, 59, 0.5);
    border: 2px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    color: #e2e8f0;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.test-card textarea:focus {
    outline: none;
    border-color: #a78bfa;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.1);
}

.test-card textarea::placeholder {
    color: #64748b;
}

.test-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    align-items: center;
}

.test-status {
    margin-top: 12px;
    text-align: center;
}

#status-message {
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-block;
    transition: all 0.3s ease;
}

.status-info {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.status-success {
    color: #34d399;
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.2);
}

.status-error {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.2);
}

.status-loading {
    color: #a78bfa;
    background: rgba(167, 139, 250, 0.1);
    border: 1px solid rgba(167, 139, 250, 0.2);
}

.api-info {
    background: rgba(15, 15, 35, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.api-info h3 {
    color: #e2e8f0;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.api-details p {
    margin-bottom: 8px;
    font-size: 14px;
    color: #94a3b8;
}

.api-details strong {
    color: #e2e8f0;
    font-weight: 600;
}

.api-details code {
    background: rgba(30, 41, 59, 0.6);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 13px;
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.2);
    word-break: break-all;
}

/* Encart de réponse API automatique */
.api-response-container {
    background: rgba(15, 15, 35, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.api-response-header-section {
    margin-bottom: 16px;
}

/* Section endpoint POST */
.api-post-endpoint {
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

.endpoint-title {
    font-size: 13px;
    font-weight: 600;
    color: #60a5fa;
    margin-bottom: 6px;
}

.endpoint-details {
    margin-bottom: 6px;
}

.endpoint-details code {
    background: rgba(15, 15, 35, 0.8);
    color: #60a5fa;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 11px;
    word-break: break-all;
    display: block;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.endpoint-example {
    font-size: 11px;
    color: #94a3b8;
}

.example-label {
    font-weight: 500;
    margin-right: 4px;
}

.endpoint-example code {
    background: transparent;
    color: #94a3b8;
    padding: 0;
    font-size: 11px;
    border: none;
    display: inline;
}

.api-response-container h3 {
    color: #e2e8f0;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.api-response-info {
    margin-bottom: 16px;
    text-align: center;
}

#api-trigger-status {
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-block;
    transition: all 0.3s ease;
}

.status-typing {
    color: #a78bfa;
    background: rgba(167, 139, 250, 0.1);
    border: 1px solid rgba(167, 139, 250, 0.2);
}

.api-response-content {
    background: rgba(30, 41, 59, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    flex: 1;
    margin-bottom: 16px;
    overflow: hidden;
    min-height: 280px;
}

#api-response-display {
    padding: 16px;
    height: 100%;
    min-height: 248px;
}

.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 248px;
    color: #64748b;
    font-style: italic;
    text-align: center;
}

.api-response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.api-response-time {
    font-size: 12px;
    color: #94a3b8;
}

.api-response-count {
    font-size: 12px;
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.api-response-input {
    margin-bottom: 8px;
    font-size: 14px;
    color: #e2e8f0;
    background: rgba(167, 139, 250, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 3px solid #a78bfa;
}

.api-response-meta {
    margin-bottom: 12px;
    text-align: center;
}

.saved-indicator {
    font-size: 12px;
    color: #34d399;
    background: rgba(52, 211, 153, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(52, 211, 153, 0.2);
    display: inline-block;
}

.api-response-text {
    width: 100%;
    display: contents;
}

.api-response-text textarea {
    width: 100%;
    flex: 1;
    min-height: 280px;
    padding: 16px;
    background: rgba(30, 41, 59, 0.5);
    border: 2px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    color: #e2e8f0;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.6;
    resize: vertical;
    backdrop-filter: blur(10px);
}

.api-response-text textarea:focus {
    outline: none;
    border-color: rgba(120, 119, 198, 0.5);
    box-shadow: 0 0 0 3px rgba(120, 119, 198, 0.1);
}

.api-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    height: 100%;
    min-height: 280px;
    color: #94a3b8;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(148, 163, 184, 0.2);
    border-top-color: #7877c6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.api-response-error {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 168px;
    color: #f87171;
    text-align: center;
    gap: 8px;
}

.error-icon {
    font-size: 24px;
}

.error-message {
    font-weight: 500;
}

.error-time {
    font-size: 12px;
    color: #94a3b8;
}

.api-response-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.api-response-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive pour la page de test */
@media (max-width: 768px) {
    .test-container {
        gap: 20px;
    }

    /* Layout mobile : colonnes empilées */
    .test-main-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .test-input-column, .test-api-column {
        min-height: auto;
    }

    .test-card, .api-response-container {
        padding: 20px;
    }

    .test-card textarea {
        min-height: 150px;
    }

    .api-response-content {
        min-height: 200px;
    }

    #api-response-display {
        min-height: 168px;
    }

    .empty-state {
        height: 168px;
    }

    .test-actions, .api-response-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .test-actions button, .api-response-actions button {
        width: 100%;
    }

    .api-details code {
        font-size: 11px;
        padding: 3px 6px;
    }

    .api-response-data {
        max-height: 200px;
    }

    .api-response-data pre {
        font-size: 11px;
    }

    .api-response-header {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }
}

.week-display {
    display: inline-block;
    font-size: 14px;
    color: #a78bfa;
    font-weight: 500;
    background: rgba(167, 139, 250, 0.1);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(167, 139, 250, 0.2);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    position: relative;
}

.week-display.clickable {
    cursor: pointer;
}

.week-display.clickable:hover {
    background: rgba(167, 139, 250, 0.2);
    border-color: #a78bfa;
    transform: translateY(-1px);
    box-shadow: 0 0 10px rgba(167, 139, 250, 0.3);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    z-index: 10;
    position: relative;
}


/* Barre de progression */
.progress-container {
    margin-bottom: 30px;
    background: rgba(26, 26, 46, 0.4);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(167, 139, 250, 0.2);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.progress-text {
    font-weight: 600;
    color: #e2e8f0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-count {
    font-size: 14px;
    color: #a78bfa;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(15, 15, 35, 0.6);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #60a5fa 0%, #a78bfa 50%, #f472b6 100%);
    border-radius: 8px;
    transition: width 0.5s ease-in-out;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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%);
    }
}

.ideas-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 30px;
}

/* Cartes d'idées */
.idea-card {
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 18px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.idea-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.4), transparent);
}

.idea-card:hover {
    border-color: rgba(96, 165, 250, 0.4);
    background: rgba(26, 26, 46, 0.8);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(96, 165, 250, 0.2);
}

.idea-number {
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.4);
    margin-top: 4px;
}

.idea-content {
    flex: 1;
}

/* Titres des cartes éditables */
.card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px;
}

.title-text {
    font-weight: 600;
    color: #e2e8f0;
    font-size: 14px;
    letter-spacing: 0.5px;
    cursor: pointer;
    flex: 1;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.title-text:hover {
    background: rgba(167, 139, 250, 0.1);
    color: #a78bfa;
}

.title-text.editing {
    background: rgba(15, 15, 35, 0.8);
    border: 1px solid #60a5fa;
    outline: none;
    color: #e2e8f0;
    padding: 4px 8px;
}

.btn-edit-title {
    display: none;
}

.idea-content textarea {
    width: 100%;
    min-height: 140px;
    max-height: none;
    padding: 16px 20px;
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    line-height: 1.6;
    transition: all 0.3s ease;
    background: rgba(15, 15, 35, 0.5);
    backdrop-filter: blur(5px);
    color: #e2e8f0;
    resize: vertical;
}

.idea-content textarea::placeholder {
    color: rgba(226, 232, 240, 0.5);
    font-style: italic;
}

.idea-content textarea:focus {
    outline: none;
    border-color: #60a5fa;
    background: rgba(15, 15, 35, 0.8);
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
}

/* Actions des cartes */
.card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    justify-content: flex-end;
    min-height: 32px;
    align-items: center;
}

.btn-validate, .btn-edit {
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-validate {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.btn-validate:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

.btn-edit {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.btn-edit:hover {
    background: rgba(251, 191, 36, 0.3);
    color: #f59e0b;
    border-color: #fbbf24;
    transform: translateY(-1px);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

/* État validé */
.idea-card.validated {
    background: linear-gradient(135deg,
        rgba(16, 185, 129, 0.15) 0%,
        rgba(34, 197, 94, 0.1) 50%,
        rgba(16, 185, 129, 0.05) 100%);
    border: 2px solid rgba(16, 185, 129, 0.6);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.3),
                0 0 60px rgba(16, 185, 129, 0.1);
    transform: scale(1.02);
    transition: all 0.3s ease;
}


.idea-card.validated .idea-content textarea {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #d1fae5;
}

.idea-card.validated .idea-number {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

/* Formulaires */
.form-group {
    text-align: left;
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #a78bfa;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(167, 139, 250, 0.3);
}

.form-group input {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 16px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(15, 15, 35, 0.6);
    backdrop-filter: blur(10px);
    color: #e2e8f0;
    position: relative;
}

.form-group input::placeholder {
    color: rgba(226, 232, 240, 0.4);
}

.form-group input:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow:
        0 0 0 2px rgba(96, 165, 250, 0.2),
        0 0 20px rgba(96, 165, 250, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    background: rgba(15, 15, 35, 0.8);
    transform: translateY(-2px);
}


/* Boutons */
.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.validate-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.btn-primary {
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #f472b6 100%);
    color: white;
    width: auto;
    min-width: 200px;
    margin-top: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), transparent);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    transform: translateY(-3px);
    box-shadow:
        0 0 30px rgba(96, 165, 250, 0.6),
        0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-primary.disabled,
.btn-primary:disabled {
    background: rgba(96, 165, 250, 0.3);
    color: rgba(226, 232, 240, 0.6);
    cursor: not-allowed;
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.1);
    transform: none;
    border-color: rgba(96, 165, 250, 0.2);
}

.btn-primary.disabled:hover,
.btn-primary:disabled:hover {
    background: rgba(96, 165, 250, 0.3);
    transform: none;
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.1);
}

.btn-primary.disabled::before,
.btn-primary:disabled::before {
    display: none;
}

.btn-secondary {
    background: rgba(15, 15, 35, 0.8);
    color: #a78bfa;
    padding: 8px 16px;
    font-size: 14px;
    position: static;
    border: 1px solid rgba(167, 139, 250, 0.3);
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.btn-secondary:hover {
    background: rgba(167, 139, 250, 0.2);
    border-color: #a78bfa;
    color: #e2e8f0;
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(167, 139, 250, 0.4);
}

/* Messages */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    padding: 12px 18px;
    border-radius: 16px;
    margin-top: 15px;
    font-size: 14px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

.success-message {
    background: rgba(34, 197, 94, 0.1);
    color: #86efac;
    padding: 12px 18px;
    border-radius: 16px;
    margin-top: 15px;
    font-size: 14px;
    text-align: center;
    border: 1px solid rgba(34, 197, 94, 0.3);
    backdrop-filter: blur(10px);
    animation: slideIn 0.5s ease-out;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
}

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

.loading {
    color: #60a5fa;
    font-size: 14px;
    margin-top: 15px;
    text-align: center;
    font-weight: 500;
    animation: pulse 2s infinite;
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .login-form, .ideas-container {
        padding: 30px 20px;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 15px;
    }

    .header-content {
        width: 100%;
    }

    .header h1 {
        font-size: 22px;
        margin-bottom: 8px;
    }

    .week-display {
        font-size: 12px;
        padding: 4px 8px;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .btn-secondary {
        position: static;
    }

    .ideas-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .idea-card {
        padding: 16px;
        gap: 12px;
    }

    .idea-number {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .idea-content textarea {
        min-height: 160px;
        padding: 18px 22px;
        font-size: 16px; /* Évite le zoom sur iOS */
        line-height: 1.7;
    }

    .idea-content input {
        font-size: 16px; /* Évite le zoom sur iOS */
    }
}

@media (max-width: 480px) {
    .login-form h1 {
        font-size: 24px;
    }

    .header h1 {
        font-size: 20px;
    }

    .form-group input {
        font-size: 16px; /* Évite le zoom sur iOS */
    }
}

/* Modal de sélection de semaine */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(167, 139, 250, 0.3);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    border-bottom: 1px solid rgba(167, 139, 250, 0.2);
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #e2e8f0;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #a78bfa;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(167, 139, 250, 0.2);
    color: #e2e8f0;
}

.modal-body {
    padding: 30px;
}

.year-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.year-nav {
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid rgba(167, 139, 250, 0.3);
    color: #a78bfa;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.year-nav:hover {
    background: rgba(167, 139, 250, 0.2);
    border-color: #a78bfa;
    color: #e2e8f0;
    transform: scale(1.1);
}

#current-year {
    font-size: 24px;
    font-weight: 600;
    color: #e2e8f0;
    min-width: 80px;
    text-align: center;
}

.weeks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding: 4px 10px 4px 4px;
}

.week-item {
    background: rgba(26, 26, 46, 0.4);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.week-item:hover {
    background: rgba(26, 26, 46, 0.7);
    border-color: rgba(167, 139, 250, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 0 15px rgba(167, 139, 250, 0.2);
}

.week-item.current {
    background: rgba(96, 165, 250, 0.2);
    border-color: #60a5fa;
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.3);
}

.week-item.validated {
    background: linear-gradient(135deg,
        rgba(16, 185, 129, 0.2) 0%,
        rgba(34, 197, 94, 0.15) 50%,
        rgba(16, 185, 129, 0.1) 100%);
    border: 2px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.week-item.validated:hover {
    background: linear-gradient(135deg,
        rgba(16, 185, 129, 0.3) 0%,
        rgba(34, 197, 94, 0.25) 50%,
        rgba(16, 185, 129, 0.2) 100%);
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.week-item.validated .week-number {
    color: #10b981;
    font-weight: 600;
}

.week-item.validated.current {
    background: linear-gradient(135deg,
        rgba(16, 185, 129, 0.3) 0%,
        rgba(96, 165, 250, 0.2) 50%,
        rgba(16, 185, 129, 0.3) 100%);
    border: 2px solid rgba(16, 185, 129, 0.6);
    box-shadow:
        0 0 20px rgba(16, 185, 129, 0.3),
        0 0 30px rgba(96, 165, 250, 0.2);
}

.week-number {
    font-size: 14px;
    font-weight: 600;
    color: #a78bfa;
    margin-bottom: 4px;
}

.week-dates {
    font-size: 12px;
    color: #e2e8f0;
    opacity: 0.8;
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-content {
        margin: 10px;
        max-height: 90vh;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-body {
        padding: 20px;
    }

    .weeks-grid {
        grid-template-columns: 1fr;
        max-height: 300px;
    }

    #current-year {
        font-size: 20px;
    }
}