/* style.css */

html, body {
	height: 100%;
	margin: 0;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	/*background: linear-gradient(to bottom right, #102c57, #3b5998);*/ /* Dégradé bleuté */
	color: #1e1e2f;
}

body {
  background: url('paper-texture.jpg') repeat;
  background-size: 150px 150px;
}

.border-wrapper {
	position: relative;
	margin: 5px;
	border: 5px solid #c60000; /* Rouge vif comme la ligne du logo */
	padding: 0;
	min-height: 99vh;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
}

header {
	text-align: center;
	padding: 20px 0 10px;
}

.logo {
	content: url("WILL-DEV_LOGO_CMJN.png");
	max-width: 250px;
	height: auto;
}

.sidebar {
	width: 150px;
	/* background-color: #0f1a3a; */
	color: white;
	padding-top: 20px;
	flex-shrink: 0;
	height: 100%;
	position: fixed;
	top: 260px; /*sous le logo*/
	left: 10px;
	border-radius: 10px;
 }

.tab {
	padding: 12px 18px;
	cursor: pointer;
	background-color: #1a2753;
	transition: all 0.3s ease;
	border-radius: 6px;
	margin: 5px;
	overflow: hidden;
	white-space: nowrap;
	width: 10px;
}

.tab:hover {
	background-color: #243b72;
	width: 150px; 
}

.tab-text {
	display: none;
	margin-left: 10px;
}

.sidebar:hover .tab-text {
	display: inline;
}

.tab.active {
	box-shadow: inset 0 -3px 0 rgba(255,255,255,.6);
	background: linear-gradient(to right, #c60000, #8b0000);
	width: 150px;
}

.sidebar .tab.active .tab-text {
	display: inline;
}

.hidden {
	display: none;
}

.main-content {
	margin-left: 230px; /* espace pour la sidebar */
	padding: 40px;
	flex: 1;
}

.main-content .content {
	padding: 10px 16px;
	background-color: #ffffff;
	color: #1e1e2f;
	border-radius: 0 6px 6px 6px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	margin-bottom: 10px;
	animation: fadeInRight 0.4s ease-in-out;
}

@keyframes fadeInRight {
	from {
		opacity: 0;
		transform: translateX(40px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

.saisie{
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	/*background: linear-gradient(to bottom right, #102c57, #3b5998);*/ /* Dégradé bleuté */
	color: #1e1e2f;
}
textarea#message.saisie {
	height: 200px;
	width: 100%;
}

input#email.saisie,input#name.saisie,input#subject.saisie {
	width: 100%;
	max-width: 300px;
}

.alert { margin-top:12px; padding:10px 14px; border-radius:6px; }
.alert.success { background:#e6ffed; border:1px solid #2ecc71; color:#1b5e20; }
.alert.error   { background:#ffecec; border:1px solid #e74c3c; color:#7f1d1d; }

.main-content {
	flex: 1;
	padding-bottom: 20px;
}

.news-footer {
	background: #f2f2f2;
	padding: 20px;
	border-top: 1px solid #ccc;
}
.news-footer h3 {
	margin-top: 0;
	margin-bottom: 10px;
}
.news-grid {
	display: flex;
	flex-direction: row-reverse;
	gap: 20px;
	flex-wrap: wrap;
}
.news-tile {
	background: white;
	border: 1px solid #ccc;
	padding: 10px;
	margin: 10px;
	flex: 1;
	min-width: 200px;
	box-shadow: 2px 2px 6px rgba(0,0,0,0.1);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}
/* .news-logo { */
  /* width: 100px; */
  /* margin-bottom: 10px; */
/* } */
.news-title {
	font-weight: bold;
	margin-bottom: 8px;
}
.news-description {
	font-size: 0.9em;
	margin-bottom: 10px;
}
.news-link {
	color: #0056b3;
	text-decoration: none;
	font-weight: bold;
	align-self: flex-start;
}
.news-link:hover {
	text-decoration: underline;
}

.news-tile a {
	color: #0056b3;
	text-decoration: none;
}
.news-tile a:hover {
	text-decoration: underline;
}

#tech-news {
	display: flex;	
}

.news-tile {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
}

.news-tile:nth-child(1) {
  animation-delay: 0.1s;
}
.news-tile:nth-child(2) {
  animation-delay: 0.3s;
}
.news-tile:nth-child(3) {
  animation-delay: 0.5s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .sidebar {
    position: static;
    width: 100%;
    display: flex;
    flex-direction: row;
    height: auto;
    top: 0;
    left: 0;
    border-radius: 0;
    padding: 0;
    justify-content: space-around;
    z-index: 50;
    background: #1a2753;
  }
  .sidebar .tab {
    flex: 1;
    width: auto;
    padding: 16px 0;
    margin: 0 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 0;
  }
  .sidebar .tab-text {
    display: none !important;
  }
  .sidebar .tab.active {
    background: linear-gradient(to top, #c60000, #8b0000);
  }
  .main-content {
    margin: 0;
    padding: 16px 2vw 32px 2vw;
  }
  .news-grid {
    flex-direction: column-reverse;
    gap: 10px;
  }
  .news-tile {
    min-width: unset;
    margin: 5px 0;
  }
  header .logo {
    max-width: 80vw;
    margin: 0 auto;
  }
}

#scrollTopBtn {
	font-size: large;
	position: fixed;
	right: 18px;
	bottom: 22px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	font-size: 20px;
	/*line-height: 44px;*/
	text-align: center;
	background: linear-gradient(to right, #3b5998, #102c57);
	color: #fff;
	box-shadow: 0 6px 18px rgba(0,0,0,.15);
	opacity: 0;
	pointer-events: none;
	transform: translateY(12px);
	transition: opacity .25s ease, transform .25s ease, box-shadow .2s ease;
	z-index: 999;
}
#scrollTopBtn.show {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
}
#scrollTopBtn:hover {
	box-shadow: 0 10px 24px rgba(0,0,0,.22);
}
@media (max-width: 800px) {
	#scrollTopBtn { right: 12px; bottom: 16px; }
}

/* ===== Mobile: menu en haut (barre horizontale) ===== */
@media (max-width: 600px) {
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 56px !important;
    background: #1a2753 !important;         /* garde ton bleu de menu */
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-around !important;
    border-radius: 0 !important;
    z-index: 1000 !important;
  }

  /* Le contenu passe sous la barre */
  .main-content {
    margin: 80px 0 0 0 !important;
    padding: 16px !important;
  }

  /* Onglets compacts */
  .sidebar .tab {
    flex: 1 1 auto !important;
    width: auto !important;
    margin: 0 !important;
    border-radius: 0 !important;
    padding: 12px 8px !important;
  }
  .sidebar .tab:hover { width: auto !important; }

  /* Icônes seules pour gagner de la place */
  .sidebar .tab-text { display: none !important; }

  /* État actif en rouge en version horizontale */
  .sidebar .tab.active {
    background: linear-gradient(to top, #c60000, #8b0000) !important;
  }
}


/* Accessibilité: lien d'évitement visible au focus */
.skip-link:focus {
  position: static !important;
  left: auto !important;
  width: auto !important;
  height: auto !important;
  clip: auto !important;
  background: #fff;
  color: #000;
  padding: 8px 12px;
  border: 2px solid #000;
  border-radius: 4px;
}

/* Accessibilité : cacher visuellement sans masquer aux lecteurs d'écran */
.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden; clip: rect(1px,1px,1px,1px);
  white-space: nowrap; border: 0; margin: -1px; padding: 0;
}

/* Focus clavier bien visible (AA) */
:focus-visible {
  outline: 3px solid #c60000;
  outline-offset: 2px;
  border-radius: 4px;
}