*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif; background: #f5f5f5; color: #333; line-height: 1.5; }

nav { background: #2c3e50; color: white; padding: 0.75rem 1rem; display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
nav h1 { font-size: 1.1rem; font-weight: 600; }
nav a { color: #ecf0f1; text-decoration: none; font-size: 0.9rem; padding: 0.25rem 0; }
nav a:hover { text-decoration: underline; }

main { max-width: 960px; margin: 1.5rem auto; padding: 0 1rem; }

h2 { font-size: 1.3rem; margin-bottom: 0.25rem; }
h3 { font-size: 1.05rem; margin: 1.5rem 0 0.75rem; color: #2c3e50; }
h3 small { font-weight: normal; color: #888; }
.meta { color: #666; font-size: 0.85rem; margin-bottom: 1rem; }

.full-width { width: 100%; padding: 0.6rem; border: 1px solid #ccc; border-radius: 6px; font-size: 0.95rem; margin-bottom: 0.75rem; }
textarea.full-width { font-family: inherit; resize: vertical; }
.editor { margin-bottom: 0.75rem; }
.editor .ql-editor { min-height: 200px; font-size: 0.95rem; }

/* Info produit */
.info-card { background: white; border: 1px solid #e0e0e0; border-radius: 8px; padding: 0.75rem 1rem; margin-bottom: 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.info-row { display: flex; align-items: baseline; gap: 0.4rem; }
.info-label { font-size: 0.75rem; font-weight: 600; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }
.prix { color: #27ae60; font-weight: 600; font-size: 1.05rem; }

/* Images */
.images { margin: 0.75rem 0; }
.img-card { position: relative; display: inline-block; max-width: 100%; }
.img-card img { max-width: 100%; max-height: 300px; border-radius: 8px; border: 1px solid #ddd; display: block; }
.img-del { position: absolute; top: -8px; right: -8px; background: #e74c3c; color: white; width: 24px; height: 24px; border-radius: 50%; text-align: center; line-height: 24px; font-size: 14px; font-weight: bold; text-decoration: none; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.img-del:hover { background: #c0392b; }

.upload-box { background: #f0f4f8; border: 2px dashed #b0c4de; border-radius: 8px; padding: 1rem; margin: 0.75rem 0; }
.upload-box form { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.upload-box input[type=file] { font-size: 0.9rem; flex: 1; min-width: 150px; }

/* Clients */
.client-list { background: white; border: 1px solid #ddd; border-radius: 8px; padding: 0.75rem; margin-bottom: 1rem; max-height: 300px; overflow-y: auto; }
.select-all { display: block; margin-bottom: 0.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid #eee; font-weight: 600; cursor: pointer; font-size: 0.9rem; }
.client-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0; cursor: pointer; }
.client-item span { flex-shrink: 0; font-size: 0.9rem; }
.client-item small { color: #888; font-size: 0.8rem; }

/* Buttons */
.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1rem 0; }
.btn { display: inline-block; padding: 0.6rem 1.2rem; border: none; border-radius: 6px; font-size: 0.9rem; font-weight: 500; cursor: pointer; background: #95a5a6; color: white; text-decoration: none; transition: opacity 0.15s; }
.btn:hover { opacity: 0.85; }
.btn-valid { background: #27ae60; color: white; }
.btn-reject { background: #e74c3c; color: white; }
.btn-send { background: #2980b9; color: white; }
.btn-danger { background: #c0392b; color: white; }
.btn-upload { background: #8e44ad; color: white; border: none; border-radius: 6px; padding: 0.5rem 1rem; font-size: 0.9rem; cursor: pointer; transition: opacity 0.15s; }
.btn-upload:hover { opacity: 0.85; }

/* Tables */
table { width: 100%; border-collapse: collapse; background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
th, td { padding: 0.6rem 0.75rem; text-align: left; border-bottom: 1px solid #eee; font-size: 0.9rem; }
th { background: #34495e; color: white; font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
tr:hover { background: #f8f9fa; }
tr:last-child td { border-bottom: none; }
.statut-en_attente td:first-child { border-left: 4px solid #f39c12; }
.statut-validee td:first-child { border-left: 4px solid #27ae60; }
.statut-rejetee td:first-child { border-left: 4px solid #e74c3c; }
.statut-envoyee td:first-child { border-left: 4px solid #2980b9; }

.flash { background: #dff0d8; border: 1px solid #d6e9c6; color: #3c763d; padding: 0.75rem 1rem; margin-bottom: 1rem; border-radius: 8px; font-size: 0.9rem; }
.empty { color: #999; font-size: 0.9rem; }

/* Product tabs */
.prod-tabs { display: flex; gap: 0.4rem; margin-bottom: 1rem; flex-wrap: wrap; }
.prod-tab { padding: 0.5rem 1rem; border: 2px solid #ddd; border-radius: 8px; background: white; color: #333; font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: all 0.15s; }
.prod-tab:hover { border-color: #2980b9; }
.prod-tab.active { border-color: #2980b9; background: #2980b9; color: white; }
.preview { border: 1px solid #ddd; padding: 1rem; background: white; border-radius: 8px; margin: 0.75rem 0; }

.login-page main { max-width: 400px; margin: 4rem auto; background: white; padding: 2rem; border-radius: 12px; box-shadow: 0 2px 15px rgba(0,0,0,0.08); }
.login-page form { display: flex; flex-direction: column; }
.login-page h2 { margin-bottom: 1.5rem; text-align: center; }
.login-page input { padding: 0.6rem; border: 1px solid #ccc; border-radius: 8px; margin-bottom: 1rem; font-size: 1rem; }
.login-page button { padding: 0.7rem; border: none; border-radius: 8px; background: #2c3e50; color: white; font-size: 1rem; cursor: pointer; font-weight: 500; }
.login-page button:hover { background: #1a252f; }

.add-client { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.add-client input { padding: 0.5rem; border: 1px solid #ccc; border-radius: 6px; font-size: 0.9rem; flex: 1; min-width: 120px; }
.add-client button { padding: 0.5rem 1rem; border: none; border-radius: 6px; background: #27ae60; color: white; font-size: 0.9rem; cursor: pointer; }
.back-link { display: inline-block; margin-top: 1rem; color: #2980b9; font-size: 0.9rem; }

@media (max-width: 768px) {
    nav { gap: 0.75rem; }
    nav h1 { width: 100%; }
    .actions { flex-direction: column; }
    .actions .btn { width: 100%; text-align: center; }
    .add-client { flex-direction: column; }
    .add-client input { min-width: auto; }
    .upload-box form { flex-direction: column; }
    .upload-box input[type=file] { width: 100%; }
    .info-card { flex-direction: column; gap: 0.3rem; }
    .prod-tabs { flex-direction: column; }
    .prod-tab { width: 100%; text-align: center; }
    table { font-size: 0.8rem; }
    th, td { padding: 0.4rem 0.5rem; }
    .client-item { flex-wrap: wrap; }
    .client-item small { width: 100%; }
}

@media (max-width: 480px) {
    main { margin: 1rem auto; padding: 0 0.75rem; }
    h2 { font-size: 1.1rem; }
    .img-card img { max-height: 200px; }
}