/* Fishing Logger Frontend Styles - Version Violet */
.fishing-log-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.fishing-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
    flex-wrap: wrap;
    gap: 15px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.welcome-user {
    color: #666;
    font-weight: 500;
    font-size: 1.1em;
}

/* Auth Required Styles */
.fishing-logger-auth-required {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.auth-message {
    text-align: center;
    margin-bottom: 40px;
}

.auth-message h3 {
    color: #8B5FBF;
    margin-bottom: 10px;
    font-size: 1.8em;
}

.auth-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.auth-option {
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

/* Login & Register Forms */
.fishing-logger-login-form,
.fishing-logger-register-form {
    max-width: 400px;
    margin: 20px auto 0;
}

/* Buttons */
.add-catch-btn, .back-btn {
    background: #8B5FBF;
    color: white;
    border: none;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
    font-weight: 500;
}

.add-catch-btn:hover, .back-btn:hover {
    background: #6B46C1;
}

.logout-btn {
    background: #6c757d;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
    font-weight: 500;
}

.logout-btn:hover {
    background: #5a6268;
}

/* Messages */
.fishing-logger-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.fishing-logger-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.fishing-logger-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.fishing-logger-message.info {
    background: #e9d8fd;
    color: #553C9A;
    border: 1px solid #d6bcfa;
}

/* Statistics Grid */
.fishing-statistics {
    margin-bottom: 40px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid #8B5FBF;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card h3 {
    font-size: 2.5em;
    margin: 0 0 10px 0;
    color: #8B5FBF;
}

/* NOUVEAU : Bouton Ajouter après les statistiques */
.add-catch-middle {
    margin: 30px 0 40px 0;
    text-align: center;
}

.add-catch-middle .add-catch-btn {
    background: #8B5FBF;
    color: white;
    border: none;
    padding: 16px 40px;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 700;
    font-size: 1.3em;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(139, 95, 191, 0.3);
}

.add-catch-middle .add-catch-btn:hover {
    background: #6B46C1;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 95, 191, 0.4);
}

/* Styles pour la photo de mesure */
.measure-photo-info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 15px;
    margin: 10px 0;
}

.measure-notice {
    color: #856404;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.measure-notice strong {
    color: #856404;
}

.measure-requirements {
    margin: 0;
    padding-left: 20px;
    color: #856404;
    font-size: 0.9em;
}

.measure-requirements li {
    margin-bottom: 4px;
}

.required {
    color: #dc3545;
}

/* Aperçu des photos */
.photo-preview {
    max-width: 200px;
    max-height: 200px;
    margin: 10px 0;
    border-radius: 4px;
    display: none;
    border: 2px solid #8B5FBF;
}

/* FORMULAIRES - STYLES COMPLETS */
.fishing-logger-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section h3 {
    color: #8B5FBF;
    margin-bottom: 20px;
    font-size: 1.3em;
    border-bottom: 2px solid #8B5FBF;
    padding-bottom: 8px;
}

.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="password"],
.form-row input[type="number"],
.form-row input[type="date"],
.form-row input[type="time"],
.form-row input[type="file"],
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-row input[type="text"]:focus,
.form-row input[type="email"]:focus,
.form-row input[type="password"]:focus,
.form-row input[type="number"]:focus,
.form-row input[type="date"]:focus,
.form-row input[type="time"]:focus,
.form-row select:focus,
.form-row textarea:focus {
    border-color: #8B5FBF;
    outline: none;
}

.form-row textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row.double {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-col {
    display: flex;
    flex-direction: column;
}

.form-actions {
    margin-top: 30px;
    text-align: center;
}

.button {
    display: inline-block;
    padding: 12px 24px;
    background: #8B5FBF;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.button.primary {
    background: #8B5FBF;
}

.button.primary:hover {
    background: #6B46C1;
    transform: translateY(-2px);
}

.button.secondary {
    background: #6c757d;
}

.button.secondary:hover {
    background: #5a6268;
}

.button.full-width {
    width: 100%;
    display: block;
}

/* Styles spécifiques pour le formulaire d'ajout de prise */
.add-catch-form {
    max-width: 800px;
    margin: 0 auto;
}

/* Catches Grid - VERSION DESKTOP (50/50 côte à côte) */
.catches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 25px;
}

.catch-card {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    min-height: 180px;
}

.catch-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(139, 95, 191, 0.1);
}

.catch-content {
    display: flex;
    width: 100%;
    height: 100%;
}

/* PHOTO - 50% de la largeur, hauteur égale à la carte */
.catch-photo {
    width: 50%;
    flex-shrink: 0;
    overflow: hidden;
    background: #f8f9fa;
}

.catch-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.catch-photo.no-photo {
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.9em;
    text-align: center;
    padding: 20px;
}

/* INFO - 50% de la largeur */
.catch-info {
    width: 50%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.catch-main-info h3 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 1.4em;
    font-weight: 600;
}

.catch-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.meta-item {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 3px solid #8B5FBF;
}

.meta-item .label {
    font-weight: 600;
    color: #555;
    min-width: 70px;
}

.meta-item .value {
    color: #333;
    font-weight: 500;
    flex: 1;
}

.catch-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.view-catch-btn {
    background: #8B5FBF;
    color: white;
    border: none;
    padding: 10px 16px;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.95em;
    flex: 1;
    text-align: center;
    font-weight: 500;
}

.view-catch-btn:hover {
    background: #6B46C1;
    color: white;
}

.delete-catch-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95em;
    flex: 1;
    text-align: center;
    font-weight: 500;
}

.delete-catch-btn:hover {
    background: #c82333;
    color: white;
}

/* Détails d'une prise */
.catch-details {
    max-width: 1000px;
    margin: 0 auto;
}

.catch-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.catch-details-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.catch-details-photo {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.catch-details-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.catch-details-photo.no-photo {
    color: #666;
    font-size: 1.1em;
}

.details-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-item strong {
    color: #333;
    font-weight: 600;
}

.detail-item span {
    color: #666;
}

.catch-notes {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #8B5FBF;
}

.catch-notes h4 {
    margin: 0 0 10px 0;
    color: #333;
}

/* Header mobile */
.mobile-header {
    display: none;
    background: #8B5FBF;
    color: white;
    padding: 15px;
    margin: -20px -20px 20px -20px;
}

.mobile-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-welcome {
    font-weight: 600;
    font-size: 1.1em;
}

.mobile-logout {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

/* CACHER LES ÉLÉMENTS MOBILE SUR DESKTOP */
.catch-row-1,
.catch-row-2 {
    display: none;
}

/* BREAKPOINTS MOBILES - UNIQUEMENT POUR LES PETITS ÉCRANS */
@media (max-width: 768px) {
    .fishing-log-container {
        padding: 15px;
    }
    
    /* Cacher l'en-tête desktop, afficher mobile */
    .fishing-log-header {
        display: none;
    }
    
    .mobile-header {
        display: block;
    }
    
    .auth-options {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    /* Formulaire responsive */
    .fishing-logger-form {
        padding: 20px;
    }
    
    .form-row.double {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .form-section {
        margin-bottom: 25px;
        padding-bottom: 15px;
    }
    
    .catch-details-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .catch-details-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    /* CACHER LE LAYOUT DESKTOP SUR MOBILE */
    .catch-content {
        display: none;
    }
    
    /* AFFICHER LE LAYOUT MOBILE */
    .catch-row-1,
    .catch-row-2 {
        display: flex;
    }
    
    /* SUR TOUS LES MOBILES, APPLIQUER LE TABLEAU 2x2 */
    .catches-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .catch-card {
        flex-direction: column;
        min-height: auto;
        display: flex;
        flex-direction: column;
    }
    
    /* STRUCTURE MOBILE SIMPLE ET FIABLE */
    .catch-row-1 {
        display: flex;
        width: 100%;
        min-height: 140px;
    }
    
    /* PREMIÈRE LIGNE : Photo (50%) et Info (50%) */
    .catch-photo {
        width: 50% !important;
        height: 140px;
        flex-shrink: 0;
    }
    
    .catch-photo.no-photo {
        padding: 20px;
        font-size: 0.85em;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .catch-info {
        width: 50% !important;
        padding: 15px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        background: white;
    }
    
    .catch-main-info h3 {
        font-size: 1.2em;
        margin-bottom: 10px;
        color: #333;
    }
    
    .catch-meta {
        margin-bottom: 0;
        gap: 6px;
    }
    
    .meta-item {
        font-size: 0.85em;
        padding: 5px 10px;
        gap: 8px;
        border-left: 3px solid #8B5FBF;
        background: #f8f9fa;
    }
    
    .meta-item .label {
        min-width: 50px;
        font-size: 0.9em;
        font-weight: 600;
        color: #555;
    }
    
    .meta-item .value {
        color: #333;
        font-weight: 500;
    }
    
    /* DEUXIÈME LIGNE : Actions (100% largeur) */
    .catch-row-2 {
        width: 100%;
        background: #f8f9fa;
        border-top: 1px solid #e5e5e5;
    }
    
    .catch-actions {
        display: flex;
        gap: 10px;
        padding: 15px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .view-catch-btn,
    .delete-catch-btn {
        padding: 10px 15px;
        font-size: 0.9em;
        flex: 1;
        text-align: center;
        border: none;
        border-radius: 6px;
        font-weight: 500;
        text-decoration: none;
        cursor: pointer;
    }
    
    .view-catch-btn {
        background: #8B5FBF;
        color: white;
    }
    
    .view-catch-btn:hover {
        background: #6B46C1;
    }
    
    .delete-catch-btn {
        background: #dc3545;
        color: white;
    }
    
    .delete-catch-btn:hover {
        background: #c82333;
    }
}

/* Pour les iPhones et petits mobiles */
@media (max-width: 428px) {
    .catch-row-1 {
        min-height: 130px;
    }
    
    .catch-photo {
        height: 130px;
    }
    
    .catch-info {
        padding: 12px;
    }
    
    .catch-main-info h3 {
        font-size: 1.1em;
    }
    
    .meta-item {
        font-size: 0.8em;
        padding: 4px 8px;
    }
    
    .meta-item .label {
        min-width: 45px;
    }
    
    .catch-actions {
        padding: 12px;
        gap: 8px;
    }
    
    .view-catch-btn,
    .delete-catch-btn {
        padding: 8px 12px;
        font-size: 0.85em;
    }
}

@media (max-width: 390px) {
    .catch-row-1 {
        min-height: 120px;
    }
    
    .catch-photo {
        height: 120px;
    }
    
    .catch-info {
        padding: 10px;
    }
    
    .catch-main-info h3 {
        font-size: 1.05em;
    }
    
    .meta-item {
        font-size: 0.75em;
        padding: 3px 6px;
    }
    
    .meta-item .label {
        min-width: 40px;
    }
    
    .catch-actions {
        padding: 10px;
        gap: 6px;
    }
    
    .view-catch-btn,
    .delete-catch-btn {
        padding: 7px 10px;
        font-size: 0.8em;
    }
}

@media (max-width: 375px) {
    .catch-row-1 {
        min-height: 110px;
    }
    
    .catch-photo {
        height: 110px;
    }
    
    .catch-info {
        padding: 8px;
    }
    
    .catch-main-info h3 {
        font-size: 1em;
    }
    
    .meta-item {
        font-size: 0.7em;
        padding: 2px 5px;
    }
    
    .meta-item .label {
        min-width: 35px;
    }
    
    .catch-actions {
        padding: 8px;
        gap: 5px;
    }
    
    .view-catch-btn,
    .delete-catch-btn {
        padding: 6px 8px;
        font-size: 0.75em;
    }
}

/* Pour forcer le rechargement du cache CSS */
.fishing-logger-css {
    version: 1.5.6;
}