/* ============================================================
   🅐 GOOGLE FONTS
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;900&family=Courier+Prime:wght@400;700&display=swap');


/* ============================================================
   🅑 ANIMATIONS GLOBALES
   ============================================================ */

/* Effet de flottement utilisé pour le thème Glass */
@keyframes float {
  0%   { transform: translateY(0px); }
  50%  { transform: translateY(-20px); }
  100% { transform: translateY(0px); }
}

/* Rotation chaotique du thème Y2K */
@keyframes spinChaos {
  0%   { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(180deg) scale(1.2); }
  100% { transform: rotate(360deg) scale(1); }
}

/* Déplacement du motif Memphis */
@keyframes patternMove {
    0%   { background-position: 0 0; }
    100% { background-position: 60px 30px; }
}



/* ============================================================
   🅒 VARIABLES — THÈME PAR DÉFAUT = GLASS (inchangé)
   ============================================================ */

:root {
  --first-color: #4D49BF;
  --second-color: #05DBF2;

  --body-color: #DFE9F2;
  --title-color: #1C1C22;
  --text-color: #58576B;

  --body-font: 'Montserrat', sans-serif;
  --normal-font-size: 1rem;

  /* Fond par défaut */
  --bg-body: var(--body-color);
  --bg-body-image: none;

  /* Style des cartes */
  --card-bg: linear-gradient(130deg, rgba(251,251,254,.6), rgba(251,251,254,.2));
  --card-border: 1px solid rgba(255, 255, 255, 0.3);
  --card-radius: 1.5rem;
  --card-shadow: inset 2px 2px 1px rgba(251,251,254,.3),
                 inset -2px -2px 1px rgba(251,251,254,.2),
                 0 4px 20px rgba(0,0,0,0.05);
  --backdrop-filter: blur(10px);

  /* Boutons */
  --btn-bg: linear-gradient(130deg, rgba(251,251,254,.9), rgba(251,251,254,.2));
  --btn-color: var(--title-color);
  --btn-border: none;
  --btn-hover-bg: linear-gradient(130deg, rgba(251,251,254,1), rgba(251,251,254,.4));

  /* Cercles Glass */
  --circle-1-bg: linear-gradient(130deg, rgba(77,73,191,.8), rgba(255,255,255,.2));
  --circle-2-bg: linear-gradient(130deg, rgba(5,219,242,.8), rgba(255,255,255,.2));
}



/* ============================================================
   🅓 THÈME MEMPHIS (inchangé – background original)
   ============================================================ */

body.theme-memphis {
  --body-font: 'Montserrat', sans-serif;
  --bg-body: #8CA38C;
  --title-color: #000;
  --text-color: #2d3436;

  --card-bg: #ffffff;
  --card-border: 4px solid #000;
  --card-radius: 0;
  --card-shadow: 10px 10px 0px #000;
  --backdrop-filter: none;

  /* Boutons Memphis */
  --btn-bg: #FFD700;
  --btn-color: #000;
  --btn-border: 3px solid #000;
  --btn-hover-bg: #FF6B6B;

  /* Motifs ronds animés */
  --circle-1-bg:
      radial-gradient(circle, #000 20%, transparent 20%),
      radial-gradient(circle at 50% 50%, #fff 20%, transparent 20%);
  --circle-2-bg: transparent;
}

/* Motif animé Memphis */
body.theme-memphis::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--circle-1-bg);
  background-size: 60px 60px;
  animation: patternMove 4s linear infinite;
  opacity: 0.15;
  z-index: -2;
}



/* ============================================================
   🅔 THÈME Y2K (NOUVEAU FOND — version clean)
   ============================================================ */

body.theme-y2k {
  --body-font: 'Comic Sans MS', 'Arial Narrow', sans-serif;

  /* Nouveau fond néon propre */
  --bg-body: transparent;
  background: radial-gradient(circle at center,
      #330055, #120030 70%, #000010 100%);

  --title-color: #FF00FF;
  --text-color: #00FF00;

  --card-bg: rgba(0, 0, 100, 0.8);
  --card-border: 4px ridge #FF00FF;
  --card-radius: 0;
  --card-shadow: 6px 6px 0px #00FF00;

  --btn-bg: linear-gradient(to bottom, #FF00FF, #0000FF);
  --btn-color: #FFF;
  --btn-border: 2px outset #FF00FF;
  --btn-hover-bg: linear-gradient(to bottom, #0000FF, #FF00FF);

  /* Annule les motifs Glass */
  --bg-body-image: none;
}

/* Étoiles néon animées */
body.theme-y2k::before {
  content: "";
  position: fixed;
  inset: 0;

  background-image:
      radial-gradient(#ff00ff 1px, transparent 1px),
      radial-gradient(#00ffcc 1px, transparent 1px),
      radial-gradient(#ffffff 2px, transparent 2px);

  background-size: 200px 200px, 150px 150px, 250px 250px;
  mix-blend-mode: screen;
  opacity: .35;
  animation: spinChaos 15s linear infinite;
  z-index: -2;
}



/* ============================================================
   🅕 BASE GLOBALE DU SITE
   ============================================================ */

*, ::before, ::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--bg-body);
  background-image: var(--bg-body-image);
  background-size: 550px 550px, 350px 350px, 250px 250px;

  color: var(--text-color);
  transition: all .5s ease;
  min-height: 100vh;
  overflow-x: hidden;
}



/* ============================================================
   🅖 ARRIÈRE-PLANS GLASS PAR DÉFAUT
   ============================================================ */

body:not(.theme-memphis):not(.theme-y2k)::before,
body:not(.theme-memphis):not(.theme-y2k)::after {
  content: "";
  position: fixed;
  width: 300px;
  height: 300px;
  background: var(--circle-1-bg);
  z-index: -1;
  border-radius: 50%;
  transition: .5s;
}

body:not(.theme-memphis):not(.theme-y2k)::before {
  top: 10%;
  left: -100px;
  animation: float 6s infinite;
}

body:not(.theme-memphis):not(.theme-y2k)::after {
  bottom: 5%;
  right: -100px;
  background: var(--circle-2-bg);
  animation: float 8s infinite reverse;
}



/* ============================================================
   🅗 LAYOUT PRINCIPAL
   ============================================================ */

.layout-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 968px) {
  .layout-container {
    flex-direction: row;
    align-items: flex-start;
    padding-top: 5vh;
  }
}



/* ============================================================
   🅘 STYLE DES CARTES (profil, projets, switcher)
   ============================================================ */

.card-style {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  backdrop-filter: var(--backdrop-filter);
  transition: .3s;
}



/* ============================================================
   🅙 COLONNE PROFIL
   ============================================================ */

.profil-colonne {
  padding: 2.5rem;
  text-align: center;
  flex: 0 0 320px; /* largeur fixe (desktop) */
}

.profil-image {
  width: 120px;
  height: 120px;
  object-fit: cover;
  margin-bottom: 1rem;
  transition: .3s;
}

/* Glass */
body:not(.theme-memphis):not(.theme-y2k) .profil-image {
  border-radius: 50%;
  border: 2px solid #F4F4FB;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Memphis */
body.theme-memphis .profil-image {
  border-radius: 0;
  border: 4px solid #000;
  box-shadow: 6px 6px 0 #000;
}

/* Y2K */
body.theme-y2k .profil-image {
  border-radius: 0;
  border: 4px ridge #FF00FF;
  filter: contrast(1.2) sepia(0.2);
}

.profil-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--title-color);
}

.profil-header .fonction {
  margin-bottom: 0.5rem;
  font-size: .875rem;
}

.contact-details {
  text-align: left;
  margin-top: 0.5rem;
}



/* ============================================================
   🅚 COLONNE PROJETS
   ============================================================ */

.projets-colonne { flex: 1; }

.page-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--title-color);
  font-weight: 900;
  text-transform: uppercase;
}

.project-card {
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
  border-radius: var(--card-radius);
}

.project-content .btn {
  display: block;
  margin: 1rem auto 0 auto;  /* centre horizontalement */
}

.profil-colonne .project-content,
.profil-colonne {
    margin-left: 0 !important;
}



.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.project-card .project-content {
    margin-left: 2vw;
}

@media (min-width: 768px) {
  .project-card {
    flex-direction: row;
    align-items: center;
  }
  .project-card img {
    width: 200px;
    height: 100%;
    min-height: 250px;
  }
}



/* ============================================================
   🅛 BOUTONS
   ============================================================ */

.btn {
  display: inline-block;
  padding: .75rem 1.5rem;
  background: var(--btn-bg);
  color: var(--btn-color);
  border-radius: .5rem;
  font-weight: 600;
  border: var(--btn-border);
  cursor: pointer;
  transition: .3s;
}

.btn:hover {
  background: var(--btn-hover-bg);
  transform: translateY(-3px);
}



/* ============================================================
   🅜 SWITCHER DE STYLE
   ============================================================ */

.style-switcher { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); z-index: 100; padding: 0.8rem 1.2rem; display: flex; align-items: center; gap: 0.4rem; width: max-content; } 
.switcher-title { margin: 0; font-size: 0.7rem; font-weight: 600; color: var(--title-color); }

.switch-btn { background: transparent; border: 2px solid var(--title-color); color: var(--title-color); padding: 0.4rem 0.8rem; border-radius: 0.3rem; cursor: pointer; font-family: var(--body-font); font-size: 0.6rem; font-weight: 700; transition: 0.3s; text-transform: uppercase; } 
.switch-btn:hover { background: var(--title-color); color: var(--bg-body); }

.switch-btn:active {
  background: var(--title-color);
  color: var(--bg-body);
}



/* ============================================================
   🅝 RESPONSIVE MOBILE
   ============================================================ */

@media (max-width: 768px) {

  /* Profil : image gauche / infos droite */
  .profil-colonne {
    padding: 0.8rem !important;
    flex: unset !important;
    height: auto !important;
  }

  .profil-flex {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
  }

  .profil-image {
    width: 140px;
    height: 140px;
    margin-bottom: 0;
  }

  .profil-infos {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .contact-details {
    margin-top: .4rem;
  }

  .profil-header h2 {
    font-size: 1rem;
    margin-bottom: .05rem;
  }
}

/* ============================================================
   MODAL GLOBAL
   ============================================================ */

.modal {
  display: none;                /* caché par défaut */
  position: fixed;
  inset: 0;
  backdrop-filter: blur(6px);   
  background: rgba(0,0,0,0.45); /* fond sombre transparent */
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

/* Contenu du modal */
.modal-content {
  max-width: 520px;
  width: 100%;
  position: relative;
  padding: 1.5rem;
  animation: modalFade .3s ease-out;
}

/* Animation légère */
@keyframes modalFade {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Image dans le modal */
.modal-img {
  width: 100%;
  height: auto;
  border-radius: .5rem;
  margin-bottom: 1rem;
}

/* Titre et texte */
.modal-title {
  margin: 0 0 .5rem;
  font-size: 1.4rem;
  color: var(--title-color);
  font-weight: 900;
}

.modal-text {
  font-size: .95rem;
  line-height: 1.5;
  color: var(--text-color);
}

/* Croix de fermeture */
.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 1.8rem;
  font-weight: bold;
  cursor: pointer;
  color: var(--title-color);
  transition: .2s;
}

.modal-close:hover {
  transform: scale(1.2);
}
