/* Importation police fun et dynamique */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;600;700&display=swap');

body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(135deg, #ff9a9e, #fad0c4);
    color: #333;
    text-align: center;
    margin: 0;
    padding: 0;
}


h1 {
    font-size: 2.5em;
    color: #222;
}

.tagline {
    font-style: italic;
    color: #555;
}

nav ul {
    list-style: none;
    padding: 0;
}

nav li {
    display: inline;
    margin: 10px;
}

nav a {
    text-decoration: none;
    color: white;
    background: #222;
    padding: 10px 15px;
    border-radius: 5px;
    transition: 0.3s;
}

nav a:hover {
    background: #ff4757;
}

nav a.active {
    background: #ffeb3b; /* Jaune clair pour bien marquer la page actuelle */
    color: #333; /* Texte sombre pour un bon contraste */
    font-weight: bold;
}

.hero {
    padding: 50px;
}

.profile-img {
    width: 150px;
    height: 170px;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn {
    display: inline-block;
    background: #ff4757;
    color: white;
    padding: 10px 20px;
    margin-top: 20px;
    border-radius: 5px;
    transition: transform 0.3s;
}

.btn:hover {
    transform: scale(1.1);
}

/* About section*/
.about-me {
    text-align: center;
    padding: 20px;
}

.about-me p {
    max-width: 600px;
    margin: auto;
    line-height: 1.6;
}

.skills, .fun-facts {
    background: white;
    padding: 20px;
    max-width: 600px;
    margin: 20px auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.skills h2, .fun-facts h2 {
    color: #ff4757;
}

.skills ul, .fun-facts ul {
    list-style: none;
    padding: 0;
}

.skills li, .fun-facts li {
    padding: 8px 0;
    font-size: 1.1rem;
}

/*Contact*/
.contact-form {
    text-align: center;
    background: var(--card-bg);
    padding: 20px;
    max-width: 500px;
    margin: 20px auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px var(--shadow-color);
}

.contact-form label {
    display: block;
    font-weight: bold;
    margin: 10px 0 5px;
    text-align: left;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--shadow-color);
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    background: var(--card-bg);
    color: var(--text-color);
    outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--btn-bg);
    box-shadow: 0 0 5px var(--btn-bg);
}

/* Bouton Envoyer */
.contact-form button {
    background: var(--btn-bg);
    color: white;
    padding: 12px 15px;
    border: none;
    border-radius: 5px;
    margin-top: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s ease-in-out;
}

.contact-form button:hover {
    background: var(--btn-hover-bg);
    transform: scale(1.05);
}

/* Ajustements responsive */
@media screen and (max-width: 500px) {
    .contact-form {
        width: 90%;
    }
}

/* Animation */
/* Animation du titre principal */
@keyframes slide-in {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

h1 {
    animation: slide-in 0.8s ease-out;
}

/* Effet d'apparition fluide pour les sections */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    opacity: 0;
    animation: fade-in 0.8s ease-out forwards;
    animation-delay: 0.2s;
}

/* Animation des boutons au survol */
.btn, .contact-form button {
    transition: transform 0.3s ease-in-out, box-shadow 0.3s;
}

.btn:hover, .contact-form button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Animation de la photo de profil */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.profile-img {
    animation: bounce 2s infinite;
}

/* Animation des liens sociaux */
.social-links a {
    transition: transform 0.3s ease, color 0.3s;
}

.social-links a:hover {
    transform: scale(1.1);
    color: #ff4757;
}

/* Dark mode */
/* Mode clair (par défaut) */
:root {
    --bg-color: #f8f9fa;
    --text-color: #333;
    --header-bg: #bd4662;
    --btn-bg: #ff4757;
    --btn-hover-bg: #e04050;
    --card-bg: white;
    --shadow-color: rgba(0, 0, 0, 0.2);
}

/* Mode sombre */
.dark-mode {
    --bg-color: #1e1e1e;
    --text-color: #f8f9fa;
    --header-bg: #252525;
    --btn-bg: #ff6b81;
    --btn-hover-bg: #ff4757;
    --card-bg: #2a2a2a;
    --shadow-color: rgba(255, 255, 255, 0.2);
}

/* Application des couleurs à tous les éléments */
body {
    background: var(--bg-color);
    color: var(--text-color);
    transition: background 0.5s ease, color 0.5s ease;
}

header {
    background: var(--header-bg);
    color: var(--text-color);
    padding: 20px;
    text-align: center;
}

h1, h2, p, a, label {
    color: var(--text-color);
}

/* Formulaires et textes */
input, textarea {
    background: var(--card-bg);
    color: var(--text-color);
    border: 2px solid var(--shadow-color);
}

/* Cartes et sections */
.skills, .fun-facts, .contact-form {
    background: var(--card-bg);
    color: var(--text-color);
    box-shadow: 0 4px 8px var(--shadow-color);
}

/* Bouton du mode sombre */
.dark-mode-toggle {
    position: fixed;
    top: 10px;
    right: 10px;
    background: var(--btn-bg);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.dark-mode-toggle:hover {
    background: var(--btn-hover-bg);
}

/*Détail projets*/

.project {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    box-shadow: 0 4px 8px var(--shadow-color);
    border-radius: 10px;
    padding: 20px;
    margin: 20px auto;
    max-width: 800px;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s;
}

.project:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 12px var(--shadow-color);
}

.project-img {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    margin-right: 20px;
}

.project-info {
    flex: 1;
    text-align: left;
}

.project-info h2 {
    color: var(--btn-bg);
}

.project-info p {
    margin: 5px 0;
    font-size: 1rem;
}

.btn {
    display: inline-block;
    background: var(--btn-bg);
    color: white;
    padding: 8px 15px;
    margin-top: 10px;
    border-radius: 5px;
    text-decoration: none;
    transition: transform 0.3s ease-in-out;
}

.btn:hover {
    transform: scale(1.1);
    background: var(--btn-hover-bg);
}

/* Responsive */
@media screen and (max-width: 768px) {
    .project {
        flex-direction: column;
        text-align: center;
    }

    .project-img {
        margin: 10px 0;
    }
}

/* Section CV*/
.cv-section {
    text-align: center;
    background: var(--card-bg);
    padding: 20px;
    max-width: 800px;
    margin: 20px auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px var(--shadow-color);
}

.cv-container {
    width: 100%;
    height: 500px;
    margin: 20px 0;
}

.cv-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Bouton de téléchargement */
.btn {
    display: inline-block;
    background: var(--btn-bg);
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: transform 0.3s ease-in-out;
}

.btn:hover {
    transform: scale(1.1);
    background: var(--btn-hover-bg);
}

/* Responsive */
@media screen and (max-width: 768px) {
    .cv-container {
        height: 400px;
    }
}

/* Footer */
footer {
    background: var(--header-bg);
    color: var(--text-color);
    padding: 20px;
    margin-top: 40px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: auto;
    text-align: left;
}

.footer-center {
    text-align: center;
}


/* Assurer une bonne visibilité des liens */
footer a {
    color: #ffffff; /* Blanc pour être lisible sur le fond foncé */
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

footer a:hover {
    text-decoration: underline;
    color: #ffeb3b; /* Jaune pour être plus visible */
}

/* Mode sombre - Liens en couleur adaptée */
.dark-mode footer a {
    color: #ff6b81; /* Rose clair pour plus de contraste */
}

.dark-mode footer a:hover {
    color: #ffeb3b; /* Jaune pour rester visible */
}

/* Responsive pour éviter les soucis d'affichage */
@media screen and (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-left, .footer-center, .footer-right {
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }
}

.footer-icons, .contact-icon {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: transform 0.3s ease, box-shadow 0.3s;
}

.social-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px var(--shadow-color);
}

/* Btn haut de page*/
#scrollTopBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--btn-bg);
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 8px var(--shadow-color);
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

#scrollTopBtn:hover {
    background: var(--btn-hover-bg);
    transform: scale(1.1);
}

/* Affichage du bouton quand on scrolle */
#scrollTopBtn.show {
    opacity: 1;
    visibility: visible;
}

@media screen and (max-width: 768px) {
  nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 0;
  }

  nav li {
    display: block;
    width: calc(50% - 20px); /* 2 boutons par ligne */
    text-align: center;
  }

  nav a {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }
}

@media screen and (max-width: 480px) {
  nav li {
    width: 100%; /* 1 bouton par ligne sur très petits écrans */
  }
}
