/* camera-capture.css - Styles pour le composant de capture caméra */

.camera-capture-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.camera-start {
    text-align: center;
    padding: 2rem;
}

.camera-view {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.video-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 0.5rem;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Overlay de cadrage */
.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

.crop-frame {
    position: absolute;
    left: 30%;
    top: 10%;
    width: 40%;
    height: 60%;
    border: 3px solid #fff;
    border-radius: 0.5rem;
    box-shadow: 
        0 0 0 9999px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Coins du cadre */
.crop-frame .corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid #4CAF50;
}

.crop-frame .corner.top-left {
    top: -3px;
    left: -3px;
    border-right: none;
    border-bottom: none;
    border-top-left-radius: 0.5rem;
}

.crop-frame .corner.top-right {
    top: -3px;
    right: -3px;
    border-left: none;
    border-bottom: none;
    border-top-right-radius: 0.5rem;
}

.crop-frame .corner.bottom-left {
    bottom: -3px;
    left: -3px;
    border-right: none;
    border-top: none;
    border-bottom-left-radius: 0.5rem;
}

.crop-frame .corner.bottom-right {
    bottom: -3px;
    right: -3px;
    border-left: none;
    border-top: none;
    border-bottom-right-radius: 0.5rem;
}

/* Texte guide */
.guide-text {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.5);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    line-height: 1.5;
}

/* Contrôles */
.camera-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.camera-controls button {
    min-width: 200px;
}

/* Animations */
@keyframes pulse-frame {
    0%, 100% {
        box-shadow: 
            0 0 0 9999px rgba(0, 0, 0, 0.4),
            0 0 20px rgba(255, 255, 255, 0.5);
    }
    50% {
        box-shadow: 
            0 0 0 9999px rgba(0, 0, 0, 0.4),
            0 0 30px rgba(255, 255, 255, 0.8);
    }
}

.crop-frame {
    animation: pulse-frame 2s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .camera-capture-container {
        max-width: 100%;
    }

    .video-container {
        aspect-ratio: 3/4;
    }

    .crop-frame {
        left: 15%;
        width: 70%;
    }

    .guide-text {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }

    .camera-controls button {
        min-width: 150px;
        font-size: 0.9rem;
    }
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
    .crop-overlay {
        background: rgba(0, 0, 0, 0.6);
    }
}
