* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f3f7;
    color: #2c2c2c;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main.container { flex: 1; padding: 30px 20px; }
.container { max-width: 1100px; margin: 0 auto; width: 100%; }
a { color: #6b2c91; text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { color: #6b2c91; font-size: 1.9em; margin-bottom: 10px; }
h2 { color: #6b2c91; font-size: 1.3em; margin-top: 0; margin-bottom: 15px; }
h3 { font-size: 1.1em; color: #6b2c91; margin: 15px 0 10px; }

.site-header { background: white; border-bottom: 1px solid #e0d8e8; padding: 15px 20px; }
.site-header .container { display: flex; justify-content: space-between; align-items: center; padding: 0; }
.logo { font-weight: 700; font-size: 1.3em; color: #6b2c91; }
.logo:hover { text-decoration: none; }
nav a { margin-left: 20px; color: #555; font-size: 0.95em; }
nav a.btn-primary { background: #6b2c91; color: white; padding: 6px 14px; border-radius: 6px; }
nav a.btn-primary:hover { background: #55236f; text-decoration: none; }

.site-footer { background: white; border-top: 1px solid #e0d8e8; padding: 20px; margin-top: 30px; }
.site-footer p { color: #888; font-size: 0.88em; text-align: center; }

.alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; }
.alert-success { background: #d4edda; color: #155724; border-left: 4px solid #28a745; }
.alert-error { background: #f8d7da; color: #721c24; border-left: 4px solid #dc3545; }
.alert-info { background: #e8f4f8; color: #0c5460; border-left: 4px solid #17a2b8; }

.card { background: white; padding: 25px; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); margin-bottom: 20px; }

form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
form .row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.field { margin-bottom: 15px; }
label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 0.94em; color: #444; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="date"], input[type="time"], input[type="number"], input[type="url"], textarea, select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cfc5d8;
    border-radius: 6px;
    font-size: 1em;
    font-family: inherit;
    background: white;
}
textarea { resize: vertical; min-height: 80px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: #6b2c91; box-shadow: 0 0 0 3px rgba(107,44,145,0.1); }
.required { color: #dc3545; }
.help { font-size: 0.85em; color: #888; margin-top: 4px; }

.btn { display: inline-block; padding: 10px 18px; border: none; border-radius: 6px; cursor: pointer; font-size: 0.95em; font-family: inherit; text-decoration: none; }
.btn-primary { background: #6b2c91; color: white; }
.btn-primary:hover { background: #55236f; text-decoration: none; color: white; }
.btn-secondary { background: #e0d8e8; color: #6b2c91; }
.btn-secondary:hover { background: #d0c5dc; text-decoration: none; }
.btn-danger { background: #dc3545; color: white; }
.btn-danger:hover { background: #c82333; color: white; }
.btn-sm { padding: 5px 12px; font-size: 0.85em; }
.btn-wide { width: 100%; padding: 14px; font-size: 1.05em; font-weight: 600; }

table { width: 100%; border-collapse: collapse; font-size: 0.93em; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eee; vertical-align: top; }
th { background: #faf7fd; color: #6b2c91; font-weight: 600; }
tr:hover { background: #fafafa; }
.table-responsive { overflow-x: auto; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 0.8em; white-space: nowrap; }
.badge-ok { background: #d4edda; color: #155724; }
.badge-limite { background: #fff3cd; color: #856404; }
.badge-complet { background: #f8d7da; color: #721c24; }
.badge-gris { background: #e9ecef; color: #495057; }

.public-form { max-width: 780px; margin: 0 auto; background: white; padding: 35px; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
fieldset { border: 1px solid #e0d8e8; border-radius: 8px; padding: 20px; margin-bottom: 22px; }
legend { font-weight: 600; color: #6b2c91; padding: 0 10px; }
.checkbox-jour { display: flex; align-items: center; padding: 10px; background: #f9f5fc; border-radius: 6px; margin-bottom: 12px; }
.checkbox-jour input { margin-right: 10px; transform: scale(1.2); }
.parcours-list { padding-left: 10px; border-left: 3px solid #e0d8e8; margin-left: 10px; display: none; }
.parcours-list.active { display: block; }
.parcours-item { display: flex; align-items: flex-start; padding: 12px; margin-bottom: 8px; background: #fafafa; border-radius: 6px; cursor: pointer; border: 2px solid transparent; }
.parcours-item:hover { background: #f0e9f5; }
.parcours-item.complet { opacity: 0.5; cursor: not-allowed; background: #f0f0f0; }
.parcours-item input { margin-right: 12px; margin-top: 4px; }
.parcours-label { flex: 1; font-size: 0.94em; }
.parcours-libelle { font-weight: 600; color: #6b2c91; font-size: 1.05em; margin-bottom: 4px; }
.parcours-detail { color: #555; font-size: 0.88em; }
.parcours-note { color: #888; font-style: italic; font-size: 0.85em; margin-top: 3px; }
.places { display: inline-block; font-size: 0.8em; padding: 2px 8px; border-radius: 10px; margin-left: 6px; font-weight: normal; }
.legende-ateliers { background: #faf7fd; padding: 14px; border-radius: 8px; margin-bottom: 15px; font-size: 0.88em; }
.legende-ateliers ul { margin-left: 20px; margin-top: 6px; }

.muted { color: #888; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mb-20 { margin-bottom: 20px; }
.d-flex { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.share-box { background: #f9f5fc; border: 1px dashed #cfc5d8; padding: 12px; border-radius: 6px; margin: 15px 0; font-family: monospace; font-size: 0.9em; word-break: break-all; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 15px; margin-bottom: 20px; }
.stat-card { background: white; padding: 18px; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); text-align: center; }
.stat-value { font-size: 2em; font-weight: bold; color: #6b2c91; }
.stat-label { color: #666; font-size: 0.88em; }

@media (max-width: 600px) {
    form .row, form .row-3 { grid-template-columns: 1fr; }
    .public-form { padding: 22px; }
    h1 { font-size: 1.5em; }
    nav a { margin-left: 10px; font-size: 0.88em; }
}

/* ============================================================================
   Ajouts v2 : paramètres, emails, RGPD, footer legal
   ============================================================================ */

.site-footer .footer-nav {
    text-align: center;
    margin-bottom: 8px;
}
.site-footer .footer-nav a {
    margin: 0 10px;
    font-size: 0.85em;
    color: #888;
}
.site-footer .footer-nav a:hover { color: #6b2c91; }

.btn { display: inline-block; padding: 9px 18px; font-size: 0.95em; font-weight: 500; border: 0;
    border-radius: 6px; cursor: pointer; text-decoration: none; transition: all 0.15s; line-height: 1.2; }
.btn-primary { background: #6b2c91; color: white; }
.btn-primary:hover { background: #55236f; text-decoration: none; }
.btn-secondary { background: #e5e7eb; color: #1f2937; }
.btn-secondary:hover { background: #d1d5db; text-decoration: none; }
.btn-sm { padding: 5px 12px; font-size: 0.85em; }
.btn-wide { width: 100%; padding: 12px; font-size: 1em; margin-top: 10px; }

fieldset { border: 1px solid #e5e7eb; border-radius: 8px; padding: 15px 18px; margin-bottom: 18px; }
fieldset legend { font-weight: 600; color: #6b2c91; padding: 0 8px; font-size: 0.95em; }

.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 5px; font-size: 0.9em; font-weight: 500; }
.field input[type=text], .field input[type=email], .field input[type=tel],
.field input[type=password], .field input[type=number], .field input[type=date],
.field textarea, .field select {
    width: 100%; padding: 9px 12px; font-size: 0.95em; border: 1px solid #d1d5db;
    border-radius: 6px; font-family: inherit; background: white;
}
.field input:focus, .field textarea:focus, .field select:focus {
    outline: none; border-color: #6b2c91; box-shadow: 0 0 0 3px rgba(107,44,145,0.12);
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.muted { color: #6b7280; }
.required { color: #dc2626; }

.badge { display: inline-block; padding: 3px 9px; font-size: 0.78em; font-weight: 500;
    border-radius: 99px; background: #e5e7eb; color: #1f2937; }
.badge-ok { background: #d1fae5; color: #065f46; }
.badge-limite { background: #fed7aa; color: #9a3412; }
.badge-complet { background: #fee2e2; color: #991b1b; }
.badge-gris { background: #e5e7eb; color: #6b7280; }

.card { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); margin-bottom: 15px; }

.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #e5e7eb; }
th { background: #f9fafb; font-weight: 600; font-size: 0.88em; color: #4b5563; }
td .text-right, .text-right { text-align: right; }

.checkbox-jour { display: flex; align-items: center; gap: 10px; padding: 12px; background: #f9fafb; border-radius: 6px; margin-bottom: 10px; }
.checkbox-jour input[type=checkbox] { width: 18px; height: 18px; }

.public-form { background: white; max-width: 720px; margin: 0 auto; padding: 30px; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.public-form h1 { margin-bottom: 8px; }

.parcours-list { display: none; margin-top: 10px; }
.parcours-list.active { display: block; }
.parcours-item { display: flex; gap: 10px; padding: 12px 14px; margin-bottom: 8px; border: 1px solid #e5e7eb; border-radius: 6px; cursor: pointer; }
.parcours-item:hover { border-color: #6b2c91; }
.parcours-item.complet { opacity: 0.5; cursor: not-allowed; }
.parcours-item input[type=radio] { margin-top: 2px; flex-shrink: 0; }
.parcours-label { flex: 1; }
.parcours-libelle { display: flex; justify-content: space-between; align-items: center; font-weight: 600; margin-bottom: 4px; }
.parcours-detail { font-size: 0.9em; color: #4b5563; line-height: 1.5; }
.parcours-note { font-size: 0.85em; color: #9ca3af; font-style: italic; margin-top: 4px; }
.places { font-size: 0.78em; padding: 3px 9px; border-radius: 99px; }

.legende-ateliers { background: #f9fafb; padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; font-size: 0.9em; }
.legende-ateliers ul { list-style: none; padding-left: 0; margin: 5px 0 0 0; }
.legende-ateliers li { padding: 2px 0; }

/* Liens dans les pages publiques RGPD / mentions — rétablir un look lisible */
.card h2 { margin-top: 25px; margin-bottom: 10px; font-size: 1.15em; }
.card p { margin-bottom: 12px; line-height: 1.6; }
.card ul { margin-bottom: 12px; padding-left: 22px; line-height: 1.7; }

/* ============================================================================
   WYSIWYG Editor
   ============================================================================ */
.wysiwyg-wrapper {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
    background: white;
}
.wysiwyg-wrapper:focus-within {
    border-color: #6b2c91;
    box-shadow: 0 0 0 3px rgba(107, 44, 145, 0.12);
}
.wysiwyg-toolbar {
    display: flex;
    gap: 2px;
    padding: 6px 8px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
}
.wysiwyg-toolbar button {
    padding: 5px 10px;
    font-size: 13px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    color: #4b5563;
    font-family: inherit;
    min-width: 28px;
}
.wysiwyg-toolbar button:hover {
    background: white;
    border-color: #e5e7eb;
    color: #6b2c91;
}
.wysiwyg-sep {
    width: 1px;
    background: #e5e7eb;
    margin: 3px 4px;
}
.wysiwyg-editor {
    padding: 12px 14px;
    font-size: 15px;
    line-height: 1.5;
    color: #1f2937;
    outline: none;
    min-height: 120px;
    max-height: 500px;
    overflow-y: auto;
}
.wysiwyg-editor p { margin: 0 0 8px 0; }
.wysiwyg-editor p:last-child { margin-bottom: 0; }
.wysiwyg-editor h3 { font-size: 16px; margin: 10px 0 6px 0; color: #6b2c91; }
.wysiwyg-editor ul, .wysiwyg-editor ol { margin: 6px 0 8px 22px; }
.wysiwyg-editor li { margin-bottom: 3px; }
.wysiwyg-editor a { color: #6b2c91; }

/* Rendu du contenu riche côté public / admin */
.rich-content p { margin: 0 0 10px 0; line-height: 1.6; }
.rich-content p:last-child { margin-bottom: 0; }
.rich-content ul, .rich-content ol { margin: 8px 0 10px 22px; line-height: 1.6; }
.rich-content h3, .rich-content h4 { margin: 12px 0 6px 0; }

.event-description {
    background: #fafafa;
    border-left: 3px solid #6b2c91;
    padding: 15px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    color: #374151;
}

.atelier-desc {
    margin-top: 4px;
    font-size: 0.88em;
    color: #6b7280;
    padding-left: 18px;
    border-left: 2px solid #e5e7eb;
}
.atelier-desc p:first-child { margin-top: 0; }

/* ============================================================================
   Catégories d'inscrits (formulaire public)
   ============================================================================ */
.categories-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.categorie-item {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.categorie-item:hover { border-color: #6b2c91; }
.categorie-item input[type=radio]:checked + .categorie-label { color: #6b2c91; }
.categorie-item:has(input:checked) { border-color: #6b2c91; background: #faf6fc; }
.categorie-item.complet { opacity: 0.55; cursor: not-allowed; background: #f9fafb; }
.categorie-label { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* ============================================================================
   Stats catégories (tableau de bord événement)
   ============================================================================ */
.cats-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 15px; }
.cat-stat { padding: 12px 14px; background: #fafafa; border: 1px solid #e5e7eb; border-radius: 6px; }
.cat-stat-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; gap: 10px; }
.cat-stat-head strong { font-size: 0.95em; }
.cat-stat-val { font-size: 0.9em; color: #4b5563; white-space: nowrap; }
.cat-stat-bar { width: 100%; height: 6px; background: #e5e7eb; border-radius: 99px; overflow: hidden; }
.cat-stat-bar-fill { height: 100%; border-radius: 99px; transition: width 0.3s ease; }
.cat-stat-note { margin-top: 6px; font-size: 0.82em; }


/* === OUIOINSCRIT-CONFERENCES-CSS-V1 === */
/* ============================================================================
   Ajouts conférences — à ajouter à la fin de assets/style.css
   ============================================================================ */

/* Liste des conférences dans le formulaire public */
.conference-item {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    background: white;
}
.conference-item:hover { border-color: #6b2c91; }
.conference-item.complet { opacity: 0.55; cursor: not-allowed; background: #f9fafb; }
.conference-item input[type=checkbox] { margin-top: 3px; flex-shrink: 0; width: 18px; height: 18px; }
.conference-item:has(input:checked) { border-color: #6b2c91; background: #faf6fc; }
.conference-label { flex: 1; font-size: 0.95em; line-height: 1.5; }
.conference-desc { margin-top: 5px; font-size: 0.88em; color: #6b7280; }

/* Parcours inaccessibles (conférences non cochées) */
.parcours-item.inaccessible {
    opacity: 0.5;
    background: #fafafa;
    cursor: not-allowed;
    border-style: dashed;
}
.parcours-msg-confs {
    margin-top: 6px;
    padding: 6px 10px;
    background: #fef3c7;
    border-radius: 4px;
    font-size: 0.85em;
    color: #78350f;
    font-weight: 500;
}


/* === OUIOINSCRIT-CONFERENCES-V2-CSS === */
/* === OUIOINSCRIT-CONFERENCES-V2-CSS === */
/* Bloc conférences intégré dans chaque jour */
.bloc-conferences {
    background: #faf6fc;
    border: 1px solid #e5d8f0;
    border-radius: 6px;
    padding: 15px 18px;
    margin-bottom: 15px;
}
.bloc-conferences h4 { color: #6b2c91; margin-bottom: 8px; }
.bloc-conferences .conference-item { background: white; }


/* === OUIOINSCRIT-REPAS-CSS-V1 === */
/* Section Repas — formulaire public */
.bloc-repas {
    margin-bottom: 18px;
}
.repas-liste {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.repas-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    background: #fafafa;
    transition: background 0.15s, border-color 0.15s;
}
.repas-item:hover { background: #f3f4f6; }
.repas-item.complet {
    opacity: 0.55;
    cursor: not-allowed;
    background: #f9fafb;
}
.repas-item input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}
.repas-label {
    flex: 1;
    font-weight: normal;
    font-size: 14px;
    line-height: 1.45;
}
.repas-label strong { font-weight: 600; }
.repas-label .badge {
    margin-left: 6px;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 3px;
    font-weight: 500;
}

/* Liste inscrits — affichage repas */
.inscrits-repas {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px dashed #e5e7eb;
    font-size: 12px;
    color: #b45309;
}
.inscrits-repas strong { color: #92400e; }
