/* ============================================
   UDSP 05 - CSS base + responsive
   Thème Pompiers - rouge/blanc/gris
   ============================================ */

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* === HEADER TOP (logo + titre) === */
.header-top {
    display: flex;
    align-items: center;
    background: linear-gradient(to right, #CC0000, #8B0000);
    padding: 15px 30px;
    gap: 20px;
}

.logo {
    height: 80px;
    width: auto;
    background: #fff;
    padding: 5px;
    border-radius: 4px;
}

.header-text h1 {
    color: #fff;
    font-size: 2.2em;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
    letter-spacing: 2px;
}

.header-text p {
    color: #ffd700;
    font-size: 0.95em;
    font-weight: 500;
}

/* === SLIDER === */
.slider {
    position: relative;
    width: 100%;
    height: 350px;
    overflow: hidden;
    background: #2c2c2c;
}

.slider-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slider-img.active {
    opacity: 1;
}

/* === NAVIGATION === */
nav {
    background: #1a1a1a;
}

.menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

.menu > li {
    position: relative;
}

.menu > li > a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 12px 18px;
    font-weight: 600;
    font-size: 0.95em;
    transition: background 0.3s;
}

.menu > li > a:hover,
.menu > li > a:focus {
    background: #CC0000;
}

/* Sous-menu */
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #1a1a1a;
    list-style: none;
    min-width: 220px;
    z-index: 100;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.has-submenu:hover .submenu,
.has-submenu:focus-within .submenu {
    display: block;
}

.submenu li a {
    display: block;
    color: #ccc;
    text-decoration: none;
    padding: 10px 18px;
    font-size: 0.9em;
    border-bottom: 1px solid #333;
    transition: background 0.3s;
}

.submenu li a:hover {
    background: #CC0000;
    color: #fff;
}

/* === H2 === */
h2 {
    color: #CC0000;
    font-size: 2em;
    font-weight: bold;
    padding-bottom: 10px;
    border-bottom: 3px solid #ffd700;
    display: inline-block;
    margin-bottom: 15px;
}

/* === MAIN === */
main {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 20px;
}

.hero {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.hero p {
    font-size: 1.05em;
    color: #555;
    margin-top: 10px;
}

/* === FOOTER === */
footer {
    background: #1a1a1a;
    color: #ccc;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

.footer-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #CC0000;
    text-decoration: none;
    font-weight: 600;
}

.footer-links a:hover {
    color: #ffd700;
}

.copyright {
    font-size: 0.85em;
    color: #888;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablette */
@media (max-width: 900px) {
    .header-top {
        padding: 12px 20px;
        gap: 15px;
    }

    .logo {
        height: 60px;
    }

    .header-text h1 {
        font-size: 1.6em;
    }

    .header-text p {
        font-size: 0.85em;
    }

    .slider {
        height: 250px;
    }

    h2 {
        font-size: 1.6em;
    }

    .menu > li > a {
        padding: 10px 14px;
        font-size: 0.9em;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .header-top {
        flex-direction: column;
        text-align: center;
    }

    .logo {
        height: 55px;
    }

    .header-text h1 {
        font-size: 1.4em;
    }

    .slider {
        height: 180px;
    }

    .menu {
        flex-direction: column;
        align-items: stretch;
    }

    .menu > li > a {
        padding: 10px;
        border-bottom: 1px solid #333;
        text-align: center;
    }

    .submenu {
        position: static;
        box-shadow: none;
    }

    .submenu li a {
        padding: 8px 20px;
        background: #222;
        font-size: 0.85em;
    }

    .has-submenu {
        border-bottom: none;
    }

    h2 {
        font-size: 1.4em;
    }

    .hero {
        padding: 25px 20px;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}

/* Petit mobile */
@media (max-width: 400px) {
    .slider {
        height: 140px;
    }

    h2 {
        font-size: 1.2em;
    }

    .logo {
        height: 45px;
    }

    .header-text h1 {
        font-size: 1.2em;
    }
}



/* ALERTE MAINTENANCE */
.alerte-maintenance {
    background-color: #1c64ad;
    color: #FFFFFF;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    text-align: center;
    font-size: 1.1em;
    font-weight: 500;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    line-height: 1.6;
}