/*
 * ========================================
 * APERTURE SCIENCE CALENDAR STYLES
 * Styles pour le planificateur de missions
 * ========================================
 */

/* Variables CSS pour la cohérence du thème */
:root {
    --aperture-orange: #ff6a00;
    --aperture-blue: #007acc;
    --aperture-dark: #1a1a1a;
    --aperture-light-grey: #333;
    --aperture-dark-grey: #2a2a2a;
    --aperture-text: #e0e0e0;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    color: var(--aperture-text);
    min-height: 100vh;
    line-height: 1.6;
}

/* 
 * ========================================
 * HEADER STYLES
 * En-tête Aperture Science
 * ========================================
 */
.aperture-header {
    background: linear-gradient(90deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
    border-bottom: 3px solid var(--aperture-orange);
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.header-title h1 {
    font-size: 2.5em;
    font-weight: 300;
    color: var(--aperture-orange);
    text-shadow: 0 0 20px rgba(255, 106, 0, 0.5);
}

.project-id {
    font-size: 0.9em;
    color: #888;
    font-family: monospace;
    margin-top: 5px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    color: var(--aperture-blue);
}

.status-light {
    width: 12px;
    height: 12px;
    background: var(--aperture-blue);
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px var(--aperture-blue);
}

/* 
 * ========================================
 * LOGO APERTURE SCIENCE
 * Animation du logo emblématique
 * ========================================
 */
.aperture-logo {
    position: relative;
    width: 80px;
    height: 80px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.aperture-logo:hover {
    transform: scale(1.1);
}

.aperture-blades {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
}

.aperture-blade {
    position: absolute;
    width: 50%;
    height: 50%;
    background: linear-gradient(45deg, var(--aperture-orange), #ff8c00);
    transform-origin: 100% 100%;
    border-radius: 0 100% 0 0;
}

.aperture-blade:nth-child(1) { transform: rotate(0deg); }
.aperture-blade:nth-child(2) { transform: rotate(45deg); }
.aperture-blade:nth-child(3) { transform: rotate(90deg); }
.aperture-blade:nth-child(4) { transform: rotate(135deg); }
.aperture-blade:nth-child(5) { transform: rotate(180deg); }
.aperture-blade:nth-child(6) { transform: rotate(225deg); }
.aperture-blade:nth-child(7) { transform: rotate(270deg); }
.aperture-blade:nth-child(8) { transform: rotate(315deg); }

.aperture-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: var(--aperture-dark);
    border-radius: 50%;
    border: 2px solid var(--aperture-orange);
}

/* 
 * ========================================
 * CONTAINER PRINCIPAL
 * Layout principal de la page
 * ========================================
 */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 
 * ========================================
 * SECTION D'AVERTISSEMENT
 * Module d'alerte réutilisable
 * ========================================
 */
.warning-section {
    background: linear-gradient(135deg, #ff4444, #cc2222);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.3);
}

.warning-icon {
    font-size: 2em;
    animation: pulse 2s infinite;
}

.warning-section h3 {
    margin-bottom: 10px;
    font-size: 1.3em;
}

/* 
 * ========================================
 * SECTIONS DE CONTENU
 * Modules de contenu réutilisables
 * ========================================
 */
.content-section {
    background: linear-gradient(135deg, var(--aperture-dark-grey), var(--aperture-light-grey));
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--aperture-orange);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.content-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--aperture-orange), transparent);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--aperture-orange);
}

.section-number {
    font-size: 3em;
    font-weight: bold;
    color: var(--aperture-orange);
    text-shadow: 0 0 20px rgba(255, 106, 0, 0.5);
}

.section-title {
    font-size: 2.2em;
    color: var(--aperture-blue);
    font-weight: 300;
    text-shadow: 0 0 10px rgba(0, 122, 204, 0.3);
}

/* 
 * ========================================
 * PLANIFICATEUR DE MISSIONS
 * Styles spécifiques au calendrier
 * ========================================
 */
.mission-planner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

/* Container du calendrier */
.calendar-container {
    background: var(--aperture-dark);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid var(--aperture-orange);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* En-tête du calendrier */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--aperture-orange);
}

.calendar-header h3 {
    color: var(--aperture-orange);
    font-size: 1.5em;
    font-weight: 300;
}

/* Boutons de navigation du calendrier */
.nav-btn {
    background: var(--aperture-orange);
    color: var(--aperture-dark);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: #ff8c00;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 106, 0, 0.5);
}

/* Grille du calendrier */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background: var(--aperture-light-grey);
    border-radius: 5px;
    padding: 10px;
}

/* En-têtes des jours de la semaine */
.calendar-day-header {
    text-align: center;
    font-weight: bold;
    color: var(--aperture-orange);
    padding: 10px;
    font-size: 0.9em;
}

/* Cellules des jours */
.calendar-day {
    background: var(--aperture-dark-grey);
    border: 1px solid var(--aperture-light-grey);
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 3px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.calendar-day:hover {
    background: var(--aperture-orange);
    color: var(--aperture-dark);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(255, 106, 0, 0.3);
}

/* Jour avec missions */
.calendar-day.has-mission {
    background: var(--aperture-blue);
    color: white;
    font-weight: bold;
}

.calendar-day.has-mission::after {
    content: '•';
    position: absolute;
    bottom: 2px;
    right: 4px;
    color: var(--aperture-orange);
    font-size: 1.5em;
}

/* 
 * ========================================
 * DÉTAILS DES MISSIONS
 * Section des missions du jour
 * ========================================
 */
.mission-details {
    background: var(--aperture-dark);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid var(--aperture-blue);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.mission-details h4 {
    color: var(--aperture-blue);
    font-size: 1.3em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--aperture-blue);
}

/* Liste des missions */
.mission-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

/* Scrollbar personnalisée */
.mission-list::-webkit-scrollbar {
    width: 8px;
}

.mission-list::-webkit-scrollbar-track {
    background: var(--aperture-dark-grey);
    border-radius: 5px;
}

.mission-list::-webkit-scrollbar-thumb {
    background: var(--aperture-orange);
    border-radius: 5px;
}

/* Élément de mission */
.mission-item {
    background: var(--aperture-dark-grey);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid var(--aperture-orange);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.mission-item:hover {
    background: var(--aperture-light-grey);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Priorités des missions */
.mission-item.priority-high {
    border-left-color: #ff4444;
}

.mission-item.priority-medium {
    border-left-color: var(--aperture-orange);
}

.mission-item.priority-low {
    border-left-color: var(--aperture-blue);
}

/* Heure de la mission */
.mission-time {
    background: var(--aperture-orange);
    color: var(--aperture-dark);
    padding: 8px 12px;
    border-radius: 5px;
    font-weight: bold;
    font-family: monospace;
    min-width: 70px;
    text-align: center;
}

/* Contenu de la mission */
.mission-content {
    flex: 1;
}

.mission-content h5 {
    color: var(--aperture-text);
    margin-bottom: 5px;
    font-size: 1.1em;
}

.mission-content p {
    color: #ccc;
    font-size: 0.9em;
}

/* Statut des missions */
.mission-status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
}

.mission-status.pending {
    background: #ff6a00;
    color: var(--aperture-dark);
}

.mission-status.completed {
    background: #4caf50;
    color: white;
}

.mission-status.scheduled {
    background: var(--aperture-blue);
    color: white;
}

/* Message pour aucune mission */
.no-missions {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 30px;
    background: var(--aperture-dark-grey);
    border-radius: 8px;
    border: 2px dashed #444;
}

/* 
 * ========================================
 * BOUTON NOUVELLE MISSION
 * Bouton pour ajouter une mission
 * ========================================
 */
.add-mission-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--aperture-orange), #ff8c00);
    color: var(--aperture-dark);
    border: none;
    border-radius: 8px;
    padding: 15px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.add-mission-btn:hover {
    background: linear-gradient(135deg, #ff8c00, var(--aperture-orange));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 106, 0, 0.4);
}

/* 
 * ========================================
 * MODAL NOUVELLE MISSION
 * Styles pour la fenêtre modale
 * ========================================
 */
.mission-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.mission-modal-content {
    background: var(--aperture-dark);
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    border: 2px solid var(--aperture-orange);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.mission-modal h3 {
    color: var(--aperture-orange);
    margin-bottom: 20px;
    font-size: 1.5em;
}

.mission-modal label {
    display: block;
    margin-bottom: 8px;
    color: var(--aperture-text);
    font-weight: bold;
}

.mission-modal input,
.mission-modal textarea,
.mission-modal select {
    width: 100%;
    padding: 10px;
    background: var(--aperture-dark-grey);
    border: 1px solid var(--aperture-light-grey);
    border-radius: 5px;
    color: var(--aperture-text);
    font-size: 1em;
    margin-bottom: 15px;
}

.mission-modal input:focus,
.mission-modal textarea:focus,
.mission-modal select:focus {
    outline: none;
    border-color: var(--aperture-orange);
    box-shadow: 0 0 10px rgba(255, 106, 0, 0.3);
}

.mission-modal textarea {
    resize: vertical;
    min-height: 80px;
}

.mission-modal button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.mission-modal button[type="submit"] {
    background: var(--aperture-orange);
    color: var(--aperture-dark);
}

.mission-modal button[type="submit"]:hover {
    background: #ff8c00;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 106, 0, 0.4);
}

.mission-modal button[type="button"] {
    background: var(--aperture-light-grey);
    color: white;
}

.mission-modal button[type="button"]:hover {
    background: #444;
}

/* 
 * ========================================
 * FOOTER
 * Pied de page Aperture Science
 * ========================================
 */
.aperture-footer {
    background: var(--aperture-dark);
    border-top: 3px solid var(--aperture-orange);
    padding: 40px 20px;
    text-align: center;
    margin-top: 40px;
}

.aperture-footer p {
    margin: 10px 0;
    color: #ccc;
}

.classification {
    color: #ff4444;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* 
 * ========================================
 * ANIMATIONS
 * Animations et transitions
 * ========================================
 */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

/* 
 * ========================================
 * RESPONSIVE DESIGN
 * Adaptations pour mobile et tablette
 * ========================================
 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .header-title h1 {
        font-size: 2em;
    }
    
    .mission-planner {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .calendar-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .calendar-day {
        min-height: 35px;
        font-size: 0.9em;
    }
    
    .mission-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .mission-time {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 20px 10px;
    }
    
    .content-section {
        padding: 20px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .section-number {
        font-size: 2em;
    }
    
    .section-title {
        font-size: 1.8em;
    }
    
    .calendar-grid {
        gap: 1px;
    }
    
    .calendar-day {
        min-height: 30px;
        font-size: 0.8em;
    }
}
