/* ========================================
   STYLES GÉNÉRAUX
   ======================================== */

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

body {
    font-family: 'Arial', sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
}

/* ========================================
   HEADER
   ======================================== */

.header {
    background: #2c5aa0;
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.2em;
    opacity: 0.9;
}

.header .enterprise-info {
    margin-top: 8px;
    padding: 8px;
    background: rgba(238, 96, 96, 0.274);
    border-radius: 8px;
    font-size: 1.1em;
}

/* ========================================
   ONGLETS
   ======================================== */

.tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #ddd;
}

.tab {
    flex: 1;
    padding: 15px;
    background: #f8f9fa;
    border: none;
    border-right: 1px solid #ddd;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
}

.tab:last-child {
    border-right: none;
}

.tab.active {
    background: white;
    color: #2c5aa0;
    border-bottom: 3px solid #2c5aa0;
}

.tab:hover:not(.active) {
    background: #e9ecef;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ========================================
   MODAL DE DÉMARRAGE
   ======================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-content h2 {
    color: #2c5aa0;
    margin-bottom: 20px;
    text-align: center;
}

.modal-content p {
    text-align: center;
    margin-bottom: 30px;
    color: #666;
    line-height: 1.6;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2c5aa0;
}

.modal-footer {
    margin-top: 20px;
    text-align: center;
}

/* ========================================
   BARRE DE PROGRESSION
   ======================================== */

.progress-bar {
    display: flex;
    justify-content: space-between;
    padding: 30px;
    background: #f8f9fa;
}

.progress-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.progress-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 60%;
    width: 80%;
    height: 3px;
    background: #ddd;
    z-index: 0;
}

.progress-item.completed:not(:last-child)::after {
    background: #28a745;
}

.progress-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    z-index: 1;
    margin-bottom: 10px;
}

.progress-item.active .progress-circle {
    background: #2c5aa0;
    box-shadow: 0 0 0 4px rgba(44, 90, 160, 0.2);
}

.progress-item.completed .progress-circle {
    background: #28a745;
}

.progress-label {
    font-size: 0.9em;
    color: #666;
    text-align: center;
}

/* ========================================
   TIMER ET SCORE
   ======================================== */

.stats-bar {
    display: flex;
    justify-content: space-between;
    padding: 20px 30px;
    background: white;
    border-bottom: 2px solid #f0f0f0;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-icon {
    width: 30px;
    height: 30px;
    fill: #2c5aa0;
}

.stat-label {
    font-size: 0.9em;
    color: #666;
}

.stat-value {
    font-size: 1.2em;
    font-weight: bold;
    color: #2c5aa0;
}

/* ========================================
   ÉCRANS DE MISSIONS
   ======================================== */

.content {
    padding: 40px;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
    animation: fadeIn 0.5s;
}

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

.screen h2 {
    color: #2c5aa0;
    margin-bottom: 20px;
    font-size: 2em;
}

.screen h3 {
    color: #333;
    margin: 20px 0 10px 0;
    font-size: 1.3em;
}

.screen p {
    line-height: 1.1;
    color: #555;
    margin-bottom: 8px;
}

/* ========================================
   CARTES D'INFORMATION
   ======================================== */

.info-card {
    background: #f8f9fa;
    padding: 8px;
    border-left: 4px solid #2c5aa0;
    border-radius: 8px;
    margin: 8px 0;
}

.info-card.warning {
    border-left-color: #ffc107;
    background: #fff3cd;
}

.info-card.success {
    border-left-color: #28a745;
    background: #d4edda;
}

.info-card h3 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-card .icon {
    width: 24px;
    height: 24px;
}

.info-card ul {
    margin: 8px 0 0 8px;
}

.info-card li {
    margin: 8px 0;
    line-height: 1.1;
}

/* ========================================
   LECTEUR AUDIO
   ======================================== */

.audio-player {
    background: #e8f4f8;
    padding: 30px;
    border-radius: 12px;
    margin: 20px 0;
    border-left: 5px solid #2c5aa0;
}

.audio-player h4 {
    color: #2c5aa0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.audio-player audio {
    width: 100%;
    margin-top: 10px;
}

.audio-instructions {
    margin-top: 15px;
    font-size: 0.95em;
    color: #666;
}

/* Suite du CSS identique au fichier original...
    background: #f8f9fa;
} */

.progress-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.progress-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 60%;
    width: 80%;
    height: 3px;
    background: #ddd;
    z-index: 0;
}

.progress-item.completed:not(:last-child)::after {
    background: #28a745;
}

.progress-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    z-index: 1;
    margin-bottom: 10px;
}

.progress-item.active .progress-circle {
    background: #2c5aa0;
    box-shadow: 0 0 0 4px rgba(44, 90, 160, 0.2);
}

.progress-item.completed .progress-circle {
    background: #28a745;
}

.progress-label {
    font-size: 0.9em;
    color: #666;
    text-align: center;
}

/* ========================================
   TIMER ET SCORE
   ======================================== */

.stats-bar {
    display: flex;
    justify-content: space-between;
    padding: 20px 30px;
    background: white;
    border-bottom: 2px solid #f0f0f0;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-icon {
    width: 30px;
    height: 30px;
    fill: #2c5aa0;
}

.stat-label {
    font-size: 0.9em;
    color: #666;
}

.stat-value {
    font-size: 1.2em;
    font-weight: bold;
    color: #2c5aa0;
}

/* ========================================
   ÉCRANS DE MISSIONS
   ======================================== */

.content {
    padding: 40px;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
    animation: fadeIn 0.5s;
}

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

.screen h2 {
    color: #2c5aa0;
    margin-bottom: 20px;
    font-size: 2em;
}

.screen h3 {
    color: #333;
    margin: 20px 0 10px 0;
    font-size: 1.3em;
}

.screen p {
    line-height: 1.1;
    color: #555;
    margin-bottom: 8px;
}

/* ========================================
   CARTES D'INFORMATION
   ======================================== */

.info-card {
    background: #f8f9fa;
    padding: 8px;
    border-left: 4px solid #2c5aa0;
    border-radius: 8px;
    margin: 8px 0;
}

.info-card.warning {
    border-left-color: #ffc107;
    background: #fff3cd;
}

.info-card.success {
    border-left-color: #28a745;
    background: #d4edda;
}

.info-card h3 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-card .icon {
    width: 24px;
    height: 24px;
}

.info-card ul {
    margin: 15px 0 0 20px;
}

.info-card li {
    margin: 8px 0;
    line-height: 1.1;
}

/* ========================================
   MESSAGE VOCAL
   ======================================== */

.voice-message {
    background: #e8f4f8;
    padding: 30px;
    border-radius: 12px;
    margin: 20px 0;
    border-left: 5px solid #2c5aa0;
}

.voice-message h4 {
    color: #2c5aa0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.voice-message .message-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #d0e7f0;
    font-style: italic;
    color: #333;
    line-height: 1.8;
}

.voice-instructions {
    margin-top: 15px;
    font-size: 0.95em;
    color: #666;
}

/* ========================================
   INTERFACE PGI
   ======================================== */

.pgi-interface {
    background: white;
    border: 2px solid #2c5aa0;
    border-radius: 10px;
    margin: 20px 0;
    overflow: hidden;
}

.pgi-header {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3a66 100%);
    color: white;
    padding: 15px 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pgi-header .icon {
    width: 24px;
    height: 24px;
    fill: white;
}

.pgi-content {
    padding: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group-full {
    grid-column: 1 / -1;
}

/* ========================================
   EMAIL
   ======================================== */

.email-container {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 10px 0;
}

.email-header {
    background: white;
    padding: 8px 8px;
    border-bottom: 1px solid #ddd;
}

.email-header-row {
    display: flex;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.email-header-label {
    font-weight: bold;
    width: 80px;
    color: #666;
}

.email-header-value {
    color: #333;
}

.email-body {
    padding: 10px;
    background: white;
    line-height: 1.1;
    white-space: pre-line;
}

/* ========================================
   PLANNING
   ======================================== */

.planning-grid {
    display: grid;
    gap: 15px;
    margin: 20px 0;
}

.time-slot {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.time-slot.available {
    background: #d4edda;
    border-color: #28a745;
}

.time-slot.available:hover {
    background: #c3e6cb;
    transform: translateX(5px);
}

.time-slot.occupied {
    background: #f8d7da;
    border-color: #dc3545;
    cursor: not-allowed;
    opacity: 0.7;
}

.time-slot.selected {
    background: #2c5aa0;
    border-color: #2c5aa0;
    color: white;
}

.time-slot .time {
    font-weight: bold;
    margin-right: 15px;
    font-size: 1.1em;
}

.time-slot .status {
    margin-left: auto;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
}

.time-slot.available .status {
    background: #28a745;
    color: white;
}

.time-slot.occupied .status {
    background: #dc3545;
    color: white;
}

/* ========================================
   TABLEAU D'ARTICLES
   ======================================== */

.order-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.order-table thead {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3a66 100%);
    color: white;
}

.order-table th {
    padding: 15px;
    text-align: left;
    font-weight: bold;
}

.order-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.order-table tbody tr:hover {
    background: #f8f9fa;
}

.order-table tfoot {
    background: #f8f9fa;
    font-weight: bold;
}

.order-table tfoot td {
    padding: 15px;
    border-top: 2px solid #2c5aa0;
}

.order-table input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* ========================================
   CLASSEMENT DE DOCUMENTS
   ======================================== */

.document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.document-card {
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: move;
    transition: all 0.3s;
}

.document-card:hover {
    border-color: #2c5aa0;
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.2);
}

.document-card .doc-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 10px;
    fill: #2c5aa0;
}

.document-card .doc-name {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.document-card .doc-type {
    font-size: 0.85em;
    color: #666;
}

.category-zone {
    background: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    min-height: 150px;
}

.category-zone h4 {
    color: #2c5aa0;
    margin-bottom: 15px;
}

.category-zone.drag-over {
    background: #e3f2fd;
    border-color: #2c5aa0;
}

/* ========================================
   QUIZ
   ======================================== */

.quiz-question {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
}

.quiz-question h3 {
    color: #2c5aa0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quiz-question .question-number {
    background: #2c5aa0;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.quiz-option {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.quiz-option:hover {
    background: #e9ecef;
    border-color: #2c5aa0;
}

.quiz-option input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.quiz-option label {
    cursor: pointer;
    flex: 1;
}

/* ========================================
   BILAN FINAL
   ======================================== */

.final-score {
    text-align: center;
    padding: 40px;
}

.score-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3a66 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    box-shadow: 0 10px 30px rgba(44, 90, 160, 0.3);
}

.score-circle .percentage {
    font-size: 3em;
    font-weight: bold;
    color: white;
}

.score-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.score-detail {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #2c5aa0;
}

.score-detail .label {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.score-detail .value {
    font-size: 1.8em;
    font-weight: bold;
    color: #2c5aa0;
}

/* ========================================
   BOUTONS
   ======================================== */

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.btn svg {
    width: 20px;
    height: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3a66 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 90, 160, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 15px;
}

.nav-buttons.center {
    justify-content: center;
}

/* ========================================
   NOTIFICATIONS
   ======================================== */

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    display: none;
    align-items: center;
    gap: 15px;
    z-index: 2000;
    max-width: 400px;
    animation: slideIn 0.3s;
}

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

.notification.show {
    display: flex;
}

.notification svg {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

.notification.success {
    border-left: 4px solid #28a745;
}

.notification.success svg {
    fill: #28a745;
}

.notification.error {
    border-left: 4px solid #dc3545;
}

.notification.error svg {
    fill: #dc3545;
}

.notification.info {
    border-left: 4px solid #2c5aa0;
}

.notification.info svg {
    fill: #2c5aa0;
}

.notification strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.notification p {
    margin: 0;
    color: #666;
    font-size: 0.95em;
}

/* ========================================
   ONGLET AUTRES TÂCHES
   ======================================== */

.task-card {
    background: white;
    border: 3px solid #2c5aa0;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(44, 90, 160, 0.15);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.task-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(44, 90, 160, 0.3);
}

.task-card-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3a66 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.3);
}

.task-card-icon svg {
    width: 50px;
    height: 50px;
    fill: white;
}

.task-card h3 {
    color: #2c5aa0;
    font-size: 1.4em;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
}

.task-card-clickable {
    background: white;
    border: 3px solid #ddd;
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.task-card-clickable:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.task-card-clickable h3 {
    color: #2c5aa0;
    font-size: 1.4em;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
}

.task-card-clickable p {
    color: #666;
    line-height: 1.7;
    text-align: center;
    margin-bottom: 20px;
}

.task-card p {
    color: #666;
    line-height: 1.7;
    text-align: center;
    margin-bottom: 20px;
}

.task-card .url-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.task-card label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.task-card input[type="url"] {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 0.95em;
    margin-bottom: 10px;
}

.task-card button {
    width: 100%;
    padding: 12px;
    background: #2c5aa0;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1em;
    transition: background 0.3s;
}

.task-card button:hover {
    background: #1e3a66;
}

/* ========================================
   IMPRESSION
   ======================================== */

@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        margin-left: 50px;
        margin-right: 50px;
    }
    
    .container {
        box-shadow: none;
    }
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8em;
    }
    
    .header p {
        font-size: 1em;
    }
    
    .content {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab {
        border-right: none;
        border-bottom: 1px solid #ddd;
    }
    
    .progress-bar {
        flex-direction: column;
        gap: 20px;
    }
    
    .progress-item::after {
        display: none;
    }
    
    .nav-buttons {
        flex-direction: column;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* ========================================
   INFORMATIONS ENTREPRISE DANS MISSIONS
   ======================================== */

.enterprise-info-mission {
    padding: 15px 30px;
    background: #fccdcd;
    border-bottom: 2px solid #e0e0e0;
    border-top: 2px solid #e0e0e0;
}

.enterprise-info-mission #enterprise-info {
    font-size: 1.1em;
    color: #333;
    line-height: 1.6;
}

.enterprise-info-mission #enterprise-info strong {
    color: #2c5aa0;
    font-weight: 600;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background: #f5f5f5;
    color: #666;
    text-align: center;
    padding: 20px;
    font-size: 0.85em;
    margin-top: 0;
}

@media print {
    .footer {
        background: #f5f5f5 !important;
        color: #666 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        page-break-inside: avoid;
    }
}
