/* Styles Mobile-First pour Days ops et SC */

/* Variables CSS */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --light-bg: #ecf0f1;
    --white: #ffffff;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --border-color: #bdc3c7;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --border-radius: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-dark);
    min-height: 100vh;
    line-height: 1.6;
}

body.participant-dashboard {
    background: #1a5dad;
}

/* Container principal */
.container {
    max-width: 414px;
    margin: 0 auto;
    padding: 0 16px;
    min-height: 100vh;
}

/* Page de connexion */
.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
    color: var(--white);
}

.logo {
    font-size: 60px;
    margin-bottom: 20px;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 16px;
    opacity: 0.9;
}

.login-form {
    background: var(--white);
    padding: 30px 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 350px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.input-group input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-primary:disabled {
    background: var(--border-color);
    cursor: not-allowed;
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    color: var(--white);
}

.login-footer p {
    font-size: 14px;
    margin-bottom: 10px;
    opacity: 0.8;
}

.help {
    font-size: 12px !important;
    opacity: 0.6 !important;
}

/* Messages d'erreur et succès */
.error-message, .success-message {
    padding: 12px;
    border-radius: var(--border-radius);
    margin-top: 15px;
    font-size: 14px;
}

.error-message {
    background: #ffeaea;
    color: var(--accent-color);
    border: 1px solid #f8d7da;
}

.success-message {
    background: #d4edda;
    color: var(--success-color);
    border: 1px solid #c3e6cb;
}

/* Dashboard participant */
.header {
    background: var(--primary-color);
    color: var(--white);
    padding: 20px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.user-info h2 {
    font-size: 18px;
    margin-bottom: 4px;
}

.user-info p {
    font-size: 14px;
    opacity: 0.8;
}

.logout-btn {
    background: none;
    border: none;
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    opacity: 0.8;
}

.logout-btn:hover {
    opacity: 1;
}

.main-content {
    background: var(--white);
    flex: 1;
    padding-bottom: 80px;
}

/* Sections */
.section {
    padding: 20px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: var(--secondary-color);
}

/* Cartes */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    overflow: hidden;
}

.card-header {
    padding: 16px;
    background: var(--light-bg);
    border-bottom: 1px solid var(--border-color);
}

.card-content {
    padding: 16px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.card-subtitle {
    font-size: 14px;
    color: var(--text-light);
}

/* Programme / Agenda */
.agenda-item {
    padding: 16px;
    border-left: 4px solid var(--secondary-color);
    margin-bottom: 12px;
    background: #f8f9fc;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.agenda-time {
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 4px;
}

.agenda-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.agenda-details {
    font-size: 14px;
    color: var(--text-light);
}

/* Groupes */
.group-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 12px;
}

.group-color {
    width: 8px;
    height: 40px;
    border-radius: 4px;
    flex-shrink: 0;
}

.group-info {
    flex: 1;
}

.group-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.activity-name {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 2px;
}

.activity-time {
    font-size: 12px;
    color: var(--secondary-color);
    font-weight: 500;
}

/* Hébergement */
.accommodation-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 16px;
}

.mobile-home-number {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.accommodation-info {
    margin-bottom: 16px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.roommates {
    background: rgba(255, 255, 255, 0.2);
    padding: 12px;
    border-radius: var(--border-radius);
    margin-top: 12px;
}

.roommates-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.roommates-list {
    font-size: 14px;
}

/* Participants */
.participants-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.participant-item {
    background: #f8f9fc;
    border: 1px solid #eef1f6;
    border-radius: var(--border-radius);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.participant-name {
    font-size: 15px;
    font-weight: 600;
}

.participant-detail {
    font-size: 13px;
    color: var(--text-light);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.participant-detail i {
    color: var(--secondary-color);
}

.participant-divider {
    color: var(--border-color);
    font-size: 12px;
}

.participants-empty {
    padding: 16px;
    text-align: center;
    color: var(--text-light);
    background: #f9fafb;
    border-radius: var(--border-radius);
    font-size: 14px;
}

/* Navigation bottom */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--border-color);
    display: flex;
    max-width: 414px;
    margin: 0 auto;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.nav-item {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    text-decoration: none;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.nav-item.active {
    color: var(--secondary-color);
}

.nav-item i {
    display: block;
    font-size: 20px;
    margin-bottom: 4px;
}

.nav-item span {
    font-size: 12px;
}

/* Spinner */
.spinner {
    animation: spin 1s linear infinite;
}

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

/* Stati */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-confirme {
    background: #d4edda;
    color: var(--success-color);
}

.status-en-attente {
    background: #fff3cd;
    color: var(--warning-color);
}

/* Media Queries pour tablettes */
@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
    
    .login-container {
        padding: 40px;
    }
    
    .login-form {
        max-width: 400px;
    }
    
    .main-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .section {
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
    }
    
    .bottom-nav {
        max-width: 768px;
    }
}