/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', Arial, sans-serif;
    background: #fff;
    color: #222;
}

/* Header */
.header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    background: transparent;
    padding: 32px 0 0 0;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 90%;
    margin: 0 auto;
}

.btn-profile {
    background: #2196f3;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 32px;
    color: #fff;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #2196f3;
}

/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    height: 90vh; /* prend 90% de la hauteur de l'écran */
    min-height: 600px; /* optionnel pour garder une bonne taille sur desktop */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0; left: 0;
    z-index: 1;
}

.hero-img-left,
.hero-img-right {
    position: absolute;
    top: 0;
    height: 100%;
    object-fit: cover;
    width: 50%;
}

.hero-img-left {
    left: 0;
}

.hero-img-right {
    right: 0;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 20, 20, 0.55);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: #fff;
    margin-top: 40px;
}

/* Filter buttons over hero (Académique / Professionnel) */
.filter-buttons {
    position: absolute;
    z-index: 4;
    left: 50%;
    transform: translateX(-50%);
    bottom: 40px;
    display: flex;
    gap: 18px;
    align-items: center;
}
.filter-btn {
    padding: 12px 26px;
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,0.12);
    background: #ffffff;
    color: #111;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    transition: transform .12s ease, background .12s ease, color .12s ease;
}
.filter-btn:hover { transform: translateY(-2px); }
.filter-btn.active {
    background: #0b0b0b;
    color: #fff;
    border-color: rgba(0,0,0,0.5);
}

@media (max-width: 820px) {
    .filter-buttons { bottom: 18px; gap: 12px; }
    .filter-btn { padding: 10px 18px; }
    .projects-grid { grid-template-columns: repeat(1, 1fr); width: 90%; }
}

/* Domain filter buttons (image buttons above projects) */
.domain-filters {
    display: flex;
    gap: 28px;
    justify-content: center;
    margin: 24px 0 8px 0;
}
.domain-btn {
    background: transparent;
    border: 2px solid rgba(0,0,0,0.06);
    padding: 12px;
    border-radius: 16px;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.domain-btn img { display: block; }
.domain-btn:hover { transform: translateY(-6px); box-shadow: 0 10px 24px rgba(0,0,0,0.12); }
.domain-btn.active { background: #111; border-color: rgba(0,0,0,0.5); }
.domain-btn.active img { filter: brightness(0) invert(1); }

@media (max-width: 820px) {
    .domain-filters { gap: 12px; margin: 16px 0; }
    .domain-btn { padding: 8px; }
}

/* Sort bar styles */
.sort-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 18px;
}
.sort-label { font-weight: 700; background:#111; color:#fff; padding:10px 14px; border-radius:24px; }
.sort-group { display:flex; gap:12px; align-items:center; }
.dropdown { position: relative; }
.dropdown-toggle { background:#fff; border:1px solid rgba(0,0,0,0.08); padding:8px 14px; border-radius:24px; cursor:pointer; }
.dropdown-list { display:none; position:absolute; top:110%; left:0; background:#fff; border-radius:8px; padding:8px; box-shadow:0 8px 20px rgba(0,0,0,0.12); min-width:160px; z-index:50; }
.dropdown.open .dropdown-list { display:block; }
.dropdown-item { display:block; padding:6px 8px; cursor:pointer; border-radius:6px; }
.dropdown-item:hover { background:#f3f4f6; }
.dropdown-item.clear { color:#9ca3af; font-size:0.9rem; }

/* hide poles control by default; JS will show when needed */
.dropdown#poles-dropdown { opacity:1; }
.dropdown#poles-dropdown.hidden { display:none !important; }

@media (max-width:820px){
    .sort-bar{ flex-direction:column; gap:12px; }
}

/* Categories */
.categories {
    background: #fff;
    padding: 32px 0;
    display: flex;
    justify-content: center;
}

.category-list {
    display: flex;
    gap: 48px;
    justify-content: center;
}

.category-item {
    background: #f5f5f5;
    border-radius: 16px;
    width: 140px;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    font-size: 0.95rem;
    font-weight: 500;
    gap: 8px;
}

.category-item img {
    margin-bottom: 8px;
}

/* Projects */
.projects {
    background: #fff;
    padding: 32px 0 0 0;
    display: flex;
    justify-content: center;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    width: 70%;
    margin: 0 auto;
}

.project-card {
    background: #222;
    color: #fff;
    border-radius: 16px;
    padding: 16px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    gap: 12px;
}

.project-meta {
    font-size: 0.8rem;
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.project-img-container {
    width: 120px;
    height: 90px;
    background: #333;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.project-img-container img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
}

.project-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.project-actions {
    display: flex;
    gap: 8px;
}

.project-card {
    background-size: cover;
    background-position: center;
    color: #fff;
    border-radius: 16px;
    padding: 16px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(20,20,20,0.55);
    border-radius: 16px;
    z-index: 1;
}

.project-meta,
.project-title,
.project-skills {
    position: relative;
    z-index: 2;
}

.project-skills {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.skill-box {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-radius: 8px;
    padding: 4px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}

.btn-details, .btn-link {
    background: #fff;
    color: #222;
    border: none;
    border-radius: 8px;
    padding: 4px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-details:hover, .btn-link:hover {
    background: #2196f3;
    color: #fff;
}

/* Footer - nouveau style */
.footer {
    background: #0f1720;
    color: #e6eef8;
    padding: 48px 0 24px;
    width: 100%;
}

.footer-inner {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.contact-section {
    text-align: left;
}

.contact-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: #ffffff;
    margin-bottom: 8px;
}

.contact-email,
.contact-text {
    color: #cbd5e1;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.socials {
    display: flex;
    gap: 12px;
    align-items: center;
}

.contact-icon img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.05) brightness(0.95);
    transition: filter .15s ease, transform .12s ease;
}

.contact-icon:hover img {
    filter: none;
    transform: translateY(-3px);
}

.footer-bottom {
    width: 90%;
    max-width: 1100px;
    margin: 14px auto 0 auto;
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #94a3b8;
    font-size: 0.9rem;
}

.footer-link {
    color: #60a5fa;
    text-decoration: none;
}

.footer-link:hover {
    text-decoration: underline;
}

/* Réactivité */
@media (max-width: 820px) {
    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 8px;
    }
    .nav-links { gap: 16px; }
}

.connexion-main {
    min-height: 100vh;
    background: #2c2726;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.connexion-title {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 40px;
    font-family: 'Montserrat', Arial, sans-serif;
    text-align: center;
}

.connexion-form {
    display: flex;
    flex-direction: column;
    gap: 32px;
    align-items: center;
}

.form-group {
    display: flex;
    align-items: center;
    gap: 24px;
}

.form-group label {
    color: #fff;
    font-size: 1.3rem;
    font-family: 'Montserrat', Arial, sans-serif;
}

.form-group input {
    border: none;
    border-radius: 18px;
    padding: 12px 32px;
    font-size: 1.2rem;
    background: #fff;
    color: #222;
    outline: none;
    width: 320px;
}

.btn-connexion {
    margin-top: 40px;
    background: #8ed3ff;
    color: #222;
    border: none;
    border-radius: 18px;
    padding: 12px 48px;
    font-size: 1.3rem;
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-connexion:hover {
    background: #2196f3;
    color: #fff;
}

/* Ajoute à la fin de styles.css */
.admin-main {
    min-height: 100vh;
    background: #2c2726;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 80px;
}

.admin-title {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 40px;
    font-family: 'Montserrat', Arial, sans-serif;
    text-align: center;
}

.admin-form {
    width: 80%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.admin-row {
    display: flex;
    gap: 48px;
    justify-content: space-between;
}

.admin-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.admin-group label {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    font-family: 'Montserrat', Arial, sans-serif;
}

.admin-group input[type="text"],
.admin-group input[type="file"],
.admin-group textarea {
    border: none;
    border-radius: 18px;
    padding: 12px 32px;
    font-size: 1.1rem;
    background: #fff;
    color: #222;
    outline: none;
    width: 100%;
}

.admin-group textarea {
    min-height: 80px;
    resize: vertical;
}

.admin-description {
    width: 100%;
}

.btn-admin {
    margin: 32px auto 0 auto;
    background: #2196f3;
    color: #fff;
    border: none;
    border-radius: 18px;
    padding: 12px 48px;
    font-size: 1.2rem;
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    display: block;
}

.btn-admin:hover {
    background: #8ed3ff;
    color: #222;
}

/* Ajoute à la fin de styles.css */
.admin-table-section {
    margin-top: 48px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.admin-table-title {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 18px;
    font-family: 'Montserrat', Arial, sans-serif;
}

.admin-table {
    width: 90%;
    max-width: 1000px;
    border-collapse: collapse;
    background: #222;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

.admin-table th, .admin-table td {
    padding: 12px 10px;
    color: #fff;
    font-size: 1rem;
    text-align: center;
    border-bottom: 1px solid #333;
}

.admin-table th {
    background: #2196f3;
    font-weight: 600;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table img {
    border-radius: 8px;
    object-fit: cover;
    background: #444;
}

.admin-table .skill-box {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-radius: 8px;
    padding: 2px 10px;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 2px;
    display: inline-block;
}

/* === Project Hero (maquette) === */
.project-hero {
    position: relative;
    width: 100%;
    height: 90vh;                 /* hauteur "premier écran" */
    min-height: 520px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-hero .hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(18, 13, 12, 0.45); /* masque sombre */
    z-index: 1;
}

.hero-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 0 20px;
    max-width: 1100px;
    width: 100%;
}

.project-title {
    font-size: clamp(2.4rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1;
    margin: 0 0 14px 0;
    letter-spacing: -1px;
    text-shadow: 0 6px 30px rgba(0,0,0,0.45);
}

.project-subtags {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 12px;
}

.tag {
    display: inline-block;
    background: rgba(255,255,255,0.06);
    color: #fff;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    backdrop-filter: blur(2px);
}

/* petit bloc description sous le hero */
.project-main {
    background: #fff;
    color: #222;
    padding: 48px 0 80px;
}

.project-main .container {
    width: 92%;
    max-width: 1100px;
    margin: 0 auto;
}

.project-description {
    margin-top: 20px;
    line-height: 1.7;
    color: #333;
    font-size: 1rem;
}

/* === Project page layout: large left description + right stacked boxes === */
.project-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 36px;
    align-items: start;
    margin-top: 28px;
}
.project-left {}
.project-right { display: flex; flex-direction: column; gap: 20px; }

.box {
    background: #1b1616;
    color: #fff;
    border-radius: 28px;
    padding: 24px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.35);
}
.description-box { padding: 36px; }
.box h3, .box h4 { color: #fff; margin: 0 0 12px 0; font-weight: 800; }
.box-content { color: #f3f3f3; line-height: 1.7; font-size: 0.98rem; }

.software-list { list-style: none; padding: 0; margin: 6px 0 0 0; display: flex; flex-direction: column; gap: 12px; }
.software-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    padding: 8px 12px;
    border-radius: 14px;
    color: #fff;
    font-weight: 600;
}

/* remove icon square for software list (no image required) */
.software-list li::before { display: none; }

/* tighten spacing since there is no icon */
.software-list li { padding-left: 12px; gap: 8px; }

/* apprentissage box specifics to ensure visibility and readable text */
.apprentissage-box { padding: 18px; border-radius: 22px; }
.apprentissage-box .box-content { white-space: pre-wrap; font-size: 0.95rem; }

.links-box a { color: #9fd8ff; text-decoration: none; font-weight: 700; }
.links-box a:hover { text-decoration: underline; }

/* Full-width bottom links bar (used for photos / vidéos links) */
.project-bottom-links { margin-top: 34px; display: flex; justify-content: center; }
.project-bottom-links .links-full { width: 100%; border-radius: 30px; padding: 18px 24px; background: #1b1616; }
.project-bottom-links .box-content { color: #fff; font-weight: 600; }
.project-bottom-links a { color: #fff; text-decoration: none; background: rgba(255,255,255,0.06); padding: 8px 12px; border-radius: 12px; margin-left: 12px; display: inline-block; }

@media (max-width: 900px) {
    .project-grid { grid-template-columns: 1fr; gap: 18px; }
    .project-hero { height: 50vh; min-height: 320px; }
    .description-box { padding: 22px; }
    .project-bottom-links .links-full { padding: 14px; }
}

/* === Overrides for project cards (smaller, no description) === */
.projects-grid .project-card {
    min-height: 160px; /* reduced height */
    padding: 14px; /* reduce inner padding */
    border-radius: 14px;
    gap: 8px;
}
.projects-grid .project-card .project-title {
    font-size: 1.05rem; /* smaller title for cards */
    font-weight: 700;
    line-height: 1.1;
    text-shadow: none;
}
.projects-grid .project-card .project-meta { font-size: 0.78rem; }
.project-desc { display: none !important; }

@media (max-width: 900px) {
    .projects-grid .project-card { min-height: 120px; padding: 12px; }
    .projects-grid .project-card .project-title { font-size: 1rem; }
}

/* Responsive */
@media (max-width: 900px) {
    .project-hero { height: 70vh; min-height: 420px; }
    .project-title { font-size: 2.2rem; }
}