@tailwind base;
@tailwind components;
@tailwind utilities;

/*Your Custom CSS Goes here*/

@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;600&display=swap');


:root {
    --bg: #111111ec;
    --accentold: rgba(0, 0, 0, 0.801);
    --accent: rgb(244, 170, 130);
    --text: #fff;
    --hover: #222;
    --tl-color: #1f2937;
    --tl-line: #e5e7eb;
    --font-base: Barlow,Barlow Fallback;
    --bg-info: rgb(236, 236, 236);
    --border-info: rgb(182, 182, 182);
    --bg-warning:  #f9f0e0;
    --border-warning: #fffbec;
  }

  .dark {
    --bg: #1a1a1a;
    --text: #e5e5e5;
    --hover: #333;
    --tl-color: #e5e7eb;
    --tl-line: #374151;
    --bg-info: rgb(40, 40, 40);
    --border-info: rgb(80, 80, 80);
    --bg-warning: #3a2f1f;
    --border-warning: #4a3f2f;
  }

.font-base {
  font-family: var(--font-base);
}

h1 {
  @apply font-black text-4xl uppercase tracking-tight drop-shadow-md 
          my-5 sm:text-5xl lg:text-6xl text-center;
  background: linear-gradient(to bottom, rgb(249, 115, 22), rgb(239, 68, 68));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dark h1 {
  background: linear-gradient(to bottom, rgb(251, 146, 60), rgb(252, 165, 165));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 { 
  @apply text-2xl lg:text-4xl font-black tracking-tight drop-shadow-md 
          my-5 sm:text-3xl text-gray-800 dark:text-gray-200; 
}

h3 {
  @apply text-2xl font-bold mb-3 dark:text-gray-200;
}

/* Syntax Highlighting*/

body :not(pre) > code[class*="language-"],
body pre[class*="language-"] {
  @apply bg-gray-800;
}

/* Prévention globale du débordement horizontal */
body {
  overflow-x: hidden;
  max-width: 100vw;
}

.container {
  overflow-x: hidden;
}

.content-div {
  max-width: 95%;
  margin-top: 1.5rem;
  /*padding-left: 1.5rem;
  padding-right: 1.5rem; */
}

.article-img-left {
  float: left;
  margin: 0 1em 1em 0; /* espace autour de l'image */
  max-width: 20%;      /* limite la taille */
}

.article-img-right {
  float: right;
  margin: 0 0 1em 1em;
  max-width: 20%;
}

.header {
  @apply bg-gray-100 dark:bg-gray-800;
}

/* Couleurs pour les jours de la semaine (utilisées dans les tableaux d'entraînement) */
.day-lundi { color: #1f77b4; }
.day-mardi { color: #2ca02c; }
.day-mercredi { color: #ff7f0e; }
.day-jeudi { color: #9467bd; }
.day-vendredi { color: #17becf; }
.day-samedi { color: #d62728; }
.day-dimanche { color: #8c564b; }

.day-lundi strong,
.day-mardi strong,
.day-mercredi strong,
.day-jeudi strong,
.day-vendredi strong,
.day-samedi strong,
.day-dimanche strong {
  font-weight: 700;
}

.about-page {
  min-height:100vh;
  display:flex;
  flex-direction:column
}
.about-v {
  margin-top:auto
}

.contact-form {
  display: flex;
  display: -webkit-flex;
  flex-direction: column;
  max-width: 60ch;
}

.contact-form label.form-label {
  margin-top: .5rem;
}

.about-me-content {
  max-width: 80ch;
  margin: 3rem auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.contact-form input {
  height: 2.75rem;
}
.contact-form input, .contact-form textarea {
  margin: .2rem 0;
  border: 1px solid #d3d3d3;
  padding: .5rem;
  border-radius: .15rem;
  font-size: 16px;
}

.contact-form textarea {
  resize: vertical;
  min-height: 9rem;
}

.contact-form button {
  margin-bottom: 36px;
  background: #1b6ee2;
  background: #1a6bdd;
  padding: 11px 1.35rem;
  border-radius: 3px;
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;
  border: none;
  color: #fff;
  margin-top: 1.35rem;
  max-width: fit-content;
  max-width: -moz-fit-content;
}

.warning {
  background-color: var(--bg-warning);
  border-left: 4px solid var(--border-warning);
  border-radius: .30rem;
  padding: 15px;
  margin: 15px 0;
}

.dark .warning {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: rgb(220, 38, 38);
  color: #fca5a5;
}

.warning::before {
  content: "⚠️ ";
}

.info {
  background-color: var(--bg-info);
  border-left: 4px solid var(--border-info);
  border-radius: .30rem;
  padding: 15px;
  margin: 15px 0;
}

.dark .info {
  background-color: rgba(59, 130, 246, 0.1);
  border-color: rgb(37, 99, 235);
  color: #93c5fd;
}

.info::before {
  content: "ℹ️ ";
}

.contact-box {
  background-color: var(--bg-warning);
  border-left: 4px solid var(--border-warning);
  border-radius: .30rem;
  padding: 20px;
  text-align: center;
  margin: 20px 0;
  border-radius: 2px;
}

.timeline { color: var(--tl-color); }
.timeline h2 { margin: 0 0 0.5rem; }
.timeline h3 { margin: 1.25rem 0 0.5rem; }

.tl { position: relative; margin: 0; padding-left: 6rem; }
.tl::before {
  content: ""; position: absolute; top: 0.5rem; bottom: 0.5rem; left: 1rem;
  width: 2px; background: var(--tl-line);
}
.tl-item { position: relative; display: grid; grid-template-columns: 0.5rem 0.5rem 1fr; align-items: start; gap: 0.75rem; margin: 0.75rem 0; }
.tl-time { justify-self: end; font-weight: 600; color: var(--tl-color); }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid white; box-shadow: 0 0 0 2px var(--accent); }
.tl-content { background: #fff; border: 1px solid var(--tl-line); border-radius: 8px; padding: 0.5rem 0.75rem; }
.tl-content p { margin: 0.25rem 0 0; color: #4b5563; font-size: 0.95rem; }

.dark .tl-dot { border-color: #1f2937; box-shadow: 0 0 0 2px var(--accent); }
.dark .tl-content { background: #1f2937; border-color: #374151; color: #d1d5db; }
.dark .tl-content p { color: #9ca3af; }

@media print {
  .tl-content { box-shadow: none; }
  .tl-dot { box-shadow: none; border-color: #fff; }
}

.bg-derval {
  background:  var(--hover);
}

.location-card {
  padding: 1rem;
  border-radius: 8px;
  background: #f7f7f7;
}

.location-links a {
  display: inline-block;
  margin: .5rem 0;
  padding: .75rem;
  background: #fff;
  border-radius: 6px;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid #ddd;
}

.location-links a:hover {
  background: #eee;
}

footer a {
  text-decoration: underline;
}

footer a:hover {
  color: var(--accent);
}

/* Prévention du débordement horizontal sur mobile pour les tableaux et images */

/* Wrapper automatique des tableaux dans le contenu prose avec scroll horizontal */
.prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* S'assurer que les tableaux ne dépassent pas sur mobile */
@media (max-width: 768px) {
  .prose table {
    font-size: 0.875rem; /* Réduction de la taille de police sur mobile */
  }
  
  .prose th,
  .prose td {
    padding: 0.5rem !important; /* Réduction du padding sur mobile */
    white-space: nowrap; /* Évite le retour à la ligne dans les cellules */
  }
}

/* S'assurer que les images ne débordent jamais */
.prose img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Conteneur principal qui empêche tout débordement */
.max-w-4xl {
  overflow-x: hidden;
}

/* Wrapper de scroll pour les tableaux avec un indicateur visuel */
.prose table {
  margin-bottom: 1.5rem;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
}

/* Indicateur de scroll sur mobile pour les tableaux */
@media (max-width: 768px) {
  .prose table::after {
    content: "← Faites défiler →";
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: #9ca3af;
    padding: 0.5rem;
    background: linear-gradient(to right, transparent, rgba(249, 115, 22, 0.1), transparent);
  }
}