/* css/style.css */

/* =======================================================
   Espace pour la barre fixe et décalage des ancres
   ======================================================= */
   body {
    padding-top: 56px;
  }
  html {
    scroll-padding-top: 56px;
  }
  
  /* =======================================================
     TYPOGRAPHIE RESPONSIVE
     ======================================================= */
  html {
    font-size: clamp(14px, 1.2vw, 18px);
  }
  body {
    line-height: 1.6;
  }
  h1 {
    font-size: clamp(2.5rem, 6vw, 6rem);
    line-height: 1.2;
  }
  h2 {
    font-size: clamp(2rem, 4vw, 4rem);
  }
  h5.card-title {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
  }
  p,
  .lead,
  .card-text {
    font-size: clamp(1rem, 2vw, 1.2rem);
  }
  
  /* =======================================================
     VARIABLES PAR THÈME
     ======================================================= */
  body.light-mode {
    --bg-head:       #ffffff;
    --bg-projects:   #ffffff;
    --bg-contact:    #ffffff;
    --text-color:    #333333;
    --banner-bg:     rgba(255,255,255,0.9);
    --banner-border: rgba(0,0,0,0.1);
    --dropdown-bg:   #ffffff;
    --dropdown-border: #dddddd;
    --dropdown-hover: #f5f5f5;
    --card-bg:       rgba(255,255,255,0.8);
    --card-text:     #555555;
    --card-shadow:   rgba(0,0,0,0.08);
    --btn-bg:        #707070;
    --btn-bg-hover:  #707070;
    --btn-text:      #ffffff;
  }
  body.dark-mode {
    --bg-head:       #222222;
    --bg-projects:   #333333;
    --bg-contact:    #222222;
    --text-color:    #eeeeee;
    --banner-bg:     rgba(0,0,0,0.8);
    --banner-border: rgba(255,255,255,0.2);
    --dropdown-bg:   #333333;
    --dropdown-border: #444444;
    --dropdown-hover: #444444;
    --card-bg:       rgba(40,40,40,0.8);
    --card-text:     #cccccc;
    --card-shadow:   rgba(0,0,0,0.6);
    --btn-bg:        #585858;
    --btn-bg-hover:  #585858;
    --btn-text:      #ffffff;
  }
  
  /* =======================================================
     RESET & BASE
     ======================================================= */
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  html,
  body {
    height: 100%;
    font-family: 'Poppins', Arial, sans-serif;
    background-color: var(--bg-head);
    color: var(--text-color);
    scroll-behavior: smooth;
  }
  a {
    color: #66d9ff;
    transition: color 0.3s;
  }
  a:hover {
    color: #99e6ff;
  }
  
  /* =======================================================
     BARRE DE NAVIGATION & DÉLIMITATION
     ======================================================= */
  .banner {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--banner-bg);
    border-bottom: 1px solid var(--banner-border);
    backdrop-filter: blur(8px);
    z-index: 1100;
  }
  .banner .navbar-brand,
  .banner .nav-link,
  .banner .dropdown-toggle {
    color: var(--text-color) !important;
  }
  
  /* =======================================================
     DROPDOWN (ouverture au survol uniquement)
     ======================================================= */
  .navbar-nav .dropdown:hover > .dropdown-menu {
    display: block !important;
  }
  .nav-link.dropdown-toggle {
    cursor: default;
    user-select: none;
    pointer-events: none;
  }
  .nav-link.dropdown-toggle::after {
    display: none;
  }
  .dropdown-menu {
    background-color: var(--dropdown-bg) !important;
    border: 1px solid var(--dropdown-border) !important;
    margin-top: 0;
  }
  .dropdown-item {
    color: var(--text-color) !important;
  }
  .dropdown-item:hover,
  .dropdown-item:focus {
    background-color: var(--dropdown-hover) !important;
    color: var(--text-color) !important;
  }
  
  /* =======================================================
     SWITCH JOUR/NUIT
     ======================================================= */
  .theme-switch-wrapper {
    position: fixed;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    z-index: 1200;
  }
  .switch-emoji {
    font-size: 1.2rem;
    margin: 0 0.5rem;
  }
  .theme-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
  }
  .theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  .slider {
    position: absolute;
    inset: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 13px;
  }
  .slider:before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
  }
  .theme-switch input:checked + .slider {
    background-color: #888;
  }
  .theme-switch input:checked + .slider:before {
    transform: translateX(24px);
  }
  
  /* =======================================================
     FULLPAGE SCROLLING
     ======================================================= */
  .fullpage-container {
    position: absolute;
    top: 56px;
    bottom: 0;
    width: 100vw;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
  }
  .section {
    scroll-snap-align: start;
    height: calc(100vh - 56px);
  }
  
  /* =======================================================
     SECTIONS
     ======================================================= */
  #presentation {
    background-color: var(--bg-head);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #applications,
  #bots {
    background-color: var(--bg-projects);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
  }
  #contact {
    background-color: var(--bg-contact);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
  }
  
  /* =======================================================
     CARTES PROJETS & BOTS STYLE « APPLE »
     ======================================================= */
  .project-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    box-shadow: 0 4px 16px var(--card-shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  .project-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 8px 24px var(--card-shadow);
  }
  .project-card .card-body {
    padding: 1.5rem;
  }
  .project-card .card-title {
    font-weight: 600;
    font-size: 1.4rem;
    border-bottom: 1px solid var(--dropdown-border);
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
  }
  .project-card .card-text {
    text-align: center;
    color: var(--card-text);
    line-height: 1.5;
    margin-bottom: 1.25rem;
  }
  
  /* luminosité dynamique sur les titres */
  body.light-mode .project-card .card-title {
    filter: brightness(0.9);
  }
  body.dark-mode .project-card .card-title {
    filter: brightness(1.1);
  }
  
  /* =======================================================
     BOUTONS
     ======================================================= */
  .btn-primary {
    background: linear-gradient(135deg, var(--btn-bg) 0%, var(--btn-bg-hover) 100%);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    color: var(--btn-text) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.308);
    transition: background 0.3s ease, box-shadow 0.3s ease;
  }
  .btn-primary:hover {
    background: linear-gradient(135deg, var(--btn-bg-hover) 0%, var(--btn-bg) 100%);
    box-shadow: 0 6px 14px rgba(0,0,0,0.3);
  }
  .btn-hex {
    background-color: var(--btn-hex-bg) !important;
    border-color:     var(--btn-hex-bg) !important;
    color:            var(--btn-hex-color, #fff) !important;
    display: inline-block;
    margin: 0.25rem;
  }
  
  /* =======================================================
     DETAIL HEADER (Titre + Icône)
     ======================================================= */
  .detail-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
  }
  .detail-header .project-logo {
    width: 64px;      /* agrandi de 48px à 64px */
    height: 64px;
    flex-shrink: 0;
    margin-right: 1rem;
  }
  .detail-header .project-logo img {
    width: 100%;
    height: auto;
    display: block;
  }
  .detail-header h1 {
    font-size: clamp(1.8rem, 4vw, 4.8rem);
    margin: 0;
    line-height: 1.2;
    color: var(--text-color);
  }
  