* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    min-height: 100vh;
}

/* Ecran de connexion */
.login-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 1000;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 350px;
    width: 90%;
}

.login-box h1 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.8em;
}

.login-box p {
    color: #666;
    margin-bottom: 20px;
}

.login-box input {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1em;
    margin-bottom: 15px;
    text-align: center;
}

.login-box input:focus {
    outline: none;
    border-color: #667eea;
}

.login-box button {
    width: 100%;
    padding: 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s;
}

.login-box button:hover {
    background: #5568d3;
}

.error-message {
    color: #e74c3c;
    margin-top: 15px;
    font-size: 0.9em;
}

/* Container principal */
.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.header-bar h1 {
    color: #667eea;
    font-size: 1.8em;
}

.sync-btn {
    background: #667eea;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    transition: transform 0.3s;
}

.sync-btn:hover {
    transform: rotate(180deg);
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.sync-status {
    text-align: center;
    color: #27ae60;
    font-size: 0.85em;
    margin-bottom: 20px;
}

.sync-status.syncing {
    color: #f39c12;
}

.sync-status.error {
    color: #e74c3c;
}

/* Cartes de jour */
.day-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.day-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.day-card.today {
    border: 3px solid #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.day-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
}

.day-icon {
    font-size: 1.8em;
    margin-right: 15px;
}

.day-name {
    font-size: 1.3em;
    font-weight: bold;
    color: #667eea;
}

/* Taches */
.tasks {
    display: grid;
    gap: 10px;
}

.task {
    display: flex;
    align-items: center;
    background: white;
    padding: 12px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.task:hover {
    background: #f8f9ff;
}

.task input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: #667eea;
}

.task label {
    flex: 1;
    cursor: pointer;
    color: #333;
}

.task.completed label {
    text-decoration: line-through;
    color: #999;
}

.task-time {
    font-size: 0.85em;
    color: #999;
    margin-left: 10px;
}

/* Badges de personnes */
.person-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 0.75em;
    font-weight: bold;
    margin-right: 10px;
    flex-shrink: 0;
}

.badge-clement {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.badge-marie {
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
    color: white;
}

.badge-tous {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
}

/* Bordure coloree sur les taches selon la personne */
.task.task-clement {
    border-left: 4px solid #3498db;
}

.task.task-marie {
    border-left: 4px solid #e91e63;
}

.task.task-tous {
    border-left: 4px solid #9b59b6;
}

/* Legende */
.legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
    color: #666;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot.clement {
    background: #3498db;
}

.legend-dot.marie {
    background: #e91e63;
}

.legend-dot.tous {
    background: #9b59b6;
}

/* Progression du jour */
.progress-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    color: white;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.progress-title {
    font-weight: bold;
    font-size: 1.1em;
}

.progress-count {
    font-size: 1.3em;
    font-weight: bold;
}

.progress-bar-container {
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
    height: 12px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #00f260 0%, #0575e6 100%);
    height: 100%;
    width: 0%;
    border-radius: 10px;
    transition: width 0.5s ease-out;
}

.progress-bar.complete {
    background: linear-gradient(90deg, #f5af19 0%, #f12711 100%);
    animation: pulse-glow 1s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(245, 175, 25, 0.5); }
    50% { box-shadow: 0 0 20px rgba(245, 175, 25, 0.8); }
}

.progress-message {
    margin-top: 10px;
    font-size: 0.9em;
    text-align: center;
    min-height: 20px;
}

/* Confettis */
#confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    opacity: 0;
    animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(720deg);
    }
}

/* Sections speciales */
.daily-tasks {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
}

.daily-tasks h2 {
    color: #d97941;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.weekly-tasks {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
}

.weekly-tasks h2 {
    color: #0891b2;
    margin-bottom: 15px;
    font-size: 1.2em;
}

/* Bouton reset */
.reset-btn {
    display: block;
    width: 200px;
    margin: 20px auto 0;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s;
}

.reset-btn:hover {
    background: #5568d3;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
    }

    .header-bar h1 {
        font-size: 1.3em;
    }

    .day-name {
        font-size: 1.1em;
    }
}
