/* ===============================
   Theme Variables
================================ */
:root {
    --primary-red: #781E34;
    --dark-red: #5a1528;
    --light-red: #9a2b48;
    --accent-red: #b3415d;
    --soft-red: #d45d7c;
    --pure-white: #ffffff;
    --off-white: #f8f9fa;
    --light-gray: #f5f5f5;
    --dark-gray: #333333;
    --text-dark: #222222;
    --text-light: #666666;

    --shadow: 0 5px 20px rgba(120, 30, 52, 0.1);
    --shadow-hover: 0 10px 30px rgba(120, 30, 52, 0.15);
    --transition: all 0.3s ease;
    --border-radius: 12px;
}
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===============================
   Hero Section
================================ */
.hero {
    background:rgba(255, 255, 255, 0.95);
    background-image: url(../uploads/bgl.png);
    background-size: cover;
    background-position: center;
    text-align: center;
    padding: 180px 0 100px;
    margin-top: 80px;
    border-bottom: 5px solid var(--primary-red);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-red), var(--light-red), var(--primary-red));
}

.hero h1 {
    color: var(--dark-red);
    font-size: 3.8rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.hero h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 4px;
    background: var(--primary-red);
    border-radius: 2px;
}

.hero p {
    color: var(--text-light);
    font-size: 1.4rem;
    max-width: 800px;
    margin: 2.5rem auto;
    line-height: 1.8;
}


/* ===============================
   Layout
================================ */
.section-padding {
    padding: 70px 0;
    background-color: var(--off-white);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* ===============================
   Project Card
================================ */
.project-card {
    background-color: var(--pure-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

/* ===============================
   Logo
================================ */
.project-logo {
    background-color: var(--light-gray);
    padding: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.project-logo img {
    max-height: 90px;
    max-width: 100%;
    object-fit: contain;
}

/* ===============================
   Content
================================ */
.project-content {
    padding: 25px;
    flex-grow: 1;
}

.project-title {
    font-size: 1.3rem;
    color: var(--primary-red);
    margin-bottom: 10px;
}

.project-tech,
.project-date {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 6px;
}

.project-tech strong,
.project-date strong {
    color: var(--text-dark);
}

/* ===============================
   Button
================================ */
.project-content .btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 18px;
    background-color: var(--primary-red);
    color: var(--pure-white);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.project-content .btn:hover {
    background-color: var(--accent-red);
}

/* ===============================
   Empty State
================================ */
.text-center {
    text-align: center;
    color: var(--text-light);
    font-size: 1rem;
}

/* ===============================
   Responsive
================================ */
@media (max-width: 768px) {
    .projects-hero h1 {
        font-size: 2.1rem;
    }

    .project-content {
        padding: 20px;
    }
}

/* Bouton Ajouter un projet   */
.add-project-container {
    width: 100%;
    margin: 35px auto;
    padding: 0 20px;
    display: flex;
    justify-content: center; /* Centre horizontalement */
    align-items: center;
}

.btn-add-project {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red)); /* ROUGE */
    color: var(--white);
    text-decoration: none;
    border-radius: 10px;
    font-size: 1.2rem;
    color: #ffffff;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(204, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
    z-index: 1;
    min-width: 280px;
}

.btn-add-project::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--dark-red), var(--primary-red)); /* ROUGE inversé */
    transition: all 0.4s ease;
    z-index: -1;
}

.btn-add-project:hover::before {
    width: 100%;
}

.btn-add-project:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(204, 0, 0, 0.35);
    letter-spacing: 0.5px;
}

.btn-add-project:active {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(204, 0, 0, 0.25);
}

.btn-add-project i {
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.btn-add-project:hover i {
    transform: rotate(180deg) scale(1.2);
}


/* ===============================
   Project Actions Container
================================ */
.project-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--light-gray);
    width: 100%;
}

/* ===============================
   Button Base Styles
================================ */
.project-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    min-width: 100px;
}

/* ===============================
   Edit Button
================================ */
.project-actions .btn-success {
    background-color: #28a745; /* Vert Bootstrap-like */
    color: var(--pure-white);
}

.project-actions .btn-success:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* ===============================
   Delete Button
================================ */
.project-actions .btn-danger {
    background-color: var(--accent-red); /* Rouge de votre palette */
    color: var(--pure-white);
}

.project-actions .btn-danger:hover {
    background-color: var(--primary-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(120, 30, 52, 0.3);
}

/* ===============================
   Icons
================================ */
.project-actions .btn i {
    font-size: 0.9rem;
}

/* ===============================
   Form Styles (pour le bouton supprimer)
================================ */
.project-actions form {
    margin: 0;
    display: inline;
}

/* ===============================
   Responsive
================================ */
@media (max-width: 480px) {
    .project-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .project-actions .btn {
        width: 100%;
        justify-content: center;
    }
}