/* =================================================================== */
/* ================== style.css (Base Styles) ====================== */
/* =================================================================== */

body {
    font-family: 'Inter', sans-serif;
    background-color: #f3f4f6;
    overscroll-behavior-y: none;
    -webkit-tap-highlight-color: transparent;
}

.gradient-text { 
    background: -webkit-linear-gradient(45deg, #22c55e, #15803d); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
}

.hidden { display: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.nav-btn.active { color: #16a34a; }

#main-header { padding-top: env(safe-area-inset-top); }
#mobile-bottom-nav { padding-bottom: env(safe-area-inset-bottom); }
#add-trailer-btn-mobile { bottom: calc(5rem + env(safe-area-inset-bottom)); }

@media (max-width: 1023px) {
    #app-view {
        --header-height: calc(68px + env(safe-area-inset-top));
        --footer-height: calc(64px + env(safe-area-inset-bottom));
        height: 100vh;
        display: flex;
        flex-direction: column;
    }
    #app-view main.flex-1 {
        padding-top: var(--header-height);
        padding-bottom: var(--footer-height);
        -webkit-overflow-scrolling: touch;
    }
    #app-view main header.sticky { top: 0 !important; }
}

#field-list-container:has(> .col-span-full) {
    display: flex;
    justify-content: center;
    align-items: center;
}

details > summary::-webkit-details-marker { display: none; }
details[open] .details-arrow { transform: rotate(180deg); }

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}
.animate-shake { animation: shake 0.82s cubic-bezier(.36,.07,.19,.97) both; }

.tour-recoltiq .shepherd-element{background:#fff;border-radius:.75rem;box-shadow:0 10px 15px -3px #00000012,0 4px 6px -4px #00000012;border:1px solid #f1f5f9;max-width:350px}.tour-recoltiq .shepherd-header{background-color:transparent;padding:1rem 1rem .5rem;border-bottom:none}.tour-recoltiq .shepherd-title{color:#0f172a;font-weight:600;font-size:1rem;display:flex;align-items:center;gap:.5rem}.tour-recoltiq .shepherd-cancel-icon{color:#94a3b8}.tour-recoltiq .shepherd-cancel-icon:hover{color:#1e293b}.tour-recoltiq .shepherd-text{padding:.5rem 1rem 1rem;color:#475569;font-size:.875rem;line-height:1.5}.tour-recoltiq .shepherd-footer{padding:0 1rem 1rem;display:flex;justify-content:space-between;align-items:center}.tour-recoltiq .shepherd-button{background:transparent;color:#475569;border:1px solid #cbd5e1;padding:.5rem 1rem;border-radius:.5rem;font-weight:600;transition:all .2s;box-shadow:none}.tour-recoltiq .shepherd-button:not(:disabled):hover{background:#f8fafc;border-color:#94a3b8;color:#1e293b}.tour-recoltiq .shepherd-button-primary{background:#16a34a;color:#fff;border-color:#16a34a}.tour-recoltiq .shepherd-button-primary:not(:disabled):hover{background:#15803d;border-color:#15803d}.shepherd-progress-bar{height:3px;background:#16a34a;transition:width .3s ease}

/* Animations Mobiles */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInUpBounce { 0% { opacity: 0; transform: translateY(100%); } 80% { opacity: 1; transform: translateY(-8px); } 100% { transform: translateY(0); } }
@keyframes slideInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInDown { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: translateY(0); } }
@keyframes iconBounce { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.3); } }
@keyframes pop { 0% { transform: scale(1); } 50% { transform: scale(0.95); } 100% { transform: scale(1); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7); } 70% { box-shadow: 0 0 0 15px rgba(22, 163, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); } }

#main-header.lg\:hidden { animation: slideInDown 0.5s ease-out; }
#mobile-bottom-nav { animation: slideInUp 0.5s ease-out; }
#modal-content { animation: slideInUpBounce 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) forwards; }
.page-content-mobile-full, #page-field-details, #page-crop-exports { animation: fadeIn 0.4s ease-in-out; }
#field-list-container > div:not(.col-span-full), #shared-field-list-container > div, #my-shares-list-container > div, #storage-summary-container > div, #trailers-list > div { animation: slideInUp 0.5s ease-out forwards; opacity: 0; }
#field-list-container > div:nth-child(1), #trailers-list > div:nth-child(1) { animation-delay: 0.05s; }
#field-list-container > div:nth-child(2), #trailers-list > div:nth-child(2) { animation-delay: 0.1s; }
#field-list-container > div:nth-child(3), #trailers-list > div:nth-child(3) { animation-delay: 0.15s; }
#mobile-bottom-nav .nav-btn.active i { animation: iconBounce 0.4s ease-in-out; }
button:active, .nav-btn:active { animation: pop 0.2s ease-in-out; }
#add-trailer-btn-mobile { animation: pulse 2.5s infinite cubic-bezier(0.66, 0, 0, 1); }
.filter-btn { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
input:focus, select:focus { transition: border-color 0.3s ease, box-shadow 0.3s ease; box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2); }

@media (max-width: 1023px) {
    .field-card-content:active, .crop-storage-card:active, #trailers-list > div:active { transform: scale(0.97); transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1); }
    #modal-container { align-items: flex-end; padding: 0; }
    #modal-content { width: 100%; border-bottom-left-radius: 0; border-bottom-right-radius: 0; margin-top: 0; padding-bottom: 3rem; }
}

/* Toggle Switch */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; background-color: #cbd5e1; border-radius: 9999px; transition: background-color 0.2s; cursor: pointer; -webkit-appearance: none; appearance: none; flex-shrink: 0; }
.toggle-switch::before { content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%; background-color: white; top: 2px; left: 2px; transition: transform 0.2s; box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.toggle-switch:checked { background-color: #16a34a; }
.toggle-switch:checked::before { transform: translateX(20px); }

/* Nouveaux styles pour la page "Mes Parcelles" */
.primary-action-btn { background-color: #16a34a; color: white; padding: 0.5rem 0.75rem; border-radius: 0.5rem; font-weight: 600; transition: background-color 0.2s; display: flex; align-items: center; gap: 0.5rem; box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); }
.primary-action-btn:hover { background-color: #15803d; }
.secondary-action-btn { background-color: #f1f5f9; color: #475569; padding: 0.5rem 0.75rem; border-radius: 0.5rem; font-weight: 600; transition: background-color 0.2s, color 0.2s; display: flex; align-items: center; gap: 0.5rem; border: 1px solid #e2e8f0; }
.secondary-action-btn:hover { background-color: #e2e8f0; color: #1e293b; }

/* Styles pour les champs de date/heure personnalisés (iOS) */
.custom-input-wrapper { display: flex; justify-content: space-between; align-items: center; background-color: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 0.5rem; padding: 0.75rem; position: relative; cursor: pointer; }
.custom-input-display { font-weight: 500; color: #1e293b; }
.custom-native-input { background: transparent; border: none; color: #94a3b8; text-align: right; font-size: 1rem; font-weight: 500; outline: none; -webkit-appearance: none; -moz-appearance: none; appearance: none; }
.custom-native-input::-webkit-calendar-picker-indicator { display: none; -webkit-appearance: none; }

/* =================================================================== */
/* NOUVEAUX STYLES POUR LA REFONTE DE LA PAGE "MES HEURES"             */
/* =================================================================== */

.hours-page-header { background-color: #f8fafc; /* slate-50 */ border-bottom: 1px solid #e2e8f0; /* slate-200 */ }
.action-btn-group { display: flex; gap: 0.5rem; }
.action-btn { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; font-weight: 600; padding: 0.5rem 0.75rem; border-radius: 0.5rem; transition: background-color 0.2s; }
.action-btn.share { background-color: #eff6ff; color: #2563eb; } /* blue */
.action-btn.export { background-color: #fee2e2; color: #dc2626; } /* red */
.action-btn.add { background-color: #14b8a6; color: white; } /* teal */

.period-selector { background-color: #f1f5f9; /* slate-100 */ border-radius: 9999px; padding: 0.25rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem; }
.period-selector button { padding: 0.5rem; border-radius: 9999px; font-weight: 600; color: #475569; transition: all 0.2s; }
.period-selector button.active { background-color: white; color: #0f172a; box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }

.date-navigator { background-color: white; border-radius: 0.75rem; padding: 1rem; box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); border: 1px solid #e2e8f0; }

.hours-entry-card {
    background-color: white;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.date-badge {
    flex-shrink: 0;
    width: 3.5rem;
    text-align: center;
    border-right: 1px solid #f1f5f9;
    padding-right: 1rem;
}
.date-badge .day-number { font-weight: 800; font-size: 1.5rem; color: #0d9488; } /* teal-600 */
.date-badge .day-name { font-size: 0.875rem; color: #64748b; }
.entry-periods { flex-grow: 1; font-weight: 600; color: #1e293b; }
.entry-description { font-size: 0.875rem; color: #64748b; margin-top: 0.25rem; }
.entry-duration { font-weight: 800; font-size: 1.25rem; color: #0d9488; }
.entry-controls { display: flex; flex-direction: column; gap: 0.25rem; }
.entry-controls button { color: #94a3b8; padding: 0.25rem; border-radius: 9999px; }
.entry-controls button:hover { background-color: #f1f5f9; color: #1e293b; }

.report-summary-card {
    background-color: white;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}
.report-summary-card:hover {
    border-color: #93c5fd; /* blue-300 */
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}