* { box-sizing: border-box; }
body { margin: 0; font-family: 'Calibri', 'Segoe UI', sans-serif; background: linear-gradient(135deg, #fce4ec 0%, #ffffff 60%); color: #212121; min-height: 100vh; display: flex; flex-direction: column; }

/* Header */
header { background: linear-gradient(135deg, #D81B60 0%, #E91E63 100%); color: #fff; padding: 16px 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.logo { display: flex; align-items: center; gap: 12px; }
.badge { width: 44px; height: 44px; border-radius: 50%; background: #fff; color: #D81B60; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.logo h1 { margin: 0; font-size: 20px; letter-spacing: 1px; }
.logo p { margin: 0; font-size: 12px; opacity: 0.9; }
nav { display: flex; gap: 16px; }
.nav-link { color: #fff; text-decoration: none; padding: 8px 14px; border-radius: 20px; font-size: 14px; }
.nav-link:hover { background: rgba(255,255,255,0.2); }
.nav-admin { background: rgba(255,255,255,0.15); }

/* Main */
main { flex: 1; max-width: 1100px; margin: 24px auto; width: 100%; padding: 0 16px; }
.loader { text-align: center; padding: 60px; color: #999; }

/* Cards */
.card { background: #fff; border-radius: 12px; padding: 32px; box-shadow: 0 4px 24px rgba(216, 27, 96, 0.08); margin-bottom: 24px; }
.card h2 { color: #D81B60; margin-top: 0; }
.card p { line-height: 1.6; }
.card.error { border-left: 4px solid #C81010; }
.card.success { border-left: 4px solid #2E7D32; }

/* Form */
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-weight: bold; color: #4A148C; margin-bottom: 6px; font-size: 14px; }
.form-row .help { font-size: 12px; color: #777; margin-bottom: 6px; }
.form-row input, .form-row textarea { width: 100%; padding: 10px 12px; border: 1px solid #E0E0E0; border-radius: 6px; font-family: inherit; font-size: 14px; }
.form-row input:focus, .form-row textarea:focus { outline: none; border-color: #D81B60; box-shadow: 0 0 0 3px rgba(216,27,96,0.1); }
.form-row textarea { min-height: 80px; resize: vertical; }
.form-row .photo-preview { max-width: 240px; max-height: 180px; border-radius: 8px; margin-top: 8px; display: block; }
.form-row .checkbox { display: flex; gap: 10px; align-items: flex-start; padding: 12px; background: #FFF3E0; border-radius: 6px; border-left: 3px solid #FF9800; }
.form-row .checkbox input { width: auto; margin-top: 3px; }
.form-row .checkbox label { font-weight: normal; color: #424242; cursor: pointer; }

/* Buttons */
button, .btn { background: #D81B60; color: #fff; border: none; padding: 12px 28px; border-radius: 6px; font-size: 15px; font-weight: bold; cursor: pointer; font-family: inherit; }
button:hover, .btn:hover { background: #C2185B; }
button:disabled { background: #ccc; cursor: not-allowed; }
button.secondary { background: #fff; color: #D81B60; border: 2px solid #D81B60; }
button.danger { background: #C81010; }
button.danger:hover { background: #A00000; }

/* Layout 2 colonnes (form + preview) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* PREVIEW = mime du PPTX */
.fiche-preview { background: linear-gradient(135deg, #fce4ec 35%, #fff 100%); border-radius: 8px; padding: 16px; aspect-ratio: 0.707; min-height: 400px; position: relative; font-size: 11px; line-height: 1.4; overflow: hidden; }
.fiche-preview .header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.fiche-preview .header .h-logo { width: 50px; height: 36px; background: linear-gradient(135deg, #D81B60 0%, #E91E63 100%); border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 9px; font-weight: bold; text-align: center; line-height: 1.1; }
.fiche-preview .header h3 { margin: 0; color: #4A148C; font-size: 14px; }
.fiche-preview .header small { color: #4A148C; font-size: 9px; }
.fiche-preview .photo-zone { background: rgba(216,27,96,0.15); border: 2px solid #D81B60; border-radius: 6px; aspect-ratio: 2; margin: 8px 0; display: flex; align-items: center; justify-content: center; color: #D81B60; font-size: 11px; position: relative; overflow: hidden; }
.fiche-preview .photo-zone img { width: 100%; height: 100%; object-fit: contain; }
.fiche-preview .nom-prenom { color: #4A148C; font-style: italic; margin: 2px 0; }
.fiche-preview .enseigne { color: #D81B60; font-weight: bold; font-size: 16px; border-left: 4px solid #D81B60; padding-left: 6px; margin: 4px 0; }
.fiche-preview .activite { color: #212121; font-weight: bold; margin: 2px 0; }
.fiche-preview .autres { color: #424242; font-size: 9px; margin: 2px 0; }
.fiche-preview .presentation { color: #4A148C; font-style: italic; font-size: 10px; margin: 4px 0; }
.fiche-preview .mot { color: #D81B60; font-style: italic; font-weight: bold; text-align: center; font-size: 10px; margin: 4px 0; }
.fiche-preview .projet { color: #424242; font-size: 9px; margin: 4px 0; }
.fiche-preview .footer-contact { position: absolute; bottom: 12px; left: 16px; right: 16px; color: #4A148C; font-weight: bold; font-size: 9px; border-top: 1px solid #E0E0E0; padding-top: 6px; }
.fiche-preview .tampon-brouillon { position: absolute; top: 30%; left: 50%; transform: translate(-50%, -50%) rotate(-15deg); background: rgba(200, 16, 16, 0.85); color: #fff; font-size: 32px; font-weight: bold; padding: 10px 30px; border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.3); letter-spacing: 4px; pointer-events: none; }

/* Footer */
footer { background: #4A148C; color: #fff; padding: 20px; text-align: center; font-size: 12px; }
footer p { margin: 4px 0; }
footer a { color: #FCE4EC; }

/* Mentions légales */
.mentions h3 { color: #4A148C; margin-top: 24px; }
.mentions table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.mentions th, .mentions td { border: 1px solid #E0E0E0; padding: 8px 12px; text-align: left; vertical-align: top; }
.mentions th { background: #FCE4EC; color: #4A148C; }

/* Admin */
.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0; }
.stat-box { background: linear-gradient(135deg, #D81B60 0%, #E91E63 100%); color: #fff; border-radius: 12px; padding: 20px; text-align: center; }
.stat-box .num { font-size: 36px; font-weight: bold; }
.stat-box .label { font-size: 12px; opacity: 0.9; }

/* Toast */
.toast { position: fixed; bottom: 24px; right: 24px; background: #2E7D32; color: #fff; padding: 14px 20px; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.2); z-index: 1000; animation: slideIn 0.3s; }
.toast.error { background: #C81010; }
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
