/* Police et mise en page générale */
body {
    font-family: 'Poppins', sans-serif;
    background: #f4f4fc;
    text-align: center;
    margin: 0;
    padding: 0;
}

/* Mode sombre */
body.dark-mode {
    background-color: rgba(31, 41, 55, 0.88);
    color: #e5e7eb;
}
.background-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("https://portfolio-a65588.gitlab.io/images/ban.png") center center / cover no-repeat;
  opacity: 1.5; /* Ajuste ici pour rendre plus ou moins subtil */
  z-index: -1;
  pointer-events: none;
}

.dark-mode .cv-box {
    background: #333;
    color: #f5f5f5;
    box-shadow: none;
}

.dark-mode .btn-download {
    background: #444;
    color: #fff;
}
/* 👇 Style du texte "Mode sombre" à gauche */
.dark-mode-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    margin-right: 10px; /* 👈 Décalage ajouté ici */
}
  
  /* 👇 Colore la lune en noir */
.toggle-icon.moon {
    color: black;
}
  

.dark-mode-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    /*gap: 12px;*/
}
  
#dark-toggle {
    display: none;
}
  
.toggle-label {
    position: relative;
    display: flex;
    align-items: center;
    width: 46px;
    height: 24px;
    background-color: #ccc;
    border-radius: 50px;
    cursor: pointer;
    padding: 0 4px;
    transition: background-color 0.3s ease;
}

.toggle-icon {
    font-size: 13px;
    z-index: 2;
    pointer-events: none;
    line-height: 1;
}

.toggle-label .toggle-icon:first-child {
    margin-right: auto;
    transform: translateY(1px); /* ajuste l'alignement vertical */
}

.toggle-label .toggle-icon:last-child {
    margin-left: -2px; /* avant c'était auto */
    transform: translateY(1px); /* pareil ici */
}

.toggle-ball {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    z-index: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

#dark-toggle:checked + .toggle-label {
    background-color: #4ade80;
}

#dark-toggle:checked + .toggle-label .toggle-ball {
    transform: translateX(30px); /* au lieu de 30px */
}

.toggle-label:hover {
    filter: brightness(1.05);
}
/*
.toggle-dark-mode {
    background: #f0f0f0;
    color: #007bff;
    border: 1px solid #ccc; 
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.toggle-dark-mode:hover {
    background: #e6e6e6;
    border-color: #aaa;
    transition: all 0.3s ease-in-out;
}
*/
/* Barre de navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 40px;
    background: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}
  

@media screen and (min-width: 769px) {
    h1 {
      font-size: 1.6rem;
      font-weight: bold;
      color: #3a3a70;
      text-align: center;
      margin: 0 auto;
      padding-top: 100px; /* espace sous navbar */
      padding-left: 16px;
      padding-right: 16px;
    }

    h1 {
        background: linear-gradient(90deg, #7D5FB2, #5468FF);
        background-clip: text;                /* version standard */
        -webkit-background-clip: text;        /* pour Chrome/Safari */
        -webkit-text-fill-color: transparent; /* masque le texte pour laisser voir le gradient */
    }
    
    /* En mode sombre */
    body.dark-mode h1 {
        color: #b3aaff; /* violet pâle lumineux */
    }
}
  

.back-button {
    text-decoration: none;
    color: #007bff;
    font-size: 1rem;
    font-weight: bold;
    transition: color 0.3s;
}

.back-button:hover {
    color: #0056b3;
}

/* Conteneur principal du CV */
.cv-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 40px;
    opacity: 1; /* Mettre directement à 1 */
    transform: translateY(0); /* Suppression de l'effet de décalage */
    padding-top: 100px;
}


/* Style des boîtes CV */
.cv-box {
    opacity: 1;
    transform: translateY(0);
}

/* Description du CV */
.cv-description {
    font-size: 16px;
    color: #666;
    text-align: center;
    margin-bottom: 10px;
    font-style: italic;
}

/* En mode sombre : couleur plus lumineuse */
body.dark-mode .cv-description {
    color: #d0caff; /* doux violet clair lisible */
}

/* Icône avant la description */
.cv-description i {
    margin-right: 8px;
    color: #3a3a70;
}

/* Date de mise à jour */
.cv-update-date {
    font-size: 14px;
    color: #888;
    margin-top: 5px;
}

/* Message "Mise à jour récente" */
.recent-update {
    font-size: 14px;
    font-weight: bold;
    color: #4CAF50;
    margin-top: 5px;
}

.cv-box h2 {
    font-size: 1.2rem;
    font-weight: bold;
    color: #3a3a70;
    margin-bottom: 15px;
}
/* Mode sombre : une couleur violette douce */
body.dark-mode .cv-box h2 {
    color: #c2b8f0;
}

/* Style de l'aperçu du CV */
.cv-frame {
    width: 100%;
    height: 450px;
    border: none;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.cv-frame:hover {
    transform: scale(1.005); /* plus doux */
    box-shadow: 0px 6px 14px rgba(0, 0, 0, 0.12);
}

.cv-loader {
    font-size: 14px;
    color: #666;
    text-align: center;
    font-weight: bold;
    margin-bottom: 10px;
}

.btn-copy,
.btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px; /* Réduction de la taille */
    font-size: 12px; /* Taille de texte réduite */
    font-weight: bold;
    text-transform: uppercase;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    width: fit-content; /* Ajustement automatique */
}


.btn-copy {
    background: #e4e4e7;
    color: #333;
}
/* Effet au survol */
.btn-copy:hover {
    background: #d4d4d7;
    transform: translateY(-2px);
}

/* Style global des boutons */
.btn-download {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    box-shadow: 0 3px 6px rgba(0, 123, 255, 0.3);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 123, 255, 0.4);
}

.cv-buttons {
    display: flex;
    justify-content: center; /* Centre les boutons */
    align-items: center;
    gap: 15px; /* Ajoute un espacement entre les boutons */
    margin-top: 10px;
}

/* Ajustement de la taille des icônes */
.btn-download img {
    width: 18px;
    height: auto;
}

.iframe-wrapper {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    background: white;
    margin-top: 10px;
}
  
.fake-header {
    height: 30px;
    background: #e5e5e5;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 8px;
}
  
.dot {
    height: 10px;
    width: 10px;
    border-radius: 50%;
    display: inline-block;
}
  
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }
  

@media screen and (max-width: 768px) {
    body {
      font-size: 15px;
      padding: 0 10px;
    }
  
    .navbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 16px; /* ESPACE INTERNE GAUCHE/DROITE */
        background: white;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
    }
    
    h1 {
        font-size: 1.2rem;
        font-weight: bold;
        color: #3a3a70;
        text-align: center;
        margin: 0px auto 16px auto; /* ⬅réduit l’espace en haut & en bas */
        padding: 70px 16px 0; /* garde une petite marge sur les côtés */
    }
    body.dark-mode h1 {
        color: #b3aaff; /*violet pâle lumineux */
    }
      
    .toggle-dark-mode {
        background: #f0f0f0;
        color: #007bff;
        font-size: 0.95rem;
        padding: 6px 12px;
        /*border-radius: 6px;*/
        max-width: 48%;
        text-align: center;
        margin-left: auto;  /* pousse à droite mais garde une marge */
        margin-right: 16px;  /* évite qu’il colle la bordure */
    }
      
      
    .cv-container {
      flex-direction: column;
      padding: 20px 0;
      gap: 30px;
    }
  
    .cv-box {
      width: 100%;
      padding: 20px 16px;
      box-sizing: border-box;
      margin-bottom: 20px;
    }
  
    .cv-box h2 {
      font-size: 1.1rem;
      text-align: center;
      margin-bottom: 8px;
    }
    body.dark-mode .cv-box h2 {
        color: #c2b8f0;
    }
  
    .cv-description {
      font-size: 0.95rem;
      text-align: center;
      margin-bottom: 8px;
    }
    /* En mode sombre : couleur plus lumineuse */
    body.dark-mode .cv-description {
        color: #d0caff; /* doux violet clair lisible */
    }
  
    .cv-frame {
      height: 400px;
      width: 100%;
      margin-top: 10px;
    }
    .cv-frame:hover {
        transform: scale(1.005); /* plus doux */
        box-shadow: 0px 6px 14px rgba(0, 0, 0, 0.12);
    }    
  
    .cv-update-date {
      font-size: 0.85rem;
      text-align: center;
      margin-top: 8px;
    }
  
    .cv-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 10px;
        margin-top: 15px;
    }
      
  
    .btn-copy,
    .btn-download {
        width: 80%;
        max-width: 240px;
        font-size: 0.85rem;
        padding: 8px 12px;
    }

  
    .btn-copy i,
    .btn-download i {
      font-size: 1rem;
    }
  
    .back-button,
    .toggle-dark-mode {
        font-size: 0.95rem;
        padding: 6px 12px;
        border-radius: 6px;
        text-decoration: none;
        display: inline-block;
        white-space: nowrap;
    }

    .back-button {
        color: #007bff;
        background: none;
        font-weight: bold;
    }

    body.dark-mode .cv-description,
    body.dark-mode .cv-update-date {
    color: #ccc;
    }

    body.dark-mode .btn-copy {
    background: #444;
    color: #eee;
    }

}
  