/* ======================================================
   RESET DE BASE
====================================================== */
html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* ======================================================
   PAGE (STRUCTURE VALIDÉE)
====================================================== */
.page-declaration {
    padding: 140px 20px 60px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    color: #e8f0f8;
    font-family: 'Segoe UI', Arial, sans-serif;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px;

    /* Anti-débords Samsung Fold / iPhone / écrans étroits */
    overflow-x: hidden;
    box-sizing: border-box;
}

.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5,20,35,0.85);
    backdrop-filter: blur(6px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
/* ======================================================
   Popupp envoi
====================================================== */
.popup-overlay.active {
    display: flex;
}

.popup-box {
    background: #10263d;
    padding: 30px 26px;
    border-radius: 20px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 0 30px rgba(0,234,255,0.6);
}
/* ================= POPUP SUCCÈS ================= */
.success-popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.success-popup.active {
    opacity: 1;
    pointer-events: all;
}

.success-box {
    background: #0c1c2b;
    border-radius: 18px;
    padding: 30px 36px;
    text-align: center;
    box-shadow: 0 0 30px rgba(0,234,255,0.6);
    animation: popupIn 0.35s ease;
}

.success-icon {
    font-size: 38px;
    color: #00eaff;
    margin-bottom: 10px;
}

.success-text {
    font-size: 1.1rem;
    color: #e8f0f8;
    font-weight: 600;
}

@keyframes popupIn {
    from { transform: scale(0.85); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}


/* ======================================================
   INTRO
====================================================== */
.intro {
    width: 100%;
    max-width: 1100px;
    text-align: center;
    padding: 0 16px;
}

.intro h1 {
    font-size: 2.6rem;
    color: #00eaff;
    margin-bottom: 12px;
    text-shadow: 0 0 10px rgba(0,200,255,0.4);
}

.intro p {
    font-size: 1.05rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* ======================================================
   CARTE FORMULAIRE (CONTOUR OK)
====================================================== */
.declaration-block {
    width: 100%;
    max-width: 780px;
    margin: 0 auto;

    background: #0c1c2b;
    padding: 36px 24px;
    border-radius: 20px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.35);
    text-align: center;
}

/* ======================================================
   TITRES
====================================================== */
.declaration-title {
    font-size: 1.9rem;
    color: #00eaff;
    margin-bottom: 14px;
}

.declaration-text {
    font-size: 1.02rem;
    line-height: 1.6;
    margin-bottom: 28px;
}

/* ======================================================
   FORMULAIRE
====================================================== */
.declaration-form {
    max-width: 520px;
    margin: 0 auto;
    text-align: left;
}

.declaration-form label {
    font-weight: 700;
    display: block;
    margin-bottom: 6px;
    color: #ffffff;
}

.declaration-form input,
.declaration-form select {
    width: 100%;
    margin-bottom: 18px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid #1e4d6b;
    background: #0b1f33;
    color: #ffffff;
    font-size: 0.95rem;
}

/* ======================================================
   FILE UPLOAD
====================================================== */
.file-upload {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}


/* ======================================================
   BOUTONS
====================================================== */
.btn-action {
    background: linear-gradient(135deg, #00eaff, #00bcd4);
    border: none;
    border-radius: 22px;
    padding: 15px 26px;
    font-weight: 800;
    font-size: 1rem;
    color: #003344; /* 👈 TEXTE BLANC */
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0,234,255,0.8);
    transition: transform 0.15s ease, box-shadow 0.15s ease;

    display: inline-flex;
    align-items: center;
    justify-content: center;
}
/* 🔥 FORCE LA COULEUR DU TEXTE POUR LE BOUTON FICHIER */
.btn-action,
.btn-action span,
.btn-action * {
    color: #003344 !important;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0,234,255,1);
}

.btn-inline { 
    width: auto; 
}

.btn-full { 
    width: 100%; 
    margin-top: 10px; 
}

/* ======================================================
   FLATPICKR – THÈME SOMBRE AAPPMA (BLANC)
====================================================== */
.flatpickr-calendar {
    background: #0c1c2b !important;
    border: 1px solid #00eaff !important;
    box-shadow: 0 0 22px rgba(0,234,255,0.6) !important;
    color: #ffffff !important;
}

.flatpickr-months,
.flatpickr-weekdays {
    background: #10263d !important;
}

.flatpickr-current-month,
.flatpickr-weekday {
    color: #ffffff !important;
}

.flatpickr-day {
    color: #ffffff !important;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: rgba(255,255,255,0.35) !important;
}

.flatpickr-day.today {
    border: 1px solid #00eaff !important;
}

.flatpickr-day.selected,
.flatpickr-day:hover {
    background: #00eaff !important;
    color: #003344 !important;
}
/* ======================================================
   SURBRILLANCE CHAMP DATE (FOCUS + CALENDRIER OUVERT)
====================================================== */
.declaration-form input:focus,
.declaration-form select:focus {
    outline: none;
    border-color: #00eaff;
    box-shadow: 0 0 12px rgba(0,234,255,0.7);
}

/* Quand Flatpickr est ouvert → garde le glow */
.flatpickr-input.active {
    border-color: #00eaff !important;
    box-shadow: 0 0 12px rgba(0,234,255,0.8) !important;
}

/* ======================================================
   MOBILE – IDENTIQUE page-identity
====================================================== */
@media screen and (max-width: 580px) {

    .page-declaration {
        padding: 100px 16px 100px; /* 👈 padding symétrique */
        gap: 30px;
    }

    .declaration-block {
        width: 100% !important;
        max-width: 360px !important; /* largeur lisible */
        margin: 0 auto !important;
        padding: 22px 18px !important;
        border-radius: 18px !important;
        box-sizing: border-box;
    }
}


    .intro h1 {
        font-size: 2.1rem;
    }

    .intro p {
        font-size: 0.95rem;
        width: 90%;
    }

    .file-upload {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
