/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');

:root {
    --green: #00c853;
    --green-dark: #227527;
    --blue:#0099ff;
    --blue-dark:#004aeb;
    --white: #ffffff;
    --gray-light: #f5f5f5;
    --gray-dark: #212121;
    --shadow: rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--gray-light);
    color: var(--gray-dark);
    line-height: 1.6;
}

/* NAVBAR */
nav {
  display: flex;
  align-items: center;
  background-color: var(--green-dark);
  padding: 0 40px;
  height: 70px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  gap: 5px;
}

/* LOGO */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.3s ease;
  color: inherit;
  flex-shrink: 0;
}

.logo:hover {
  opacity: 0.8;
  text-decoration: none;
}

.logo img {
  height: 40px;
  display: block;
}

.logo span {
  color: var(--white);
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
}

/* LIENS DU MENU */
.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  margin: 0;
  margin-left: auto;
  padding: 0;
  list-style: none;
  min-width: 0;
}

/* Conteneur pour + et hamburger */
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.more-dropdown {
  display: flex;
  align-items: center;
  position: relative;
}

.more-button {
  background: none;
  border: none;
  color: var(--white);
  font-size: 24px;
  cursor: pointer;
  padding: 5px 8px;
  transition: transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.more-button:hover {
  transform: scale(1.1);
}

.more-menu {
  position: absolute;
  top: 70px;
  right: 0;
  background: var(--white);
  color: var(--gray-dark);
  list-style: none;
  padding: 5px 0;
  border: 1px solid var(--shadow);
  border-radius: 4px;
  box-shadow: 0 2px 6px var(--shadow);
  min-width: 150px;
  opacity: 0;
  transform: translateY(-10px) scaleY(0.95);
  transform-origin: top right;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1001;
}

.more-menu.show {
  opacity: 1;
  transform: translateY(0) scaleY(1);
  animation: fadeIn 0.2s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px) scaleY(0.95); }
  to   { opacity: 1; transform: translateY(0) scaleY(1); }
}

/* base styles for desktop nav items (lost earlier during edits) */
.nav-links li a {
  color: var(--white);
  text-decoration: none;
  font-weight: 400;
  padding: 3px 8px;
  display: inline-block;
  transition: all 0.3s ease;
  position: relative;
  vertical-align: middle;
  /* nudge links a bit lower than exact center */
  transform: translateY(4px);
}

.nav-links li a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--green);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-links li a:hover {
  color: var(--green);
  background-color: rgba(0, 200, 83, 0.1);
  border-radius: 4px;
  /* slightly up from baseline position */
  transform: translateY(2px);
}

.nav-links li a:hover::after {
  width: 70%;
}





/* HEADER */
header {
    height: 100vh;
    background: linear-gradient(to bottom right, var(--green-dark), var(--green));
    color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
}

header h1 {
    font-size: 50px;
    margin-bottom: 20px;
}

header p {
    font-size: 20px;
    opacity: 0.9;
}

/* MAIN CONTAINER */
.container {
    width: 90%;            /* fluid up to large screens */
    max-width: none;       /* removed limit so content can stretch */
    margin: 120px auto 40px;
    padding: 20px;
}

/* ensure details take full container width */
.competences-sections details {
    width: 100%;
}

/* restrict grid to maximum three columns without altering card size */
.competence-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
    max-width: calc(3 * 450px + 40px); /* approx 3 cards plus gaps */
    margin: 0 auto;
}


/* TITRES */
h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--green-dark);
}

/* Titre principal des sections de compétences */
.competences-section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 100%);
    color: var(--white);
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(34, 117, 39, 0.25);
}

.competences-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
    flex-shrink: 0;
}

.competences-title {
    font-size: 40px;
    font-weight: 700;
    margin: 0;
    padding: 0;
    color: var(--white);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background: none;
    box-shadow: none;
    border-radius: 0;
}

/* Séparation entre les sections de compétences */
.competences-sections {
    padding-bottom: 60px;
    margin-bottom: 60px;
    position: relative;
}

.competences-sections:after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--blue-dark), transparent);
    border-radius: 2px;
}

.competences-sections:last-of-type {
    padding-bottom: 0;
    margin-bottom: 0;
}

.competences-sections:last-of-type:after {
    display: none;
}

h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--green);
}

/* CARTES */
.card {
    background-color: var(--white);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px var(--shadow);
    border-left: 5px solid var(--green);
}

/* LISTES */
ul {
    padding-left: 20px;
}

ul li {
    margin-bottom: 8px;
}

/* LIENS */
a {
    color: var(--green-dark);
    text-decoration: none;
}

a:hover {
    color: var(--green);
}

/* Interactive competence sections (accordion style) */
.competences-sections details {
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow);
    transition: box-shadow 0.3s;
    /* remove gradient here; apply on inner container for visibility */
}

/* animate the inner grid rather than the entire details element */
.competences-sections details .competence-grid {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.competences-sections details[open] .competence-grid {
    max-height: 1000px; /* enough to show all cards */
    opacity: 1;
}

.competences-sections details[open] .competence-grid {
    max-height: 1000px; /* enough to show all cards */
}



/* stagger entry delays */
.competences-sections details[open] .competence-card:nth-child(1) { transition-delay: 0.05s; }
.competences-sections details[open] .competence-card:nth-child(2) { transition-delay: 0.1s; }
.competences-sections details[open] .competence-card:nth-child(3) { transition-delay: 0.15s; }
.competences-sections details[open] .competence-card:nth-child(4) { transition-delay: 0.2s; }
.competences-sections details[open] .competence-card:nth-child(5) { transition-delay: 0.25s; }
.competences-sections details[open] .competence-card:nth-child(6) { transition-delay: 0.3s; }
.competences-sections details[open] .competence-card:nth-child(7) { transition-delay: 0.35s; }
.competences-sections details[open] .competence-card:nth-child(8) { transition-delay: 0.4s; }
.competences-sections details[open] .competence-card:nth-child(9) { transition-delay: 0.45s; }
.competences-sections details[open] .competence-card:nth-child(10) { transition-delay: 0.5s; }

/* remove delays when closing */
.competences-sections details:not([open]) .competence-card {
    transition-delay: 0s;
}

.competences-sections details .competence-grid {
    background: rgba(224, 247, 255, 0.8); /* solid light blue */
    padding: 15px; /* keep padding from earlier rules if needed */
}

.competences-sections details:hover {
    box-shadow: 0 4px 12px var(--shadow);
}

.competences-sections summary {
    background: var(--blue);
    color: var(--white);
    padding: 12px 18px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    list-style: none;
}

/* hide default disclosure triangle */
.competences-sections summary::-webkit-details-marker {
    display: none;
}

.competences-sections summary::after {
    content: '\25BC'; /* single custom arrow */
    position: absolute;
    right: 18px;
    transition: transform 0.3s;
}

.competences-sections details[open] summary::after {
    transform: rotate(180deg);
}

.competences-sections summary:hover {
    background: var(--blue-dark);
}

.competences-sections .competence-grid {
    padding: 15px;
    background: var(--white);
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}


/* TABLEAU DE COMPÉTENCES */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

table th, table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

table th {
    background-color: var(--green-dark);
    color: var(--white);
}

/* FORMULAIRE DE CONTACT */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input, textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: 'Inter', sans-serif;
}


form input, form textarea {
  width: 100%;
  box-sizing: border-box; /* pour que padding + border ne dépassent pas */
}

form textarea {
  resize: vertical; /* autorise seulement la hauteur */
}


button {
    background-color: var(--green);
    color: var(--white);
    border: none;
    padding: 12px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: var(--green-dark);
}

/* FOOTER */
footer {
    text-align: center;
    padding: 20px;
    background-color: var(--green-dark);
    color: var(--white);
    margin-top: 40px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    header h1 {
        font-size: 36px;
    }

    .container {
        padding: 10px;
    }
}


/* Hamburger button - hidden by default on desktop */
.menu-toggle {
  display: none;
}


@media (max-width: 768px) {
    /* nav structure mobile */
    nav {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      width: 100%;
      height: 70px;
      padding: 0;
      margin: 0;
      display: flex;
      flex-wrap: nowrap;
      z-index: 1000;
      gap: 0;
      justify-content: flex-start;
      align-items: stretch;
    }

    /* hamburger: FIXE À GAUCHE */
    .menu-toggle {
      display: flex !important;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      flex-grow: 0;
      width: 70px;
      height: 70px;
      padding: 0 !important;
      margin: 0 !important;
      background: none !important;
      border: none !important;
      font-size: 24px;
      line-height: 1;
      cursor: pointer;
      position: relative !important;
      z-index: 10;
    }

    /* logo: À COTÉ DU HAMBURGER */
    .logo {
      display: flex;
      align-items: center;
      gap: 8px;
      height: 100%;
      flex-shrink: 1;
      flex-grow: 1;
      margin: 0 !important;
      padding: 0 15px !important;
      min-width: 0;
      justify-content: flex-start;
    }

    .logo:hover {
      opacity: 0.8;
    }

    .logo img {
      height: 36px;
      flex-shrink: 0;
    }

    .logo span {
      color: var(--white);
      font-size: 14px;
      font-weight: 600;
      line-height: 1;
      white-space: nowrap;
    }

    /* nav-right masqué en mobile */
    .nav-right {
      display: none !important;
    }

    /* mobile menu panel – start hidden via display:none, shown with flex */
    .nav-links {
      position: fixed;
      top: 70px;
      left: 0;
      right: 0;
      bottom: 0;
      display: none !important;
      flex-direction: column;
      background: var(--green-dark);
      padding: 0;
      margin: 0 !important;
      gap: 0;
      width: 100%;
      height: calc(100vh - 70px);
      border-radius: 0;
      box-shadow: none;
      border: none;
      z-index: 999;
      list-style: none;
      overflow-y: auto;
      /* animation support: we'll trigger a keyframe when the
         element becomes visible in .show */
    }

    .nav-links.show {
      display: flex !important;
      animation: slideDown 0.3s ease forwards;
    }

    /* apply reversed animation while hiding so the panel slides up */
    .nav-links.hiding {
      display: flex !important; /* ensure still flex during animation */
      animation: slideUp 0.3s ease forwards;
    }

    /* slide-down animation for mobile menu */
    @keyframes slideDown {
      from { transform: translateY(-100%); }
      to   { transform: translateY(0); }
    }

    /* reverse animation for closing */
    @keyframes slideUp {
      from { transform: translateY(0); }
      to   { transform: translateY(-100%); }
    }

    .nav-links li {
      list-style: none !important;
      display: block !important;
      width: 100% !important;
      margin: 0 !important;
      padding: 0 !important;
      border-bottom: 1px solid rgba(255,255,255,0.1);
      height: auto;
    }

    .nav-links li:last-child {
      border-bottom: none;
    }

    .nav-links li a {
      display: block !important;
      width: 100% !important;
      padding: 20px 20px !important;
      color: var(--white) !important;
      font-size: 16px !important;
      font-weight: 400 !important;
      text-decoration: none !important;
      transform: none !important;
      position: relative !important;
      line-height: 1.5 !important;
    }

    .nav-links li a::after {
      display: none !important;
    }

    .nav-links li a:hover {
      background: rgba(255,255,255,0.1);
      color: var(--white) !important;
    }

    /* masquer le + en mobile */
    .more-dropdown {
      display: none !important;
    }
  }

  .skill-card {
    background: var(--white);
    border-left: 5px solid var(--green);
    padding: 12px 18px;
    border-radius: 8px;
    box-shadow: 0 2px 6px var(--shadow);
    font-weight: 500;
    color: var(--gray-dark);
    transition: transform 0.2s ease;
  }
  
  .skill-card:hover {
    transform: scale(1.03);
  }
  
  .skill-card.purple {
    border-left-color: #6a1b9a;
    background: #f3e5f5;
  }
  
  .competence-card {
    background: var(--white);
    border-left: 6px solid var(--green);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px var(--shadow);
    transition: transform 0.2s ease;
  }
  
  .competence-card:hover {
    transform: scale(1.02);
  }
  
  .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
  }
  
  .card-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--green-dark);
  }
  
  .status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: white;
  }
  
  .status.expert {
    background-color: var(--green);
  }
  
  .status.maitrise {
    background-color: var(--blue);
  }
  
  .status.intermediaire {
    background-color: #ff9800;
  }
  
  .status.debutant {
    background-color: #ff6b6b;
  }
  
  .status.success {
    background-color: var(--green);
  }
  
  .status.inprogress {
    background-color: #ff9800;
  }
  
  .status.pending {
    background-color: #9e9e9e;
  }
  
  .description {
    font-size: 15px;
    margin-bottom: 10px;
    color: var(--gray-dark);
    line-height: 1.6;
    display: block;
    white-space: normal;
    word-wrap: break-word;
  }
  
  /* Liens cliquables dans la description */
  .description .inline-link {
    color: var(--green);
    text-decoration: none;
    word-break: break-all;
    transition: color 0.2s ease;
  }
  
  .description .inline-link:hover {
    color: var(--green-dark);
    text-decoration: underline;
  }
  
  .details p {
    font-size: 14px;
    margin: 4px 0;
  }
  
  .card-button {
    display: inline-block;
    margin-top: 10px;
    background-color: var(--blue);
    color: white;
    padding: 8px 14px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
    width: fit-content;
  }
  
  .card-button:hover {
    background-color: var(--blue-dark);
    color: white;
    text-decoration: none;
  }

  
  .competence-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
  }
  
  .competence-card {
    display: flex;
    flex-direction: row;
    background: var(--white);
    border-left: 6px solid var(--green);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 10px var(--shadow);
    transition: transform 0.2s ease;
    /* allow cards to grow and wrap; min 350px for slightly larger cards */
    flex: 1 1 350px;
    /* no max-width so cards stretch to fill available space */
  }
  
  .competence-card:hover {
    transform: scale(1.02);
  }
  
  .card-logo {
    width: 50px;
    height: 50px;
    margin-right: 15px;
    object-fit: contain;
    align-self: flex-start;
  }
  
  .card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
  }
  
  .card-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--green-dark);
  }
  
  .status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: white;
  }
  
  .status.success {
    background-color: var(--green);
  }
  
  .description {
    font-size: 15px;
    margin-bottom: 10px;
    color: var(--gray-dark);
  }
  
  .details p {
    font-size: 14px;
    margin: 4px 0;
  }
  
  .card-button {
    display: inline-block;
    margin-top: 10px;
    background-color: var(--blue-dark);
    color: white;
    padding: 8px 14px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
    width: fit-content;
  }
  
  .card-button:hover {
    background-color: var(--blue);
  }
  
  /* Responsive : 1 carte par ligne en mobile */
  @media (max-width: 768px) {
    .competence-card {
      flex: 1 1 100%;
      flex-direction: column;
      align-items: flex-start;
    }
  
    .card-logo {
      margin-bottom: 10px;
    }
  
    .card-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 5px;
    }

    .competences-section-header {
      gap: 12px;
      padding: 20px 15px;
      margin-bottom: 30px;
    }

    .competences-icon {
      width: 32px;
      height: 32px;
    }

    .competences-title {
      font-size: 22px;
      letter-spacing: 0;
    }
  }

  /* SOCIAL ICONS */
  .social-icons {
    display: flex;
    justify-content: center;
    margin-top: 30px;
  }

  .social-icons a {
    display: inline-block;
    margin: 0 10px;
    transition: filter 0.3s ease;
  }

  .social-icons img {
    width: 40px;
    height: 40px;
    filter: grayscale(100%);
  }

  .social-icons a:hover img {
    filter: none;
  }

  /* MODAL POUR LES PREUVES */
  .proof-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    flex-direction: column;
  }

  .proof-modal.show {
    display: flex;
  }

  .proof-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2001;
  }

  .proof-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    background-color: var(--white);
    /* remove outer border; use iframe border instead */
    border: none;
    border-radius: 12px 12px 0 0; /* rounded only on top corners */
    display: flex;
    flex-direction: column;
    z-index: 2002;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  }

  .proof-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 12px 5px; /* a little more space below buttons */
    border-top: 4px solid var(--blue-dark);
    border-bottom: none; /* remove line under header */
    background-color: var(--blue-dark);
    border-radius: 12px 12px 0 0;
    flex-shrink: 0;
    gap: 10px;
    z-index: 2003; /* sit above iframe border */
  }

  .proof-title {
    flex: 1;
    text-align: left;
    font-size: 14px; /* smaller text */
    font-weight: 600;
    color: var(--white);
    user-select: none;
    margin-left: 8px;
    /* Windows XP title bar font approximation */
    font-family: Tahoma, 'Microsoft Sans Serif', sans-serif;
  }

  .proof-controls {
    display: flex;
    gap: 4px;
  }

  /* generic control button style: Windows blue background */
  .proof-controls button {
    font-size: 14px;
    line-height: 1;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #fff; /* fine white border */
    border-radius: 2px;
    cursor: pointer;
    background: var(--blue-dark);
    color: var(--white);
    transition: background-color 0.2s ease, border-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .proof-controls button:hover {
    background: var(--blue);
    border-color: #eee;
  }

  /* keep close red to stand out; border white like other buttons */
  .proof-controls button.proof-close {
    background-color: #e53935;
    border-color: #fff; /* white border */
    font-size: 16px; /* slightly larger cross */
    line-height: 1; /* ensure vertical centering */
    text-align: center;
  }

  .proof-controls button.proof-close:hover {
    background-color: #d32f2f;
    border-color: #eee; /* lighter border on hover */
  }

  /* open-new-tab remains green */
  .proof-open-new-tab {
    background-color: var(--green);
    color: var(--white);
    font-size: 12px;
    padding: 2px 4px;
  }

  .proof-open-new-tab:hover {
    background-color: var(--green-dark);
  }

  /* minimized state: shrink container and hide iframe */
  



  .proof-iframe {
    flex: 1;
    /* frame-only border, square corners */
    border: 4px solid var(--blue-dark);
    border-radius: 0;
    margin-top: -4px; /* overlap header to eliminate gap */
  }

  /* Mode mobile */
  @media (max-width: 768px) {
    .proof-container {
      top: 0;
      left: 0;
      transform: none;
      width: 100%;
      height: 100vh;
      max-width: none;
      border-radius: 0;
    }

    .proof-header {
      border-radius: 0;
      padding: 3px 12px 5px; /* match desktop compact height */
      gap: 6px;
    }

    .proof-close {
      font-size: 16px;
    }

    .proof-open-new-tab {
      font-size: 12px;
      padding: 8px 12px;
      white-space: nowrap;
    }

    .proof-iframe {
      border-radius: 0;
    }
  }







  
