/*
    Fichier: styles.css
    Description: Styles CSS pour le site de mutualisation de la paye des AED
    Auteur: Zahardin BOUKORTT
    Date de création: Juin 2025
*/

/* Définir la police Gelosa Cara */
@font-face {
    font-family: 'GelosaCara';
    src: url('fonts/GelosaCara-Regular.woff') format('woff'),
         url('fonts/GelosaCara-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Réinitialisation */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', Arial, sans-serif;
    line-height: 1.6;
    color: #000;
}

header {
    background: #006973;
    color: antiquewhite;
    padding: 0.75rem 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 1000;
    box-sizing: border-box;
}

.site-title {
    font-family: 'GelosaCara', 'Playfair Display', serif;
    font-size: 48px;
    font-weight: 400;
    margin-left: 2rem;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin-right: 2rem;
}

nav a {
    color: antiquewhite;
    font-size: 36px;
    text-decoration: none;
    font-family: 'GelosaCara', 'Playfair Display', serif;
    font-weight: 400;
}

nav a:hover {
    text-decoration: none;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    margin-top: 100px;
}

section {
    margin-bottom: 3rem;
}

h1, h2, h3 {
    font-family: 'Nunito', Arial, sans-serif;
    font-weight: 700;
}

h1 {
    font-size: 2.5rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
}

h2 {
    color: #000;
    font-size: 1.8rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    border: 1px solid #006973;
    border-radius: 32px;
    padding-bottom: 0.5rem;
    text-align: center;
}

h3 {
    color: #000;
    font-size: 1.4rem;
}

.btn {
    background: #006973;
    color: #fff;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 33px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-family: 'Nunito', Arial, sans-serif;
    font-weight: 700;
}

.btn:hover {
    background: #004d57;
}

.regulations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.regulation-item {
    background: #659ba2;
    padding: 1rem;
    text-align: center;
    border-radius: 33px;
    text-decoration: none;
    color: #000;
    transition: background 0.3s;
}

.regulation-item:hover {
    background: #e0e0e0;
    border-radius: 33px;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(200px, 1fr));
    gap: 1.5rem;
}

.download-item {
    text-align: center;
    text-decoration : none;
    padding: 1rem;
    background: #ddd;
    border: 1px solid #ddd;
    border-radius: 33px;
}

.download-item a {
    color: #006973;
    text-decoration: none;
    font-family: 'Nunito', Arial, sans-serif;
    font-weight: 400;
}

.download-item a:hover {
    text-decoration: none;
}

.download-item p {
    margin: 0;
}

footer {
    background: #f4f4f4;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
    color: #000;
}

.back-button {
    padding: 1rem;
}

.bottom-buttons {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
}

#pdf-viewer {
    margin-top: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 100%;
    height: calc(100vh - 200px);
    overflow: hidden;
}

#pdf-embed {
    width: 100%;
    height: 100%;
    display: block;
}

#related-links {
    margin-top: 2rem;
}

#related-links ul {
    list-style: none;
}

#related-links li {
    margin-bottom: 0.5rem;
}

#related-links a {
    color: #006973;
    text-decoration: none;
    font-family: 'Nunito', Arial, sans-serif;
}

#related-links a:hover {
    text-decoration: none;
}



/* Page title and form styles */
.page-title {
    font-family: 'Nunito', sans-serif;
    margin-top: 5rem;
    margin-bottom: 1rem;
    background-color: #f4f4f4;
}

.container {
    background: #fff;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 10px auto;
}

label {
    display: block;
    margin: 10px 0 5px;
}

input, select {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 3px solid #ccc;
    border-radius: 32px;
    box-sizing: border-box;
}

button {
    background-color: #4CAF50;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #45a049;
}

#result {
    margin-top: 20px;
    padding: 15px;
    background-color: #e8f4f0;
    border-radius: 4px;
}

.alert {
    color: red;
    font-weight: bold;
}

/* Responsive: unified for tablet and phones */
@media (max-width: 900px) {
    header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 2rem 1rem;
    }

    .site-title,
    nav a {
        font-size: 28px;
        text-align: center;
        margin-left: 0;
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
        margin: 0;
        padding: 0;
    }

    main {
        padding: 2rem 1rem;
        margin-top: 120px;
        padding-top: 0;
    }

    .regulations-grid,
    .download-grid {
        grid-template-columns: 1fr;
    }

    .bottom-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    #pdf-viewer embed,
    #pdf-embed {
        height: 400px;
    }

    .top-button {
        position: fixed;
        bottom: 2rem;
        width: 100%;
        display: flex;
        justify-content: center;
        z-index: 1000;
    }

    .top-button .btn {
        background: #006973;
        color: #fff;
        padding: 0.75rem 1.5rem;
        border-radius: 5px;
        text-decoration: none;
        font-family: 'Nunito', Arial, sans-serif;
        font-weight: 700;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }

    .top-button .btn:hover {
        background: #004d57;
    }
}
/* --- Fix header covering top content on mobile --- */
@media (max-width: 600px) {
    header {
        position: static !important;
        top: auto !important;
    }
}
