/* Font arabic cairo */

@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@200..1000&family=Geist:wght@100..900&display=swap");

.cairo-font {
  font-family: "Cairo", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-variation-settings: "slnt" 0;
}

/* GLOBAL STYLES */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html[lang="ar"] {
  direction: rtl;
  font-size: 50%;
  font-family: "Arial", sans-serif;
}

html {
  font-size: 47%;
  font-family: "Geist", sans-serif;
}

h1 {
  font-size: 2.6rem;
}
li,
button,
label,
input,
p {
  font-size: 2rem;
}
h2 {
  font-size: 2.8rem;
}
h3 {
  font-size: 2.2rem;
  font-weight: normal;
}
h4 {
  font-size: 2rem;
}
h5 {
  color: white;
  font-size: 1.5rem;
}
a {
  color: white;
  text-decoration: none;
}
table {
  width: 90%;
  margin: 20px auto;
  border-collapse: collapse;
  text-align: center;
}

/* div site qui regroupe tout le site */
#site {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  grid-template-areas:
    "header"
    "content-today"
    "content-articles"
    "footer";
  min-height: 100vh;
}
/* *****************
*******
*******
***************** */
/* partie header *********************************************************************************************/
/* *****************
*******
*******
***************** */

.logo {
  width: 10rem;
  height: 7rem;
  object-fit: contain; /* Garde les proportions de l'image */
}

header {
  display: flex;
  flex-direction: column;
  align-content: center;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 3rem;
  background: #2c3e50;
  color: white;
  grid-area: header;
}

nav ul {
  display: flex;
  gap: 5rem;
  list-style: none;
  padding-bottom: 1rem;
  text-align: center;
}

header nav ul li a {
  text-decoration: none;
}
/* *****************
*******
*******
***************** */
/* partie section de content-today **********************************************************************************/
/* *****************
*******
*******
***************** */
#content-today {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: right;
  background: #e0e0e0;
  grid-area: content-today;
}

#conversion-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

#hijri-date {
  padding: 0.5rem;
  font-size: 1rem;
}

button {
  padding: 0.5rem 1rem;
  background-color: #333;
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #575757;
}

#dateSelect {
  display: flex;
  justify-content: space-evenly;
  gap: 1rem;
}

#message {
  color: gray;
  margin-top: 1rem;
}

/* *****************
*******
*******
***************** */
/* Calendrier et Aujourdhui sections */
/* *****************
*******
*******
***************** */
.calendar-day {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
  overflow: hidden;
  width: 100%;
  max-width: 60rem;
  padding: 1rem;
  margin: 0 auto;
}

.date-today {
  width: 100%;
  margin: auto;
  padding: 1.5rem;
}

.date-card.today {
  background: #ffeb3b;
  color: #000;
  font-weight: bold;
}

.month {
  background: #4c6e97;
  color: white;
  padding: 1rem;
  text-align: center;
  border-radius: 1rem 1rem 0 0;
}

/* *****************
*******
*******
***************** */
/* partie section de content-calendar **********************************************************************************/
/* *****************
*******
*******
***************** */
#content-calendar {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: right;
  grid-area: content-calendar;
}

.calendar {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
  overflow: hidden;
  width: 100%;
  max-width: 90rem;
  padding: 1rem;
  margin: 0 auto;
}

.days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #e0e0e0;
  padding: 0.5rem;
  text-align: center;
  font-weight: bold;
  font-size: small;
}

.dates {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  padding: 0.5rem;
}

.date-card {
  background: #e6e6e6;
  border-radius: 0.5rem;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
  font-size: 1.2rem;
}

.date-card:hover {
  transform: translateY(-0.25rem);
}

#gregorian-date-converted,
#hijri-date-converted {
  color: #4c6e97;
  font-weight: bold;
}

/* *****************
*******
*******
***************** */
/* partie section de content-articles **********************************************************************************/
/* *****************
*******
*******
***************** */
#content-articles {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #e0e0e0;
  grid-area: content-articles;
}

.article {
  margin: 1rem;
}
.article-title {
  color: #4c6e97;
  cursor: pointer;
  font-size: 2rem;
  display: inline-flex;
  align-items: center;
  margin: 1rem;
}
.toggle-icon {
  font-size: 2rem;
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
}
input[type="checkbox"] {
  display: none;
}
.article-content {
  display: none;
  margin-top: 0.625rem;
  padding: 0.9375rem;
  border: 1px solid #ddd;
  border-radius: 0.3125rem;
  font-size: 1.25rem; /* Augmente la taille de la police */
  line-height: 1.6; /* Ajoute l'espacement entre les lignes */
  background: #e0e0e0;
}
input[type="checkbox"]:checked + label .toggle-icon {
  transform: rotate(90deg);
}
input[type="checkbox"]:checked + label + .article-content {
  display: block;
}
label {
  cursor: pointer;
}
.area-articles {
  background: #f4f5f9;
  border-radius: 1rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
  overflow: hidden;
  width: 90%;
  max-width: 60rem;
  padding: 1rem;
  margin: 0 auto;
}
/* *****************
*******
*******
***************** */
/* Partie Footer ********************************************************************************************/
/* *****************
*******
*******
***************** */
footer {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: 0.8rem 3rem;
  background-color: #2c3e50;
  text-align: center;
  font-size: 1.4rem;
  grid-area: footer;
}

#footer-country-lang,
#footer-menu {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.social-icon {
  color: #fff;
  font-size: 24px;
  transition: color 0.3s ease;
}

.social-icon:hover {
  color: #1da1f2; /* Couleur pour Twitter */
}

.social-icon:hover:nth-child(2) {
  color: #e1306c; /* Couleur pour Instagram */
}

.social-icon:hover:nth-child(3) {
  color: #ff0000; /* Couleur pour YouTube */
}
/* *****************
*******
*******
***************** */
/* Partie dropdown ********************************************************************************************/
/* *****************
*******
*******
***************** */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  background-color: white;
  color: #2c3e50;
  padding: 0.8rem;
  border: none;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 10rem;
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 1;
  bottom: 100%; /* Fait apparaître le menu vers le haut */
  left: 0; /* Aligne le menu avec le côté gauche du bouton */
}

.dropdown-content a {
  color: black;
  padding: 1rem;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: #ddd;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown:hover .dropbtn {
  background-color: #ddd;
  color: white;
}
/* *****************
*******
*******
***************** *********************************************************************************************/
/* MEDIA QUERIES **********************************************************************************************/
/* *************************************************************************************************************
*******
*******
***************** */
@media screen and (min-width: 992px) {
  html,
  html[lang="ar"] {
    font-size: 62.5%;
  }
  header {
    flex-direction: row;
    justify-content: space-between;
    gap: 0rem;
  }
  nav ul {
    padding-bottom: 0;
  }
  /* ici comence la partie calendrier */
  .calendar-day,
  .area-articles {
    width: 90%;
    max-width: 80rem;
    padding: 2rem;
  }

  .calendar {
    max-width: 100rem;
    padding: 2rem;
  }

  .month {
    padding: 1.5rem;
  }

  .days,
  .dates {
    padding: 1rem;
  }

  .date-card {
    padding: 1.5rem;
    font-size: 1.4rem;
  }
  footer {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 0.8rem 3rem;
    background-color: #2c3e50;
    text-align: center;
    grid-area: footer;
  }
  .dropbtn {
    padding: 1rem;
  }
}
