*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: Arial, sans-serif;
    background: url("DSC06770-Enhanced-NR-scaled.jpg");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    color: #1a1a1a;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: #990000;
    color: #ffffff;
    padding: 40px;
    text-align: center;
    position: center;
    top: 0;
    z-index: 1000;
}
header h1 {
    font-size: 2.em;
}

nav.tabs {
    background-color: #1a1a1a;
}

nav.tabs ul {
    list-style: none;
    display:flex;
    justify-content: center;
    flex-wrap: wrap;
}
nav.tabs li {
    margin: 0;
}

nav.tabs a {
    display: block;
    padding: 15px 20px;
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
}

nav.tabs a:hover,
nav.tabs a:focus {
    background-color: #990000;
    outline: none;
}

main {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.95);
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
    border-left: 8px solid #990000;
    border-right: 8px solid #990000;
     border-top: 8px solid #990000;
    border-bottom: 8px solid #990000;
    border-radius: 0;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

section h1{
    text-align: center;
    margin-bottom:30px;
    font-size: 2.8em;
    color:#1a1a1a;
    font-weight: bold;
}
section h1::after {
    content: "";
    display: block;
    width: 360px;
    height: 4px;
    background-color: #000000;
    margin: 10px auto 0 auto;
    border-radius: 4px;
}
section h2{
    text-align: center;
    margin-bottom:30px;
    font-size: 2em;
    color:#990000;
    font-weight: bold;
}

section h2::after {
    content: "";
    display: block;
    width: 120px;
    height: 4px;
    background-color: #000000;
    margin: 10px auto 0 auto;
    border-radius: 2px;
}

#index,
#regles,
#ibjjf,
#adcc,
#tableau{
    text-align: left;
    margin-left: 200px;
    margin-right: 200px;
}

#index p,
#regles p,
#ibjjf p,
#adcc p,
#tableau p {
    max-width: 800px;
    margin: 0 auto 25px auto;
    font-size: 1.4em;
    line-height: 1.4;
}
ul li,
ol li {
    font-size: 1.3em;
    line-height: 1.8;
    margin-bottom: 10px;
}

.gallery{
    display:grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    justify-items: center;
}

.rule-card{
    text-align:center;
    margin-bottom: 40px;
}

.rule-img{
    width: 600px;
    height:600px;
    object-fit: cover;
    object-position: 50% 30%;
    border: 2px solid #990000;
    border-radius: 5px;
    display: block;
    margin:0 auto 15px auto;
}
.rule-video{
    width: 600px;
    height:600px;
    object-fit: cover;
    object-position: center;
    border: 2px solid #990000;
    border-radius: 5px;
    display: block;
    margin:0 auto 15px auto;
}
.rule-video-special-video{
    width: 600px;
    height:600px;
    object-fit: cover;
    object-position: 50% 10%;
    border: 2px solid #990000;
    border-radius: 5px;
    display: block;
    margin:0 auto 15px auto;
}
.rule-card h3{
    color: #333333;
    padding: 8px 15px;
    border-radius: 3px;
    font-size:1.6em;
    font-weight: bold;
}

.rule-desc{
    font-size: 20px;
    color: #333333;
    max-width:500px;
    margin: 0 auto;
    line-height: 1.4;
}

table{
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th,
table td{
    border: 1px solid #1a1a1a;
    padding:10px;
    text-align: left;
    font-family:Arial, sans-serif;
    font-size:18px;
    line-height:1em;
    color:#1a1a1a;
}
table th{
    background-color: #990000;
    color:#ffffff;
    font-weight:bold;
    text-align:center;
}
table tbody tr:hover{
    background-color: #ffe5e5;
}

.biblio {
  font-size: 0.9em;
  color: #000000;
  max-width: 900px;
  margin: 30px auto;
  line-height: 1.5;
  background: #f0f0f0;
}

.biblio-title {
  font-size: 1.6em;
  color: #000000;
  text-align: center;
  margin-bottom: 10px;
  font-weight: bold;
  margin-top: 180px;
  
}

/* Prevent any underline lines from global rules */
.biblio h3::after {
  content: none;
  display: none;
}

footer{
    background-color: #1a1a1a;
    color: #ffffff;
    text-align: center;
    padding:15px;
    border-top:8px solid #990000;
}

@media (max-width: 600px) {
  /* Reduce section margins */
  #index,
  #regles,
  #ibjjf,
  #adcc,
  #tableau,
  #bibliographie {
    margin-left: 10px;
    margin-right: 10px;
  }

  /* Shrink headings */
  section h1 {
    font-size: 1.6em;
  }
  section h2 {
    font-size: 1.2em;
  }

  /* Make navbar stack vertically */
  nav.tabs ul {
    flex-direction: column;
    align-items: center;
  }
  nav.tabs a {
    padding: 12px;
    font-size: 1em;
    width: 100%;
    text-align: center;
  }

  /* Make images and videos responsive */
  .rule-img,
  .rule-video,
  .rule-video-special-video {
    width: 100%;
    height: auto;
  }

  /* Adjust main content padding */
  main {
    padding: 15px;
  }

  /* Bibliography box adapts */
  .biblio {
    max-width: 95%;
    padding: 15px;
    font-size: 0.85em;
  }
}

