/* ===== COULEURS GLOBALES ===== */
:root {
  --rouge: #bd3131;
  --bleu: #2c4075;
  --fond-carte: rgba(255, 255, 255, 0.85);
  --texte-sombre: #1a1a1a;
  --texte-clair: #ffffff;
  --gris: #555555;
}

/* ===== RESET DE BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: grey;
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  color: var(--texte-clair);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

body.modal-open {
  overflow: hidden;
}

/* ===== MISE EN PAGE ===== */
.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

a {
  text-decoration: none;
  color: white;
}

/* ===== HEADER ===== */
.site-header {
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--rouge);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  text-shadow: 2px 2px 0px var(--rouge);
}

.logo span {
  color: var(--rouge);
}

/* ===== NAVIGATION ===== */
.main-nav {
  display: flex;
}

.main-nav a {
  margin-left: 30px;
  color: #ccc;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 8px;
  transition: 0.3s;
}

.main-nav a:hover {
  color: white;
  background-color: var(--rouge);
}

/* Bouton hamburger (visible seulement sur mobile) */
.menu-button {
  display: none;
  background: none;
  border: 2px solid white;
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 30px;
  height: 3px;
  background-color: white;
  margin-bottom: 5px;
}

/* ===== BOUTONS ===== */
.button {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 15px;
  font-weight: bold;
  text-align: center;
  border: 3px solid #000;
  font-size: 0.9rem;
  transition: 0.3s;
  margin-right: 10px;
}

.button-primary {
  background-color: var(--rouge);
  color: white;
}

.button-secondary {
  background-color: var(--fond-carte);
  color: black;
}

.button-primary:hover,
.button-secondary:hover {
  background-color: #1a1a1a;
  color: white;
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.5);
  border-color: var(--rouge);
}

.button-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  background-color: #555;
  color: #aaa;
  border-color: #333;
}

/* ===== SECTION HERO (haut de page) ===== */
.hero {
  padding-top: 180px;
  padding-bottom: 100px;
  text-align: center;
}

.eyebrow {
  background-color: var(--rouge);
  color: white;
  display: inline-block;
  padding: 5px 15px;
  border-radius: 20px;
  border: 2px solid #000;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 1px;
}

.hero h1 {
  font-size: 55px;
  margin-top: 20px;
  margin-bottom: 20px;
  text-shadow: 3px 3px 0px var(--bleu);
}

.hero h1 span {
  color: var(--rouge);
}

.hero-text {
  font-size: 20px;
  font-weight: bold;
  width: 70%;
  margin: 0 auto 40px auto;
}

/* ===== SECTIONS ===== */
.section {
  padding: 80px 0;
}

.section-alt {
  background-color: rgba(0, 0, 0, 0.7);
  border-top: 3px solid var(--bleu);
  border-bottom: 3px solid var(--bleu);
}

.section-label {
  background-color: var(--rouge);
  color: white;
  display: inline-block;
  padding: 5px 15px;
  border-radius: 15px;
  border: 2px solid #000;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 14px;
  margin-bottom: 10px;
}

.section-heading {
  margin-bottom: 40px;
}

.section-heading h2 {
  font-size: 40px;
  margin-bottom: 15px;
  text-shadow: 2px 2px 0px var(--rouge);
}

.section-heading p {
  color: #ddd;
  font-size: 18px;
  font-weight: bold;
}

/* ===== CARTES (style commun) ===== */
.content-card,
.skill-card,
.contact-card {
  background-color: var(--fond-carte);
  border: 3px solid var(--bleu);
  border-radius: 35px;
  color: var(--texte-sombre);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  transition: 0.3s;
}

.content-card:hover,
.skill-card:hover {
  transform: scale(1.05);
  border-color: var(--rouge);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

/* ===== SECTION À PROPOS ===== */
.about-grid {
  display: flex;
  justify-content: space-between;
}

.content-card {
  width: 48%;
  padding: 35px;
}

.content-card h3 {
  margin-bottom: 15px;
  font-size: 24px;
  color: var(--rouge);
}

.content-card p {
  margin-bottom: 15px;
  font-weight: bold;
}

/* ===== SECTION COMPÉTENCES ===== */
.skills-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.skill-card {
  width: 23%;
  padding: 30px;
}

.skill-number {
  background-color: #000;
  color: white;
  padding: 5px 12px;
  border-radius: 50%;
  border: 2px solid var(--rouge);
  font-weight: bold;
  font-size: 16px;
}

.skill-card h3 {
  margin-top: 20px;
  margin-bottom: 15px;
  font-size: 20px;
}

.skill-card p {
  color: var(--gris);
  font-size: 15px;
  font-weight: bold;
}

/* ===== SECTION PROJETS ===== */
.projects-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.projects-heading p {
  width: 40%;
}

.projects-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.project-card {
  width: 31%;
  background-color: var(--fond-carte);
  border-radius: 30px;
  margin-bottom: 35px;
  border: 3px solid var(--bleu);
  overflow: hidden;
  cursor: pointer;
  color: var(--texte-sombre);
  display: flex;
  flex-direction: column;
  transition: 0.3s;
}

.project-card:hover {
  border-color: var(--rouge);
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

.project-card-preview {
  height: 220px;
  width: 100%;
  position: relative;
  background-color: #111;
  border-bottom: 3px solid var(--bleu);
}

.project-card:hover .project-card-preview {
  border-bottom-color: var(--rouge);
}

.project-card-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card-no-image {
  text-align: center;
  padding-top: 90px;
  color: white;
  font-weight: bold;
}

/* Overlay rouge au survol */
.project-card-preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(189, 49, 49, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: 0.3s;
}

.project-card:hover .project-card-preview-overlay {
  opacity: 1;
}

.project-card-preview-overlay span {
  background-color: white;
  color: var(--rouge);
  padding: 10px 20px;
  border: 2px solid #000;
  border-radius: 20px;
  font-weight: bold;
}

.project-card-body {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.project-tag {
  background-color: #000;
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  border: 2px solid var(--rouge);
}

.project-number {
  color: #777;
  font-weight: bold;
  font-size: 18px;
}

.project-card h3 {
  margin-bottom: 15px;
  font-size: 22px;
}

.project-description {
  color: var(--gris);
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 25px;
}

.project-technologies {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 25px;
}

.project-technologies span {
  background-color: #111;
  color: white;
  padding: 6px 12px;
  border: 1px solid var(--bleu);
  border-radius: 10px;
  font-size: 12px;
  font-weight: bold;
  margin-right: 8px;
  margin-bottom: 8px;
}

/* Pousse le bouton tout en bas de la carte */
.project-card-body .button {
  margin-top: auto;
  width: 100%;
}

/* ===== SECTION CONTACT ===== */
.contact-card {
  padding: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.contact-card div {
  width: 60%;
}

.contact-card h2 {
  color: var(--rouge);
  font-size: 35px;
  margin-bottom: 15px;
}

/* ===== FOOTER ===== */
.site-footer {
  border-top: 3px solid var(--rouge);
  padding: 40px 0;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.9);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  color: #ccc;
  font-weight: bold;
}

.footer-content a:hover {
  color: var(--rouge);
}

/* ===== MODALE (pop-up projet) ===== */
.project-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s;
}

.project-modal.open {
  visibility: visible;
  opacity: 1;
}

.project-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
}

.project-modal-content {
  position: relative;
  background-color: var(--fond-carte);
  width: 900px;
  max-width: 95%;
  height: 600px;
  border-radius: 40px;
  border: 4px solid var(--rouge);
  display: flex;
  z-index: 10001;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.project-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: #000;
  color: white;
  border: 2px solid var(--rouge);
  font-size: 24px;
  font-weight: bold;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  z-index: 10;
  transition: 0.2s;
}

.project-modal-close:hover {
  background-color: var(--rouge);
  transform: rotate(90deg);
}

.project-modal-image-container {
  width: 50%;
  background-color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  border-right: 3px solid var(--rouge);
}

.project-modal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-modal-information {
  width: 50%;
  padding: 40px;
  display: flex;
  flex-direction: column;
  color: var(--texte-sombre);
}

.project-modal-information h2 {
  font-size: 32px;
  margin-top: 20px;
  margin-bottom: 15px;
}

.project-modal-information p {
  color: var(--gris);
  font-weight: bold;
  margin-bottom: 25px;
  font-size: 16px;
}

.project-modal-information .button {
  margin-top: auto;
  width: 100%;
}

/* ===== FORMULAIRE DE CONNEXION ===== */
.formulaire {
  margin: 20px 0;
  background-color: var(--fond-carte);
  padding: 20px;
  border: 3px solid var(--bleu);
  border-radius: 20px;
  color: black;
}

.nom {
  font-size: 16px;
  font-weight: bold;
  color: black;
}

input.nom {
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  border: 3px solid var(--rouge);
  border-radius: 10px;
  background-color: #fff;
  color: #000;
  transition: 0.3s;
}

input.nom:focus {
  outline: none;
  box-shadow: 0 0 10px rgba(189, 49, 49, 0.5);
}

.bouton-retour {
  margin-top: 30px;
  text-align: center;
}

.bouton-retour a {
  display: inline-block;
  background-color: #000;
  color: white;
  border: 3px solid var(--rouge);
  padding: 12px 25px;
  border-radius: 15px;
  font-weight: bold;
  transition: 0.3s;
}

.bouton-retour a:hover {
  background-color: var(--rouge);
  transform: translateY(-5px);
}

/* ===== UTILITAIRES ===== */
.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}