/* ============================================================
   SimWork – Feuille de style responsive
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --rouge:    #8B0000;
    --orange:   #e87722;
    --gris:     #f4f4f4;
    --gris2:    #ddd;
    --texte:    #2b2b2b;
    --lien:     #8B0000;
    --radius:   8px;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    color: var(--texte);
    background: #fff;
    font-size: 16px;
    line-height: 1.6;
}

a { color: var(--lien); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── HEADER ─── */
header {
    background: var(--orange);
    color: #fff;
    padding: 18px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 4px solid var(--rouge);
}
header .logo h1 { font-size: 2rem; font-weight: 800; letter-spacing: 1px; }
header .logo p  { font-size: 1rem; opacity: .9; }
header .adresse { font-size: .85rem; text-align: right; opacity: .9; line-height: 1.4; }

/* ─── NAV ─── */
nav {
    background: var(--rouge);
}
nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}
nav ul li a, nav ul li span {
    display: block;
    padding: 14px 22px;
    color: #fff;
    font-weight: 600;
    font-size: .95rem;
    letter-spacing: .4px;
    transition: background .2s;
}
nav ul li a:hover { background: rgba(255,255,255,.15); text-decoration: none; }
nav ul li.active a, nav ul li.active span { background: rgba(0,0,0,.25); }

/* ─── LAYOUT ─── */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* ─── PAGE PRESENTATION ─── */
.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
    margin-top: 20px;
}
.intro-grid img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

/* ─── PRODUITS ─── */
.page-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--rouge);
    border-bottom: 3px solid var(--orange);
    padding-bottom: 8px;
    margin-bottom: 24px;
}

.produit-card {
    background: var(--gris);
    border: 1px solid var(--gris2);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 28px;
}
.produit-card h2 {
    font-size: 1.3rem;
    color: var(--rouge);
    margin-bottom: 8px;
}
.produit-card .sous-titre {
    font-size: .9rem;
    color: #666;
    margin-bottom: 12px;
}
.produit-card .description { margin-bottom: 14px; }

.produit-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}
.produit-photos img {
    height: 200px;
    width: auto;
    border-radius: var(--radius);
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(0,0,0,.12);
}

.prix {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a7a1a;
    margin: 8px 0;
}
.prix-gratuit { color: green; }
.prix-epuise  { color: red; }

.badge {
    display: inline-block;
    background: var(--orange);
    color: #fff;
    border-radius: 4px;
    padding: 2px 10px;
    font-size: .8rem;
    font-weight: 700;
    margin-bottom: 6px;
}

/* ─── FORMULAIRE COMMANDE ─── */
.order-form {
    background: var(--gris);
    border: 1px solid var(--gris2);
    border-radius: var(--radius);
    padding: 24px;
    margin-top: 30px;
}
.order-form h2 { color: var(--rouge); margin-bottom: 16px; font-size: 1.3rem; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 4px; }
.form-row input, .form-row select, .form-row textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gris2);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}
.form-row textarea { height: 100px; resize: vertical; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
    outline: 2px solid var(--orange);
    border-color: var(--orange);
}

/* ─── TABLEAU COMMANDE ─── */
.order-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.95rem;
}
.order-table th {
    background: var(--rouge);
    color: #fff;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
}
.order-table th:first-child { border-radius: 8px 0 0 0; }
.order-table th:last-child { border-radius: 0 8px 0 0; }
.order-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--gris2);
    vertical-align: middle;
}
.order-table tr:last-child td { border-bottom: none; }
.order-table tr:hover { background: var(--gris); }
.order-table .qty-input {
    width: 72px;
    padding: 8px 10px;
    border: 1px solid var(--gris2);
    border-radius: 6px;
    font-size: 1rem;
    text-align: center;
    font-family: inherit;
}
.order-table .qty-input:focus {
    outline: 2px solid var(--orange);
    border-color: var(--orange);
}
.order-table .prix-unite {
    font-weight: 600;
    color: var(--rouge);
    white-space: nowrap;
}
.order-table .prix-gratuit-cell {
    color: #2e7d32;
    font-weight: 600;
}
.order-table .unite-cell {
    color: #666;
    font-size: 0.85rem;
    text-align: left;
}
.order-table .prix-col {
    width: 100px;
}
.form-highlight {
    border: 2px solid var(--rouge);
    box-shadow: 0 0 0 4px rgba(195, 44, 44, 0.1);
    width: 100%;
    margin: 30px auto 0 auto;
    padding-bottom: 20px;
}
.form-highlight h2 {
    font-size: 1.5rem;
}

/* ─── SÉPARATEURS CATÉGORIES ─── */
.cat-sep td {
    background: #e0e0e0 !important;
    font-weight: bold;
    font-size: 0.8rem;
    color: #333;
    padding: 18px 12px 6px 12px !important;
    border-bottom: 1px solid #ccc !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* Lignes produits dans le formulaire */
.order-item { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.order-item label { min-width: 100px; font-weight: 500; }
.order-item input[type="number"] { width: 90px; }
.order-item .unit { color: #666; font-size: .9rem; }

.btn {
    background: var(--rouge);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}
.btn:hover { background: #6b0000; }

.info-box {
    background: #fff8e1;
    border-left: 4px solid var(--orange);
    padding: 14px 18px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin-bottom: 20px;
}

/* ─── CONTACT ─── */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}
.contact-block h2 { color: var(--rouge); font-size: 1.2rem; margin-bottom: 12px; }
.contact-block p  { margin-bottom: 8px; }

/* ─── FOOTER ─── */
footer {
    background: var(--rouge);
    color: rgba(255,255,255,.8);
    text-align: center;
    padding: 14px;
    font-size: .8rem;
    margin-top: 40px;
}

/* ─── RESPONSIVE MOBILE ─── */
@media (max-width: 1000px) {
    header { flex-direction: column; text-align: center; }
    header .adresse { text-align: center; }
    nav ul { flex-direction: column; }
    nav ul li a, nav ul li span { padding: 12px 18px; }
    .intro-grid, .contact-grid { grid-template-columns: 1fr; }
    .produit-photos img { height: 150px; }
}

/* Récapitulatif prix commande */
.recap-prix {
    margin: 20px 0;
    padding: 15px 20px;
    background: #f5f5f5;
    border-radius: 8px;
    display: inline-block;
}
.recap-total {
    border-collapse: collapse;
}
.recap-total td {
    padding: 6px 15px;
    font-size: 1.1em;
}
.recap-total .prix-val {
    text-align: right;
    font-family: monospace;
    font-weight: bold;
}
.recap-total .total-row td {
    border-top: 2px solid #333;
    padding-top: 10px;
    font-size: 1.2em;
}
.note-remise {
    margin: 8px 0 0 0;
    font-size: 0.85em;
    color: #666;
    font-style: italic;
}

/* Liste des produits commandés */
.produits-commandes {
    margin: 20px 0;
    padding: 15px 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}
.produits-commandes h3 {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    color: #333;
}
.produits-commandes ul {
    margin: 0;
    padding: 0 0 0 20px;
}
.produits-commandes li {
    margin: 4px 0;
    line-height: 1.4;
}
