/* style.css */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 20px;
    background-color: #020817;
    font-family: 'Montserrat', sans-serif;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.app-container {
    width: 100%;
    max-width: 650px;
}

/* Barre du navigateur */
.browser-bar {
    background: #091530;
    padding: 10px 15px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    display: flex;
    align-items: center;
    border: 1px solid #1a305d;
    border-bottom: none;
}

.dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.url-bar {
    background: #030a1c;
    color: #7b93be;
    font-size: 11px;
    padding: 4px 15px;
    border-radius: 12px;
    margin-left: 15px;
    flex-grow: 1;
    text-align: center;
    border: 1px solid #142544;
}

/* Wrapper du flyer */
.flyer-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #040e24;
    border-left: 1px solid #1a305d;
    border-right: 1px solid #1a305d;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    overflow: hidden;
    user-select: none;
}

#flyerCanvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
}

#flyerCanvas:active {
    cursor: grabbing;
}

/* Panneau de contrôle */
.controls-panel {
    background: #091530;
    padding: 20px;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    border: 1px solid #1a305d;
    border-top: none;
}

.adjust-tools {
    display: none; /* caché tant qu'aucune photo n'est importée */
    align-items: center;
    justify-content: space-between;
    background: #040e24;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #142544;
    gap: 15px;
    flex-wrap: wrap;
}

.zoom-control {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.zoom-control label {
    font-size: 12px;
    font-weight: 700;
    color: #7b93be;
    white-space: nowrap;
}

.zoom-control input[type="range"] {
    flex: 1;
    accent-color: #ff6600;
    cursor: pointer;
    min-width: 100px;
}

#zoomValue {
    color: #ff6600;
    font-weight: 700;
    font-size: 14px;
    min-width: 40px;
    text-align: center;
}

.btn {
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-family: 'Montserrat', sans-serif;
    white-space: nowrap;
}

.btn-primary {
    background-color: #ff6600;
    color: #ffffff;
}
.btn-primary:hover {
    background-color: #e55c00;
}

.btn-success {
    background-color: #27c93f;
    color: #051330;
}
.btn-success:hover:not(:disabled) {
    background-color: #1fb035;
}
.btn-success:disabled {
    background-color: #234433;
    color: #628a73;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: #1a305d;
    color: #ffffff;
}
.btn-secondary:hover {
    background-color: #23447a;
}

.btn-group {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-group .btn {
    flex: 1;
}

.instructions {
    text-align: center;
    font-size: 11px;
    color: #7b93be;
    margin-top: 5px;
}

/* Responsive */
@media (max-width: 480px) {
    .adjust-tools {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .zoom-control {
        flex-wrap: wrap;
    }
    .btn-group {
        flex-direction: column;
    }
}
