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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    color: white;
    padding: 40px 0;
}

h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

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

.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    background: white;
    border-radius: 10px;
    padding: 5px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.tab {
    padding: 15px 30px;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1.1em;
    color: #666;
    transition: all 0.3s;
    border-radius: 8px;
}

.tab.active {
    background: #667eea;
    color: white;
}

.content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

#today-view {
    text-align: center;
}

.temperature-display {
    margin: 40px 0;
}

.temp-value {
    font-size: 4em;
    font-weight: bold;
    color: #667eea;
}

.city-name {
    font-size: 1.5em;
    color: #666;
    margin-top: 10px;
}

.status {
    padding: 20px;
    border-radius: 15px;
    margin: 30px 0;
    font-size: 1.3em;
}

.status.is-coldest {
    background: #83beec;
}

.status.not-coldest {
    background: #fff;
    color: #991b1b;
}

/* Style pour le message de streak */
.streak-message {
    font-size: 1.2em;
    font-weight: bold;
    padding: 15px 25px;
    margin: 20px auto;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    color: #2d3436;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    animation: slideInUp 0.5s ease-out;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.streak-message::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

/* Message de record */
.record-message {
    font-size: 1em;
    padding: 12px 20px;
    margin: 15px auto;
    border-radius: 10px;
    background: #e5e7eb;
    color: #374151;
    text-align: center;
    display: inline-block;
    animation: fadeIn 0.5s ease-out;
}

.record-message.new-record {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #fff;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
    animation: bounceIn 0.8s ease-out;
}

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

@keyframes bounceIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive pour mobile */
@media (max-width: 480px) {
    .record-message {
        font-size: 0.9em;
        padding: 10px 15px;
        margin: 10px 5px;
    }
}

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

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.comparison {
    margin-top: 30px;
    padding: 20px;
    background: #f3f4f6;
    border-radius: 10px;
}

#calendar-view {
    display: none;
}

.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.month-selector {
    display: flex;
    align-items: center;
    gap: 20px;
}

.month-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.day-header {
    text-align: center;
    font-weight: bold;
    color: #666;
    padding: 10px;
}

.day-cell {
    aspect-ratio: 1;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
    cursor: pointer;
    transition: transform 0.2s;
}

.day-cell:hover {
    transform: scale(1.05);
}

.day-cell.empty {
    background: transparent;
}

.day-cell.coldest {
    background: #83beec;
    border: 2px solid #667eea;
    color: #fff;
}

.day-cell.not-coldest {
    background: #fff;
    border: 2px solid #f3f4f6;
}

.day-cell.no-data {
    background: #f3f4f6;
    color: #9ca3af;
}

.day-number {
    font-weight: bold;
}

.day-temp {
    font-size: 0.8em;
    margin-top: 5px;
}

.legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

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

.legend-color {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    border: 2px solid;
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.2em;
    color: #666;
}

.error {
    background: #fee2e2;
    color: #991b1b;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}
/* === ANIMATION DE CHARGEMENT PLEIN ÉCRAN === */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.loading-overlay.fade-out {
    opacity: 0;
    transform: scale(1.1);
    pointer-events: none;
}

.loading-container {
    text-align: center;
    color: white;
    padding: 40px;
}

.thermometer {
    width: 60px;
    height: 200px;
    margin: 0 auto 30px;
    position: relative;
}

.thermometer-body {
    width: 20px;
    height: 150px;
    background: rgba(255, 255, 255, 0.3);
    border: 3px solid white;
    border-radius: 10px 10px 0 0;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.thermometer-bulb {
    width: 40px;
    height: 40px;
    background: #ff4757;
    border: 3px solid white;
    border-radius: 50%;
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.mercury {
    width: 100%;
    background: linear-gradient(to bottom, #ff4757, #ff6b7a);
    position: absolute;
    bottom: 0;
    border-radius: 8px 8px 0 0;
    animation: mercuryDrop 3s ease-in-out infinite;
}

.scale {
    position: absolute;
    right: -15px;
    top: 0;
    height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: white;
    font-size: 12px;
}

.scale-mark {
    position: relative;
}

.scale-mark::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    width: 8px;
    height: 2px;
    background: white;
    transform: translateY(-50%);
}

.raindrops {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.raindrop {
    position: absolute;
    color: #4dabf7;
    font-size: 1em;
    animation: fall linear infinite;
}

.loading-text {
    font-size: 1.3em;
    margin-bottom: 15px;
    min-height: 1.5em;
    font-weight: 500;
}

.sub-text {
    font-size: 1em;
    opacity: 0.8;
    animation: pulse 2s ease-in-out infinite;
}

.result-content {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.result-content.show {
    opacity: 1;
    transform: translateY(0);
}

.hidden {
    display: none;
}

/* Animations */
@keyframes mercuryDrop {
    0% { height: 100%; }
    50% { height: 20%; }
    100% { height: 100%; }
}

@keyframes fall {
    0% { 
        transform: translateY(-100vh);
        opacity: 1;
    }
    100% { 
        transform: translateY(100vh);
        opacity: 0;
    }
}

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

/* Responsive */
@media (max-width: 480px) {
    .thermometer {
        width: 50px;
        height: 180px;
    }
    
    .thermometer-body {
        width: 18px;
        height: 130px;
    }
    
    .thermometer-bulb {
        width: 35px;
        height: 35px;
        bottom: 10px;
    }
    
    .scale {
        height: 130px;
        right: -18px;
    }
    
    .streak-message {
        font-size: 1.1em;
        padding: 12px 20px;
        margin: 15px 10px;
    }
}
/* === FAQ SECTION === */
/* === LAYOUT RESPONSIVE POUR FAQ === */

/* Layout en flex pour today-view seulement */
#today-view {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* Contenu principal à gauche */
.main-today-content {
    flex: 1;
}

/* Section FAQ à droite */
.faq-section {
    flex: 1;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    min-width: 300px;
}

/* Mobile : retour en colonne */
@media (max-width: 1024px) {
    #today-view {
        flex-direction: column;
        gap: 30px;
    }
    
    .faq-section {
        margin-top: 30px;
        padding-top: 30px;
        border-top: 2px solid #f3f4f6;
    }
}

.faq-section h2 {
    text-align: center;
    color: #334155;
    margin-bottom: 30px;
    font-size: 1.8em;
}

.faq-item {
    border: 2px solid #f3f4f6;
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.faq-question {
    padding: 20px;
    background: #f8fafc;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.1em;
    color: #334155;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: #667eea;
    color: white;
}

.faq-question.active {
    background: #667eea;
    color: white;
}

.faq-icon {
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.faq-answer {
    padding: 0 20px;
    background: white;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
}

.faq-answer.active {
    padding: 20px;
    max-height: 500px;
}

.faq-answer p {
    margin-bottom: 12px;
    line-height: 1.6;
    color: #475569;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer ul {
    margin: 12px 0;
    padding-left: 20px;
}

.faq-answer li {
    margin-bottom: 6px;
    color: #475569;
}
