@font-face {
  font-family: "Caveat";
  src: url("fonts/Caveat-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Caveat";
  src: url("fonts/Caveat-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "Caveat";
  src: url("fonts/Caveat-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: "Caveat";
  src: url("fonts/Caveat-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "Patrick Hand";
  src: url("fonts/PatrickHand-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

:root {
	--ink: #263b67;
    --red: #c94b4b;
    --yellow: #fff2a8;
    --paper: #fffdf4;
    --grid: rgba(99, 153, 205, .23);
 }

* {
    box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	}

body {
	margin: 0;
	color: var(--ink);
	font-family: "Patrick Hand", cursive;
	font-size: 21px;
	line-height: 1.55;
	background-color: #e8e3d6;
	background-image: linear-gradient(rgba(255,255,255,.45), rgba(255,255,255,.45));
    }

    /* Feuille principale */
.page {
  position: relative;
  max-width: 1050px;
  margin: 40px auto;
  padding: 75px 85px 100px;

  background-color: var(--paper);

  background-image:
    linear-gradient(
      to right,
      transparent 0,
      transparent 54px,
      rgba(210, 76, 76, .35) 55px,
      transparent 56px
    ),
    repeating-linear-gradient(
      to bottom,
      var(--grid) 0,
      var(--grid) 1px,
      transparent 1px,
      transparent 28px
    ),
    repeating-linear-gradient(
      to right,
      var(--grid) 0,
      var(--grid) 1px,
      transparent 1px,
      transparent 28px
    );

  background-size:
    100% 100%,
    100% 100%,
    100% 100%;

  box-shadow:
    0 8px 25px rgba(0,0,0,.15),
    0 1px 2px rgba(0,0,0,.1);
}


/* Petite ombre de feuille */
.page::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 35px rgba(70,50,20,.08);
}

.content {
  position: relative;
  z-index: 1;
}

h1, h2, h3 {
  font-family: "Caveat", cursive;
  font-weight: 700;
  line-height: 1.05;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(52px, 8vw, 88px);
  color: var(--red);
  text-align: center;
  transform: rotate(-1.5deg);
}

.subtitle {
  text-align: center;
  font-size: 25px;
  margin-bottom: 60px;
  color: #536789;
}

h2 {
  display: inline-block;
  margin: 55px 0 20px;
  padding: 4px 12px;
  font-size: 40px;
  color: var(--ink);
  background: var(--yellow);
  transform: rotate(-1deg);
  box-shadow: 3px 3px 0 rgba(40,55,80,.12);
}

h3 {
  font-size: 31px;
  margin-bottom: 8px;
}

p {
  margin: 18px 0;
}

.intro {
  font-size: 25px;
  margin-bottom: 35px;
}

/* Citation d'ouverture */
.quote {
  position: relative;
  margin: 25px 10px 45px;
  padding: 25px 30px 25px 45px;
  border-left: 5px solid var(--red);
  font-family: "Caveat", cursive;
  font-size: 31px;
  line-height: 1.3;
  background: rgba(255, 241, 150, .35);
  transform: rotate(.4deg);
}

.quote::before {
  content: "”";
  position: absolute;
  right: 8px;
  bottom: -32px;
  font-family: Georgia, serif;
  font-size: 70px;
  color: var(--red);
}
.quote::after {
  content: "“";
  position: absolute;
  left: 8px;
  top: -12px;
  font-family: Georgia, serif;
  font-size: 70px;
  color: var(--red);
}

/* Encadrés */
.note {
  margin: 30px 0;
  padding: 20px 25px;
  border: 2px solid var(--ink);
  background: rgba(255,255,255,.45);
  box-shadow: 5px 5px 0 rgba(38,59,103,.12);
  transform: rotate(.25deg);
}

.note.yellow {
  background: rgba(255, 242, 168, .65);
  border-color: #b79f32;
}

.note.red {
  border-color: var(--red);
  background: rgba(255, 225, 225, .45);
}

.example {
  margin: 25px 0;
  padding: 15px 25px;
  background: rgba(255,255,255,.7);
  border-left: 4px solid #7896bb;
  font-size: 23px;
}

.example strong {
  color: var(--red);
}

/* Gros futur */
.future {
  margin: 40px 0;
  padding: 30px;
  text-align: center;
  border: 3px dashed var(--red);
  background: rgba(255, 244, 178, .55);
  transform: rotate(-.5deg);
}

.future-title {
  font-family: "Caveat", cursive;
  font-size: clamp(40px, 6vw, 65px);
  font-weight: 700;
  color: var(--red);
  text-shadow: 2px 2px 0 white;
}

.stars {
  letter-spacing: 8px;
  color: #d19b25;
}

/* Tableau des terminaisons */
.grammar {
  overflow-x: auto;
  margin: 30px 0;
}

table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  background: rgba(255,255,255,.7);
  font-size: 22px;
}

th, td {
  border: 2px solid rgba(38,59,103,.5);
  padding: 12px 15px;
  text-align: center;
}

th {
  background: rgba(120, 150, 190, .2);
  font-family: "Caveat", cursive;
  font-size: 27px;
}

/* Comparaison */
.comparison {
  display: flex;
  justify-content: center;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 30px 0;
}

.comparison > div {
  padding: 20px;
  border: 2px solid var(--ink);
  background: rgba(255,255,255,.65);
}

.comparison .old {
  border-color: #777;
}

.comparison .new {
  border-color: var(--red);
  background: rgba(255, 237, 184, .6);
}

.comparison h3 {
  margin-top: 0;
  color: var(--red);
}

/* Faux dessin */
.image-placeholder {
  margin: 35px auto;
  max-width: 700px;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 3px dashed #6e83a5;
  background:
	repeating-linear-gradient(
	  -45deg,
	  rgba(100,130,170,.06),
	  rgba(100,130,170,.06) 10px,
	  transparent 10px,
	  transparent 20px
	);
  color: #687895;
  font-family: "Caveat", cursive;
  font-size: 38px;
  transform: rotate(.4deg);
}

/* Surlignage */
.highlight {
  background:
	linear-gradient(
	  transparent 45%,
	  rgba(255, 226, 79, .75) 45%,
	  rgba(255, 226, 79, .75) 85%,
	  transparent 85%
	);
}

.red {
  color: var(--red);
}

.underline {
  text-decoration: underline;
  text-decoration-style: wavy;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
}

/* Gribouillis */
.scribble {
  font-family: "Caveat", cursive;
  color: var(--red);
  font-size: 28px;
  transform: rotate(-5deg);
  display: inline-block;
  margin-left: 10px;
}

.margin-note {
  position: absolute;
  right: -45px;
  font-family: "Caveat", cursive;
  font-size: 25px;
  color: var(--red);
  transform: rotate(8deg);
}

/* Fin */
.ending {
  margin-top: 70px;
  padding: 35px;
  text-align: center;
  font-family: "Caveat", cursive;
  font-size: 34px;
  border-top: 3px double var(--ink);
  border-bottom: 3px double var(--ink);
}

.signature {
  margin-top: 35px;
  text-align: right;
  font-family: "Caveat", cursive;
  font-size: 29px;
  color: #647594;
}

@media (max-width: 750px) {
  body {
	font-size: 19px;
  }

  .page {
	margin: 0;
	padding: 55px 35px 70px 70px;
	transform: none;
  }

  .quote {
	font-size: 26px;
	padding-left: 35px;
  }

  .comparison {
	grid-template-columns: 1fr;
  }

  h2 {
	font-size: 34px;
  }

  .margin-note {
	display: none;
  }
}

footer { text-align: center; margin-bottom: 25px; }