:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #e74c3c;
    --background-color: #ecf0f1;
    --text-color: #333;
    --border-color: #ddd;
    --section-bg: #fff;
    --primary-dark: #233140;
}

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

body {
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: url('realist.png') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: var(--background-color);
    border-radius: 8px;
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.contact {
    margin-top: 0.5rem;
    color: #666;
}

.customer-info {
    margin-bottom: 2rem;
    background: var(--section-bg);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-category {
    background-color: #ffffff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-category h2 {
    margin-bottom: 1.2rem;
    color: var(--primary-color);
    font-size: 1.3rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.product-group {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 8px;
    border: 1px solid #ddd;
}

.product-item label {
    flex: 1;
    margin-right: 12px;
    font-size: 0.95rem;
}

select {
    width: 70px;
    padding: 5px 25px 5px 10px;
    border: 2px solid #ccc;
    border-radius: 4px;
    background-color: white;
    font-size: 1rem;
    cursor: pointer;
    display: inline-block;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 10px;
    margin: 0;
}

select:hover {
    border-color: var(--primary-color);
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.2);
}

.seasonal {
    color: #e67e22;
    font-size: 0.9em;
    font-style: italic;
}

button {
    display: block;
    width: 100%;
    padding: 1rem;
    margin-top: 2rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

button:hover {
    opacity: 0.9;
}

.user-info {
    text-align: center;
    margin: 1rem 0;
}

.welcome-message {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

#user-name {
    font-weight: bold;
    color: var(--accent-color);
}

.logout-btn {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.logout-btn:hover {
    background-color: var(--secondary-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
}

.login-section {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

#captcha-container {
    margin: 2rem 0;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#captcha-container label {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: block;
    color: #495057;
}

.captcha-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
}

#captcha-input {
    flex: 1;
    font-size: 1.5rem;
    padding: 0.8rem;
    text-align: center;
    letter-spacing: 2px;
    font-family: monospace;
}

#captcha-text {
    font-family: 'Courier New', monospace;
    font-size: 2.5rem;
    font-weight: bold;
    background: #e9ecef;
    padding: 1rem 2rem;
    border-radius: 8px;
    user-select: none;
    color: #2c3e50;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    min-width: 150px;
    text-align: center;
    border: 2px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.login-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.login-btn, .new-user-btn {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn {
    background-color: var(--primary-color);
    color: white;
}

.login-btn:hover {
    background-color: var(--secondary-color);
}

.new-user-btn {
    background-color: var(--accent-color);
    color: white;
}

.new-user-btn:hover {
    opacity: 0.9;
}

.miel-product {
    margin-bottom: 1.5rem;
}

.miel-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.miel-options select {
    flex: 1;
    min-width: 120px;
}

@media (max-width: 480px) {
    .miel-options {
        flex-direction: column;
    }
    
    .miel-options select {
        width: 100%;
    }
}

.tomme-section, .other-dairy {
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.tomme-section h3, .other-dairy h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-align: center;
}

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

@media (max-width: 480px) {
    .tomme-products {
        grid-template-columns: 1fr;
    }
}

.header-image {
    margin: 2rem auto;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
}

.farm-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-card {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.product-card h4 {
    color: var(--primary-color);
    margin: 0.5rem 0;
    font-size: 1.2rem;
}

.product-card p {
    color: #666;
    margin: 0;
}

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

.subcategory {
    margin: 2.5rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.subcategory + .subcategory {
    margin-top: 4rem;
}

.product-category .subcategory:first-child {
    margin-bottom: 4rem;
}

.product-category .subcategory:last-child {
    margin-top: 4rem;
}

.subcategory h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    font-size: 1.3rem;
}

/* Style des liens */
a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Optimisations mobiles */
@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
    }
    
    .product-item {
        padding: 0.6rem;
    }
    
    select {
        width: 70px;
        padding: 0.6rem;
        padding-right: 25px;
    }

    .product-item label {
        font-size: 0.95rem;
    }

    /* Amélioration du touch sur mobile */
    select, button {
        touch-action: manipulation;
    }
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem;
    align-items: center;
}

.submit-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    text-align: center;
}

.submit-btn:hover {
    background-color: #45a049;
    text-decoration: none;
    color: white;
}

.logout-btn {
    background-color: #e74c3c;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    width: 100%;
    max-width: 300px;
}

.logout-btn:hover {
    background-color: #c0392b;
}

/* Styles pour le captcha */
.captcha-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 15px auto;
    background: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    width: 80%;
    max-width: 300px;
}

#captcha-text {
    font-family: 'Courier New', monospace;
    font-size: 28px;
    letter-spacing: 5px;
    font-weight: bold;
    color: #333;
    text-align: center;
    min-width: 120px;
}

.refresh-captcha {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    flex-shrink: 0;
}

.refresh-captcha:hover {
    background: #f0f0f0;
    color: #333;
}

#captcha-input {
    text-align: center;
    letter-spacing: 3px;
    font-size: 18px;
}
