/* ================= RESET ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ================= VARIABLES ================= */
:root {
  --jaune: #f7c600;
  --noir: #111;
  --blanc: #fff;
}

/* ================= GLOBAL ================= */
body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--blanc);
  color: var(--noir);
}

/* ================= HEADER ================= */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--noir);
  padding: 20px 40px;
  z-index: 1000;
  transition: all 0.3s ease;
}

.header.scrolled {
  padding: 10px 40px;
  background-color: rgba(17,17,17,0.95);
  box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

.header-container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ================= LOGO ================= */
.logo img {
  height: 60px;
  transition: height 0.3s ease;
}

.header.scrolled .logo img {
  height: 45px;
}

/* ================= NAVIGATION ================= */
.menu {
  list-style: none;
  display: flex;
  gap: 20px;
}

.menu li {
  position: relative;
}

.menu > li > a {
  color: var(--blanc);
  text-decoration: none;
  font-weight: 600;
  padding: 10px 5px;
  display: block;
  transition: color 0.3s;
}

.menu > li > a:hover {
  color: var(--jaune);
}

/* ================= SOUS-MENUS ================= */
.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--noir);
  list-style: none;
  min-width: 180px;
  display: none;
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.submenu li a {
  color: var(--blanc);
  padding: 12px 15px;
  font-size: 14px;
  display: block;
  text-decoration: none;
}

.submenu li a:hover {
  background-color: var(--jaune);
  color: var(--noir);
}

/* affichage desktop */
.dropdown:hover .submenu {
  display: block;
}

/* ================= BURGER ================= */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.burger span {
  width: 25px;
  height: 3px;
  background-color: var(--jaune);
}

/* ================= FORMULAIRE AJOUT ACTU ================= */
form {
  max-width: 700px;
  margin: 140px auto 60px;
  background-color: #fff;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

form input[type="text"],
form textarea,
form input[type="file"],
form input[type="url"] {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
  width: 100%;
}

form textarea {
  resize: vertical;
  min-height: 100px;
}

form button {
  background-color: var(--jaune);
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s;
}

form button:hover {
  background-color: #e0ab00;
}

/* ================= CARTES ACTUALITÉS ================= */
.news-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 20px auto;
  max-width: 900px;
}

.news-card {
  background-color: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  width: 100%;
  transition: transform 0.3s, box-shadow 0.3s;
}

.news-card:hover {
  transform: scale(1.03);
  box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.news-image {
  width: 100%;
  height: 150px;
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

.news-content {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.news-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111;
  word-wrap: break-word;
  white-space: normal;
}

.news-content p {
  font-size: 0.9rem;
  line-height: 1.4;
  color: #555;
  word-wrap: break-word;
  white-space: normal;
}

.news-content a {
  margin-top: auto;
  text-decoration: none;
  font-weight: 600;
  color: var(--jaune);
  transition: color 0.2s;
}

.news-content a:hover {
  color: #111;
}

/* ================= SOCIAL ICONS ================= */
.social-icons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
}

.social-icons a img {
  width: 32px;
  height: 32px;
  transition: transform 0.3s, opacity 0.3s;
}

.social-icons a:hover img {
  transform: scale(1.2);
  opacity: 0.8;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .burger {
    display: flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    background-color: var(--noir);
    flex-direction: column;
    z-index: 1000;
  }

  .nav.active {
    display: flex;
  }

  .menu {
    flex-direction: column;
    gap: 0;
  }

  .menu > li > a {
    padding: 15px 20px;
    border-top: 1px solid #222;
  }

  .submenu {
    position: static;
    display: none;
    flex-direction: column;
    background-color: var(--noir);
  }

  .dropdown.open .submenu {
    display: flex;
  }

  .submenu li a {
    padding: 12px 20px;
  }

  form {
    margin: 160px 20px 40px;
    padding: 20px;
    gap: 12px;
  }

  form input, form textarea, form input[type="url"], form button {
    font-size: 0.95rem;
  }

  .news-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .news-container {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .news-card .news-image {
    height: 140px;
  }

  .news-card .news-content h3 {
    font-size: 1rem;
  }

  .news-card .news-content p {
    font-size: 0.9rem;
  }

  form {
    margin: 160px 15px 40px;
    padding: 15px;
  }
}

@media (max-width: 500px) {
  .header {
    padding: 10px 15px;
  }

  .logo img {
    height: 40px;
  }
}

/* ================= ÉVÉNEMENTS ADMIN ================= */
.event-card {
    border-bottom: 1px solid #ddd;
    padding: 15px 0;
    margin-bottom: 15px;
}

.event-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 6px;
}

.event-card p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.4;
    margin-bottom: 8px;
}

.event-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.event-images img {
    width: 150px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* Bouton supprimer */
.event-card a {
    display: inline-block;
    padding: 5px 10px;
    background-color: #ff4d4f;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Boutons admin uniquement (les deux derniers liens) */
.event-card > a {
    display: inline-block;
    padding: 6px 12px;
    background-color: #ff4d4f;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-right: 8px;
}

.event-card > a:hover {
    background-color: #e60000;
}

.event-card p a {
    background: none;
    padding: 0;
    color: var(--noir);
    text-decoration: underline;
    font-weight: normal;
}

.event-card p a:hover {
    background: none;
    color: var(--noir);
}

/* Liens “normaux” */
.event-card a.lien-normal {
    display: inline;           /* pas de bloc */
    padding: 0;                /* annule le padding */
    background-color: transparent; /* pas de fond rouge */
    color: var(--noir);        
    text-decoration: underline; /* souligné comme un lien normal */
    border-radius: 0;          /* pas de coins arrondis */
    font-size: 1rem;           /* taille normale */
    font-weight: normal;       /* poids normal */
    transition: none;          /* annule la transition bouton */
}

.event-card a:hover {
    background-color: #e60000;
}

.event-card a.lien-normale {
    display: inline;           /* pas de bloc */
    padding: 0;                /* annule le padding */
    background-color: transparent; /* pas de fond rouge */
    color: var(--noir);        
    border-radius: 0;          /* pas de coins arrondis */
    font-size: 1rem;           /* taille normale */
    font-weight: normal;       /* poids normal */
    transition: none;          /* annule la transition bouton */
}


.event-card a.lien-normal:hover {
    color: var(--noir); 
    text-decoration: underline; /* même souligné */
    background-color: transparent; /* pas de fond */
    cursor: auto;          /* curseur normal */
}

.event-card a.lien-normale:hover {
    color: var(--noir); 
    background-color: transparent; /* pas de fond */
    cursor: auto;          /* curseur normal */
}

/* Forcer le retour à la ligne dans les événements existants */
#section-evenement .event-card p {
    white-space: normal;        /* retour à la ligne automatique */
    word-break: break-word;     /* coupe les mots trop longs */
    overflow-wrap: anywhere;    /* coupe même sans espace */
    max-width: 100%;
}


.admin-choix {
    text-align: center;
    margin: 30px 0;
    margin-top: 140px;
    position: relative;
}

.admin-choix button {
    background: #eee;
    color: #333;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 600;
}

.admin-choix button.active {
    background: #f5c400; /* jaune */
    color: #000;
}

.admin-choix button:hover {
    background: #777575;
}

.admin-section {
    display: none;
}

.admin-actions {
  margin-top: 10px;
}

.admin-actions a {
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  margin-right: 10px;
}

.admin-actions a:hover {
  color: #111;
}

.lien-normal {
    color: var(--noir);
    text-decoration: underline;
}

/* Responsive pour petits écrans */
@media (max-width: 600px) {
  .admin-choix button {
    flex: 1 1 100%;         /* chaque bouton prend toute la largeur */
  }
}

/* ================= ADMIN 10 KM ================= */

.admin-section h2 {
  margin: 30px 0 15px;
  font-size: 1.4rem;
  font-weight: 700;
}

.event-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.event-card h3 {
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.event-card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 10px 0 6px;
  color: #333;
}

/* ===== Liens résultats ===== */
.event-card .resultats {
  margin-top: 10px;
  padding: 10px 12px;
  background: #f7f7f7;
  border-radius: 8px;
}

.event-card .resultats a {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--noir);
  text-decoration: underline;
  font-weight: 500;
}

/* ===== Images ===== */
.event-card .images,
.event-card .images-parcours {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.event-card .images img,
.event-card .images-parcours img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #ccc;
}

/* ===== Partenaires ===== */
.event-card .partenaires {
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.event-card .partenaires p {
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.event-card .partenaires img {
  margin-top: 5px;
  width: 100px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

/* ===== Actions admin ===== */
.event-card .admin-actions {
  margin-top: 15px;
}

.event-card .admin-actions a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

.event-card .admin-actions a:first-child {
  background: #f7c600;
  color: #111;
}

.event-card .admin-actions a:last-child {
  background: #ff4d4f;
  color: #fff;
}

.event-card .admin-actions a:hover {
  opacity: 0.85;
}