/* printOrchard.css */
/* Styles pour le bordereau d'impression du verger */

@page {
    size: A4 landscape;
    margin: 15mm;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Arial', 'Helvetica', sans-serif;
    background: white;
}

/* Structure des pages */
.page {
    width: 100%;
    min-height: 100vh;
    page-break-after: always;
    display: flex;
    flex-direction: column;
    background: white;
}

.page:last-child {
    page-break-after: auto;
}

/* PAGE 1 - Carte du verger */
.page-1 {
    position: relative;
}

.page-1-header {
    text-align: center;
    padding: 25px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: 4px solid #4a90e2;
}

.page-1-header h1 {
    margin: 0;
    font-size: 36px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.page-1-header .date {
    margin-top: 12px;
    font-size: 16px;
    opacity: 0.95;
    font-weight: 300;
}

.page-1-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
    background: #fafafa;
}

.map-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.map-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border: 3px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* PAGE 2 - Informations complementaires */
.page-2 {
    position: relative;
}

.page-2-header {
    text-align: center;
    padding: 25px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: 4px solid #4a90e2;
}

.page-2-header h2 {
    margin: 0;
    font-size: 32px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.page-2-content {
    flex: 1;
    padding: 40px;
    background: #fafafa;
}

.page-2-placeholder {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #999;
    font-size: 28px;
    font-style: italic;
    border: 3px dashed #ddd;
    border-radius: 8px;
    background: white;
}

/* Styles d'impression */
@media print {
    body {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
    
    .page {
        page-break-after: always;
        margin: 0;
    }
    
    .page:last-child {
        page-break-after: auto;
    }
    
    .page-1-header,
    .page-2-header {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
    
    /* Assurer que les images sont bien imprimees */
    .map-image {
        max-width: 100%;
        height: auto;
        page-break-inside: avoid;
    }
    
    /* Eviter les sauts de page indesirables */
    .page-1-content,
    .page-2-content {
        page-break-inside: avoid;
    }
}

/* Styles pour ecran (preview) */
@media screen {
    .page {
        margin: 20px auto;
        max-width: 1200px;
        box-shadow: 0 0 20px rgba(0,0,0,0.1);
    }
}

/* Gestion du ratio 4/3 pour l'image */
.map-image-container::before {
    content: '';
    display: block;
    padding-top: 75%;
    float: left;
}

.map-image-container::after {
    content: '';
    display: table;
    clear: both;
}
