/**
 * REFACTOR_css_detail.css
 * Styles séparés pour la page de détail des relevés
 * Fichier : assets/css/detail-releve.css
 */

/* === CONTENEUR PRINCIPAL === */
.igloups-detail-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* === EN-TÊTE === */
.detail-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px 20px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border-radius: 15px;
}

.detail-header h1 {
    margin: 0 0 10px 0;
    font-size: 2.5em;
    font-weight: bold;
}

.detail-header p {
    margin: 0;
    font-size: 1.1em;
    opacity: 0.9;
}

/* === NAVIGATION === */
.detail-nav {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
}

.btn-back, .btn-all {
    padding: 10px 20px;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-back {
    background: #6c757d;
}

.btn-all {
    background: #17a2b8;
}

.btn-back:hover, .btn-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-decoration: none;
    color: white;
}

/* === SECTIONS === */
.detail-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid #4a90e2;
    animation: fadeInUp 0.6s ease-out forwards;
}

.detail-section h2 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 1.4em;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 10px;
}

.detail-section:nth-child(2) { animation-delay: 0.1s; }
.detail-section:nth-child(3) { animation-delay: 0.2s; }
.detail-section:nth-child(4) { animation-delay: 0.3s; }
.detail-section:nth-child(5) { animation-delay: 0.4s; }

/* === TEMPÉRATURES === */
.temp-cards {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.temp-card {
    flex: 1;
    min-width: 200px;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.temp-card.air {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
}

.temp-card.water {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.temp-label {
    font-size: 0.9em;
    margin-bottom: 10px;
    opacity: 0.9;
    font-weight: 600;
}

.temp-value {
    font-size: 2.5em;
    font-weight: bold;
    margin: 0;
}

/* === LOCALISATION === */
.location-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    align-items: start;
}

.location-info .location-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.location-icon {
    width: 25px;
    text-align: center;
    margin-right: 10px;
}

.location-label {
    font-weight: 600;
    min-width: 80px;
    color: #495057;
}

.location-value {
    color: #2c3e50;
    font-weight: 500;
}

/* === CARTE === */
#detail-map {
    height: 300px;
    width: 100%;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* === ÉTENDUE D'EAU === */
.water-info .water-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.water-icon {
    width: 25px;
    text-align: center;
    margin-right: 10px;
}

.water-label {
    font-weight: 600;
    min-width: 80px;
    color: #495057;
}

.water-value {
    color: #2c3e50;
    font-weight: 500;
}

/* === COMMENTAIRE === */
.comment-content {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #17a2b8;
    font-size: 1.1em;
    line-height: 1.6;
    color: #495057;
}

.comment-section {
    margin-bottom: 2em;
}

/* === PHOTO === */
.photo-section .photo-container {
    text-align: center;
}

.releve-photo {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.releve-photo:hover {
    transform: scale(1.02);
}

/* === MODAL PHOTO === */
.photo-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    cursor: pointer;
}

.photo-modal-content {
    position: relative;
    margin: 15px auto;
    display: block;
    width: 90%;
    max-width: 1000px;
    text-align: center;
    top: 50%;
    transform: translateY(-50%);
}

.photo-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
}

.photo-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

.photo-modal-close:hover {
    opacity: 0.7;
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .igloups-detail-container {
        padding: 15px;
    }
    
    .detail-header h1 {
        font-size: 2em;
    }
    
    .temp-cards {
        flex-direction: column;
    }
    
    .location-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-nav {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-back, .btn-all {
        width: 200px;
        text-align: center;
    }
    
    .temp-card {
        min-width: auto;
    }
    
    #detail-map {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .detail-header {
        padding: 20px 15px;
    }
    
    .detail-header h1 {
        font-size: 1.8em;
    }
    
    .detail-section {
        padding: 15px;
    }
    
    .temp-value {
        font-size: 2em;
    }
    
    .location-item, .water-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3em;
    }
    
    .location-icon, .water-icon {
        width: auto;
        margin-right: 0.5em;
    }
}