/*
 * Feuille de style principale pour la refonte "Swiss Modern" de ensuiza.com
 * Date: 2024-05-28
 */

/* 1. Variables et Styles de Base
-------------------------------------------------- */
:root {
  --primary-color: #2C3E50; /* Bleu Nuit */
  --accent-color: #D32F2F;  /* Rouge Suisse */
  --background-color: #F8F9FA;
  --surface-color: #FFFFFF;
  --text-color: #343a40;
  --text-color-light: #6c757d;
  --border-color: #dee2e6;
  --border-radius: 8px;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.07);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --font-body: 'Lato', sans-serif;
  --font-headings: 'Montserrat', sans-serif;
}

body {
    font-family: var(--font-body);
    background-color: var(--background-color);
    color: var(--text-color);
    padding-top: 65px; /* Hauteur de la navbar */
    line-height: 1.7;
}

.container {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    font-weight: 700;
    color: var(--primary-color);
}

a {
  color: var(--accent-color);
  transition: color 0.2s ease;
}

a:hover {
  color: #a02525;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
}

/* 2. Navigation
-------------------------------------------------- */
.navbar {
    background-color: var(--primary-color) !important;
    box-shadow: var(--shadow-sm);
    padding: 0.5rem 1rem;
}

/* Correction du padding pour le container de la navbar */
.navbar > .container {
    padding-top: 0;
    padding-bottom: 0;
}

.navbar-brand {
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
}

.nav-link {
    font-weight: 500;
    color: white !important;
    transition: background-color 0.2s;
    border-radius: 4px;
    padding: 0.5rem 1rem !important;
}

.nav-item.active .nav-link,
.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown-menu {
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.dropdown-item {
    color: var(--text-color) !important;
}

.dropdown-item:hover {
    background-color: #f1f1f1;
}

/* 3. Header Banner (Page d'accueil)
-------------------------------------------------- */
.header-banner {
  height: 400px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: white;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
  border-radius: var(--border-radius);
  margin-bottom: 2.5rem;
  overflow: hidden;
}

.header-banner h1 {
    font-weight: 700;
    font-size: clamp(1.8rem, 5vw, 2.8rem); /* Responsive font size */
    color: white;
}

.header-banner::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
  z-index: 0;
}

.header-banner .container {
  position: relative;
  z-index: 1;
}


/* 4. Cartes (Offres d'emploi, Articles)
-------------------------------------------------- */
.card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    background-color: var(--surface-color);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    margin-bottom: 1.5rem;
}

a.card-job-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

a.card-job-link:hover {
    text-decoration: none;
    color: inherit;
}

a.card-job-link:hover .card {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.card .card-title {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.card .card-body {
    padding: 1.5rem;
}

.card-text {
    color: var(--text-color-light);
}

/* 5. Page de Détail (Offre & Article)
-------------------------------------------------- */
.page-header {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.page-header h1 {
    margin: 0;
    font-size: 2.2rem;
}

.blog-details, .job-details {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.job-details .badge {
    font-size: 0.9rem;
    padding: 0.5em 0.9em;
    margin-right: 0.5rem;
}

.article_body p, .article_body li, .job-description {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* 6. Formulaires
-------------------------------------------------- */
#apply-form-container, #form-subscribe, .blog-sidebar {
    background-color: #fdfdff;
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid #e9eaf7;
    box-shadow: var(--shadow-sm);
}

#apply-form-container h2, #form-subscribe h3 {
    margin-bottom: 1.5rem;
    font-weight: 500;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

#form-subscribe p {
  color: var(--text-color-light);
  margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-control, .custom-select {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 0.75rem 1rem;
    height: auto;
    background-color: #fdfdff;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

.form-control:focus {
    border-color: var(--accent-color);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(211, 47, 47, 0.25);
}

.custom-file-label {
    background-color: #fdfdff;
}

label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* 7. Boutons
-------------------------------------------------- */
.btn {
    font-family: var(--font-headings);
    font-weight: 700;
    border-radius: 25px;
    padding: 12px 30px;
    font-size: 1rem;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: #a02525;
    border-color: #a02525;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 8. Footer
-------------------------------------------------- */
.footer-main {
    background-color: var(--primary-color);
    color: rgba(255,255,255,0.7);
    padding: 40px 0;
    margin-top: 40px;
    font-size: 0.9rem;
}

.footer-main a {
    color: #ffffff;
    font-weight: 500;
}

.footer-main a:hover {
    text-decoration: underline;
}

/* 9. Pagination
-------------------------------------------------- */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 1rem;
}

.pagination .page-item {
    margin: 0 4px;
}

.pagination .page-item .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-color);
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    width: 45px;
    height: 45px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease-in-out;
}

.pagination .page-item .page-link:hover {
    background-color: #f2f2f2;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #c7c8c9;
}

.pagination .page-item.active .page-link {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    box-shadow: 0 4px 10px rgba(211, 47, 47, 0.3);
    transform: translateY(-2px);
}

.pagination .page-item.disabled .page-link {
    color: #adb5bd;
    background-color: #e9ecef;
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
}

.pagination .page-link:focus {
    box-shadow: 0 0 0 0.2rem rgba(211, 47, 47, 0.25);
}

/* 10. Publicité
-------------------------------------------------- */
.adsbygoogle {
    display: block;
    margin: 1.5rem auto;
    text-align: center;
    background-color: #e9ecef;
    min-height: 90px;
}

.card-job-link .card-meta {
    font-size: 0.85rem;
    color: var(--text-color-light);
}

.card-job-link .card-meta .font-weight-bold {
    color: var(--text-color) !important;
}