/* ==========
   Layout de base
   ========== */
body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f5f6fa;
    color: #222;
}

/* marge latérale de 20% */
.record-page {
    max-width: 900px;
    margin: 40px 20%;
    padding: 0 0 40px;
}

.record-page h1 {
    text-align: left;
    margin-bottom: 24px;
    font-size: 32px;
    color: #0A2239;
}

/* ==========
   Zone vidéo
   ========== */
.record-container {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    margin-bottom: 24px;
}

.video-wrapper {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    min-height: 260px; /* zone visible avant la caméra */
}

.video-wrapper video {
    display: block;
    width: 100%;
    height: auto;
}

/* ==========
   Boutons
   ========== */
.controls,
.actions-below-video {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
    justify-content: center;
}

.btn {
    border: none;
    padding: 12px 22px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    background: #0A2239;
    color: #ffffff !important;
    transition: 0.18s ease;
}

/* on force aussi le blanc sur tout le contenu intérieur du bouton */
.record-page .btn,
.record-page .btn * {
    color: #ffffff !important;
}

.btn:hover {
    transform: translateY(-2px);
    background: #0F2E4C;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* variantes */
.btn.primary {
    background: #0039A6;
}

.btn.primary:hover {
    background: #004FCC;
}

.btn.success {
    background: #007A5A;
}

.btn.success:hover {
    background: #009F74;
}

.btn.danger {
    background: #B00020;
}

.btn.danger:hover {
    background: #D00025;
}

/* ==========
   Statut & Timer
   ========== */
.record-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 14px;
}

#timer {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* ==========
   Section upload
   ========== */
.upload-section {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

.upload-section h2 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 24px;
    color: #0A2239;
}

.upload-section p {
    margin-top: 0;
    font-size: 14px;
    color: #555;
}

.upload-block {
    margin: 16px 0;
}

.file-label {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 6px;
    background: #f0f0f0;
    border: 1px dashed #bbb;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 6px;
}

#fileInput {
    display: block;
    margin-top: 6px;
}

.email-options {
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #333;
}

.email-input label {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
}

.email-input input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
}

/* ==========
   Messages serveur
   ========== */
.server-message {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
}

.server-message.success {
    color: #009F74;
}

.server-message.error {
    color: #D00025;
}

/* ==========
   Responsive
   ========== */
@media (max-width: 900px) {
    .record-page {
        margin: 20px 5%;
        padding-bottom: 30px;
    }
}

@media (max-width: 600px) {
    .record-container,
    .upload-section {
        padding: 16px;
    }

    .record-page h1 {
        font-size: 24px;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .actions-below-video {
        flex-direction: column;
    }
}
