* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f8f8;
    overflow-x: clip;
}

nav.old-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 8vh;
    background-color: #333;
    color: white;
    padding: 0 5%;
}

.logo {
    text-transform: uppercase;
    letter-spacing: 5px;
    font-size: 20px;
    font-weight: bold;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px; /* C'est LA solution magique pour créer de l'espace entre chaque <li> */
    align-items: center;
}

.nav-links li a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
} 

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px;
    transition: all 0.3s ease;
}

@media screen and (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0px;
        height: 92vh;
        top: 8vh;
        background-color: #333;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 50%;
        transform: translateX(100%); 
        transition: transform 0.5s ease-in;
        z-index: 999;
    }

    .nav-active {
        transform: translateX(0%);
    }

    .burger {
        display: block; 
    }
}

main {
    padding: 20px;
    min-height: 80vh;
}

footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: auto;
}

/* --- HERO ET RECHERCHE ACCUEIL --- */
.hero {
    background-color: #0056b3; 
    color: white;
    padding: 4rem 1rem;
    text-align: center;
}

.hero h1 {
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.hero .search-form {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap; 
    margin-top: 2rem;
}

.hero .search-form input {
    padding: 10px;
    width: 300px;
    border: none;
    border-radius: 5px;
}

/* --- BOUTONS --- */
.btn {
    padding: 10px 20px;
    background-color: #ff9900;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background-color: #e68a00;
}

.btn-small {
    display: inline-block;
    padding: 5px 15px;
    background-color: #0056b3;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* --- GRILLE DES OFFRES --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 20px;
    margin-top: 20px;
}

.offer-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.offer-card:hover {
    transform: translateY(-5px);
}

.offer-header h3 {
    color: #333;
    margin-bottom: 5px;
}

.company-name {
    color: #666;
    font-size: 0.9rem;
    font-weight: bold;
}

.offer-body {
    margin: 15px 0;
    font-size: 0.95rem;
    color: #555;
}

/* --- PAGE CONNEXION --- */
.login-container {
    max-width: 400px;
    margin: 40px auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.form-footer {
    margin-top: 15px;
    text-align: center;
    font-size: 0.9rem;
}

/* --- PAGINATION --- */
.pagination {
    margin-top: 30px;
    text-align: center;
}

.pagination a {
    color: #8d0c0c;
    padding: 8px 16px;
    text-decoration: none;
    border: 1px solid #ddd;
    margin: 0 4px;
    border-radius: 4px;
    transition: background-color .3s;
}

.pagination a.active {
    background-color: #1c232a;
    color: white;
    border: 1px solid #0056b3;
}

.pagination a:hover:not(.active) {
    background-color: #1f1313;
}

/* =========================================
   STYLE DU TABLEAU DE BORD (DASHBOARD)
   ========================================= */
.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.dashboard-table th {
    background-color: #333;
    color: white;
    text-align: left;
    padding: 10px;
}

.dashboard-table th.center {
    text-align: center;
}

.dashboard-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.dashboard-table .date-text {
    color: #555;
}

.dashboard-table .student-name {
    color: #2c3e50;
    font-weight: bold;
    text-decoration: none;
    border-bottom: 1px dashed #2c3e50;
}

.dashboard-table .student-email {
    color: #7f8c8d;
    font-size: 0.85rem;
}

.message-details summary {
    color: #3498db;
    font-weight: bold;
    outline: none;
    cursor: pointer;
}

.message-box {
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-left: 3px solid #3498db;
    font-size: 0.9rem;
    color: #333;
    border-radius: 4px;
}

.btn-cv {
    color: #e74c3c;
    text-decoration: none;
    font-weight: bold;
}

.btn-delete {
    color: white;
    background-color: #e74c3c;
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
}

.btn-delete:hover {
    background-color: #c0392b;
}

.empty-message {
    text-align: center;
    margin-top: 20px;
    color: #7f8c8d;
}

/* =========================================
   STYLE DE LA WISH-LIST
   ========================================= */
.wishlist-header {
    color: #2c3e50;
    margin-bottom: 30px;
}

.wishlist-header i {
    color: #e74c3c;
}

.wishlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.wishlist-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-top: 4px solid #e74c3c;
}

.wishlist-card h3 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.wishlist-card p {
    color: #7f8c8d;
    margin-bottom: 15px;
}

.wishlist-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wishlist-empty {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 8px;
}

.wishlist-empty p {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 20px;
}

.btn-icon-delete {
    color: #e74c3c;
    font-size: 1.5rem;
    text-decoration: none;
}

/* =========================================
   STYLE DES FORMULAIRES 
   ========================================= */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.form-title {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

.alert-error {
    background-color: #e74c3c;
    color: white;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-warning {
    display: none;
    background-color: #f39c12;
    color: white;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
    margin-bottom: 15px;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.btn-cancel {
    background-color: #7f8c8d;
    text-align: center;
    flex: 1;
    color: white;
    padding: 10px;
    border-radius: 5px;
    text-decoration: none;
}

.btn-submit {
    background-color: #27ae60;
    flex: 1;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}

/* =========================================
   STYLE DES PAGES LISTES (Offres, Étudiants)
   ========================================= */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header h2 {
    color: #2c3e50;
    margin: 0;
}

.page-subtitle {
    margin-bottom: 20px;
    color: #7f8c8d;
    font-weight: bold;
}

/* RECHERCHE DES LISTES */
.search-container {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.search-container .search-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-start;
    margin-top: 0;
}

.search-input-group {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
    z-index: 5;
}

.search-input {
    width: 100%;
    padding: 12px 10px 12px 40px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    height: 45px;
}

.btn-search {
    background-color: #0056b3;
    padding: 0 30px;
    font-size: 1rem;
    border-radius: 8px;
    border: none;
    color: white;
    cursor: pointer;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-cancel-search {
    color: #e74c3c;
    text-decoration: none;
    padding: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.filter-tags {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag {
    background-color: #e2e6ea;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #333;
    cursor: pointer;
}

/* Cartes et Tableaux */
.offer-card.company-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.company-title {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.company-location {
    color: #7f8c8d;
    font-weight: bold;
    margin-bottom: 15px;
}

.company-description {
    color: #555;
    margin-bottom: 15px;
    line-height: 1.5;
}

.company-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.data-table th {
    background-color: #2c3e50;
    color: white;
    text-align: left;
    padding: 15px;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.data-table tr:hover {
    background-color: #f9f9f9;
}

.student-link {
    color: #2980b9;
    text-decoration: none;
    border-bottom: 1px dashed #2980b9;
    font-weight: bold;
}

.status-badge {
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
}

.status-recherche {
    background-color: #f39c12;
}

.status-trouve {
    background-color: #2ecc71;
}

.status-entretien {
    background-color: #3498db;
}

.action-edit {
    color: #f39c12;
    text-decoration: none;
    margin-right: 15px;
}

.action-delete {
    color: #e74c3c;
    text-decoration: none;
}

/* =========================================
   STYLE DE MES CANDIDATURES
   ========================================= */
.candidatures-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.candidature-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-left: 5px solid #2ecc71;
}

.candidature-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.candidature-title {
    margin-bottom: 5px;
    color: #2c3e50;
}

.candidature-company {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.candidature-motivation {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.motivation-text {
    margin-top: 10px;
    font-style: italic;
    color: #555;
}

.empty-state {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
}

/* =========================================
   STYLE DES PAGES DE DÉTAILS
   ========================================= */
.detail-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #2557a7;
    text-decoration: none;
    font-weight: bold;
}

.btn-back {
    display: inline-block;
    margin-bottom: 20px;
    background-color: #7f8c8d;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
}

.detail-card {
    background: white;
    border: 1px solid #e4e4e4;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

.detail-title {
    font-size: 2.5rem;
    margin-bottom: 5px;
    color: #2c3e50;
    font-weight: bold;
}

.detail-subtitle {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.detail-subtitle a {
    color: #2557a7;
    text-decoration: underline;
    font-weight: 500;
}

.detail-actions {
    margin: 25px 0;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-apply {
    background-color: #2557a7;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    font-size: 1.1rem;
}

.btn-wishlist-add {
    background-color: #e74c3c;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
}

.btn-wishlist-remove {
    background-color: white;
    color: #e74c3c;
    border: 2px solid #e74c3c;
    padding: 10px 22px;
    border-radius: 8px;
    text-decoration: none;
}

.detail-divider {
    border: none;
    border-top: 1px solid #e4e4e4;
    margin: 25px 0;
}

.info-group {
    margin-bottom: 20px;
}

.info-label {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.info-value {
    background-color: #f3f2f1;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
    display: inline-block;
}

.highlight-box {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 5px solid #2557a7;
}

.highlight-text {
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.skills-wrapper {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.skill-badge {
    background-color: #e2e6ea;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
}

.detail-content {
    line-height: 1.8;
    color: #333;
    font-size: 1.05rem;
}

/* Grilles Spécifiques (Entreprises / Étudiants) */
.detail-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.rating-box {
    text-align: right;
    background-color: #f1c40f;
    color: #fff;
    padding: 15px 25px;
    border-radius: 8px;
}

.rating-score {
    font-size: 1.5rem;
    font-weight: bold;
}

.layout-grid {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.layout-main {
    flex: 2;
    min-width: 300px;
}

.layout-sidebar {
    flex: 1;
    min-width: 250px;
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
}

.status-large {
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: bold;
}

.history-list {
    list-style-type: none;
    padding: 0;
}

.history-item {
    background-color: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 5px solid #3498db;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* =========================================
   CARROUSEL DE STATISTIQUES (SFx 11)
   ========================================= */
.stats-section {
    padding: 2rem 1rem;
    background-color: #f1f2f6;
    text-align: center;
}

.carousel-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory; /* Effet de magnétisme au scroll */
    gap: 20px;
    padding: 20px 0;
    max-width: 1200px;
    margin: 0 auto;
}

/* Cache la barre de défilement pour faire plus propre */
.carousel-container::-webkit-scrollbar { display: none; }
.carousel-container { -ms-overflow-style: none; scrollbar-width: none; }

.stat-card {
    flex: 0 0 auto; /* Empêche les cartes de rétrécir */
    width: 300px;
    scroll-snap-align: center; /* S'arrête pile au centre */
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-top: 4px solid #ff9900;
    text-align: left;
}

.stat-card h3 {
    color: #2c3e50;
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #0056b3;
    margin-bottom: 10px;
}

/* navbar sticky is handled in header.php inline styles */