1917 lignes
66 KiB
HTML
1917 lignes
66 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Collaborer sur une vision - Formulaire de contact</title>
|
|
|
|
<!-- Police Inter & déclinaisons de graisses -->
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
|
|
|
|
<style>
|
|
/* ==========================================================================
|
|
VARIABLES & THÈME TALLY
|
|
========================================================================== */
|
|
:root {
|
|
--font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
--bg-color: #ffffff;
|
|
--text-main: #191919;
|
|
--text-muted: #6b7280;
|
|
--text-light: #9ca3af;
|
|
--border-color: #e5e7eb;
|
|
--border-focus: #111827;
|
|
--input-bg: #ffffff;
|
|
--btn-bg: #000000;
|
|
--btn-text: #ffffff;
|
|
--btn-hover: #262626;
|
|
--card-hover: #f9fafb;
|
|
--card-selected: #f3f4f6;
|
|
|
|
/* Couleurs spécifiques Tally Page 2 */
|
|
--tag-purple-bg: #f3e8ff;
|
|
--tag-purple-border: #d8b4fe;
|
|
--tag-purple-text: #6b21a8;
|
|
|
|
--tag-green-bg: #dcfce7;
|
|
--tag-green-border: #86efac;
|
|
--tag-green-text: #15803d;
|
|
|
|
--tag-yellow-bg: #fef9c3;
|
|
--tag-yellow-border: #fde047;
|
|
--tag-yellow-text: #854d0e;
|
|
|
|
--tag-gray-bg: #f3f4f6;
|
|
--tag-gray-border: #e5e7eb;
|
|
--tag-gray-text: #374151;
|
|
|
|
--radius-sm: 6px;
|
|
--radius-md: 10px;
|
|
--radius-lg: 14px;
|
|
--radius-full: 9999px;
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
margin: 0;
|
|
padding: 0;
|
|
font-family: var(--font-main);
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
}
|
|
|
|
body {
|
|
background-color: var(--bg-color);
|
|
color: var(--text-main);
|
|
min-height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding: 40px 20px 80px;
|
|
}
|
|
|
|
/* Barre de progression discrète */
|
|
.progress-bar-container {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 3px;
|
|
background: #f1f5f9;
|
|
z-index: 1000;
|
|
}
|
|
.progress-bar-fill {
|
|
height: 100%;
|
|
width: 20%;
|
|
background: #000000;
|
|
transition: width 0.35s ease;
|
|
}
|
|
|
|
/* Conteneur principal façon Tally */
|
|
.tally-container {
|
|
width: 100%;
|
|
max-width: 660px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
/* En-tête principal */
|
|
.form-header {
|
|
margin-bottom: 32px;
|
|
}
|
|
.form-title {
|
|
font-size: 34px;
|
|
font-weight: 800;
|
|
letter-spacing: -0.03em;
|
|
line-height: 1.15;
|
|
color: #111827;
|
|
margin-bottom: 18px;
|
|
}
|
|
.form-intro {
|
|
font-size: 15px;
|
|
line-height: 1.55;
|
|
color: #374151;
|
|
margin-bottom: 20px;
|
|
}
|
|
.form-subintro {
|
|
font-size: 18px;
|
|
font-weight: 700;
|
|
color: #111827;
|
|
margin-top: 18px;
|
|
}
|
|
|
|
/* Sections */
|
|
.section-title {
|
|
font-size: 19px;
|
|
font-weight: 700;
|
|
margin: 28px 0 16px 0;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
color: #111827;
|
|
}
|
|
|
|
/* Groupes de champs */
|
|
.field-group {
|
|
margin-bottom: 24px;
|
|
}
|
|
.field-label {
|
|
font-size: 15.5px;
|
|
font-weight: 600;
|
|
margin-bottom: 8px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
color: #111827;
|
|
}
|
|
.field-label.italic {
|
|
font-style: italic;
|
|
font-weight: 500;
|
|
font-size: 16px;
|
|
}
|
|
.required-star {
|
|
color: #9ca3af;
|
|
font-size: 13px;
|
|
}
|
|
.chevron-inline {
|
|
color: #9ca3af;
|
|
font-size: 11px;
|
|
margin-left: 3px;
|
|
}
|
|
|
|
/* Inputs de texte & wrappers */
|
|
.input-wrapper {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
width: 100%;
|
|
}
|
|
.tally-input {
|
|
width: 100%;
|
|
height: 48px;
|
|
padding: 0 44px 0 14px;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: var(--radius-md);
|
|
font-size: 15px;
|
|
color: var(--text-main);
|
|
background-color: var(--input-bg);
|
|
outline: none;
|
|
transition: border-color 0.2s, box-shadow 0.2s;
|
|
}
|
|
.tally-input::placeholder {
|
|
color: #9ca3af;
|
|
}
|
|
.tally-input:focus {
|
|
border-color: var(--border-focus);
|
|
box-shadow: 0 0 0 1px var(--border-focus);
|
|
}
|
|
.input-icon-badge {
|
|
position: absolute;
|
|
right: 14px;
|
|
color: #9ca3af;
|
|
font-size: 14px;
|
|
pointer-events: none;
|
|
user-select: none;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
/* Inputs groupés verticalement */
|
|
.stacked-inputs .input-wrapper:not(:last-child) {
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
/* Textarea */
|
|
.tally-textarea {
|
|
width: 100%;
|
|
min-height: 110px;
|
|
padding: 14px;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: var(--radius-md);
|
|
font-size: 14.5px;
|
|
line-height: 1.5;
|
|
color: var(--text-main);
|
|
outline: none;
|
|
resize: vertical;
|
|
transition: border-color 0.2s;
|
|
}
|
|
.tally-textarea::placeholder {
|
|
color: #9ca3af;
|
|
}
|
|
.tally-textarea:focus {
|
|
border-color: var(--border-focus);
|
|
box-shadow: 0 0 0 1px var(--border-focus);
|
|
}
|
|
|
|
/* Checkbox & Termes */
|
|
.cgu-card {
|
|
margin-top: 14px;
|
|
border-radius: var(--radius-md);
|
|
}
|
|
.checkbox-label {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
font-size: 14.5px;
|
|
cursor: pointer;
|
|
color: #374151;
|
|
user-select: none;
|
|
}
|
|
.checkbox-custom {
|
|
width: 18px;
|
|
height: 18px;
|
|
border: 1.5px solid #d1d5db;
|
|
border-radius: 4px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: all 0.2s;
|
|
background: white;
|
|
flex-shrink: 0;
|
|
}
|
|
.hidden-checkbox {
|
|
display: none;
|
|
}
|
|
.hidden-checkbox:checked + .checkbox-custom {
|
|
background: #111827;
|
|
border-color: #111827;
|
|
}
|
|
.hidden-checkbox:checked + .checkbox-custom::after {
|
|
content: "✓";
|
|
color: white;
|
|
font-size: 12px;
|
|
font-weight: bold;
|
|
}
|
|
.cgu-link {
|
|
color: #2563eb;
|
|
text-decoration: underline;
|
|
cursor: pointer;
|
|
font-weight: 500;
|
|
margin-top: 6px;
|
|
display: inline-block;
|
|
font-size: 14px;
|
|
}
|
|
|
|
/* Tags colorés Tally (Type de prestation) */
|
|
.pill-tags-grid {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
.pill-tag-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 9px 14px;
|
|
border-radius: var(--radius-md);
|
|
font-size: 14.5px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
width: fit-content;
|
|
transition: transform 0.15s, opacity 0.15s, box-shadow 0.15s;
|
|
user-select: none;
|
|
}
|
|
.pill-tag-btn:hover {
|
|
opacity: 0.92;
|
|
transform: translateY(-1px);
|
|
}
|
|
.pill-tag-btn.active {
|
|
box-shadow: 0 0 0 2px #000000;
|
|
}
|
|
.pill-purple {
|
|
background-color: var(--tag-purple-bg);
|
|
border: 1px solid var(--tag-purple-border);
|
|
color: var(--tag-purple-text);
|
|
}
|
|
.pill-green {
|
|
background-color: var(--tag-green-bg);
|
|
border: 1px solid var(--tag-green-border);
|
|
color: var(--tag-green-text);
|
|
}
|
|
.pill-yellow {
|
|
background-color: var(--tag-yellow-bg);
|
|
border: 1px solid var(--tag-yellow-border);
|
|
color: var(--tag-yellow-text);
|
|
}
|
|
.pill-gray {
|
|
background-color: var(--tag-gray-bg);
|
|
border: 1px solid var(--tag-gray-border);
|
|
color: var(--tag-gray-text);
|
|
}
|
|
|
|
/* Cartes d'options déroulantes Tally (Idée & Ambiance) */
|
|
.option-cards-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
.option-card-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 10px 14px;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: var(--radius-md);
|
|
background: white;
|
|
font-size: 14.5px;
|
|
cursor: pointer;
|
|
transition: all 0.15s;
|
|
user-select: none;
|
|
}
|
|
.option-card-row:hover {
|
|
background: var(--card-hover);
|
|
border-color: #cbd5e1;
|
|
}
|
|
.option-card-row.selected {
|
|
background: #f8fafc;
|
|
border-color: #111827;
|
|
font-weight: 500;
|
|
}
|
|
.option-card-row .icon-chevron {
|
|
color: #9ca3af;
|
|
font-size: 11px;
|
|
}
|
|
|
|
/* Tableaux matriciels (Utilisation des médias & Détails techniques) */
|
|
.tally-matrix-card {
|
|
width: 100%;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: var(--radius-md);
|
|
overflow: hidden;
|
|
margin-top: 10px;
|
|
background: white;
|
|
}
|
|
.matrix-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
font-size: 14px;
|
|
}
|
|
.matrix-table th {
|
|
padding: 12px 10px;
|
|
font-weight: 600;
|
|
color: #374151;
|
|
text-align: center;
|
|
border-bottom: 1px solid var(--border-color);
|
|
border-left: 1px solid var(--border-color);
|
|
background: #fafafa;
|
|
font-size: 13.5px;
|
|
}
|
|
.matrix-table th:first-child {
|
|
border-left: none;
|
|
background: white;
|
|
}
|
|
.matrix-table td {
|
|
padding: 12px 14px;
|
|
border-top: 1px solid var(--border-color);
|
|
border-left: 1px solid var(--border-color);
|
|
color: #374151;
|
|
text-align: center;
|
|
vertical-align: middle;
|
|
}
|
|
.matrix-table td:first-child {
|
|
border-left: none;
|
|
text-align: left;
|
|
font-weight: 500;
|
|
color: #111827;
|
|
width: 46%;
|
|
}
|
|
.matrix-radio {
|
|
appearance: none;
|
|
-webkit-appearance: none;
|
|
width: 20px;
|
|
height: 20px;
|
|
border: 1.5px solid #d1d5db;
|
|
border-radius: 50%;
|
|
outline: none;
|
|
cursor: pointer;
|
|
display: inline-block;
|
|
vertical-align: middle;
|
|
position: relative;
|
|
transition: all 0.2s ease;
|
|
background: #fff;
|
|
}
|
|
.matrix-radio:checked {
|
|
border-color: #111827;
|
|
}
|
|
.matrix-radio:checked::after {
|
|
content: "";
|
|
position: absolute;
|
|
top: 4px;
|
|
left: 4px;
|
|
width: 10px;
|
|
height: 10px;
|
|
background: #111827;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
/* Échelle de budget (Boutons 40 à 220) */
|
|
.budget-scale-container {
|
|
margin-top: 10px;
|
|
}
|
|
.budget-buttons-row {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 6px;
|
|
margin-bottom: 6px;
|
|
}
|
|
.budget-btn {
|
|
flex: 1;
|
|
min-width: 48px;
|
|
height: 38px;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: var(--radius-sm);
|
|
background: white;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
color: #111827;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: all 0.15s;
|
|
}
|
|
.budget-btn:hover {
|
|
background: #f3f4f6;
|
|
}
|
|
.budget-btn.selected {
|
|
background: #111827;
|
|
color: white;
|
|
border-color: #111827;
|
|
font-weight: 600;
|
|
}
|
|
.budget-extremes {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
font-size: 11px;
|
|
font-weight: 700;
|
|
color: #6b7280;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.04em;
|
|
padding: 0 4px;
|
|
margin-bottom: 12px;
|
|
}
|
|
.budget-warning {
|
|
font-size: 13.5px;
|
|
color: #374151;
|
|
line-height: 1.4;
|
|
margin-top: 10px;
|
|
}
|
|
|
|
/* Liste réorganisable (Drag & Drop) */
|
|
.sortable-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
margin-top: 10px;
|
|
}
|
|
.sortable-item {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 10px 14px;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: var(--radius-md);
|
|
background: white;
|
|
font-size: 14.5px;
|
|
cursor: grab;
|
|
user-select: none;
|
|
transition: background 0.15s, box-shadow 0.15s;
|
|
}
|
|
.sortable-item:active {
|
|
cursor: grabbing;
|
|
box-shadow: 0 4px 12px rgba(0,0,0,0.08);
|
|
}
|
|
.sortable-item.dragging {
|
|
opacity: 0.4;
|
|
background: #f1f5f9;
|
|
}
|
|
.sortable-left {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
.drag-icon {
|
|
color: #9ca3af;
|
|
font-size: 14px;
|
|
}
|
|
.sort-actions {
|
|
display: flex;
|
|
gap: 4px;
|
|
}
|
|
.sort-btn {
|
|
background: none;
|
|
border: 1px solid #e5e7eb;
|
|
border-radius: 4px;
|
|
width: 26px;
|
|
height: 26px;
|
|
font-size: 12px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
color: #64748b;
|
|
}
|
|
.sort-btn:hover {
|
|
background: #f1f5f9;
|
|
color: #0f172a;
|
|
}
|
|
|
|
/* Upload zone */
|
|
.file-upload-box {
|
|
border: 1.5px dashed #cbd5e1;
|
|
border-radius: var(--radius-md);
|
|
padding: 32px 20px;
|
|
text-align: center;
|
|
cursor: pointer;
|
|
background: #fafafa;
|
|
transition: all 0.2s ease;
|
|
margin-top: 10px;
|
|
}
|
|
.file-upload-box:hover, .file-upload-box.dragover {
|
|
border-color: #111827;
|
|
background: #f8fafc;
|
|
}
|
|
.file-upload-icon {
|
|
font-size: 20px;
|
|
margin-bottom: 8px;
|
|
color: #4b5563;
|
|
}
|
|
.file-upload-title {
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
color: #111827;
|
|
}
|
|
.file-upload-subtext {
|
|
font-size: 12px;
|
|
color: #9ca3af;
|
|
margin-top: 6px;
|
|
}
|
|
.file-preview-list {
|
|
margin-top: 10px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
}
|
|
.file-preview-chip {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
background: #f3f4f6;
|
|
border-radius: var(--radius-sm);
|
|
padding: 6px 12px;
|
|
font-size: 13px;
|
|
}
|
|
.file-remove-btn {
|
|
cursor: pointer;
|
|
color: #ef4444;
|
|
font-weight: bold;
|
|
margin-left: 8px;
|
|
}
|
|
|
|
/* Signature Canvas (Page 5) */
|
|
.signature-area {
|
|
margin-top: 16px;
|
|
}
|
|
.signature-canvas-container {
|
|
border: 1.5px dashed #cbd5e1;
|
|
border-radius: var(--radius-md);
|
|
padding: 16px;
|
|
background: #ffffff;
|
|
position: relative;
|
|
}
|
|
.signature-canvas {
|
|
width: 100%;
|
|
height: 180px;
|
|
display: block;
|
|
cursor: crosshair;
|
|
touch-action: none;
|
|
}
|
|
.signature-footer-line {
|
|
border-top: 1px solid #d1d5db;
|
|
margin-top: 8px;
|
|
padding-top: 8px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
color: #9ca3af;
|
|
font-size: 13px;
|
|
}
|
|
.btn-clear-sig {
|
|
background: none;
|
|
border: none;
|
|
color: #64748b;
|
|
font-size: 12px;
|
|
cursor: pointer;
|
|
text-decoration: underline;
|
|
}
|
|
.btn-clear-sig:hover {
|
|
color: #111827;
|
|
}
|
|
|
|
/* Boutons de navigation Tally */
|
|
.nav-buttons-row {
|
|
margin-top: 36px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
}
|
|
.btn-tally-next {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
background: var(--btn-bg);
|
|
color: var(--btn-text);
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
padding: 12px 22px;
|
|
border-radius: var(--radius-full);
|
|
border: none;
|
|
cursor: pointer;
|
|
transition: background 0.15s, transform 0.15s;
|
|
}
|
|
.btn-tally-next:hover {
|
|
background: var(--btn-hover);
|
|
transform: translateY(-1px);
|
|
}
|
|
.btn-tally-prev {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
background: transparent;
|
|
color: #4b5563;
|
|
font-size: 14.5px;
|
|
font-weight: 500;
|
|
padding: 10px 18px;
|
|
border-radius: var(--radius-full);
|
|
border: 1px solid #e5e7eb;
|
|
cursor: pointer;
|
|
transition: all 0.15s;
|
|
}
|
|
.btn-tally-prev:hover {
|
|
background: #f9fafb;
|
|
color: #111827;
|
|
border-color: #cbd5e1;
|
|
}
|
|
|
|
/* Écran de succès et Export JSON */
|
|
.success-card {
|
|
text-align: center;
|
|
padding: 40px 20px;
|
|
animation: fadeIn 0.4s ease;
|
|
}
|
|
.success-icon {
|
|
font-size: 48px;
|
|
margin-bottom: 16px;
|
|
}
|
|
.success-title {
|
|
font-size: 28px;
|
|
font-weight: 800;
|
|
margin-bottom: 12px;
|
|
}
|
|
.success-text {
|
|
color: #4b5563;
|
|
font-size: 16px;
|
|
max-width: 480px;
|
|
margin: 0 auto 28px;
|
|
line-height: 1.5;
|
|
}
|
|
.json-actions {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 12px;
|
|
margin-bottom: 24px;
|
|
}
|
|
.btn-action-primary {
|
|
background: #000;
|
|
color: white;
|
|
border: none;
|
|
padding: 12px 24px;
|
|
border-radius: var(--radius-full);
|
|
font-weight: 600;
|
|
font-size: 14.5px;
|
|
cursor: pointer;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
.btn-action-secondary {
|
|
background: #f3f4f6;
|
|
color: #111827;
|
|
border: 1px solid #e5e7eb;
|
|
padding: 10px 20px;
|
|
border-radius: var(--radius-full);
|
|
font-weight: 500;
|
|
font-size: 14px;
|
|
cursor: pointer;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
.json-preview-container {
|
|
margin-top: 20px;
|
|
text-align: left;
|
|
background: #0f172a;
|
|
color: #e2e8f0;
|
|
border-radius: var(--radius-md);
|
|
padding: 16px;
|
|
font-size: 13px;
|
|
max-height: 320px;
|
|
overflow-y: auto;
|
|
font-family: monospace;
|
|
white-space: pre-wrap;
|
|
word-break: break-all;
|
|
}
|
|
|
|
/* Modal CGU */
|
|
.modal-overlay {
|
|
display: none;
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(0, 0, 0, 0.45);
|
|
backdrop-filter: blur(2px);
|
|
z-index: 2000;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 20px;
|
|
}
|
|
.modal-overlay.active {
|
|
display: flex;
|
|
}
|
|
.modal-box {
|
|
background: white;
|
|
max-width: 520px;
|
|
width: 100%;
|
|
border-radius: var(--radius-lg);
|
|
padding: 24px;
|
|
box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
|
|
max-height: 80vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
.modal-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 16px;
|
|
}
|
|
.modal-title {
|
|
font-size: 18px;
|
|
font-weight: 700;
|
|
}
|
|
.modal-close {
|
|
background: none;
|
|
border: none;
|
|
font-size: 20px;
|
|
cursor: pointer;
|
|
color: #9ca3af;
|
|
}
|
|
.modal-body {
|
|
overflow-y: auto;
|
|
font-size: 14px;
|
|
line-height: 1.6;
|
|
color: #4b5563;
|
|
padding-right: 8px;
|
|
}
|
|
|
|
/* Animations & Masquage de pages */
|
|
.form-step {
|
|
display: none;
|
|
animation: fadeIn 0.25s ease forwards;
|
|
}
|
|
.form-step.active {
|
|
display: block;
|
|
}
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; transform: translateY(6px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
|
|
/* Utilitaires */
|
|
.toast-notice {
|
|
position: fixed;
|
|
bottom: 24px;
|
|
background: #111827;
|
|
color: white;
|
|
padding: 10px 20px;
|
|
border-radius: 9999px;
|
|
font-size: 14px;
|
|
box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transition: opacity 0.25s, transform 0.25s;
|
|
transform: translateY(10px);
|
|
z-index: 3000;
|
|
}
|
|
.toast-notice.show {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<!-- Barre de progression -->
|
|
<div class="progress-bar-container">
|
|
<div class="progress-bar-fill" id="progressBar"></div>
|
|
</div>
|
|
|
|
<main class="tally-container">
|
|
|
|
<!-- ====================================================================
|
|
PAGE 1 : IDENTITÉ
|
|
==================================================================== -->
|
|
<section class="form-step active" id="step1">
|
|
<header class="form-header">
|
|
<h1 class="form-title">Collaborer sur une vision</h1>
|
|
<p class="form-intro">
|
|
Bienvenue dans mon cockpit. Que ce soit pour capturer les sommets du Vercors ou sublimer un projet personnel, chaque image commence par une intention.
|
|
</p>
|
|
<p class="form-subintro">Dis-moi ce que tu as en tête.</p>
|
|
</header>
|
|
|
|
<div class="section-title">📁 Ton Identité 📁</div>
|
|
|
|
<div class="field-group">
|
|
<label class="field-label italic" for="clientName">Ton nom+prénom / Entreprise?</label>
|
|
<div class="input-wrapper">
|
|
<input type="text" id="clientName" class="tally-input" placeholder="Théo">
|
|
<span class="input-icon-badge">Aa</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="field-group">
|
|
<label class="field-label" for="clientEmail">
|
|
Adresse mail/ numéro de téléphone : <span class="required-star">*</span>
|
|
</label>
|
|
<div class="stacked-inputs">
|
|
<div class="input-wrapper">
|
|
<input type="email" id="clientEmail" class="tally-input" placeholder="théo.photo@totoche1045fr.com">
|
|
<span class="input-icon-badge">@</span>
|
|
</div>
|
|
<div class="input-wrapper">
|
|
<input type="tel" id="clientPhone" class="tally-input" placeholder="0601020304">
|
|
<span class="input-icon-badge">📞</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="field-group cgu-card">
|
|
<div class="field-label" style="font-size: 13.5px; font-weight: 700; text-transform: uppercase;">
|
|
A LIRE <span class="required-star">*</span> <span class="chevron-inline">˅</span>
|
|
</div>
|
|
<label class="checkbox-label" for="acceptCgu">
|
|
<input type="checkbox" id="acceptCgu" class="hidden-checkbox">
|
|
<div class="checkbox-custom"></div>
|
|
<span>J'accepte les termes et conditions:</span>
|
|
</label>
|
|
<div>
|
|
<a class="cgu-link" id="openCguModalBtn">Cliquez ICI pour aller la lire.</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="nav-buttons-row">
|
|
<button type="button" class="btn-tally-next" onclick="goToStep(2)">
|
|
N'attendons pas! passons a ton projet! ➔
|
|
</button>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- ====================================================================
|
|
PAGE 2 : LE PROJET & LA VISION
|
|
==================================================================== -->
|
|
<section class="form-step" id="step2">
|
|
<div class="section-title">🎯 Le Projet 🎯</div>
|
|
|
|
<div class="field-group">
|
|
<label class="field-label">
|
|
Quel est le type de préstation? <span class="required-star">*</span> <span class="chevron-inline">˅</span>
|
|
</label>
|
|
<div class="pill-tags-grid" id="prestationGroup">
|
|
<div class="pill-tag-btn pill-purple" data-value="Flux cinématique." onclick="selectPrestationTag(this)">
|
|
✓ Flux cinématique.
|
|
</div>
|
|
<div class="pill-tag-btn pill-green" data-value="Imagerie fixe." onclick="selectPrestationTag(this)">
|
|
✓ Imagerie fixe.
|
|
</div>
|
|
<div class="pill-tag-btn pill-yellow" data-value="Hybride (les deux)." onclick="selectPrestationTag(this)">
|
|
✓ Hybride (les deux).
|
|
</div>
|
|
<div class="pill-tag-btn pill-gray" data-value="Autre." onclick="selectPrestationTag(this)">
|
|
✓ Autre.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="field-group">
|
|
<label class="field-label">
|
|
C'est quoi l'idée ? <span class="chevron-inline">˅</span>
|
|
</label>
|
|
<div class="option-cards-list" id="projectIdeaGroup">
|
|
<div class="option-card-row" data-value="Shooting Photo (Portrait / Lifestyle)" onclick="toggleOptionCard(this)">
|
|
<span class="icon-chevron">˅</span>
|
|
<span>📷 Shooting Photo (Portrait / Lifestyle)</span>
|
|
</div>
|
|
<div class="option-card-row" data-value="Vue du ciel (Vidéo Drone FPV/4K)" onclick="toggleOptionCard(this)">
|
|
<span class="icon-chevron">˅</span>
|
|
<span>🦅 Vue du ciel (Vidéo Drone FPV/4K)</span>
|
|
</div>
|
|
<div class="option-card-row" data-value="Reportage Montagne (Aventure / Sommets)" onclick="toggleOptionCard(this)">
|
|
<span class="icon-chevron">˅</span>
|
|
<span>🏔️ Reportage Montagne (Aventure / Sommets)</span>
|
|
</div>
|
|
<div class="option-card-row" data-value="Montage Vidéo (Format TikTok / YouTube)" onclick="toggleOptionCard(this)">
|
|
<span class="icon-chevron">˅</span>
|
|
<span>🎬 Montage Vidéo (Format TikTok / YouTube)</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="field-group">
|
|
<label class="field-label" for="projectLocation">
|
|
Où est-ce que ça se passe ? <span class="required-star">*</span>
|
|
</label>
|
|
<div class="input-wrapper">
|
|
<input type="text" id="projectLocation" class="tally-input" placeholder="C'est en intérieur? En ville?">
|
|
<span class="input-icon-badge">Aa</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section-title">🎨 La Vision 🎨</div>
|
|
|
|
<div class="field-group">
|
|
<label class="field-label" for="projectStory">
|
|
Raconte-moi l'histoire derrière ce projet. <span class="required-star">*</span>
|
|
</label>
|
|
<textarea id="projectStory" class="tally-textarea" placeholder="Plus j'en sais sur "pourquoi" tu fais ça, mieux je saurai le capturer."></textarea>
|
|
</div>
|
|
|
|
<div class="field-group">
|
|
<label class="field-label">
|
|
En un mot, quelle ambiance cherches-tu ? <span class="chevron-inline">˅</span>
|
|
</label>
|
|
<div class="option-cards-list" id="ambianceGroup">
|
|
<div class="option-card-row" data-value="Sombre & Épuré" onclick="selectSingleCard(this, 'ambianceGroup')">
|
|
<span class="icon-chevron">˅</span>
|
|
<span>🟣 Sombre & Épuré</span>
|
|
</div>
|
|
<div class="option-card-row" data-value="Lumineux & Naturel" onclick="selectSingleCard(this, 'ambianceGroup')">
|
|
<span class="icon-chevron">˅</span>
|
|
<span>🌻 Lumineux & Naturel</span>
|
|
</div>
|
|
<div class="option-card-row" data-value="Énergique & Cinématique" onclick="selectSingleCard(this, 'ambianceGroup')">
|
|
<span class="icon-chevron">˅</span>
|
|
<span>⚡ Énergique & Cinématique</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="nav-buttons-row">
|
|
<button type="button" class="btn-tally-prev" onclick="goToStep(1)">← Précédent</button>
|
|
<button type="button" class="btn-tally-next" onclick="goToStep(3)">
|
|
Tu m'as bien transmit ton idée? Passont a la logistique! ➔
|
|
</button>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- ====================================================================
|
|
PAGE 3 : LOGISTIQUE, BUDGET, PRIORITÉS & MOODBOARD
|
|
==================================================================== -->
|
|
<section class="form-step" id="step3">
|
|
<div class="section-title">💰 Logistique 💰</div>
|
|
|
|
<div class="field-group">
|
|
<label class="field-label" for="projectDate">
|
|
À quel moment vois-tu ce projet se réaliser ?
|
|
</label>
|
|
<div class="input-wrapper">
|
|
<input type="date" id="projectDate" class="tally-input">
|
|
<span class="input-icon-badge">📅</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="field-group">
|
|
<label class="field-label">
|
|
Combien de temps tu évalurai? <span class="required-star">*</span> <span class="chevron-inline">˅</span>
|
|
</label>
|
|
<div class="option-cards-list" id="durationGroup">
|
|
<label class="checkbox-label" style="padding: 6px 0;">
|
|
<input type="radio" name="duration" value="-30 min" class="hidden-checkbox">
|
|
<div class="checkbox-custom"></div>
|
|
<span>-30 min</span>
|
|
</label>
|
|
<label class="checkbox-label" style="padding: 6px 0;">
|
|
<input type="radio" name="duration" value="1h-2h" class="hidden-checkbox">
|
|
<div class="checkbox-custom"></div>
|
|
<span>1h-2h</span>
|
|
</label>
|
|
<label class="checkbox-label" style="padding: 6px 0;">
|
|
<input type="radio" name="duration" value="2h-5h" class="hidden-checkbox">
|
|
<div class="checkbox-custom"></div>
|
|
<span>2h-5h</span>
|
|
</label>
|
|
<label class="checkbox-label" style="padding: 6px 0;">
|
|
<input type="radio" name="duration" value="5h+" class="hidden-checkbox">
|
|
<div class="checkbox-custom"></div>
|
|
<span>5h+</span>
|
|
</label>
|
|
<label class="checkbox-label" style="padding: 6px 0;">
|
|
<input type="radio" name="duration" value="Plusieurs jours" class="hidden-checkbox">
|
|
<div class="checkbox-custom"></div>
|
|
<span>Plusieurs jours</span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="field-group">
|
|
<label class="field-label">Utilisation des médias</label>
|
|
<div class="tally-matrix-card">
|
|
<table class="matrix-table">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>OUI</th>
|
|
<th>NON</th>
|
|
<th>Je ne sait pas encore</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>Résaux (insta,TikTok,Facebook,ect...)</td>
|
|
<td><input type="radio" name="media_reseaux" value="OUI" class="matrix-radio"></td>
|
|
<td><input type="radio" name="media_reseaux" value="NON" class="matrix-radio"></td>
|
|
<td><input type="radio" name="media_reseaux" value="Je ne sait pas encore" class="matrix-radio"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Site Web & Portfolio digital</td>
|
|
<td><input type="radio" name="media_web" value="OUI" class="matrix-radio"></td>
|
|
<td><input type="radio" name="media_web" value="NON" class="matrix-radio"></td>
|
|
<td><input type="radio" name="media_web" value="Je ne sait pas encore" class="matrix-radio"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Impression Haute Définition (Affiches, Tirages, Book)</td>
|
|
<td><input type="radio" name="media_print" value="OUI" class="matrix-radio"></td>
|
|
<td><input type="radio" name="media_print" value="NON" class="matrix-radio"></td>
|
|
<td><input type="radio" name="media_print" value="Je ne sait pas encore" class="matrix-radio"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Usage institutionnel / Diffusion TV</td>
|
|
<td><input type="radio" name="media_tv" value="OUI" class="matrix-radio"></td>
|
|
<td><input type="radio" name="media_tv" value="NON" class="matrix-radio"></td>
|
|
<td><input type="radio" name="media_tv" value="Je ne sait pas encore" class="matrix-radio"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="field-group">
|
|
<label class="field-label">Quel est ton budget?</label>
|
|
<div class="budget-scale-container">
|
|
<div class="budget-buttons-row" id="budgetButtonsRow">
|
|
<button type="button" class="budget-btn" onclick="selectBudget(40)">40</button>
|
|
<button type="button" class="budget-btn" onclick="selectBudget(60)">60</button>
|
|
<button type="button" class="budget-btn" onclick="selectBudget(80)">80</button>
|
|
<button type="button" class="budget-btn" onclick="selectBudget(100)">100</button>
|
|
<button type="button" class="budget-btn" onclick="selectBudget(120)">120</button>
|
|
<button type="button" class="budget-btn" onclick="selectBudget(140)">140</button>
|
|
<button type="button" class="budget-btn" onclick="selectBudget(160)">160</button>
|
|
<button type="button" class="budget-btn" onclick="selectBudget(180)">180</button>
|
|
<button type="button" class="budget-btn" onclick="selectBudget(200)">200</button>
|
|
<button type="button" class="budget-btn" onclick="selectBudget(220)">220</button>
|
|
</div>
|
|
<div class="budget-extremes">
|
|
<span>40 ET MOINS</span>
|
|
<span>220 ET PLUS</span>
|
|
</div>
|
|
<p class="budget-warning">
|
|
Attention; si le budget est trop faible, je ne pourait peut etre pas répondre a toutes tes attentes.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="field-group">
|
|
<label class="field-label" for="budgetDetails">
|
|
En fonction du budget choisi au-dessus, détaille-moi tes attentes prioritaires.
|
|
</label>
|
|
<textarea id="budgetDetails" class="tally-textarea" placeholder="ex: "je veux surtout 5 photos en bonne qualité", ou "je veux un montage vidéo dynamique""></textarea>
|
|
</div>
|
|
|
|
<!-- Partie 3-2 : Ordre d'importance & Fichier -->
|
|
<div class="field-group" style="margin-top: 32px;">
|
|
<label class="field-label">
|
|
Classe par ordre d'importance. <span class="chevron-inline">˅</span>
|
|
</label>
|
|
<div class="sortable-list" id="priorityList">
|
|
<div class="sortable-item" draggable="true" data-id="Qualité visuelle">
|
|
<div class="sortable-left">
|
|
<span class="drag-icon">↕</span>
|
|
<span>Qualité visuelle</span>
|
|
</div>
|
|
<div class="sort-actions">
|
|
<button type="button" class="sort-btn" onclick="moveItem(this, -1)">↑</button>
|
|
<button type="button" class="sort-btn" onclick="moveItem(this, 1)">↓</button>
|
|
</div>
|
|
</div>
|
|
<div class="sortable-item" draggable="true" data-id="Rapidité de livraison">
|
|
<div class="sortable-left">
|
|
<span class="drag-icon">↕</span>
|
|
<span>Rapidité de livraison</span>
|
|
</div>
|
|
<div class="sort-actions">
|
|
<button type="button" class="sort-btn" onclick="moveItem(this, -1)">↑</button>
|
|
<button type="button" class="sort-btn" onclick="moveItem(this, 1)">↓</button>
|
|
</div>
|
|
</div>
|
|
<div class="sortable-item" draggable="true" data-id="Originalité/Créativité">
|
|
<div class="sortable-left">
|
|
<span class="drag-icon">↕</span>
|
|
<span>Originalité/Créativité</span>
|
|
</div>
|
|
<div class="sort-actions">
|
|
<button type="button" class="sort-btn" onclick="moveItem(this, -1)">↑</button>
|
|
<button type="button" class="sort-btn" onclick="moveItem(this, 1)">↓</button>
|
|
</div>
|
|
</div>
|
|
<div class="sortable-item" draggable="true" data-id="Prix">
|
|
<div class="sortable-left">
|
|
<span class="drag-icon">↕</span>
|
|
<span>Prix</span>
|
|
</div>
|
|
<div class="sort-actions">
|
|
<button type="button" class="sort-btn" onclick="moveItem(this, -1)">↑</button>
|
|
<button type="button" class="sort-btn" onclick="moveItem(this, 1)">↓</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="field-group">
|
|
<label class="field-label">
|
|
Si tu as un style en tete que tu veux sur ta production finale, met la moi ici!
|
|
</label>
|
|
<div class="file-upload-box" id="fileDropZone" onclick="document.getElementById('fileInput').click()">
|
|
<div class="file-upload-icon">↑</div>
|
|
<div class="file-upload-title">Click to choose a file or drag here</div>
|
|
<div class="file-upload-subtext">Size limit: 10 MB. Image, PDF, moodboard acceptés.</div>
|
|
<input type="file" id="fileInput" style="display:none" multiple accept="image/*,.pdf">
|
|
</div>
|
|
<div class="file-preview-list" id="filePreviewList"></div>
|
|
</div>
|
|
|
|
<div class="nav-buttons-row">
|
|
<button type="button" class="btn-tally-prev" onclick="goToStep(2)">← Précédent</button>
|
|
<button type="button" class="btn-tally-next" onclick="goToStep(4)">
|
|
Tout est bon? On passe a la finalisation? ➔
|
|
</button>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- ====================================================================
|
|
PAGE 4 : LOGIQUE CONDITIONNELLE (Plans Vidéo / Shooting Photo)
|
|
==================================================================== -->
|
|
<section class="form-step" id="step4">
|
|
|
|
<!-- Bloc Vidéo (Affiché si Flux cinématique ou Hybride) -->
|
|
<div id="conditionalVideoBlock" class="field-group" style="display:none;">
|
|
<label class="field-label">
|
|
Quels types de plans ? <span class="required-star">*</span>
|
|
</label>
|
|
<div class="tally-matrix-card">
|
|
<table class="matrix-table">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>Oui!</th>
|
|
<th>Je ne sait pas...</th>
|
|
<th>Non.</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>Plan de loin ou de paysage.</td>
|
|
<td><input type="radio" name="video_paysage" value="Oui!" class="matrix-radio"></td>
|
|
<td><input type="radio" name="video_paysage" value="Je ne sait pas..." class="matrix-radio"></td>
|
|
<td><input type="radio" name="video_paysage" value="Non." class="matrix-radio"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Suivi de sujet (ou naturels)</td>
|
|
<td><input type="radio" name="video_suivi" value="Oui!" class="matrix-radio"></td>
|
|
<td><input type="radio" name="video_suivi" value="Je ne sait pas..." class="matrix-radio"></td>
|
|
<td><input type="radio" name="video_suivi" value="Non." class="matrix-radio"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Plans dynamiques FPV</td>
|
|
<td><input type="radio" name="video_fpv" value="Oui!" class="matrix-radio"></td>
|
|
<td><input type="radio" name="video_fpv" value="Je ne sait pas..." class="matrix-radio"></td>
|
|
<td><input type="radio" name="video_fpv" value="Non." class="matrix-radio"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Bloc Photo (Affiché si Imagerie fixe ou Hybride) -->
|
|
<div id="conditionalPhotoBlock" class="field-group" style="display:none; margin-top: 28px;">
|
|
<label class="field-label">
|
|
Quels types de shooting ? <span class="required-star">*</span>
|
|
</label>
|
|
<div class="tally-matrix-card">
|
|
<table class="matrix-table">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>Certainement!</th>
|
|
<th>Aucune idée.</th>
|
|
<th>Certainement pas!</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>Portrait / plan large.</td>
|
|
<td><input type="radio" name="photo_portrait" value="Certainement!" class="matrix-radio"></td>
|
|
<td><input type="radio" name="photo_portrait" value="Aucune idée." class="matrix-radio"></td>
|
|
<td><input type="radio" name="photo_portrait" value="Certainement pas!" class="matrix-radio"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Photo au loin /</td>
|
|
<td><input type="radio" name="photo_loin" value="Certainement!" class="matrix-radio"></td>
|
|
<td><input type="radio" name="photo_loin" value="Aucune idée." class="matrix-radio"></td>
|
|
<td><input type="radio" name="photo_loin" value="Certainement pas!" class="matrix-radio"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Autre...</td>
|
|
<td><input type="radio" name="photo_autre" value="Certainement!" class="matrix-radio"></td>
|
|
<td><input type="radio" name="photo_autre" value="Aucune idée." class="matrix-radio"></td>
|
|
<td><input type="radio" name="photo_autre" value="Certainement pas!" class="matrix-radio"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Message si aucune condition spéciale n'est active -->
|
|
<div id="conditionalDefaultBlock" style="display:none; padding: 20px; background: #f9fafb; border-radius: 8px; margin-bottom: 20px;">
|
|
<p style="color: #4b5563; font-size: 14.5px;">
|
|
Tu as sélectionné une prestation spécifique ("Autre"). Aucun détail technique supplémentaire n'est requis à cette étape.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="nav-buttons-row">
|
|
<button type="button" class="btn-tally-prev" onclick="goToStep(3)">← Précédent</button>
|
|
<button type="button" class="btn-tally-next" onclick="goToStep(5)">
|
|
Dernière étape! ➔
|
|
</button>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- ====================================================================
|
|
PAGE 5 : CONCLUSION & SIGNATURE
|
|
==================================================================== -->
|
|
<section class="form-step" id="step5">
|
|
<div style="margin-bottom: 24px;">
|
|
<p style="font-size: 15px; color: #111827; margin-bottom: 6px;">
|
|
Veux tu m'aider a améliorer mon site? <a href="#" onclick="alert('Merci pour ton aide ! Tu pourras donner ton avis juste après validation.'); return false;" style="color: #2563eb; text-decoration: underline;">Vien ici!</a>
|
|
</p>
|
|
<p style="font-size: 13.5px; color: #6b7280;">
|
|
Si tu clique, noublie pas de valider.
|
|
</p>
|
|
</div>
|
|
|
|
<h2 style="font-size: 24px; font-weight: 800; line-height: 1.25; margin-bottom: 24px; color: #111827;">
|
|
Il te reste juste a envoyer! Merci et passe une agréable journée!
|
|
</h2>
|
|
|
|
<div class="field-group signature-area">
|
|
<label class="field-label" style="color: #9ca3af; font-size: 14px;">
|
|
Type a question <span class="required-star">*</span>
|
|
</label>
|
|
<div class="signature-canvas-container">
|
|
<canvas id="signaturePad" class="signature-canvas"></canvas>
|
|
<div class="signature-footer-line">
|
|
<span>Signiez ICI</span>
|
|
<button type="button" class="btn-clear-sig" onclick="clearSignature()">Effacer</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="nav-buttons-row">
|
|
<button type="button" class="btn-tally-prev" onclick="goToStep(4)">← Précédent</button>
|
|
<button type="button" class="btn-tally-next" onclick="submitForm()">
|
|
C'est parti ! ➔
|
|
</button>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- ====================================================================
|
|
ÉCRAN DE CONFIRMATION / LIVRABLE JSON
|
|
==================================================================== -->
|
|
<section class="form-step" id="stepSuccess">
|
|
<div class="success-card">
|
|
<div class="success-icon">✨</div>
|
|
<h2 class="success-title">Projet transmis avec succès !</h2>
|
|
<p class="success-text">
|
|
Merci pour toutes ces précisions. Vos réponses ont été collectées proprement au format JSON et sont prêtes à être traitées.
|
|
</p>
|
|
|
|
<div class="json-actions">
|
|
<button type="button" class="btn-action-primary" onclick="downloadJsonFile()">
|
|
📥 Télécharger les réponses (.json)
|
|
</button>
|
|
<button type="button" class="btn-action-secondary" onclick="copyJsonToClipboard()">
|
|
📋 Copier le JSON dans le presse-papier
|
|
</button>
|
|
<button type="button" class="btn-action-secondary" onclick="toggleJsonPreview()">
|
|
👁️ Afficher / Masquer le JSON brut
|
|
</button>
|
|
<button type="button" class="btn-tally-prev" style="margin-top: 10px;" onclick="resetForm()">
|
|
🔄 Recommencer le formulaire
|
|
</button>
|
|
</div>
|
|
|
|
<div id="jsonPreview" class="json-preview-container" style="display:none;"></div>
|
|
</div>
|
|
</section>
|
|
|
|
</main>
|
|
|
|
<!-- ====================================================================
|
|
MODAL TERMES ET CONDITIONS (Page 1)
|
|
==================================================================== -->
|
|
<div class="modal-overlay" id="cguModal">
|
|
<div class="modal-box">
|
|
<div class="modal-header">
|
|
<div class="modal-title">Termes & Conditions</div>
|
|
<button type="button" class="modal-close" id="closeCguModalBtn">×</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<p><strong>1. Intention de collaboration</strong><br>
|
|
En remplissant ce formulaire, vous formulez une demande d'échange et de devis pour des prestations créatives (photographie, production vidéo, prises de vues aériennes par drone FPV/4K).</p>
|
|
<br>
|
|
<p><strong>2. Prises de vues par Drone & Réglementation</strong><br>
|
|
Les tournages par drone sont soumis à la réglementation aérienne en vigueur (conditions météorologiques favorables, autorisations de vol en zones réglementées, déclaration de vol en agglomération si nécessaire).</p>
|
|
<br>
|
|
<p><strong>3. Confidentialité & Données</strong><br>
|
|
Les informations transmises restent strictement confidentielles et ne sont destinées qu'à l'étude de votre projet artistique ou professionnel.</p>
|
|
<br>
|
|
<p><strong>4. Devis & Facturation</strong><br>
|
|
Toute prestation fait l'objet d'un accord préalable formalisé par un devis validé avant le début effectif de la production.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Toast notification -->
|
|
<div class="toast-notice" id="toastNotice">Notification</div>
|
|
|
|
<!-- ====================================================================
|
|
LOGIQUE JAVASCRIPT & CONFIGURATION DES COLLECTES
|
|
==================================================================== -->
|
|
<script>
|
|
/* ==========================================================================
|
|
CONFIGURATION CENTRALE (INTERRUPTEURS ON / OFF)
|
|
========================================================================== */
|
|
const FORM_CONFIG = {
|
|
// 1. Télécharger automatiquement le fichier .json lors de la soumission finale
|
|
AUTO_DOWNLOAD_JSON: true, // [ON: true / OFF: false]
|
|
|
|
// 2. Transmettre le payload JSON à un Webhook (Make, Zapier, n8n, API PHP, etc.)
|
|
ENABLE_WEBHOOK: false, // [ON: true / OFF: false]
|
|
WEBHOOK_URL: 'https://mon-portfolio.fr/api/reception-tally', // URL de votre endpoint
|
|
|
|
// 3. Ouvrir le client de messagerie prérempli (mailto)
|
|
ENABLE_MAILTO: false, // [ON: true / OFF: false]
|
|
MAILTO_RECIPIENT: 'theo.photo@totoche1045fr.com',
|
|
|
|
// 4. Copier automatiquement le JSON dans le presse-papier de l'utilisateur
|
|
AUTO_COPY_CLIPBOARD: false, // [ON: true / OFF: false]
|
|
|
|
// 5. Sauvegarde automatique du brouillon en LocalStorage (pour ne rien perdre au refresh)
|
|
ENABLE_AUTOSAVE: true // [ON: true / OFF: false]
|
|
};
|
|
|
|
/* ==========================================================================
|
|
ÉTAT DE L'APPLICATION
|
|
========================================================================== */
|
|
let currentStep = 1;
|
|
const totalSteps = 5;
|
|
|
|
let formData = {
|
|
client: {
|
|
nomEntreprise: '',
|
|
email: '',
|
|
telephone: '',
|
|
cguAcceptees: false
|
|
},
|
|
projet: {
|
|
typePrestation: 'Flux cinématique.', // Par défaut
|
|
idees: [],
|
|
lieu: '',
|
|
histoire: '',
|
|
ambiance: ''
|
|
},
|
|
logistique: {
|
|
datePrevue: '',
|
|
dureeEstimee: '',
|
|
utilisationMedias: {
|
|
reseauxSociaux: '',
|
|
siteWebPortfolio: '',
|
|
impressionHD: '',
|
|
diffusionTV: ''
|
|
},
|
|
budget: 100,
|
|
budgetAttentesPrioritaires: '',
|
|
ordreImportance: [
|
|
'Qualité visuelle',
|
|
'Rapidité de livraison',
|
|
'Originalité/Créativité',
|
|
'Prix'
|
|
],
|
|
fichiersStyle: []
|
|
},
|
|
detailsTechniques: {
|
|
plansVideo: {
|
|
planPaysage: '',
|
|
suiviSujet: '',
|
|
plansFPV: ''
|
|
},
|
|
shootingPhoto: {
|
|
portraitPlanLarge: '',
|
|
photoLoin: '',
|
|
autre: ''
|
|
}
|
|
},
|
|
signature: {
|
|
imageDateUri: '',
|
|
signedAt: null
|
|
},
|
|
metadata: {
|
|
submittedAt: null,
|
|
userAgent: navigator.userAgent
|
|
}
|
|
};
|
|
|
|
/* ==========================================================================
|
|
GESTION DE LA NAVIGATION & DES ÉTAPES
|
|
========================================================================== */
|
|
function updateProgressBar() {
|
|
const bar = document.getElementById('progressBar');
|
|
const percentage = (currentStep / totalSteps) * 100;
|
|
bar.style.width = percentage + '%';
|
|
}
|
|
|
|
function goToStep(step) {
|
|
// Sauvegarde des données de l'étape courante
|
|
harvestCurrentStepData();
|
|
|
|
// Validation rapide de l'étape 1
|
|
if (step > 1 && currentStep === 1) {
|
|
if (!formData.client.email && !formData.client.telephone) {
|
|
showToast('Veuillez renseigner au moins un email ou téléphone.');
|
|
return;
|
|
}
|
|
if (!formData.client.cguAcceptees) {
|
|
showToast('Veuillez accepter les termes et conditions pour continuer.');
|
|
return;
|
|
}
|
|
}
|
|
|
|
// Gestion de la logique conditionnelle pour l'étape 4
|
|
if (step === 4) {
|
|
applyConditionalLogic();
|
|
}
|
|
|
|
// Transition d'écran
|
|
document.querySelectorAll('.form-step').forEach(el => el.classList.remove('active'));
|
|
const target = document.getElementById('step' + step);
|
|
if (target) {
|
|
target.classList.add('active');
|
|
currentStep = step;
|
|
updateProgressBar();
|
|
window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
}
|
|
|
|
// Redimensionner le canvas de signature quand la page 5 devient visible
|
|
if (step === 5) {
|
|
setTimeout(initSignatureCanvasSize, 50);
|
|
}
|
|
}
|
|
|
|
function applyConditionalLogic() {
|
|
const prestation = formData.projet.typePrestation || '';
|
|
const videoBlock = document.getElementById('conditionalVideoBlock');
|
|
const photoBlock = document.getElementById('conditionalPhotoBlock');
|
|
const defaultBlock = document.getElementById('conditionalDefaultBlock');
|
|
|
|
let showVideo = prestation.includes('Flux cinématique') || prestation.includes('Hybride');
|
|
let showPhoto = prestation.includes('Imagerie fixe') || prestation.includes('Hybride');
|
|
|
|
videoBlock.style.display = showVideo ? 'block' : 'none';
|
|
photoBlock.style.display = showPhoto ? 'block' : 'none';
|
|
|
|
if (!showVideo && !showPhoto) {
|
|
defaultBlock.style.display = 'block';
|
|
} else {
|
|
defaultBlock.style.display = 'none';
|
|
}
|
|
}
|
|
|
|
/* ==========================================================================
|
|
COLLECTE DES DONNÉES DEPUIS LE DOM
|
|
========================================================================== */
|
|
function harvestCurrentStepData() {
|
|
// Page 1
|
|
formData.client.nomEntreprise = document.getElementById('clientName').value.trim();
|
|
formData.client.email = document.getElementById('clientEmail').value.trim();
|
|
formData.client.telephone = document.getElementById('clientPhone').value.trim();
|
|
formData.client.cguAcceptees = document.getElementById('acceptCgu').checked;
|
|
|
|
// Page 2
|
|
formData.projet.lieu = document.getElementById('projectLocation').value.trim();
|
|
formData.projet.histoire = document.getElementById('projectStory').value.trim();
|
|
|
|
// Page 3
|
|
formData.logistique.datePrevue = document.getElementById('projectDate').value;
|
|
const durationRadio = document.querySelector('input[name="duration"]:checked');
|
|
if (durationRadio) formData.logistique.dureeEstimee = durationRadio.value;
|
|
|
|
// Tableaux médias
|
|
const r1 = document.querySelector('input[name="media_reseaux"]:checked');
|
|
if (r1) formData.logistique.utilisationMedias.reseauxSociaux = r1.value;
|
|
const r2 = document.querySelector('input[name="media_web"]:checked');
|
|
if (r2) formData.logistique.utilisationMedias.siteWebPortfolio = r2.value;
|
|
const r3 = document.querySelector('input[name="media_print"]:checked');
|
|
if (r3) formData.logistique.utilisationMedias.impressionHD = r3.value;
|
|
const r4 = document.querySelector('input[name="media_tv"]:checked');
|
|
if (r4) formData.logistique.utilisationMedias.diffusionTV = r4.value;
|
|
|
|
formData.logistique.budgetAttentesPrioritaires = document.getElementById('budgetDetails').value.trim();
|
|
|
|
// Page 4 : Détails techniques
|
|
const v1 = document.querySelector('input[name="video_paysage"]:checked');
|
|
if (v1) formData.detailsTechniques.plansVideo.planPaysage = v1.value;
|
|
const v2 = document.querySelector('input[name="video_suivi"]:checked');
|
|
if (v2) formData.detailsTechniques.plansVideo.suiviSujet = v2.value;
|
|
const v3 = document.querySelector('input[name="video_fpv"]:checked');
|
|
if (v3) formData.detailsTechniques.plansVideo.plansFPV = v3.value;
|
|
|
|
const p1 = document.querySelector('input[name="photo_portrait"]:checked');
|
|
if (p1) formData.detailsTechniques.shootingPhoto.portraitPlanLarge = p1.value;
|
|
const p2 = document.querySelector('input[name="photo_loin"]:checked');
|
|
if (p2) formData.detailsTechniques.shootingPhoto.photoLoin = p2.value;
|
|
const p3 = document.querySelector('input[name="photo_autre"]:checked');
|
|
if (p3) formData.detailsTechniques.shootingPhoto.autre = p3.value;
|
|
|
|
if (FORM_CONFIG.ENABLE_AUTOSAVE) {
|
|
try {
|
|
localStorage.setItem('tally_portfolio_draft', JSON.stringify(formData));
|
|
} catch(e) {}
|
|
}
|
|
}
|
|
|
|
/* ==========================================================================
|
|
ÉLÉMENTS INTERACTIFS SPÉCIFIQUES TALLY
|
|
========================================================================== */
|
|
// Sélecteur tag couleur (Page 2)
|
|
function selectPrestationTag(element) {
|
|
document.querySelectorAll('#prestationGroup .pill-tag-btn').forEach(btn => btn.classList.remove('active'));
|
|
element.classList.add('active');
|
|
formData.projet.typePrestation = element.getAttribute('data-value');
|
|
}
|
|
|
|
// Sélecteur cartes multiples (C'est quoi l'idée ?)
|
|
function toggleOptionCard(element) {
|
|
element.classList.toggle('selected');
|
|
const val = element.getAttribute('data-value');
|
|
const index = formData.projet.idees.indexOf(val);
|
|
if (index > -1) {
|
|
formData.projet.idees.splice(index, 1);
|
|
} else {
|
|
formData.projet.idees.push(val);
|
|
}
|
|
}
|
|
|
|
// Sélecteur carte unique (Ambiance)
|
|
function selectSingleCard(element, groupId) {
|
|
document.querySelectorAll(`#${groupId} .option-card-row`).forEach(card => card.classList.remove('selected'));
|
|
element.classList.add('selected');
|
|
formData.projet.ambiance = element.getAttribute('data-value');
|
|
}
|
|
|
|
// Échelle de budget
|
|
function selectBudget(amount) {
|
|
document.querySelectorAll('.budget-btn').forEach(b => b.classList.remove('selected'));
|
|
event.target.classList.add('selected');
|
|
formData.logistique.budget = amount;
|
|
}
|
|
|
|
// Ordre d'importance : Réorganisation par flèches et drag&drop
|
|
function moveItem(btn, direction) {
|
|
const item = btn.closest('.sortable-item');
|
|
const list = document.getElementById('priorityList');
|
|
if (direction === -1 && item.previousElementSibling) {
|
|
list.insertBefore(item, item.previousElementSibling);
|
|
} else if (direction === 1 && item.nextElementSibling) {
|
|
list.insertBefore(item.nextElementSibling, item);
|
|
}
|
|
updatePrioritiesFromDom();
|
|
}
|
|
|
|
function updatePrioritiesFromDom() {
|
|
const items = document.querySelectorAll('#priorityList .sortable-item');
|
|
formData.logistique.ordreImportance = Array.from(items).map(i => i.getAttribute('data-id'));
|
|
}
|
|
|
|
// Drag and drop natif pour la liste ordonnée
|
|
const sortableList = document.getElementById('priorityList');
|
|
let draggedItem = null;
|
|
|
|
sortableList.addEventListener('dragstart', (e) => {
|
|
draggedItem = e.target.closest('.sortable-item');
|
|
if (draggedItem) draggedItem.classList.add('dragging');
|
|
});
|
|
sortableList.addEventListener('dragend', () => {
|
|
if (draggedItem) draggedItem.classList.remove('dragging');
|
|
draggedItem = null;
|
|
updatePrioritiesFromDom();
|
|
});
|
|
sortableList.addEventListener('dragover', (e) => {
|
|
e.preventDefault();
|
|
const afterElement = getDragAfterElement(sortableList, e.clientY);
|
|
if (draggedItem) {
|
|
if (afterElement == null) {
|
|
sortableList.appendChild(draggedItem);
|
|
} else {
|
|
sortableList.insertBefore(draggedItem, afterElement);
|
|
}
|
|
}
|
|
});
|
|
|
|
function getDragAfterElement(container, y) {
|
|
const draggableElements = [...container.querySelectorAll('.sortable-item:not(.dragging)')];
|
|
return draggableElements.reduce((closest, child) => {
|
|
const box = child.getBoundingClientRect();
|
|
const offset = y - box.top - box.height / 2;
|
|
if (offset < 0 && offset > closest.offset) {
|
|
return { offset: offset, element: child };
|
|
} else {
|
|
return closest;
|
|
}
|
|
}, { offset: Number.NEGATIVE_INFINITY }).element;
|
|
}
|
|
|
|
// Gestion du Moodboard / File Upload
|
|
const fileDropZone = document.getElementById('fileDropZone');
|
|
const fileInput = document.getElementById('fileInput');
|
|
const filePreviewList = document.getElementById('filePreviewList');
|
|
|
|
fileDropZone.addEventListener('dragover', (e) => {
|
|
e.preventDefault();
|
|
fileDropZone.classList.add('dragover');
|
|
});
|
|
fileDropZone.addEventListener('dragleave', () => {
|
|
fileDropZone.classList.remove('dragover');
|
|
});
|
|
fileDropZone.addEventListener('drop', (e) => {
|
|
e.preventDefault();
|
|
fileDropZone.classList.remove('dragover');
|
|
handleFiles(e.dataTransfer.files);
|
|
});
|
|
fileInput.addEventListener('change', (e) => {
|
|
handleFiles(e.target.files);
|
|
});
|
|
|
|
function handleFiles(files) {
|
|
Array.from(files).forEach(file => {
|
|
if (file.size > 10 * 1024 * 1024) {
|
|
showToast(`Fichier trop volumineux (>10 Mo) : ${file.name}`);
|
|
return;
|
|
}
|
|
const fileObj = {
|
|
name: file.name,
|
|
size: Math.round(file.size / 1024) + ' Ko',
|
|
type: file.type
|
|
};
|
|
formData.logistique.fichiersStyle.push(fileObj);
|
|
|
|
// Rendu visuel
|
|
const chip = document.createElement('div');
|
|
chip.className = 'file-preview-chip';
|
|
chip.innerHTML = `
|
|
<span>📎 ${file.name} (${fileObj.size})</span>
|
|
<span class="file-remove-btn" onclick="removeFile('${file.name}', this)">✕</span>
|
|
`;
|
|
filePreviewList.appendChild(chip);
|
|
});
|
|
}
|
|
|
|
function removeFile(fileName, el) {
|
|
formData.logistique.fichiersStyle = formData.logistique.fichiersStyle.filter(f => f.name !== fileName);
|
|
el.closest('.file-preview-chip').remove();
|
|
}
|
|
|
|
/* ==========================================================================
|
|
CANVAS DE SIGNATURE NUMÉRIQUE (Page 5)
|
|
========================================================================== */
|
|
const canvas = document.getElementById('signaturePad');
|
|
const ctx = canvas.getContext('2d');
|
|
let isDrawing = false;
|
|
let hasSigned = false;
|
|
|
|
function initSignatureCanvasSize() {
|
|
const rect = canvas.getBoundingClientRect();
|
|
canvas.width = rect.width * window.devicePixelRatio;
|
|
canvas.height = rect.height * window.devicePixelRatio;
|
|
ctx.scale(window.devicePixelRatio, window.devicePixelRatio);
|
|
ctx.lineWidth = 2.2;
|
|
ctx.lineCap = 'round';
|
|
ctx.lineJoin = 'round';
|
|
ctx.strokeStyle = '#111827';
|
|
}
|
|
|
|
function getCanvasCoords(e) {
|
|
const rect = canvas.getBoundingClientRect();
|
|
const clientX = e.touches ? e.touches[0].clientX : e.clientX;
|
|
const clientY = e.touches ? e.touches[0].clientY : e.clientY;
|
|
return {
|
|
x: clientX - rect.left,
|
|
y: clientY - rect.top
|
|
};
|
|
}
|
|
|
|
function startSign(e) {
|
|
isDrawing = true;
|
|
hasSigned = true;
|
|
const coords = getCanvasCoords(e);
|
|
ctx.beginPath();
|
|
ctx.moveTo(coords.x, coords.y);
|
|
}
|
|
function drawSign(e) {
|
|
if (!isDrawing) return;
|
|
e.preventDefault();
|
|
const coords = getCanvasCoords(e);
|
|
ctx.lineTo(coords.x, coords.y);
|
|
ctx.stroke();
|
|
}
|
|
function stopSign() {
|
|
isDrawing = false;
|
|
}
|
|
function clearSignature() {
|
|
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
hasSigned = false;
|
|
formData.signature.imageDateUri = '';
|
|
}
|
|
|
|
canvas.addEventListener('mousedown', startSign);
|
|
canvas.addEventListener('mousemove', drawSign);
|
|
window.addEventListener('mouseup', stopSign);
|
|
|
|
canvas.addEventListener('touchstart', startSign, { passive: false });
|
|
canvas.addEventListener('touchmove', drawSign, { passive: false });
|
|
window.addEventListener('touchend', stopSign);
|
|
|
|
/* ==========================================================================
|
|
SOUMISSION FINALE & EXPORT JSON
|
|
========================================================================== */
|
|
function submitForm() {
|
|
harvestCurrentStepData();
|
|
|
|
if (hasSigned) {
|
|
formData.signature.imageDateUri = canvas.toDataURL('image/png');
|
|
formData.signature.signedAt = new Date().toISOString();
|
|
}
|
|
formData.metadata.submittedAt = new Date().toISOString();
|
|
|
|
// 1. Déclenchement webhook si activé (ON)
|
|
if (FORM_CONFIG.ENABLE_WEBHOOK && FORM_CONFIG.WEBHOOK_URL) {
|
|
try {
|
|
fetch(FORM_CONFIG.WEBHOOK_URL, {
|
|
method: 'POST',
|
|
headers: { 'Content-Type': 'application/json' },
|
|
body: JSON.stringify(formData)
|
|
}).catch(err => console.warn('Webhook non joint (attendu en local):', err));
|
|
} catch(e) {}
|
|
}
|
|
|
|
// 2. Déclenchement automatique du téléchargement JSON si activé (ON)
|
|
if (FORM_CONFIG.AUTO_DOWNLOAD_JSON) {
|
|
downloadJsonFile();
|
|
}
|
|
|
|
// 3. Copie presse-papier si activée (ON)
|
|
if (FORM_CONFIG.AUTO_COPY_CLIPBOARD) {
|
|
copyJsonToClipboard(false);
|
|
}
|
|
|
|
// 4. Déclenchement mailto si activé (ON)
|
|
if (FORM_CONFIG.ENABLE_MAILTO && FORM_CONFIG.MAILTO_RECIPIENT) {
|
|
const subject = encodeURIComponent(`Nouvelle collaboration : ${formData.client.nomEntreprise || 'Client'}`);
|
|
const body = encodeURIComponent(`Voici le récapitulatif du projet:\n\n${JSON.stringify(formData, null, 2)}`);
|
|
window.location.href = `mailto:${FORM_CONFIG.MAILTO_RECIPIENT}?subject=${subject}&body=${body}`;
|
|
}
|
|
|
|
// Afficher l'écran de confirmation
|
|
document.querySelectorAll('.form-step').forEach(el => el.classList.remove('active'));
|
|
document.getElementById('stepSuccess').classList.add('active');
|
|
document.getElementById('progressBar').style.width = '100%';
|
|
|
|
// Remplir le visualiseur JSON
|
|
document.getElementById('jsonPreview').textContent = JSON.stringify(formData, null, 2);
|
|
}
|
|
|
|
/* ==========================================================================
|
|
UTILITAIRES DE LIVRABLE JSON
|
|
========================================================================== */
|
|
function downloadJsonFile() {
|
|
const jsonStr = JSON.stringify(formData, null, 2);
|
|
const blob = new Blob([jsonStr], { type: 'application/json;charset=utf-8;' });
|
|
const url = URL.createObjectURL(blob);
|
|
const link = document.createElement('a');
|
|
const safeName = (formData.client.nomEntreprise || 'projet').toLowerCase().replace(/[^a-z0-9]/g, '_');
|
|
const dateStr = new Date().toISOString().slice(0, 10);
|
|
link.href = url;
|
|
link.setAttribute('download', `reponses_${safeName}_${dateStr}.json`);
|
|
document.body.appendChild(link);
|
|
link.click();
|
|
document.body.removeChild(link);
|
|
URL.revokeObjectURL(url);
|
|
showToast('Fichier JSON téléchargé !');
|
|
}
|
|
|
|
function copyJsonToClipboard(withToast = true) {
|
|
const jsonStr = JSON.stringify(formData, null, 2);
|
|
navigator.clipboard.writeText(jsonStr).then(() => {
|
|
if (withToast) showToast('JSON copié dans le presse-papier !');
|
|
}).catch(() => {
|
|
showToast('Impossible de copier automatiquement.');
|
|
});
|
|
}
|
|
|
|
function toggleJsonPreview() {
|
|
const box = document.getElementById('jsonPreview');
|
|
box.style.display = box.style.display === 'none' ? 'block' : 'none';
|
|
}
|
|
|
|
function resetForm() {
|
|
if (confirm('Voulez-vous réinitialiser le formulaire ?')) {
|
|
localStorage.removeItem('tally_portfolio_draft');
|
|
window.location.reload();
|
|
}
|
|
}
|
|
|
|
function showToast(msg) {
|
|
const toast = document.getElementById('toastNotice');
|
|
toast.textContent = msg;
|
|
toast.classList.add('show');
|
|
setTimeout(() => toast.classList.remove('show'), 3000);
|
|
}
|
|
|
|
/* ==========================================================================
|
|
MODAL TERMES ET CONDITIONS
|
|
========================================================================== */
|
|
const modal = document.getElementById('cguModal');
|
|
document.getElementById('openCguModalBtn').addEventListener('click', () => modal.classList.add('active'));
|
|
document.getElementById('closeCguModalBtn').addEventListener('click', () => modal.classList.remove('active'));
|
|
modal.addEventListener('click', (e) => {
|
|
if (e.target === modal) modal.classList.remove('active');
|
|
});
|
|
|
|
/* ==========================================================================
|
|
INITIALISATION AU CHARGEMENT
|
|
========================================================================== */
|
|
window.addEventListener('DOMContentLoaded', () => {
|
|
// Par défaut, activer le premier tag de prestation
|
|
const firstTag = document.querySelector('#prestationGroup .pill-purple');
|
|
if (firstTag) firstTag.classList.add('active');
|
|
|
|
// Par défaut, activer un bouton budget
|
|
const budget100 = document.querySelectorAll('.budget-btn')[3];
|
|
if (budget100) budget100.classList.add('selected');
|
|
|
|
updateProgressBar();
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|