/* =========================================
   RESET ET BASE (Pour unifier l'affichage)
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f5f7; /* Couleur gris clair du fond de la page */
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Permet de pousser le footer en bas de page */
}

a {
    text-decoration: none;
    color: inherit;
}

/* =========================================
   EN-TÊTE (Header)
   ========================================= */
header {
    background-color: #171e2b; /* Bleu très foncé presque noir */
    color: #ffffff;
    display: flex;
    justify-content: space-between; /* Pousse le logo à gauche, le menu à droite */
    align-items: center; /* Centre verticalement */
    padding: 20px 8%; /* Espacement interne (haut/bas et gauche/droite) */
}

/* Style du logo "DevTask" dans le header */
header section p a {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Style de la navigation principale */
header .navBar {
    display: flex;
    gap: 30px; /* Espace entre chaque lien */
}

header .navBar a {
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

header .navBar a:hover {
    color: #a0aec0; /* Change légèrement de couleur au survol */
}

/* =========================================
   CONTENU PRINCIPAL (Main)
   ========================================= */
main {
    flex: 1; /* Prend tout l'espace disponible entre le header et le footer */
    padding: 40px 8%;
}

/* =========================================
   PIED DE PAGE (Footer)
   ========================================= */
footer {
    background-color: #171e2b;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 40px 8%;
    margin-top: auto;
}

/* --- Partie gauche du footer --- */
footer .left-part {
    max-width: 400px;
}

footer .left-part p:first-child a {
    font-size: 1.4rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 10px;
}

footer .left-part p:last-child {
    color: #a0aec0; /* Gris clair pour le texte descriptif */
    font-size: 0.9rem;
    line-height: 1.5;
}

/* --- Partie droite du footer --- */
footer .right-part {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-top: 25px; /* Pour l'aligner harmonieusement avec la gauche */
}

footer .right-part .navBar {
    display: flex;
    gap: 20px;
}

footer .right-part .navBar a {
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

footer .right-part .navBar a:hover {
    color: #a0aec0;
}

footer .right-part p {
    color: #718096; /* Gris plus foncé pour le copyright */
    font-size: 0.85rem;
}

/* =========================================
   RESPONSIVE (Pour les petits écrans)
   ========================================= */
@media (max-width: 768px) {
    header, footer {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    footer .right-part {
        flex-direction: column;
        gap: 15px;
    }
}

/* =========================================
   STRUCTURE DES DEUX COLONNES
   ========================================= */
.dashboard-container {
    display: flex;
    gap: 30px; /* Espace entre les deux colonnes */
    align-items: flex-start; /* Empêche les colonnes de s'étirer verticalement */
}

/* Style des "cartes" blanches pour chaque colonne */
.card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02); /* Ombre très légère */
    flex: 1; /* Chaque carte prend 50% de l'espace disponible */
    min-width: 0; /* Évite les débordements sur petits écrans */
}

.card h2 {
    font-size: 1.4rem;
    color: #1e293b;
    margin-bottom: 25px;
}

/* =========================================
   DESIGN DU FORMULAIRE (Colonne gauche)
   ========================================= */
.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #334155;
}

.form-row input[type="text"],
.form-row textarea,
.form-row select,
.file-input-wrapper {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    color: #475569;
    outline: none;
    transition: border-color 0.2s;
}

.form-row input[type="text"]:focus,
.form-row textarea:focus,
.form-row select:focus {
    border-color: #2563eb; /* Bordure bleue au clic */
}

.form-row textarea {
    resize: vertical; /* Permet d'agrandir la zone de texte uniquement de haut en bas */
}

/* Le bouton bleu d'ajout */
.btn-submit {
    width: 100%;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.btn-submit:hover {
    background-color: #1d4ed8;
}

/* =========================================
   DESIGN DES TÂCHES (Colonne droite)
   ========================================= */
.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 15px;
}

.task-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* L'icône rouge pour Angular par exemple */
.task-icon {
    width: 40px;
    height: 40px;
    background-color: #f1f5f9;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.task-text h3 {
    margin: 0 0 5px 0;
    font-size: 1.05rem;
    color: #0f172a;
}

.task-text p {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
}

/* Design des badges de priorité */
.badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    color: white;
}

.badge-easy { background-color: #22c55e; } /* Vert */
.badge-medium { background-color: #f59e0b; } /* Orange */
.badge-high { background-color: #ef4444; } /* Rouge */

/* =========================================
   RESPONSIVE (Passage sur une colonne sur mobile)
   ========================================= */
@media (max-width: 900px) {
    .dashboard-container {
        flex-direction: column;
    }
}

/* =========================================
   NOUVELLES MISES EN PAGE
   ========================================= */

/* Conteneur principal pour les pages simples */
.page-container {
    width: 100%;
    margin: 0 auto;
}

/* Restreindre la largeur pour les formulaires seuls (Profil, Contact) */
.container-small {
    max-width: 600px;
}

/* Restreindre la largeur pour les pages de texte (Aide, Confidentialité) */
.container-text {
    max-width: 800px;
}

/* Grille pour la page Tasks (2 colonnes sur grand écran) */
.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

/* Grille pour la page Projets */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Design d'une carte projet */
.project-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    background-color: #f8fafc;
    display: flex;
    flex-direction: column;
}

.project-card h3 {
    color: #0f172a;
    margin-bottom: 10px;
}

.project-card p {
    color: #64748b;
    font-size: 0.95rem;
    flex-grow: 1; /* Pousse le footer du projet vers le bas */
    margin-bottom: 20px;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: bold;
    color: #3b82f6;
    border-top: 1px solid #e2e8f0;
    padding-top: 15px;
}

.btn-link {
    color: #2563eb;
}

.btn-link:hover {
    text-decoration: underline;
}

/* =========================================
   PAGES DE TEXTE (Aide & Confidentialité)
   ========================================= */

.text-content h3 {
    margin-top: 25px;
    margin-bottom: 10px;
    color: #1e293b;
    font-size: 1.1rem;
}

.text-content p {
    line-height: 1.6;
    color: #475569;
    margin-bottom: 15px;
}

.faq-item {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}