/* 
 * Mots casés - Button and UI Styles
 * Modern, responsive design with improved accessibility
 */

/* Base styles and custom properties */
:root {
	--primary-color: #3EACBA;
	--primary-dark: #338A94;
	--primary-hover: #48C6D4;
	--secondary-color: #D25068;
	--secondary-dark: #AD4257;
	--secondary-hover: #F66C7B;
	--accent-color: #BAAC3E;
	--accent-hover: #D4C648;
	--success-color: #2b7c26; 
	--success-hover: #7dd448;
	--bg-color: #eed391;
	--text-color: #333;
	--text-light: #FFF;
	--border-radius: 5px;
	--box-shadow-standard: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 
						   0 -1px 0 rgba(255, 255, 255, 0.1) inset, 
						   0 4px 0 var(--primary-dark), 
						   0 4px 2px rgba(0, 0, 0, 0.5);
	--transition-speed: 0.3s;
  }
  
  /* Typography */
  body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, 
				 Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
	color: var(--text-color);
	line-height: 1.6;
	font-size: 16px;
  }
  
  h1, h2, h3, 
  .push_button {
	font-family: 'Oswald', Helvetica, sans-serif;
	font-weight: 500;
  }
  
  /* Layout */
  html, 
  body {
	height: 100%;
	margin: 0;
	padding: 0;
	overflow-x: hidden;
  }
  
  body {
	background-color: var(--bg-color);
	background-image: url("/motscases/static/images/background.png"), 
					  url("/motscases/static/images/background2.png");
	background-size: 100%, contain;
	background-repeat: no-repeat, repeat;
	background-position: bottom, top;
	display: flex;
	flex-direction: column;
  }
  
  .container {
	padding: 2rem 1rem;
	max-width: 1200px;
	flex: 1 0 auto;
  }
  
  /* Button styles with accessibility improvements */
  .push_button {
	position: relative;
	width: 100%;
	text-align: center;
	color: var(--text-light);
	text-decoration: none;
	line-height: 1.2;
	font-size: 1.25rem;
	display: inline-block;
	margin: 10px 0;
	border: none;
	cursor: pointer;
	transition: all var(--transition-speed) ease;
	padding: 0.75rem 1rem;
	border-radius: var(--border-radius);
	overflow: hidden;
  }
  
  .push_button:hover,
  .push_button:focus {
	text-decoration: none;
	color: var(--text-light);
	transform: translateY(-2px);
	outline: none;
  }
  
  .push_button:focus-visible {
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.7), 
				0 0 0 5px var(--primary-dark);
  }
  
  .push_button:before {
	border-radius: var(--border-radius);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) inset, 0 1px 0 #FFF;
	position: absolute;
	content: "";
	left: -6px;
	right: -6px;
	top: -6px;
	bottom: -10px;
	z-index: -1;
	transition: all var(--transition-speed) ease;
  }
  
  .push_button:active {
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 
				0 -1px 0 rgba(255, 255, 255, 0.1) inset;
	top: 5px;
  }
  
  .push_button:active:before {
	top: -11px;
	bottom: -5px;
	content: "";
  }
  
  /* Button colors */
  .red {
	text-shadow: -1px -1px 0 var(--secondary-dark);
	background: var(--secondary-color);
	border: 1px solid var(--secondary-color);
	background-image: linear-gradient(to bottom, var(--secondary-hover), var(--secondary-color));
	border-radius: var(--border-radius);
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 
				0 -1px 0 rgba(255, 255, 255, 0.1) inset, 
				0 4px 0 var(--secondary-dark), 
				0 4px 2px rgba(0, 0, 0, 0.5);
  }
  
  .red:hover,
  .red:focus {
	background: var(--secondary-hover);
	background-image: linear-gradient(to bottom, var(--secondary-color), var(--secondary-hover));
  }
  
  .blue {
	text-shadow: -1px -1px 0 var(--primary-dark);
	background: var(--primary-color);
	border: 1px solid var(--primary-color);
	background-image: linear-gradient(to bottom, var(--primary-hover), var(--primary-color));
	border-radius: var(--border-radius);
	box-shadow: var(--box-shadow-standard);
  }
  
  .blue:hover,
  .blue:focus {
	background: var(--primary-hover);
	background-image: linear-gradient(to bottom, var(--success-hover), var(--primary-hover));
  }
  
  .green {
	text-shadow: -1px -1px 0 var(--success-color);
	background: var(--accent-color);
	border: 1px solid var(--primary-color);
	background-image: linear-gradient(to bottom, var(--success-color), var(--accent-color));
	border-radius: var(--border-radius);
	box-shadow: var(--box-shadow-standard);
  }
  
  .green:hover,
  .green:focus {
	background: var(--accent-hover);
	background-image: linear-gradient(to bottom, var(--primary-color), var(--accent-hover));
  }
  
  /* Game button image alignment */
  .game-button img {
	margin-left: 8px;
	vertical-align: middle;
  }
  
  /* Chat/messaging styles */
  .chat-messages {
	max-height: 85vh;
	min-height: 400px;
	overflow-y: auto;
	padding: 0.5rem;
	background-color: #f8f9fa;
	border-radius: var(--border-radius);
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  }
  
  #messages {
	list-style-type: none;
	margin: 0;
	padding: 0;
  }
  
  #messages li {
	padding: 10px;
	border-bottom: 1px solid #eee;
	font-size: 1rem;
	display: flex;
	align-items: baseline;
  }
  
  #messages li:last-child {
	border-bottom: none;
  }
  
  #messages li:nth-child(odd) {
	background: #f2f2f2;
  }
  
  .message-time {
	font-style: italic;
	color: #777;
	font-size: 0.9em;
	margin-right: 8px;
	flex-shrink: 0;
  }
  
  .message-content {
	word-break: break-word;
  }
  
  .info-text {
	font-size: 0.9rem;
	color: #666;
	min-height: 1.5rem;
  }
  
  /* Chat input container */
  .chat-input-container {
	background: #f1f1f1;
	padding: 12px;
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
	z-index: 100;
  }
  
  #form_sender {
	max-width: 1200px;
	margin: 0 auto;
  }
  
  #input_sender {
	flex: 1;
	padding: 0.75rem;
	border: 1px solid #ddd;
	border-radius: var(--border-radius);
	transition: border-color var(--transition-speed) ease, 
				box-shadow var(--transition-speed) ease;
  }
  
  #input_sender:focus {
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px rgba(62, 172, 186, 0.25);
	outline: none;
  }
  
  #button_sender {
	padding: 0.75rem 1.5rem;
	background-color: var(--primary-color);
	color: white;
	font-weight: 500;
	border: none;
	border-radius: var(--border-radius);
	transition: background-color var(--transition-speed) ease;
  }
  
  #button_sender:hover,
  #button_sender:focus {
	background-color: var(--primary-hover);
  }
  
  /* Make space for fixed chat input */
  body {
	padding-bottom: 100px;
  }
  
  /* Featured button styles */
  .featured-button {
    transform: scale(1.05);
    font-size: 1.3em;
    padding: 1rem 1.5rem;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 
                0 -1px 0 rgba(255, 255, 255, 0.1) inset, 
                0 6px 0 var(--success-color), 
                0 6px 3px rgba(0, 0, 0, 0.5);
  }
  
  .featured-button:hover,
  .featured-button:focus {
    transform: translateY(-4px) scale(1.05);
  }
  
  .featured-container {
    margin-bottom: 2rem;
  }
  
  .secondary-buttons {
    opacity: 0.9;
  }
  
  /* Responsive adjustments */
  @media (max-width: 576px) {
	:root {
	  font-size: 14px;
	}
	
	.container {
	  padding: 1rem 0.5rem;
	}
	
	.push_button {
	  font-size: 1.1rem;
	  padding: 0.6rem 0.75rem;
	}
	
	.chat-input-container {
	  padding: 8px;
	}
	
	#input_sender,
	#button_sender {
	  padding: 0.5rem;
	}
	
	#button_sender {
	  min-width: 80px;
	}
	
	body {
	  padding-bottom: 60px;
	}
	
	.chat-messages {
      min-height: 300px;
    }
    
    .featured-button {
      margin-bottom: 0.5rem;
    }
  }
  
  @media (min-width: 992px) {
	.push_button {
	  font-size: 1.5rem;
	}
  }