* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #E91E8C 0%, #C0156F 100%);
    min-height: 100vh;
    padding: 16px 16px 56px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

.header {
    background: white;
    padding: 20px 30px;
    border-bottom: 4px solid #E91E8C;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-logo {
    height: 80px;
    width: auto;
    flex-shrink: 0;
    border-radius: 6px;
}

.header h1 {
    font-size: 1.8em;
    color: #222;
    margin-bottom: 4px;
}

.header p {
    font-size: 1em;
    color: #666;
}

.header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 6px;
    font-size: 0.88em;
    color: #444;
    font-weight: 500;
}

.content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    padding: 20px;
    flex: 1;
    min-height: 0;
    align-items: stretch;
}

.plan-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

.plan-title {
    font-size: 1.5em;
    color: #333;
    font-weight: 600;
}

.plan-container {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    min-height: 0;
    position: relative;
    cursor: grab;
    user-select: none;
}

.zoom-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    z-index: 100;
    background: white;
    padding: 8px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.zoom-btn {
    padding: 8px 12px;
    background: #E91E8C;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.zoom-btn:hover {
    background: #C0156F;
    transform: scale(1.05);
}

.zoom-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.zoom-level {
    display: flex;
    align-items: center;
    padding: 0 10px;
    color: #333;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
}

#svgContainer {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center;
    transition: transform 0.3s ease;
}

#plan {
    display: block;
}

/* Styles pour les emplacements */
#plan rect {
    cursor: pointer;
    transition: all 0.3s ease;
    stroke-width: 2;
}

#plan rect:hover {
    filter: brightness(0.9);
    stroke: #333 !important;
    stroke-width: 3;
}

/* Disponible - Vert */
.available {
    fill: #4CAF50 !important;
    stroke: #45a049 !important;
    opacity: 0.7;
}

#plan rect.available:hover {
    opacity: 1;
}

/* Occupé - Gris */
.occupied {
    fill: #9E9E9E !important;
    stroke: #757575 !important;
    opacity: 0.5;
    cursor: not-allowed;
}

#plan rect.occupied:hover {
    filter: none;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Bloqué (Zone fermée) - Orange/Rouge */
.blocked {
    fill: #ff9800 !important;
    stroke: #f57c00 !important;
    opacity: 0.6;
    cursor: not-allowed;
}

#plan rect.blocked:hover {
    filter: none;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Sélectionné - Bleu */
.selected {
    fill: #00AEEF !important;
    stroke: #008AC2 !important;
    opacity: 1;
    stroke-width: 3;
    filter: drop-shadow(0 0 8px rgba(0, 174, 239, 0.6));
}

/* Autres éléments SVG (background, images, paths) */
#plan image,
#plan path,
#plan text,
#plan g:not([class]) {
    pointer-events: none;
}

#plan rect {
    pointer-events: auto !important;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    min-height: 0;
}

.sidebar-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 2px solid #e0e0e0;
}

.sidebar-section h3 {
    font-size: 1.1em;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
    border-bottom: 2px solid #E91E8C;
    padding-bottom: 10px;
}

.legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95em;
}

.legend-color {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    border: 2px solid #333;
    flex-shrink: 0;
}

.legend-available {
    background: #4CAF50;
}

.legend-occupied {
    background: #9E9E9E;
}

.legend-selected {
    background: #00AEEF;
    box-shadow: 0 0 8px rgba(0, 174, 239, 0.6);
}

.legend-blocked {
    background: #ff9800;
}

.selected-info {
    background: white;
    border: 2px solid #00AEEF;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    box-sizing: border-box;
    overflow: hidden;
}

.selected-count-badge {
    font-size: 2.2em;
    font-weight: bold;
    color: #00AEEF;
    line-height: 1;
}

.selected-label {
    font-size: 0.85em;
    color: #666;
    margin: 4px 0 10px;
}

.selected-number {
    font-size: 1em;
    color: #444;
    font-weight: 600;
    word-break: break-all;
    background: #EBF7FD;
    border-radius: 4px;
    padding: 6px 8px;
    margin-top: 6px;
}

.selection-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    width: 100%;
}

.selection-actions .btn-primary {
    flex: 1;
    min-width: 0;
}

.selection-actions .btn-secondary {
    flex: 0 0 auto;
    min-width: 0;
    padding: 12px 10px;
    font-size: .82em;
    white-space: nowrap;
}

button {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #E91E8C 0%, #C0156F 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(233, 30, 140, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
    border: 2px solid #ddd;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #e0e0e0;
}

.stat-item {
    text-align: center;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #E91E8C;
}

.stat-label {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    padding: 20px 0;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    text-align: center;
    margin: auto;
}

.modal-content h2 {
    color: #333;
    margin-bottom: 20px;
}

.modal-content p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

.modal-actions button {
    min-width: 140px;
}

/* Modal formulaire */
.modal-form {
    max-width: 580px;
    text-align: left;
}

.modal-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.modal-header-bar h2 {
    color: #333;
    font-size: 1.4em;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.8em;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

.modal-close:hover {
    color: #333;
    transform: none;
    box-shadow: none;
}

.booking-summary {
    background: #EBF7FD;
    border: 1.5px solid #B3E5FC;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: baseline;
}

.summary-label {
    font-size: 0.9em;
    color: #555;
    white-space: nowrap;
}

.summary-emplacements {
    font-weight: 700;
    color: #006FA6;
    font-size: 0.95em;
    word-break: break-all;
}

/* Champs du formulaire */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-group label {
    font-size: 0.9em;
    font-weight: 600;
    color: #333;
}

.required {
    color: #e53935;
}

.optional {
    font-weight: 400;
    color: #999;
    font-size: 0.85em;
}

.form-group input,
.form-group textarea {
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95em;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    color: #333;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #00AEEF;
    box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.15);
}

.form-group input.invalid,
.form-group textarea.invalid {
    border-color: #e53935;
}

.form-group input.invalid:focus,
.form-group textarea.invalid:focus {
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.field-error {
    font-size: 0.82em;
    color: #e53935;
    min-height: 16px;
}

.form-notice {
    font-size: 0.82em;
    color: #999;
    margin-bottom: 8px;
    margin-top: 4px;
}

.registrations-closed-banner {
    background: #fce4ec;
    border-bottom: 3px solid #c62828;
    padding: 16px 24px;
    text-align: center;
    font-size: 1em;
    color: #b71c1c;
}

.riverain-only-banner {
    background: #fff3e0;
    border-bottom: 3px solid #f57c00;
    padding: 14px 24px;
    text-align: center;
    font-size: .97em;
    color: #e65100;
}

.form-riverain-notice {
    background: #fff3e0;
    border-left: 4px solid #f57c00;
    border-radius: 4px;
    padding: 10px 14px;
    font-size: .88em;
    color: #e65100;
    margin-bottom: 16px;
}

.riverain-block {
    background: #e8f5e9;
    border: 2px solid #66bb6a;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.riverain-checkbox-label {
    font-weight: 600;
    font-size: .97em;
    color: #2e7d32;
}

.riverain-checkbox-label small {
    font-weight: 400;
    color: #555;
    font-size: .85em;
}

.caution-notice {
    background: #fff8e1;
    border-left: 4px solid #f9a825;
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 0.88em;
    color: #555;
    margin-bottom: 12px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.92em;
    color: #333;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: #E91E8C;
}

.checkbox-label a {
    color: #E91E8C;
    text-decoration: underline;
}

/* Modal succès */
.modal-success {
    max-width: 420px;
    text-align: center;
}

.success-icon {
    width: 64px;
    height: 64px;
    background: #4CAF50;
    color: white;
    border-radius: 50%;
    font-size: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-weight: bold;
}

.modal-success h2 {
    color: #333;
    margin-bottom: 12px;
}

.modal-success p {
    color: #555;
    margin-bottom: 8px;
    line-height: 1.5;
}

.success-sub {
    font-size: 0.9em;
    color: #999;
    margin-bottom: 24px !important;
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    body {
        padding: 0 0 56px;
    }

    .container {
        border-radius: 0;
        height: auto;
        min-height: 100vh;
    }

    .content {
        grid-template-columns: 1fr;
        flex: none;
        height: auto;
    }

    .plan-container {
        min-height: 400px;
        flex: none;
        height: 60vw;
    }

    .sidebar {
        flex-direction: row;
        flex-wrap: wrap;
        overflow-y: visible;
    }

    .sidebar-section {
        flex: 1;
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8em;
    }

    .content {
        padding: 15px;
    }

    .plan-container {
        min-height: 300px;
        padding: 10px;
    }

    .sidebar {
        flex-direction: column;
    }
}

.toast {
    position: fixed;
    bottom: 64px;
    right: 20px;
    background: #333;
    color: white;
    padding: 15px 20px;
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.info-box {
    background: #E5F5FD;
    border-left: 4px solid #00AEEF;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
    font-size: 0.95em;
    color: #006FA6;
}


.site-footer {
    text-align: center;
    padding: 14px;
    font-size: .78em;
    color: #aaa;
    border-top: 1px solid #e8e8e8;
    margin-top: 20px;
    background: #fafafa;
}

.site-footer a {
    color: #E91E8C;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* ── Footer VVP Solutions ──────────────────────────────────────────────────── */
.vvp-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background-color: #1a3a52;
    border-top: 3px solid #f09d1a;
    padding: 0.4rem 1.5rem;
}

.vvp-footer-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.vvp-footer-logo {
    height: 26px;
    width: auto;
    background-color: #ffffff;
    padding: 3px 8px;
    border-radius: 4px;
}

.vvp-footer-text {
    color: #c9dce8;
    font-size: 0.78rem;
}

.vvp-footer-text strong {
    color: #e8f2f8;
}

.vvp-footer-sep {
    margin: 0 0.25rem;
    color: #f09d1a;
}

.vvp-footer-link {
    color: #f09d1a;
    text-decoration: none;
}

.vvp-footer-link:hover {
    color: #fbb740;
    text-decoration: underline;
}
