/* ===== Reset & base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    background-color: #f4f4f4;
    font-family: 'Century Gothic', 'AppleGothic', 'Dejavu Sans', 'Segoe UI', Arial, sans-serif;
    color: #333;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

@font-face {
    font-family: 'Century Gothic';
    src: local('Century Gothic'), local('CenturyGothic'), local('AppleGothic'), sans-serif;
    font-display: swap;
}

/* ===== Icônes SVG ===== */
.icon-svg {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}
.icon-file { color: #7a87b8; }

/* ===== Décorations de fond (coins) ===== */
.deco-bottom-left,
.deco-bottom-right {
    position: fixed;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    width: 220px;
    max-width: 25vw;
}

.deco-bottom-left  { left: 0; }
.deco-bottom-right { right: 0; }

/* ===== Bannière ===== */
.banner {
    background-color: #7a87b8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    padding: 20px 0;
}

.banner__stripe {
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.8);
}

.banner__logo {
    height: 160px;
    display: block;
    z-index: 2;
}

.banner__mascotte {
    position: absolute;
    right: 20px;
    bottom: -60px;
    height: 160px;
    z-index: 3;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.1));
}

/* ===== Contenu principal ===== */
.main {
    position: relative;
    z-index: 1;
    max-width: 820px;
    margin: 0 auto;
    padding: 28px 20px;
}

/* ===== Badge numéro de carte ===== */
.card-number {
    display: inline-block;
    background-color: #b2d6cd;
    border-radius: 12px;
    padding: 8px 32px;
    font-size: 2.2rem;
    font-weight: bold;
    color: #333;
    letter-spacing: 1px;
    margin-bottom: 24px;
    font-family: 'Arial Rounded MT Bold', 'Helvetica Rounded', Arial, sans-serif;
}

.card-number-wrap {
    text-align: center;
}

/* ===== Liste de fichiers ===== */
.file-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.file-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.file-item__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}

.file-item__icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.file-item__name {
    font-size: 0.95rem;
    color: #444;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.print-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #7a87b8;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, transform 0.2s;
}

.print-btn:hover {
    color: #6273a5;
    transform: scale(1.1);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 ratio */
    height: 0;
    overflow: hidden;
    margin: 12px;
    border-radius: 8px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ===== Visionneuse PDF ===== */
.pdf-container {
    margin: 12px;
    border-radius: 8px;
    overflow: hidden;
    background: #ccc;
    min-height: 80vh;
}

.pdf-viewer {
    display: block;
    width: 100%;
    height: 80vh;
    border: none;
    background: transparent;
}

/* ===== Images inline ===== */
.img-viewer {
    display: block;
    max-width: 100%;
    margin: 0 auto;
    padding: 12px;
}

/* ===== Vidéos inline ===== */
.video-viewer {
    display: block;
    width: calc(100% - 24px); /* 100% moins les marges de 12px */
    max-height: 75vh;
    margin: 12px;
}

/* ===== Lien fallback ===== */
.file-link {
    display: block;
    padding: 14px 16px;
    color: #7a87b8;
    text-decoration: none;
    font-weight: 500;
}
.file-link:hover { text-decoration: underline; }

/* ===== Message vide ===== */
.empty-message {
    text-align: center;
    color: #888;
    padding: 40px 0;
    font-size: 1rem;
}

/* ===== Page Login ===== */
.login-page {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    gap: 0;
}

.login-container {
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
    max-width: 600px;
}

.login-mascotte {
    height: 250px;
    margin-right: -100px;
    z-index: 2;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.1));
    pointer-events: none;
}

.login-card {
    background: #e0e0e0; /* Gris clair comme sur l'image */
    border: 2px solid #7a87b8;
    border-radius: 20px;
    padding: 32px 28px 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.09);
    max-width: 450px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
}

.login-card__title {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-card__lock-img {
    height: 35px;
    margin-bottom: 12px;
}

.login-card__input-wrapper {
    position: relative;
    width: 100%;
    margin-top: 14px;
}

.login-card__input {
    width: 100%;
    padding: 15px 60px 15px 25px;
    border: 2px solid #7a87b8;
    border-radius: 15px;
    font-size: 1.2rem;
    color: #555;
    outline: none;
    transition: border-color 0.2s;
    background: #ccc;
}

.login-card__input::placeholder { color: #888; }
.login-card__input:focus { border-color: #7a87b8; }

.login-card__submit-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #7a87b8;
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.login-card__submit-btn:hover {
    background: #6273a5;
    transform: translateY(-50%) scale(1.05);
}

.login-card__submit-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.login-card__btn {
    display: none; /* Masqué car remplacé par le bouton incrusté */
}

.login-card__note {
    margin: 20px 0 0 70px;
    font-size: 1rem;
    color: #333;
    line-height: 1.4;
    text-align: left;
}

.login-card__error {
    margin-top: 10px;
    color: red;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .login-container {
        flex-direction: column;
        padding: 0 10px;
    }

    .login-mascotte {
        height: 180px;
        margin-right: 0;
        margin-bottom: -30px;
        z-index: 3;
    }

    .login-card {
        padding: 40px 20px 24px;
        max-width: 100%;
    }

    .login-card__title {
        font-size: 1.4rem;
    }

    .login-card__note {
        margin: 20px 0 0 0;
        text-align: center;
        font-size: 0.9rem;
    }

    .banner__logo {
        height: 120px;
    }

    .banner__mascotte {
        right: 0;
        height: 120px;
    }

    .deco-bottom-left,
    .deco-bottom-right {
        width: 180px;
    }
    @media (max-width: 400px) {
        .banner__mascotte {
            height: 100px;
        }
    }
}