/* ========================================
   BASE STYLES - INDEX.PHP
   ======================================== */

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

html,
body {
  height: 100%;
  overflow-x: hidden;
}

/* Fonts */
.montserrat-normal {
  font-family: "Montserrat", sans-serif;
  font-optical-sizing: auto;
  font-weight: normal;
  font-style: normal;
}

.montserrat-bold {
  font-family: "Montserrat", sans-serif;
  font-optical-sizing: auto;
  font-weight: bold;
  font-style: normal;
}

.poppins-bold {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-style: normal;
}

/* ========================================
   HEADER HOME
   ======================================== */

.header-home {
  background-color: #626d86;
  min-height: 100vh;
  padding: 0 20px;
}

.container-header-dev {
  background-color: #549be3;
  width: 250px;
  border-radius: 50px;
  padding: 10px;
  color: #3c42e3;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px auto;
  margin-bottom: 24px;
}

.title-header {
  line-height: 1.2;
  margin-bottom: 24px;
}

.title-header-1 {
  font-size: 60px;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
}

.title-header-2 {
  font-size: 60px;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #202a37;
  margin-bottom: 30px;
}

.text-header-1 {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
  font-size: 20px;
  padding: 0 20px;
  text-align: center;
}

.text-header-2 {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  margin-bottom: 80px;
  font-size: 20px;
  padding: 0 20px;
  text-align: center;
}

.text-header-container {
  line-height: 1;
}

.projets-btn {
  background-color: #202a37;
  height: 50px;
  color: white;
  padding: 12px 24px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  text-decoration: none;
  width: fit-content;
  margin: 20px auto;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.projets-btn:hover {
  background-color: #2c3948;
  transform: translateY(-2px);
}

/* ========================================
   SECTION MON PORTRAIT
   ======================================== */

.pdp-offset {
  position: absolute;
  right: clamp(12px, 8vw, 120px);
  width: min(450px, 40vw);
  height: min(450px, 40vw);
  object-fit: cover;
  display: block;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
  border-radius: 0;
}

.container-main-portrait {
  color: #917c47;
  background-color: #f7ca5a;
  width: 180px;
  border-radius: 50px;
  padding: 10px;
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 40px;
}

.title-section-portrait {
  font-size: 60px;
  font-weight: bold;
}

.experience-section p {
  margin: 0;
}

.rectangle {
  width: 30px;
  height: 30px;
  background-color: #549be3;
  border-radius: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.rectangle i {
  font-size: 20px;
  color: white;
}

.rectangle1 {
  width: 40px;
  height: 40px;
  background-color: #549be3;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.rectangle1 i {
  font-size: 20px;
  color: white;
}

/* ========================================
   SECTION COMPÉTENCES
   ======================================== */

.container-main-competences {
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

.card-competences {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px 20px;
  min-width: 240px;
  max-width: 280px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card-competences:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  border-color: #202a37;
}

.card-competences-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.card-competences-icon {
  width: 48px;
  height: 48px;
  background: #202a37;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.3s ease;
}

.card-competences:hover .card-competences-icon {
  background: #2c3948;
}

.card-competences-icon i {
  font-size: 1.3rem;
  color: #ffffff;
}

.card-competences-content p {
  font-size: 1.1rem;
  font-weight: 600;
  color: #202a37;
  margin: 0;
  text-align: left;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
  margin-top: 16px;
}

.skills-list .badge {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 5px 10px;
  background: #f3f4f6 !important;
  color: #4b5563 !important;
  border: 1px solid #e5e7eb !important;
  transition: all 0.2s ease;
}

.skills-list .badge:hover {
  background: #202a37 !important;
  color: #ffffff !important;
  border-color: #202a37 !important;
}

/* ========================================
   SECTION PROJETS
   ======================================== */

.container-projet {
  display: block;
  width: 100%;
  margin-left: 0;
  background-color: #d4a574 !important;
  box-sizing: border-box;
  padding: 48px 0;
  position: relative;
  z-index: 0;
}

.container-projet > .container {
  background: transparent;
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
}

.projects-container .project-card {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.projects-container .project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.project-img img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.project-title {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.project-description {
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.project-link {
  position: relative;
  color: #000000;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  transition: transform 0.18s ease, color 0.18s ease;
  padding-bottom: 2px;
}

.project-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 0%;
  border-radius: 3px;
  background: linear-gradient(90deg, #2563eb 0%, #8b5cf6 100%);
  transition: width 260ms cubic-bezier(0.2, 0.9, 0.3, 1);
}

.project-link:hover {
  transform: translateY(-3px);
  color: #000000;
}

.project-link:hover::after {
  width: 100%;
}

/* ========================================
   SECTION CONTACT
   ======================================== */

.contact-section {
  padding: 60px 0;
}

.contact-side {
  position: sticky;
  top: 20px;
}

.form-column {
  padding-left: 20px;
}

.contact-form .form-control {
  border-radius: 8px;
  border: 1px solid #dee2e6;
  padding: 10px 14px;
}

.contact-form .form-control:focus {
  border-color: #202a37;
  box-shadow: 0 0 0 0.2rem rgba(32, 42, 55, 0.25);
}

.contact-form textarea.form-control {
  min-height: 140px;
  resize: vertical;
}

.contact-form .btn-primary {
  background-color: #202a37;
  border-color: #202a37;
  padding: 12px 24px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.contact-form .btn-primary:hover {
  background-color: #2c3948;
  border-color: #2c3948;
  transform: translateY(-2px);
}

/* ========================================
   MEDIA QUERIES - RESPONSIVE
   ======================================== */

/* Tablettes et écrans moyens (max 992px) */
@media screen and (max-width: 992px) {
  /* Header */
  .title-header-1,
  .title-header-2 {
    font-size: 48px;
  }

  .text-header-1,
  .text-header-2 {
    font-size: 18px;
  }

  .container-header-dev {
    width: 220px;
    font-size: 0.95rem;
  }

  /* Portrait section */
  .pdp-offset {
    right: 24px;
    width: 320px;
    height: 320px;
  }

  .title-section-portrait {
    font-size: 48px;
  }

  .container-main-portrait {
    width: 160px;
    font-size: 0.95rem;
  }

  /* Compétences */
  section.ms-5 {
    margin-left: 2rem !important;
  }

  .card-competences {
    min-width: 220px;
    max-width: 260px;
    padding: 20px 18px;
  }

  .card-competences-header {
    gap: 10px;
    margin-bottom: 14px;
  }

  .card-competences-icon {
    width: 44px;
    height: 44px;
  }

  .card-competences-icon i {
    font-size: 1.2rem;
  }

  .card-competences-content p {
    font-size: 1.05rem;
  }

  .skills-list {
    margin-top: 14px;
  }

  .skills-list .badge {
    font-size: 0.75rem;
    padding: 4px 9px;
  }

  /* Projets */
  .project-img img {
    height: 200px;
  }

  /* Contact */
  .contact-section {
    padding: 50px 0;
  }
}

/* Tablettes moyennes (max 768px) */
@media screen and (max-width: 768px) {
  /* Header */
  .header-home {
    padding: 0 15px;
  }

  .title-header-1,
  .title-header-2 {
    font-size: 36px;
  }

  .text-header-1,
  .text-header-2 {
    font-size: 16px;
    flex-direction: column;
  }

  .text-header-2 {
    margin-bottom: 50px;
  }

  .container-header-dev {
    width: 200px;
    font-size: 0.9rem;
    padding: 8px;
  }

  .projets-btn {
    padding: 10px 20px;
    font-size: 16px;
    height: 45px;
  }

  /* Portrait section - FIX PHOTO */
  .pdp-offset {
    position: relative !important;
    right: auto !important;
    width: 100% !important;
    max-width: 280px !important;
    height: 280px !important;
    margin: 20px auto !important;
    display: block !important;
    float: none !important;
  }

  section.ms-5 {
    margin-left: 1.5rem !important;
    margin-right: 1.5rem !important;
  }

  .title-section-portrait {
    font-size: 36px;
    text-align: left;
    margin-bottom: 20px;
  }

  .container-main-portrait {
    width: 150px;
    font-size: 0.9rem;
    margin-left: 0;
    margin-right: auto;
  }

  .container-main-competences {
    font-size: 2rem;
  }

  /* Réorganiser la section portrait */
  .d-flex.align-items-top {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  /* Photo après le titre */
  .d-flex.align-items-top .position-absolute {
    position: relative !important;
    order: 2;
    margin: 20px 0 !important;
  }

  section.ms-5 > p.montserrat-normal {
    width: 100% !important;
    text-align: left;
  }

  /* Compétences */
  section.ms-5 > .d-flex.gap-5 {
    flex-direction: column;
    align-items: center;
    gap: 20px !important;
  }

  .card-competences {
    min-width: 100%;
    max-width: 400px;
    padding: 22px 20px;
  }

  .card-competences-header {
    gap: 12px;
    margin-bottom: 14px;
  }

  .card-competences-icon {
    width: 46px;
    height: 46px;
  }

  .card-competences-icon i {
    font-size: 1.25rem;
  }

  .card-competences-content p {
    font-size: 1.1rem;
  }

  .skills-list {
    margin-top: 14px;
  }

  .skills-list .badge {
    font-size: 0.8rem;
    padding: 5px 10px;
  }

  /* Projets */
  .container-projet {
    padding: 40px 15px;
  }

  .project-img img {
    height: 180px;
  }

  /* Contact */
  .contact-section .row {
    margin-left: 0 !important;
  }

  .contact-side {
    position: static;
    margin-bottom: 30px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .form-column {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .contact-section {
    padding: 40px 0;
  }

  section#contact {
    margin-left: 0 !important;
  }

  section#contact .container-fluid {
    padding-left: 0;
    padding-right: 0;
  }
}

/* Smartphones (max 576px) */
@media screen and (max-width: 576px) {
  /* Header */
  .header-home {
    padding: 0 12px;
    min-height: auto;
    padding-bottom: 40px;
  }

  .title-header-1,
  .title-header-2 {
    font-size: 28px;
  }

  .text-header-1,
  .text-header-2 {
    font-size: 14px;
    padding: 0 10px;
  }

  .text-header-2 {
    margin-bottom: 40px;
  }

  .container-header-dev {
    width: 180px;
    font-size: 0.85rem;
    padding: 8px;
    margin-bottom: 20px;
  }

  .projets-btn {
    padding: 10px 18px;
    font-size: 14px;
    height: 42px;
  }

  /* Portrait section - FIX PHOTO */
  .pdp-offset {
    position: relative !important;
    right: auto !important;
    left: auto !important;
    width: 100% !important;
    max-width: 250px !important;
    height: 250px !important;
    margin: 20px auto !important;
    display: block !important;
    float: none !important;
  }

  section.ms-5 {
    margin-left: 1rem !important;
    margin-right: 1rem !important;
  }

  .title-section-portrait {
    font-size: 28px;
  }

  .container-main-portrait {
    width: 140px;
    font-size: 0.85rem;
    padding: 8px;
  }

  .container-main-competences {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
  }

  .rectangle {
    width: 28px;
    height: 28px;
  }

  .rectangle i {
    font-size: 18px;
  }

  .rectangle1 {
    width: 36px;
    height: 36px;
  }

  .rectangle1 i {
    font-size: 18px;
  }

  /* Compétences */
  .card-competences {
    padding: 20px 18px;
    border-radius: 10px;
    max-width: 100%;
  }

  .card-competences-header {
    gap: 10px;
    margin-bottom: 12px;
  }

  .card-competences-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
  }

  .card-competences-icon i {
    font-size: 1.15rem;
  }

  .card-competences-content p {
    font-size: 1.05rem;
  }

  .skills-list {
    gap: 5px;
    margin-top: 12px;
  }

  .skills-list .badge {
    font-size: 0.75rem;
    padding: 4px 9px;
  }

  /* Projets */
  .container-projet {
    padding: 35px 12px;
  }

  .projects-container .row {
    gap: 20px;
  }

  .project-img img {
    height: 160px;
  }

  .project-title {
    font-size: 1rem;
  }

  .project-description {
    font-size: 0.9rem;
  }

  /* Contact */
  .contact-section {
    padding: 35px 0;
  }

  .contact-side {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .form-column {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .contact-section .container-fluid {
    padding: 0;
  }

  section#contact .row {
    margin: 0;
  }

  .contact-form .form-control {
    padding: 9px 12px;
    font-size: 0.9rem;
  }

  .contact-form textarea.form-control {
    min-height: 120px;
  }

  .contact-form .btn-primary {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}

/* Petits smartphones (max 400px) */
@media screen and (max-width: 400px) {
  /* Header */
  .title-header-1,
  .title-header-2 {
    font-size: 24px;
  }

  .text-header-1,
  .text-header-2 {
    font-size: 13px;
  }

  .container-header-dev {
    width: 160px;
    font-size: 0.8rem;
  }

  .projets-btn {
    padding: 9px 16px;
    font-size: 13px;
    height: 40px;
  }

  /* Portrait */
  section.ms-5 {
    margin-left: 0.75rem !important;
    margin-right: 0.75rem !important;
  }

  .title-section-portrait {
    font-size: 24px;
  }

  .container-main-portrait {
    width: 130px;
    font-size: 0.8rem;
  }

  .container-main-competences {
    font-size: 1.4rem;
  }

  /* Compétences */
  .card-competences {
    padding: 18px 16px;
  }

  .card-competences-header {
    gap: 10px;
    margin-bottom: 12px;
  }

  .card-competences-icon {
    width: 40px;
    height: 40px;
  }

  .card-competences-icon i {
    font-size: 1.1rem;
  }

  .card-competences-content p {
    font-size: 1rem;
  }

  .skills-list {
    margin-top: 12px;
  }

  .skills-list .badge {
    font-size: 0.7rem;
    padding: 4px 8px;
  }

  /* Projets */
  .project-img img {
    height: 140px;
  }

  .project-title {
    font-size: 0.95rem;
  }

  .project-description {
    font-size: 0.85rem;
  }

  /* Contact */
  .contact-side {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .form-column {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* Très petits écrans (max 360px) */
@media screen and (max-width: 360px) {
  /* Header */
  .title-header-1,
  .title-header-2 {
    font-size: 22px;
  }

  .text-header-1,
  .text-header-2 {
    font-size: 12px;
  }

  .container-header-dev {
    width: 150px;
    font-size: 0.75rem;
  }

  /* Portrait */
  .title-section-portrait {
    font-size: 22px;
  }

  .container-main-competences {
    font-size: 1.3rem;
  }

  /* Compétences */
  .card-competences {
    padding: 16px 14px;
    border-radius: 10px;
  }

  .card-competences-header {
    gap: 8px;
    margin-bottom: 10px;
  }

  .card-competences-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
  }

  .card-competences-icon i {
    font-size: 1rem;
  }

  .card-competences-content p {
    font-size: 0.95rem;
  }

  .skills-list {
    gap: 5px;
    margin-top: 10px;
  }

  .skills-list .badge {
    font-size: 0.7rem;
    padding: 3px 7px;
  }

  /* Projets */
  .project-img img {
    height: 130px;
  }
}

/* Optimisation pour écrans ultra-larges */
@media screen and (min-width: 1400px) {
  .title-header-1,
  .title-header-2 {
    font-size: 70px;
  }

  .text-header-1,
  .text-header-2 {
    font-size: 22px;
  }

  .container-header-dev {
    width: 280px;
    padding: 12px;
  }

  .projets-btn {
    font-size: 19px;
    padding: 14px 28px;
    height: 55px;
  }

  .title-section-portrait {
    font-size: 70px;
  }

  .container-main-competences {
    font-size: 3rem;
  }

  .card-competences {
    min-width: 260px;
    max-width: 300px;
  }

  .project-img img {
    height: 240px;
  }
}

/* Ajustement pour orientation paysage sur petits écrans */
@media screen and (max-height: 500px) and (orientation: landscape) {
  .header-home {
    min-height: auto;
    padding: 20px 15px 30px;
  }

  .title-header-1,
  .title-header-2 {
    font-size: 24px;
  }

  .text-header-1,
  .text-header-2 {
    font-size: 13px;
    margin-bottom: 10px;
  }

  .text-header-2 {
    margin-bottom: 20px;
  }

  .container-header-dev {
    margin: 10px auto 15px;
  }

  .projets-btn {
    margin: 15px auto;
  }
}