/* ------------------------------------------------------------------- */
/* CSS POUR CENTRE HOSPITALIER SAINT-VITAL - MEDILINK (ACCUEIL)        */
/* Palette : Bleu Institutionnel (#005f99), Bleu Foncé (#0a3d62), Vert (#4CAF50), Orange CAPSI (#FF8C00) */
/* ------------------------------------------------------------------- */

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8fafd;
    color: #333;
    line-height: 1.6;
}

/* -----------------------------------
 * Header
 * ----------------------------------- */
.header {
    background: #fff;
    padding: 15px 20px;
    border-bottom: 5px solid #005f99;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.header-spacer {
    height: 120px;
    width: 180px;
    visibility: hidden;
}

.header-main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.header-logo {
    height: 100px;
}

.capsi-logo {
    height: 170px;
    object-fit: contain;
}

.header-title {
    color: #005f99;
    margin: 0;
    font-size: 28px;
    font-weight: 600;
}

.header-subtitle {
    color: #555;
    margin: 5px 0 0;
    font-size: 18px;
    font-weight: 400;
}

/* Titre du challenge CAPSI */
.capsi-challenge-title {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.8em;
    font-weight: 500;
    color: #111;
}

.capsi-challenge-title .capsi-orange {
    color: #FF8C00;
    font-weight: 700;
}

/* -----------------------------------
 * Main
 * ----------------------------------- */
.main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.intro {
    background: #fff;
    padding: 30px;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.intro h2 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #0a3d62;
}

/* Alerte piratage */
.alert {
    margin-top: 30px;
    padding: 25px;
    background: #b30000;
    color: #fff;
    border-radius: 12px;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-align: center;
    animation: warningPulse 1.5s infinite;
}

.alert h3 {
    margin-top: 0;
    font-size: 24px;
}

@keyframes warningPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.005);
    }
}

/* -----------------------------------
 * Sections et Cards
 * ----------------------------------- */
.sections {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.card {
    background: #fff;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    flex: 1 1 300px;
    /* carte flexible avec min-width 300px */
    max-width: 350px;
    box-sizing: border-box;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.card h4 {
    font-size: 22px;
    color: #005f99;
    margin-bottom: 10px;
    text-align: center;
}

.card p {
    margin-bottom: 15px;
    text-align: center;
}

/* Mission Card */
.card.mission-card {
    justify-content: space-between;
}

.card.mission-card .btn-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Center Card */
.center-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.center-card .btn {
    margin-top: 20px;
    width: auto;
    min-width: 200px;
}

/* -----------------------------------
 * Boutons
 * ----------------------------------- */
a.btn,
button.btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
}

/* Types de boutons */
.btn.primary-btn {
    background: #4CAF50;
    color: #fff;
    border-color: #4CAF50;
}

.btn.primary-btn:hover {
    background: #45a049;
}

.btn.secondary-btn {
    background: #1a4a6e;
    color: #fff;
    border-color: #1a4a6e;
}

.btn.secondary-btn:hover {
    background: #0a2d48;
}

.btn.tertiary-btn {
    background: #ff8c00;
    color: #fff;
    border-color: #ff8c00;
}

.btn.tertiary-btn:hover {
    background: #e67e00;
    border-color: #e67e00;
}

.card a.primary-btn {
    width: 100%;
    /* prend toute la largeur disponible de la card */
    max-width: 100%;
    /* empêche de dépasser */
    box-sizing: border-box;
    /* padding inclus dans la largeur */
}

/* -----------------------------------
 * Footer
 * ----------------------------------- */
.footer {
    margin-top: 60px;
    padding: 25px;
    text-align: center;
    background: #0a3d62;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.15);
}

/* -----------------------------------
 * Responsive
 * ----------------------------------- */
@media (max-width: 900px) {
    .sections {
        flex-direction: column;
        align-items: center;
    }

    .card {
        max-width: 90%;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        justify-content: center;
    }

    .capsi-logo {
        margin-top: 10px;
        order: 0;
        height: 80px;
        width: 80px;
    }

    .header-spacer {
        display: none;
    }

    .header-logo {
        height: 80px;
    }

    .header-title {
        font-size: 24px;
    }

    .header-subtitle {
        font-size: 16px;
    }

    .main {
        margin: 20px auto;
        padding: 0 15px;
    }

    .card {
        padding: 20px;
    }
}

.alert #octopusCountdown {
    background: #ffe6e6;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
}